Optimizing nCloth

 
 
 

This section describes in detail ways you can improve the playback speed of nCloth simulations.

Simulate low resolution nCloth objects Keep a low polygon count when modifying and simulating non-final nCloth objects. Smooth the polygon mesh after you are done making changes to your simulation.If you must use a high resolution model for modification, use the output cloth mesh as a wrap deformer.
Model your nCloth appropriately Model your nCloth as uniform-sized quads or as close to uniform as possible.
Disable collisions where appropriate Disable any unnecessary collisions to greatly reduce the amount of computations performed during simulation.
Adjust self collision settings Reduce the Thickness attribute of the nClothShape node to improve self collision speed. This improvement is especially prevalent when the Self Collision Flag is not set to Vertex.If Self Collision Flag is set to Vertex, adjust the Self Collide Width Scale so that the collision spheres barely touch each other.
Use a Vertex Pushout Technique
  1. Turn off all the collisions on the nCloth object and all nRigid or passive objects.
  2. For each nRigid object, in the Quality Settings section of the Attribute Editor, set the Push Out value to 1.
  3. Run the simulation.
  4. As the simulation is running, adjust the Push Out Radius value such that it is as low as possible while collisions still display properly.
  5. Adjust the Thickness of the nRigid object(s) such that so that it is large enough such that the nCloth triangles do not interpenetrate the object.
If the collisions do not appear correct, activate Trapped Check in the Quality Settings section of both the nCloth and nRigid objects.
Use constraints If a region of the cloth needs to be stiff, connect the vertices in the region with a Component to Component constraint rather than painting cloth attributes. You can simulate stiffness by setting the Connection Method to Within Max Distance and adjusting the Max Distance attribute.If a region of cloth needs to stay close to a part of a character’s body, use a constraint rather than relying on Friction and Stretch Resistance. For example, use a Point to Surface constraint utilizing a point on the nCloth and the character’s body, along with a low Strength value for the constraint.
Bind clothing to a skeleton When animating a character, use the Bind Skin command on the clothing mesh and character skeleton before making the clothing nCloth. Use the Input Mesh Attract to pull the cloth towards the character’s end position thereby relieving some nCloth calculations.
Lower substeps In most cases, lowering the Substeps, and Max Collide Iterations of the nucleus node will improve playback at the expense of a loss in quality.Lowering the Max Self Collide Iterations of the nCloth node can also improve playback.
Lower Input Mesh Attract Avoid Input Mesh Attract values higher than 1.2.
Use Stretch Damp rather than Stretch Resistance If your nCloth appears to stretch too much, increase the Stretch Damp attribute rather than the Stretch Resistance attribute whenever possible.
Adjust collision values for layers When working with layered garments (such as a jacket on top of a shirt), give the outer garments higher Collision Layer values than the inner garment(s). This will allow you to use lower quality settings.You can also adjust the Collision Layer Range value so that the outer layer garment does not compute collisions with inner layers, such as the character’s body.
Caching After caching an nCloth simulation, turn off Enable in the nucleus node. However, be sure to turn it back on when you wish to append to the cache or simulate after.