Tips for Using Cloth and Soft Body

 
 
 

The following is a list of tips to consider for optimizing cloth or soft body performance.

Using Motion Blur on Cloth or Soft Body

If you want to use motion blur when rendering a cloth or soft body scene, make sure to select Deformation Blur in the object's Motion Blur property editor and make sure that the mental ray Motion Steps Deformation option in the Render Manager has a value over 0.

For more information on this, see mental ray Rendering Settings [Cameras and Motion Blur].

Setting an Initial State for Cloth

While you can't directly set an initial state for cloth (that is, have it start the simulation at a certain deformed state), here's a trick that may work:

Freeze the cloth at the frame where it's at the state you like, then reapply the Cloth operator. The drawback of this is that you need to reapply forces and obstacles to the cloth, but they do keep their properties so you don't have to set them up again.

Tips for Optimizing Cloth or Soft Body Performance

Here are some useful tips to help prevent sluggish performance from cloth or soft body simulations:

  • Before you apply cloth or soft body to an object, check if the object has any unnecessary operators in its geometry stack.

    For example, you may have some modeling operators (move component, extrude, etc.) that you no longer need. If you can, freeze the object before applying cloth or soft body.

  • Use wildcard selection like *.clothop, *.softbodyop, or *.obstacleprop to find relevant simulation objects in your scenes. You might be surprised at what you find.

  • Remove any unnecessary obstacles and natural forces (gravity, wind, etc.).

  • For obstacles, turn off Animatable Deformations unless it's really needed. It is only needed if the geometry is actually deforming over time. It incurs some memory cost.

    If you don't need Double face collision, make sure to turn it off in the Obstacle property editor.

  • If you are using primitive shapes for obstacles, such as spheres, grids, and boxes (or geometries with close enough approximations to these shapes), use the bounding shape rather than Actual Shape. This can save lots of memory.

    If you need more precise collision detection (with "actual shape"), consider using (hidden) low-res objects you've built to "stand in" for the high-res visible geometry.

  • Turn down the Iterations per Frame as much as you can while preserving the look you want (this requires some tweaking — see Setting the Precision of the Cloth Simulation or Stabilizing a Soft Body Deformation).

    Try out a scenario from your scene with only one or two objects being simulated, and start with low inter-frame iterations, and bring it up until you get the realistic simulation look you want.

    In some cases, you can get away with low settings like 2. Tune each cloth or soft-body object differently — they probably won't use the same settings. This is highly dependent on the properties you've set, like stiffness and mass.

  • Use the smallest possible range of simulation you can. If you know that objects won't start colliding until frame 107, don't start the simulation until around then, and stop it as soon as you can (such as if the objects go out of view). Don't use the full scene time range unless absolutely necessary. This will save some memory to cache the results of the simulation (but is not as important as the issues mentioned above).

  • Self-collision detection takes more time with complex cloth geometry.

  • Lower the soft body's Sampling to as low a level as possible while still maintaining the right look.

  • Save the simulation after it's calculated (when you save the cloth scene or click Save Simulation in the SoftBodyOp property editor before you save the scene) so you don't have to recalculate every time you open the scene.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License