Adjusting the accuracy of nCloth collisions
 
 
 

The third step in creating believable cloth effects is to make your nCloth object’s collisions as accurate as possible. In reality, a falling piece of cloth comes into close contact with the object it lands on and it deforms, reflecting the shape of the object it has come into contact with. Currently, the table cloth does not exhibit this behavior.

To set the thickness of your nCloth and passive objects

  1. Select the table cloth.
  2. Open the Attribute Editor and select the nClothShape1 tab.
  3. In the Collisions section, select Collision Thickness from the Solver Display drop-down list.

    The table cloth’s collision thickness appears in the scene view.

    An nCloth’s Thickness attribute determines the radius or depth of the table cloth’s collision volume. The collision volume is a non-renderable surface offset from the table cloth’s surface that the nucleus1 solver uses when calculating the table cloth’s passive object collisions. Collisions occur at the table cloth’s collision volume, not at the surface of the table cloth itself.

  4. Go to the beginning of the playback range.
  5. In the Collisions section, change the table cloth’s Thickness attribute value to 0.066.

    The table cloth’s collision volume is noticeably reduced, so that it will now behave like a thin piece of fabric rather than a thick surface. This new Thickness will contribute to improving the accuracy of the table cloth’s collisions when it falls onto the table.

  6. Select Off from the Solver Display drop-down list.

    The table cloth’s Collision Thickness is no longer displayed in the scene view.

  7. Play back the table cloth’s simulation.

    Even though you adjusted the table cloth’s Thickness, the table cloth still does not appear to be making contact with the table’s surface. This is because passive collision objects, like the table, also possess collision volumes.

    To further improve the accuracy of the table cloth’s collisions, you need to adjust the table’s Thickness.

  8. Go to the beginning of the playback range.
  9. In the scene view select the table, and in the Attribute Editor select its nRigidShape1 tab.
  10. In the Collisions section, select Collision Thickness from the Solver Display drop-down list.

    The table’s collision thickness appears in the scene view.

  11. Set the table’s Thickness attribute value to 0.066.

    The table’s collision volume is noticeably reduced, so that the table cloth will now conform closely to the actual shape of the table when you play back its simulation.

  12. In the Collisions section, select Off from the Solver Display drop-down list.

    The table’s Collision Thickness is no longer displayed in the scene view.

  13. Play back the table cloth’s simulation.

    Adjusting the Thickness of the table cloth nCloth and the table passive object dramatically improved the accuracy of the table cloth’s collisions.

  14. Go to the start of the playback range.

The way Collision Thickness appears in the scene view is determined by your nCloth’s current Collision Flag selection. The Collision Flag drop-down list lets you specify which of the table cloth’s components participate in its collisions and which type of collision volume is used by the table cloth. You can adjust the speed of your nCloth collisions with the Collision Flag at the cost of collision accuracy.

To set which nCloth components participate in collisions

  1. Select the table cloth.
  2. In the Attribute Editor, select the nClothShape1 tab.
  3. In the Collisions section, select Collision Thickness from the Solver Display drop-down list.
  4. By default, the Collision Flag is set to Face.

    Face provides the best and most accurate collisions, but it is the slowest to calculate the collisions for.

  5. Change the Collision Flag selection to Vertex. Vertex produces the least accurate collisions, but it is the fastest to calculate the collisions for.

    The table cloth’s collision volume changes from a surface to multiple collision spheres.

  6. Play back the table cloth’s simulation.

    Parts of the table cloth are not properly colliding with the table. This is because when you select Vertex as your component type, only the small collision spheres surrounding the table cloth’s vertices participate in the table cloth’s collisions, rather than the entire surface as with Face.

    Vertex and face are useful when you want to speed up your simulation by reducing the number of collision calculations, or your cloth simulation does not require the maximum level of collision accuracy (for example, for a distance shot of colliding nCloth objects).

  7. Reset the Collision Flag to the default Face selection, and select Off from the Solver Display drop-down list.
  8. Go to the beginning of the playback range.
  9. Play back the table cloth’s simulation.

    The table cloth once again easily and accurately collides with the table.