RobynsVeil opened this issue on Dec 03, 2010 ยท 409 posts
johnpf posted Sun, 05 December 2010 at 5:15 PM
Heh! Two days of nothing but cloth simulations, and I've finally worked something out. Well... I've worked a few things out (mainly how not to do things), but I've come to the conclusion that the most influential parameter (so far) is the Cloth Density value in section 4 "Dynamics Controls".
At first, I assumed (incorrectly, it turns out) that this would somehow affect how the cloth bends and folds. After all, something that's incredibly dense will fold less easily than something that's a lot less dense. How wrong I was! Instead, the reverse sometimes happens from what you'd expect with a 'dense' (using my incorrect definition) cloth.
What I noticed was that if the fabric has a very low c.d. (0.01 or thereabouts) it will float. Not actually floating in the air, but it will be only slightly affected by gravity and it won't bend much due only to gravity. A collision mesh pushing on 0.01 fabric will bend it, but left to its own devices and only having gravity exert any force on it, 0.01 fabric doesn't want to bend very much. Now, at first, this was strange. Something that's not dense at all should fold instantly! Imagine the density of tissue paper... it barely keeps its shape if you suspend it and let gravity drag it down. And the opposite was true, too... a high c.d. of 0.3 or higher made the fabric bend due to gravity almost instantly. Huh? It's dense! Cardboard and wood and cement, they're dense, and they don't bend from gravity much!
Of course, if you dissociate the idea that the cloth is actually 'dense' in the real world sense and, instead, imagine that density here refers to the mass of the fabric it all makes more sense. Even though gravity affects all mass in the same way (cf. hammers and feathers being dropped on the moon!), the density here refers to what I'm going to call the bendy-resistance strength of the material. Tissue paper (or a fabric at c.d. 0.01) will bend due to gravity much less than a plank of wood (of c.d. something huge), if wood could bend in the way that fabrics do. This is because tissue paper has a lower bendy-resistance stength. Gravity will make it want to bend less than the higher c.d. fabrics with their much higher bendy-resistance strength.
What does this mean for simulations? Well, if you have a floaty garment, try increasing the Cloth Density. It should start to drape in a way that makes it point much straighter to the ground.
Even more important is what I've discovered about high Cloth Density values. A high c.d. will actually over-ride your collision settings. That fabric really wants to be affected by the downward pull of gravity, and nothing's going to get in its way! Which explains my original picture with the skirt sinking through the figure's thighs. The c.d. was too high, and once the simulation had reached a certain point (I'm not sure why or what that point is... further testing is needed), it will start to plough its way through anything, even the things that prior to that tipping point it was happily colliding with.