Username
Password
Auto-login
Show my name in the online users list
Not a member?
Please register.
Forgot your password?
(2) May 2008
(1) January 2008
(1) November 2007
(2) September 2007
(7) August 2007
(2) July 2007
(1) June 2007
(3) May 2007
(4) April 2007
(8) March 2007
(9) February 2007
(2) January 2007
Bubble Level with nCloth
Posted: May 12, 2008 - 06:21 PM
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.
In order to post any comments, you must be logged in!
  Posted by blade33ru  on  06/18  at  03:04 PM

hey no more tutorials ...focus on product dev ;)

  Posted by strob  on  06/03  at  12:10 PM

Hi Duncan!

I can’t wait to see what product developement you did! Thanks a lot for those tuts!

jocelyn “Strob” Simard, Montreal.

  Posted by sacslacker  on  05/13  at  03:23 PM

Thanks for taking some time to show us more neat tricks!

Can’t wait to see what the new development brings us!

  Posted by toha  on  05/13  at  12:07 PM

Tanks a lots
I will probably will mix two methods together.
For a closeup shot i will take modeled bubbles, particles for back....
Main practical usage is for soap foam, air in the bottle, air in hydro system, biomedical purposes.

  Posted by Duncan Brinsmead  on  05/13  at  11:01 AM

Splitting would be very difficult with this method. There might be a clever trick that could work, for example simulating many combined cloth bubbles with some kind of downstream merge history and sticky constraints, however I would be surprised if it were practical.

For splitting bubbles I would use particles. You could look at the water nCloth example on this blog and modify it to have negative gravity. That example uses nCloth with vertex collisions and no stretch to create colliding particles. This is piped into a particle system which renders the result as blobbies. A problem with using blobbies for bubbles is that they smoothy merge together, instead of packing together then suddenly merging in a pop(still a bit of a research problem). However I’ve seen pretty good bubbles using blobby rendering.

 
Page 1 of 2 pages  1 2 >