Sintel, the Durian Open Movie Project » Blog Archive » Cloth Simulation

    

Cloth Simulation

on November 17th, 2009, by nathan

For the past week or so I’ve been doing tests with the cloth simulation in Blender. Nothing too fancy, but just trying to shake out the most obvious issues before we try to use it directly in production.

The basic cloth simulation–how the cloth moves–already works quite well:

Cloth Test 01 from Project Durian on Vimeo.

Cloth Test 04 from Project Durian on Vimeo.

Cloth Test 05 from Project Durian on Vimeo.

Video 01 shows a simple test on a character (never mind the crap animation). Videos 04 and 05 show my attempts at tweaking the cloth sim to look “silky” and “leathery”, respectively. My tweaking could definitely use some work, but it illustrates well the range Blender’s cloth sim can achieve. Definitely good enough for production use.

Where I’m running into some troubles is with collision detection. By-and-large it works well:

Cloth Test 03 from Project Durian on Vimeo.

But especially once cloth needs to stretch to avoid intersecting geometry, it starts having issues. For example, in this video where I gave the model a much more constricting skirt:

Cloth Test 02 from Project Durian on Vimeo.

(Note that collision is only turned on for the legs, not the feet or hips. So collision failures on the hips and feet are, of course, expected.)

Other things that need work is allowing cloth simulation to work with linked cloth meshes (for example, cloth sim on linked character rigs), and nicely resolving forced intersections (like cloth pinched between an elbow) which will occur in normal character animation.

Over all, though, cloth sim is looking really promising, and I’m confident we can get it working well and ready for production.

Many thanks to Daniel Genrich for all of his hard work on the cloth sim!

–Nathan

33 Responses to “Cloth Simulation”

  1. ijstaart Says:

    Nice to see something different than the usual cloth on a cube-test 🙂

  2. Lasse R. Bruntse Says:

    Looks pretty good. Am i right, when thinking that the second and third testmovie-objects are moved with a mouse and the cloth sim is from the realtime-function, and then baked afterwards?

  3. Month3d Says:

    Oeh blender has so many goodies I still need to discover and explore, cloth sim being one of them.

    I really like the consistent blogging, it’s cool to see what ya guys are doing 🙂 so another 2 thumbs up from me 🙂

  4. Denny Lindberg Says:

    With the new version of Blender (2.5), all these new features and this projects has got me interested in trying out Blender again! Thanks for such inspiring updates fellas, it’s really appreciated. 🙂

  5. Wahooney Says:

    I’m still holding out for a cloth stitching system, where panels of cloth are sewn together to make actual garments, with Delaunay subdivision for irregular folds.

  6. Linkeltje Says:

    Looks good! I imagine things might get more complicated when the dress gets more detail, folds and tension.
    I’m very exited to see what you will come up with. I think it’s great to see the development of the movie in so much detail.

  7. kram1032 Says:

    Oh, nice 🙂
    So, when collision is only activated for the legs, what’s the failure in test 2? I don’t really see any errors, except for where the hips show through, which, as you said, is expected….

    can’t wait to see Sintel’s cloths 😀

  8. Riboshom Says:

    As I see it, the silky garments looks perfect.
    The leather looks too much like rubber.
    For the movie, leather should be more of hard, undeformable plates.

    And I wonder how can the clothes get glichy, whit this being rendered frame by frame… I mean, when a peice of garmennt is starting to cross over something else, the computer should retest the collision map in low-poly and then rerender the frame according to these settings!

    Since I guess that this is probably the way Blender does it, I don’t see how can it go wrong!

  9. Snapai Says:

    Pixar published a nice paper on untangling cloth, barticularly when caught between intersecting geometry, during their Monsters Inc production. http://graphics.pixar.com/library/UntanglingCloth/paper.pdf – maybe it will help? The math involved doesn’t look much more complicated than that for a flood fill. 🙂

  10. D Says:

    It looks nice so far. I wonder if the leather looks a bit like rubber because it keeps its shape a little too elastically?

  11. Nixon Says:

    the sim really looks fine i bet with some tweaking even the leather will look convincing…
    the silk and (i assume) cotton ones really look lifelike!
    the leather seems to lightweight and thin and not stiff enough to imitate leather completely,
    however leather skirts in such a design are rather uncommon (just my guess) so it seems a bit odd. maybe a brownish or black color with less spec can help to find the correct settings while tweaking the sim for the desired effect..
    anyway gotta love the vid where the skirt flips over the mockup model 😀
    best regards and lots of fun for the team!o!

  12. Domy_Graphy Says:

    mmmm…. the cloth simulation in blender is funny
    i think it was the nice tool , when Stability further in future

  13. ccherrett Says:

    create a vertex group in the collision areas on the underlying mesh and set it’s material to full full transparent. It is a hack but works.

  14. eye208 Says:

    Looking good!

    Is the skirt mesh a part of the body object (using self-collision with all the body vertices pinned), or is it a separate object with the body as a parent?

  15. grafixsuz Says:

    @kram1032 : The cloth appears to go straight through her right leg if you look closely, then it hangs on the other side. I think that is what he is talking about.

    Great work by the way, I am interested in getting some stitching going as well. I am right now doing a character for the Emperors new clothes, using Softimage (don’t hate me…it’s a job) and I doing a cloth simulation at this very moment using syflex, while it’s good it doesn’t seem to offer too much difference in the way of results from the ones you just showed, I say this cloth simulator is very close to being production ready. Just needs a few extra options as noted above and better leather, skin, flesh… capabilities and there you go.

    Love the updates guys!

  16. irve Says:

    I’d like to suggest taking a real cloth and filming it under similar conditions. Perhaps you need to add air-drag and some turbulent vortices, perhaps need to tweak the material or algorithm.

    The “falloff” for rippling seems especially wrong — it should be dampened by still air (but I’m not sure that it’s the cause for otherwise nice tests to seem strange).

  17. maroLui Says:

    Yeah, leather is always more difficult to simulate, although those settings are not too bad, it just seems to move and shake a bit more than leather, but looks pretty fine.

    Are there plans to make somethings like the Skinwrap modifier from max to make detailed pieces of cloth being driven by simplified versions?

    Is a great technique, makes it easier to set up the cloth, brings smoother collisions with less penetrations, and simulates faster thanks to the simplified cloth meshes.

  18. Aritz Says:

    Yes, SKinwrap is one of the best modifiers in max, and very usefull for clothing, and many other applications.

  19. mcreamsurfer Says:

    Hello Nathan,

    I posted this link before (maybe way too early) but I still believe it could just be useful since most of the tipps come from real professionals who deal with this stuff on a (let’s say) daily basis. I mean, most stuff is just common sense but a few things might just help to speed up the thinking how i could do it process up. I’ve experimented a lot with cloth and it’s sooo cool. So, here’s the link: http://www.3dworldmag.com/page/3dworld?entry=40_clothing_simulation_tips
    no more talking, hope it helps and bye bye

  20. maroLui Says:

    I’m also glad that you’re posting “obstacles” you find in the road. Is very useful to see what obstacles one could find in a production like this, and later, how those are solved or worked around.

  21. MeshWeaver Says:

    Hey, it’s Simple Biped! 😀 cool 😀

    the simulations look cool 😀 reminds me of the Attack of the Clones bonuses, where they show how they made the digital characters… Yoda’s cloak was an issue, like how it should react, and a few glitches 😉

    the animation isn’t crappy, Nathan 😀 it’s basic, yes, but it gets the test done 😀
    in fact, it’s better than the very few animations i’ve done. 😉

  22. Todd McCullough Says:

    Something that sprung to mind when I watched the videos –

    Maybe the animator needs to consider the materials that the character is wearing when creating movement for the character.

    Cloth test 2 shows how a more constricting design has trouble detecting the mesh, yet the character wouldn’t be able to do those movements wearing something as tight as that without tearing the cloth apart at the seams. They also wouldn’t be able to do those movements wearing tight leather clothing.

    So you guys may want to consult Crouching Tiger Hidden Dragon or other kung fu movies for costume designs. Loose flowing clothing is better suited to Wushu acrobatic movements.

  23. Create3D Says:

    I was wondering, does the Blender cloth simulation engine take into account the affect of the drag of air around cloth?

  24. Alaa El-din Says:

    I think adding one or two more subdivisions to the cloth mesh will give better results.
    adding subdivision doesn’t necessary increase simulation time “a lot”, and I think it helps in solving collision troubles and vertices vibration issues.

    can you show us the wire of the mesh please?

    sorry about bad english

  25. The Raven King Says:

    I really enjoy reading all of the stuff you guys are doing.
    The constant updates are really awesome.

    It would be REALLY GREAT if you could show us a wire mesh, as it would help us in understanding the simulation.

  26. The Raven King Says:

    I have started a website about blender animation if anyone wants to check it out. It’s http://www.quantumworks.weebly.com

  27. kram1032 Says:

    @grafixsuz:
    Ah, yeah. Now I see it, thanks 🙂
    Dunno why I didn’t notice that before^^

  28. Pedro Sacramento Says:

    I would change the file extensions form OGV to OMG. Amazing work!

  29. Kirado Says:

    @nathan: Thanks for posting OGV’s! 😉

  30. The Raven King Says:

    How did you guys set the mesh deform? The way you animated the physics is incredible.

  31. toontje Says:

    Having followed the cloth development, if memory serves me well, Gensher used those Pixar paper as well as the latest Siggraph at that time. That’s I found it strange to read a post from Ton asking Genscher if he could look into improving the cloth sim by using those very same Pixar and Siggraph papers he used.

    I think the cloth sim is already state of the art, but it is just that: a cloth SIMULATION. I guess that a that it is customary to do a lot a manual tweaking in these situation, which the cloth sim is also build for.

    @ Create3D: yes the sim has air drag and it reacts to wind too.

    as far as I know, Genscher used these papers:
    Stable but responsive cloth – http://portal.acm.org/citation.cfm?id=566624
    Untangling Cloth – http://www.pixar.com/companyinfo/research/deb/

  32. brecht Says:

    toontje, the untangling cloth paper or anything similar is not implemented in Blender. I think the cloth simulation is very good, but improved collision handling to deal with real world production problems can save a lot of manual tweaking. See also:
    http://graphics.stanford.edu/papers/cloth-sig02/

  33. Jason LaDere Says:

    I find that most cloth simulation tests only deal with a single piece of cloth and are testing collision with a body. However, in production, there would normally be multiple layers of cloth and interaction between layers as well as with a body.
    Here are some of my results and tips for simulation with layers of cloth in blender:
    http://www.dooglamoo.com/software/blender/86-blenderlayeredclothtips
    I am only a beginner with Blender cloth simulation so I am not sure if my tips will be helpful but I hope so.

    Jason LaDere
    Dooglamoo Studios