Tips for Using Cloth

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

Using Motion Blur on Cloth

If you want to use motion blur when rendering a cloth 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 Deformation Motion Steps for Deformation Blur [ Lights and Cameras ].

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 Performance

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

• Before you apply cloth 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.

• Use wildcard selection like *.clothop or *.obstacleprop to find relevant simulation objects in your scenes.

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

• For obstacles, turn off Animatable Deformations unless 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.

• If you are using primitive shapes like spheres, grids, and boxes (or geometries with close enough approximations to these shapes), use the bounding shape for obstacles 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).

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 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 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.

• Save the simulation after it’s calculated (when you save the scene) so you don’t have to recalculate every time you open the scene.



Autodesk Softimage v.7.5