Cloth not sticking to animation with max substeps
#1
Hi Guys,

Any of you have an idea on how to deal with this problem.

I have a character running pretty fast (an actual human mocap, so not superhuman), however even at max substeps (1/32) the cloth seems to penetrate the mesh. A few facts:

Particle bind solver steps: 50 (but 500 also doesn't do the trick)
Max substeps: 1/32
Simple cloth solver
Collision radius: 0,01m
Tyflow version: 1.020

Please find screenshots and a video reference below.

Thank you!

Tim


Attached Files Thumbnail(s)
       

.mp4   Clothing_error_v001.mp4 (Size: 1.42 MB / Downloads: 97)
  Reply
#2
Can you post the file? (If you can't post it publicly, email would be fine as well)

Could be a few different things...hard to guess without seeing the setup.
  Reply
#3
(07-24-2023, 05:06 PM)tyFlow Wrote: Can you post the file? (If you can't post it publicly, email would be fine as well)

Could be a few different things...hard to guess without seeing the setup.

Hi Tyson!

Thanks, no problem. Please find the file attached.

https://drive.google.com/file/d/19X-q7ex...sp=sharing

Looking forward to your reaction.

Tim
  Reply
#4
This is a tricky one, because your collider has self-intersections during the animation (ex: when the knee bends at its most extreme angle, the calf intersects the thigh), so you can't rely on the CCCS (which would otherwise fix all the problems - because it can't handle self-intersecting colliders).



On the other hand, the reason why the cloth is moving through the collider without the CCCS, even with a small timestep, is that because your collider is quite thin, it's just slipping between the particles in the collision step of the solver, and without the CCCS there's no face/edge collisions happening...so the cloth vertices themselves are colliding just fine, but during the collision phase of the solver they're being spread far enough apart from each other that the collider is slipping between them. You can observe this by disabling the playback cache and slowly scrubbing through the timeline, watching the movement of individual particles carefully around areas where the intersections are occurring.



There are some improvements I want to make to the cloth solver in the future that would remedy all this...but for now your option is just to enable the CCCS and try to resolve self-intersections in the collision mesh (in areas where it collides with cloth) for all frames (ex: by creative use of the relax modifier around joints). With no self-intersections and the CCCS enabled, you'll get a proper result. See attached.


Attached Files
.zip   WM_01_010_mocap_v002_CCCS.zip (Size: 6.36 MB / Downloads: 89)
  Reply
#5
(07-24-2023, 05:59 PM)tyFlow Wrote: This is a tricky one, because your collider has self-intersections during the animation (ex: when the knee bends at its most extreme angle, the calf intersects the thigh), so you can't rely on the CCCS (which would otherwise fix all the problems - because it can't handle self-intersecting colliders).



On the other hand, the reason why the cloth is moving through the collider without the CCCS, even with a small timestep, is that because your collider is quite thin, it's just slipping between the particles in the collision step of the solver, and without the CCCS there's no face/edge collisions happening...so the cloth vertices themselves are colliding just fine, but during the collision phase of the solver they're being spread far enough apart from each other that the collider is slipping between them. You can observe this by disabling the playback cache and slowly scrubbing through the timeline, watching the movement of individual particles carefully around areas where the intersections are occurring.



There are some improvements I want to make to the cloth solver in the future that would remedy all this...but for now your option is just to enable the CCCS and try to resolve self-intersections in the collision mesh (in areas where it collides with cloth) for all frames (ex: by creative use of the relax modifier around joints). With no self-intersections and the CCCS enabled, you'll get a proper result. See attached.

Amazing, wow. I had no clue that self-intersecting colliders could be the cause of this. Indeed relaxing the shape helps as well. But your CCCS example is perfect, and did the trick. Thanks so much again!
  Reply


Forum Jump: