Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
Theme color:
  • 1/3
You are here: Homepage /  Blogs /  Duncan's Blog / Coins With nCloth
Coins With nCloth
Posted: Sep 15, 2007
Category: nCloth
Social Media:
Bookmark and Share
 
While in general I would recommend using a dedicated rigid body solver for things like falling coins, it is possible to do this with nCloth in a relatively stable and efficient manner. However for a large number of objects it is generally better to use bend/stretch/compression resistance on the cloth instead of the rigidity attribute, because one can first do a poly combine on the objects so that one only has one cloth node. This is also simpler to edit.

Rather than simulate the full coin (modelled as a squashed cylinder) we simplify it and take advantage of the collision width attribute on the nCloth.

1. Create a poly cylinder with subdivisions axis set to only around 8 or 10. ( we will smooth after the simulation )
Delete all faces except for one of the caps. Rotate a little so it is at an angle with the ground.

2. Duplicate special with 100 copies (100 coins) and a translate of 1 and a y rotate of 110 (so the coins all twist differently).

3. Select all the coins an do a poly combine. Also delete history to keep the graph simple.

4. Make nCloth on the coins object. Display the collision width and set to the desired thickenss values.
On nClothShape1 set:
mass = 20 (to avoid the coins dragging in the air)
selfCollidWidthScale = 1
stretchResistance = 50
compressionResistance = 50
bendResistance = 50
bounce 0.8
selfCollisionFlag = FullSurface
maxSelfCollidIterations = 10
(if you get interpenetrations increase this as well as the nuclues substeps)

On nucleus1 set:
planeFriction = 0.8
substeps= 7
maxCollisionIterations = 11


You can now playback and see the general animation. The rest of the tutorial deals with making the render look like coins.

5. Select the cloth and do "Mesh: smooth". Turn off keepGeometryBorders on the polySmoothFace node.

6. Select all the cloth faces and do "Edit Mesh: Transform Component". Move the faces down along the normal so that they are at the bottom of the coins. (polyMoveface localTranslateZ = -clothThickness)

7. Select the cloth mesh and do "Edit Mesh: extrude". Move along the normal to the top of the coins (polyExtrudeFace = clothThickness * 2)

The coins should now look like smoothly rounded flat cylinders.
In order to post any comments, you must be logged in!
Newest users comments View All 2 Comments
Posted by Ali Hussain on Apr 07, 2010 at 04:32 AM
Thanx Duncan..
you're a genius ...
Posted by sil_musashi on Mar 12, 2009 at 09:26 AM
this is amazing :D