|
Feedback
Posted: May 13, 2008
Category: nCloth
It has been a long while since I've been active on this blog. I've been very busy lately doing product development.
Here is a simple tutorial that shows how to implement a bubble style carpenter's level with nCloth.
1. Create a simple cylinder for the glass tube and a sphere for the bubble. In order to get nice uniform quads start with a poly cube and do "Mesh: Smooth" with a
divisionLevel of 3 to make it into a sphere. This will simulate better than the default sphere.
2. Make the sphere an nCloth and make the cylinder a passive collider. Turn off trapped check on the nRigid node for the cylinder, because trapped check assumes we are
colliding on the outside of the object( or one could reverse normals on the cylinder ).
3. Set the gravity to -100 on the nucleus node. This will make the bubble rise quickly. Also make the substeps 9 and the maxCollisionIterations 17 for better collision quality. The bubble will now rise, but will collapse like a plastic bag.
4. Set the nCloth pressure method to "Volume Tracking Model". The cloth should now behave like a bubble. You can increase the startPressure if desired(this
basically means that the air inside the initial sphere is pressurized). This will tend to keep the bubble more spherical. If you use a low value for the startPressure
allowing the drop to deform more, then it may buckle or overlap in places. To deal with this one can set the self collision flag to "Vertex" and increase the
self collide width scale until the vertices just touch. (set solverDisplay to "self collision" to preview)
5. Increase drag to keep the bubble from bouncing too much. Optionally one may also wish to increase damp. If the bubble does not slide enough then you may wish to lower friction on the tube and/or bubble.
|
|||||