Problem with cloth simulation with PhysX2.8: Capsule rotation causes cloth to ‘pop’&hell

Hi all, I’ve been trying to improve / solve this important problem with cloth simulation with PhysX 2.8 for over a month and thus far no improvement… any ideas would be greatly appreciated!!

My setup is PhysX SDK 2.8.4.6 under Windows based on the basic clothing samples found in the SDK. The symptoms are:

  • Capsule movement, radius change, length change are all OK and the neighboring cloth moves fluidly without problems. Switching to spheres there are no problems as well…
  • However, even a minute rotation to the capsule frequently causes the neighboring cloth to ‘pop’ or ‘move suddenly’ as if some cloth particles were suddenly applied a very large force away from the just-rotated capsule, possibly due to a ‘collision penalty’.
  • This happens in hardware / GPU mode and is even worse in software / CPU mode.
  • I have tried all kinds of settings for the density of the cloth and the capsule colliders to no effect.
  • I have tried setting the ‘cloth thickness’, stretching, bending, solvert iterations, damping, etc to no effect.

In other words, this ‘popping’ of the cloth when neighboring capsules rotate make the usage of capsules unusable as the visual effects are much too apparent to the player.

Any ideas? Has anyone ever encountered capsule misbehavior near cloth?

Dan,

P.S. I unfortunately cannot move to PhysX3-branch because of its overly-limiting “32 spheres / capsules” limit cloth collider. (In my PhysX 2.8.4.6 setup I can safely collide with around 700 capsules with great performance if I don’t rotate them)

I forgot to mention above that the capsules are kinematic and moved / rotated with moveGlobalPosition() and moveGlobalOrientationQuat().

Of particular curiosity, if I setup a string of capsules jointed together by D6 joints the cloth behaves fine in either one-way or two-way interaction!

In other words it appears that me rotating kinematic capsules near cloth (even by a millionth of a degree) causes the penalty force to be applied explaining the cloth explosion.

Q1: Is there a way to set the strenght of the punitive force applied to cloth that penetrates a collider?

Q2: Even though moveGlobalXXX() is recommnended for kinematic actors should setGlobalXXX be used instead to help resolve this problem?

Grasping at straws!!

Bbreakthough!! But only in software cloth simulation though…

I found that if you use the setGlobalXXX functions instead of the moveGlobalXXX functions to move&rotate capsule colliders that cloth will behave fine if you raise the density of the colliders much higher than the cloth (I have mine set to FLT_MAX to 1 for cloth)… I must have spent an entire 2 weeks of work finding this solution so hopefully this will benefit someone!!

In other words the problem occur if you rotate capsule colliders with moveGlobalXXX and if you use setGlobal with low density cloth won’t be repelled from colliders fast enough and will poke through.

Still hopelessly not working in hardware cloth sim mode however… Even with cloth density at .00000001 and collider density at FLT_MAX I still get that cloth explosion whether I use setGlobalXXX or moveGlobalXXX to rotate capsule colliders.

Has anyone been able to rotate capsule colliders in hardware cloth simulation mode on PhysX2-branch??

Please help!!