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 / Bubble Level with nCloth
Bubble Level with nCloth
Posted: May 13, 2008
Category: nCloth
Social Media:
Bookmark and Share
 
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.
In order to post any comments, you must be logged in!
Newest users comments View All 11 Comments
Posted by Duncan Brinsmead on Mar 21, 2011 at 03:32 PM
It uses an implicit technique for the solve that is inherently stable. You might find the following a useful reference:
images.autodesk.com/adsk/files/autodeskmaya_nucleus_whitepaper.pdf
Posted by furness003 on Mar 19, 2011 at 08:20 PM
Can someone tell what type of cloth model the maya Nucleus is based on? Is it a mass-spring model like that of Maya Classic Cloth and Syflex?
Posted by Duncan Brinsmead on Sep 08, 2008 at 11:43 PM
Yes, it would be pretty trivial to do with nParticles.

Duncan
Posted by Max Balboa on Sep 06, 2008 at 12:51 PM
I think splitting the bubble can now be achieved in maya 2009s' nParticle Module. What do you think? :)
Posted by blade33ru on Jun 19, 2008 at 12:04 AM
hey no more tutorials ...focus on product dev ;)