nCloth Soda Can
 
 
 

This example will show you how to use nCloth to simulate a soda can being crushed.

Create an nCloth can

This is the base model for the can and the input mesh for your rigid nCloth.

To make the soda can model nCloth.

  1. In the nDynamics menu set select the can and select nMesh > Create nCloth.
  2. In the Attribute Editor, select the nucleus1 tab.
  3. In the Ground Plane section turn on Use Plane.

To make the soda can crushable

  1. In the Attribute Editor, select the nClothShape1 tab.
  2. In the Dynamic Properties set the attributes as follows:
    • Stretch Resistance: 133
    • Compression Resistance: 200
    • Bend Resistance: 17
    • Bend Angle Dropoff: 0.9
    • Restitution Angle: 6
    • Restitution Tension: 1000
    • Deform Resistance: 1.3
    • Damp: 1

Crushing the can

The soda can is now configured to react like an aluminum can. You can now crush it.

To crush the soda can

  1. Select Create > Polygon Primitives > Cube.

    A polygon cube appears at the origin. The cube is obscured by the can when it is initially created.

  2. Select the Move Tool from the Tool Box and move the cube up so that it rests above the can.
  3. Select the Scale Tool and scale the cube so that its length and width are the same as those of the can.

  4. Select nMesh > Create Passive Collider.
  5. Select the Move Tool from the Tool Box.
  6. In the nDynamics menu set, select nSolver > Interactive Playback.
  7. As the scene plays, move the cube into the can at various angles and speeds.

    As you move the cube down the can deforms. You can experiment by hitting the can from the side or on an angle to see different deformations. If you find the animation is resetting before you can experiment completely, increase the playback end time.