O'Reilly logo

Learning Physics Modeling with PhysX by Krishna Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tweaking the cloth properties

In PhysX, a cloth is made of a number of interconnected cloth particles, and each particle can be affected by other PhysX objects as well, as it has to be in constraint with other connected cloth particles. This makes cloth simulation very sensitive to numerical error. Therefore, the cloth solver iterates multiple times in a single time step to achieve physically accurate cloth simulation. We can set the solver iteration count by calling the PxCloth::setSolverFrequency() function that requires a parameter of the PxReal type, and it represents the solver frequency, that is, the number of solver iterations per second. For instance, setting the solver frequency to 120 corresponds to two iterations per frame if your application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required