Cloth simulator improvements

Thanks for the response! I did originally have the belts as the same object as the skirt, and that worked fine with self collision. However I couldn’t make it work with surface deform. I have a higher detail belt object that needs to be controlled by it’s sim mesh. But surface deform could not differentiate the belt from the skirt enough, so some verts of the detail mesh would follow the skirt, and some the belt. Surface deform could really use a way to limit it to a vertex group of the target object or something!

Do you know of any work around for this?

Strongly agreeing with File_xor on this one. All of these suggestions should be done.

While earnestly trying to use the new 2.8 simulator for a very simple task – as I previously commented on this forum – I suddenly experienced “explosions” when the mesh passed a seemingly-arbitrary point of density. The deflections of the vertices became absolutely nonsensical (varying very-extremely from one vertex to its neighbors). The problem stopped cold when “self-collision” was turned off (which also made the simulation useless for me, but pointed to the root-cause problem). We basically need more control of the process, and maybe a little bit more forgiveness. Maybe the algorithm should somehow “clamp” how much deflection it thinks that it should apply to a particular vertex during a cycle, because it sure looks like some kind of feedback-loop developed and the simulation “ran away” into noise.

The great part about Marvellous Designer was that it could fix intersecting mesh by forcing it out.
I remember having immense trouble with Blender because the intersecting mesh wouldn’t fix itself and it’d just go crazy and remain stuck or get worse.

Is this improved yet?

@File_xor, @sundialsvc4, regarding skipping neighbouring vertices, that is already done for directly neighbouring polygons. The issue is that when the self collision distance is greater than the size of some polygons, collisions will happen between polygons near each other, even if they are not neighbouring. Simply arbitrarily ignoring “some amount” of neighbouring polygons is not a solution here. The way to fix this would be to either ignore polygons closer than the collision distance through the mesh, or ideally, to clamp the collision distance between polygons, based on their distance through the mesh. This really adds significant complexity to the code, and depending on the way it is implemented, could also result in a significant performance penalty. I do plan to look into this eventually, but it really isn’t as simple as it seems. For now, just reduce the self collision distance manually.

I see the point of having multiple weights affecting a single property, but how do you see this being implemented from a UI perspective?

Cache step isn’t there, because cloth looks terrible when interpolated. Even for particles, this feature’s usefulness can be debatable, though there I can see a point for it in some situations.

@sundialsvc4, disabling self collisions is a good test, to check if that is where the issue stems from, however, once you have defined that it is indeed the problem, just try to enable it again, and reduce the self collision distance. Have you tried that? The mesh density where it explodes is not arbitrary at all, it is simply the point where your polygons are smaller than the self collision distance.

@rombout, indeed I forgot to add the new properties to the presets. Thanks to you and Philipp Oeser for fixing that!

@Ascalon, indeed that is a problem with surface deform. It could be nice to limit binds with vertex groups. This would also be fixed by my plan to implement UV space based binding. Though I don’t know when I’ll have time to look into improving surface deform. Currently I don’t know of a way to deal with this, unfortunately.

@SPYNeox, yes, this is fixed. A new option has been added to the collider settings, called “Single Sided” (enabled by default), which makes the collisions aware of normals, and pushes intersecting geometry out.

6 Likes

Sorry for a naive question from someone who hasn’t been following cloth all that closely.

On the rare occasions when I trade my dev hat for an artist hat, making stills, I find myself somewhat stuck at how to make realistic folds in curtains, sleeves, bedspreads, etc. I know that one way to do this is to set up a cloth simulation and hope that the result is pleasing. Have people ever talked about an “interactive modeling” workflow, where you could grab and pull on a vertex and the cloth would deform realistically in response?

yes, such an interactive modeling mode would be great. i have spent/wasted many hours letting bed sheets fall on to a bed until i got the results i tried to achieve. :slight_smile:

Have people ever talked about an “interactive modeling” workflow, where you could grab and pull on a vertex and the cloth would deform realistically in response?

There is addon CLoth that allow grabbing and pulling vertices with simulation
https://i.imgur.com/EmvrQ7F.gifv

3 Likes

UPDATE: It was a hidden object that still had collision enabled, nevermmind!

Okay, I’m finally trying this out in 2.8 instead of the 2.79 build, and I’m getting nowhere. I’m trying to sim this pleated skirt, and no matter what sorts of settings I use, it just get jittery stuff. I’ve tried different levels of stiffness, damping, collision distance, etc. Even with self collision off, it just jitters itself to death. (It’s not any worse with self collision on, but not any better either of course.)

Any ideas what settings would contribute to this? This is a different pleated skirt than the one that I previously simmed in 2.79, but it’s actually a better mesh than that one so I didn’t expect to have issues.

I don’t have specific settings to share because it’s basically been the same no matter what settings I use. Having 50 tension vs 5 doesn’t make any difference I can really notice. Same with 50 damping vs 1.

1 Like

Combined Cloth and Armature modifiers for creating wobling tentecle:
Tentacle_curious.7z (60.6 KB)

Thanks to “use deformed mesh” option.

2 Likes

I’m happy to report that 2.8 cloth is still working extremely well for me. Here’s a couple of my test poses from my current project:

The shirt and tie use a detail mesh surface deformed to a sim mesh. The skirt and sleeves don’t need that because they don’t have surface detail beyond modifiers that can go after the cloth sim. The skirt is the most complex, as it has two layers and self collision. The other items have 20 quality steps, but the skirt needs ~40 and higher amounts of collision steps to not have the lower layer clip itself on some of the pleats.

But while the cloth sim has been working very well, I’m running into trouble with the workflow due to Surface Deform. Sometimes it behaves just fine, even with complex meshes that are far above or below the surface of the sim mesh. But other times it gives me spikey vertices upon binding, even for meshes that are nearly exactly duplicates of the sim mesh. I haven’t been able to nail down what causes these glitches, but its driving me nuts! @Luca_Rood do you have any insight on what causes it or how to avoid it?

3 Likes

Have any one seen this omg…

4 Likes

These improvements to cloth are really impressive.

I’m very interested in experimenting with dynamic-mesh as a fitting tool… It looks practical to create a “pre-fit” shape key that places clothing into a generously non-colliding state, then animate away the pre-fit to place the fabric in it’s fitted shape. Compared to sewing springs, this has the advantage of controlling the fabric angular bending stiffness at all points … where sewing springs lose this information at the spring junction. Casual tests look promising.


I would still like to see some kind of fix to sewing-edges to eliminate the distracting gaps that remain after sewing… especially when the fabric remains under tension. You can see these in the video kakachiex2 posted.

For a naive look at the problem, see…


I still have trouble with the friction model, as even at the max 80 friction, fabric slides ever so slowly. I think the friction model needs some kind of “stiction” – a force required to break a stationary contact once it’s established.

You can see an example here… Both cones have max friction, and shrinking the fabric causes it to slowly “walk” up the cylinders… where in the real world, stiction would make the cloth stay put.

1 Like

Hi Luca

I was wondering if there’s any documentation for Impulse Clamping anywhere? I’ve been trying to use it to avoid jitters in the cloth in tight collision areas but have failed to use the setting in any meaningful manner. I even tried to use it with a very simple cloth setup but to no avail. It would be immensely helpful if these settings could be explained more elaborately!!

Also just wanted to thank you for all the suggestions you gave us at Tangent Animation last year!

Thank you
Angad

1 Like

Just a general tip about cloth dynamics. May or may not help you. But sometimes when you turn on a feature it requires a more accurate calculation. So that you might have to turn up your samples. (Quality: Steps) and the same in your collision settings.

Also another thing that causes jitters is collision distance too high. If the cloth is being forced to collide with itself or other things in a tight space and there is no room for it to go.

So this also can happen with not a high enough step value in collisions.

You might try simulating with higher step values to see if the problem goes away.

In general, this is the most tricky thing about simulating cloth. Because you want to try out settings at a lower step level before the final simulation. Unfortunately, you wind up going in circles with some of the settings, as you run into all kinds of issues that are solved by turning up the step value. It is an ironic and cruel aspect to simulating cloth…lol So you have to prepare to wait long times between setting changes in reality most of the time.

2 Likes

It be awesome to make possible the cloth to collide if they are not the same mesh

If Blender’s cloth simulation can add a function: Time-property.We can adjust the time value in real time to achieve the simulation effect without playing the timeline simulation.

I hope this function can be implemented in the future.

2 Likes

please somebody tell me how to use internal springs

I’m actually interested if it would be possible to improve cloth simulator according to the following blender file. More like a purse that you can drop items to. Or it could be filled with water.

Simulation.blend (2.4 MB)