Jump to content

Bubbles


Recommended Posts

Hello,

I've been trying to figure out how to simulate the behavior of bubbles when they come in contact with each other.

When bubbles come in contact, the surface of the sphere flattens out at an angle perpendicular to a line connecting the centroids/centers of the two spheres. Any thoughts on how to set something like that up?

I would think you could start by testing for the length between the centers of the spheres, and if the distance between the centers becomes less than the sum of their radii, the surfaces would begin to flatten where they contact. I would think deforming the surface by scaling down the magnitude of the surface normals would work, but I don't know how to deform an object this way. I'm still a novice as far as building tools like this goes, so please forgive my lack of understanding. Any hints or suggestions would be greatly appreciated.

Thanks,

Steve

Link to comment
Share on other sites

Guest mantragora

There was an interesting technical paper regarding bubble creation by Pixar and Dreamworks presented at last Siggraph 2013

Is there a chance you got your own implementation of it? Could you share it?

Link to comment
Share on other sites

Thank you for the replies! I saw a demonstration by Todd Akita of this done with ICE in XSI, and have wanted to figure out how to make it work in Houdini. His presentation notes are here if you're curious (http://area.autodesk.com/blogs/marks/todd-akitas-ice-design-tools-document).

It was was an example of what can be done through basic normal manipulation. Sort of like metaballs, except instead of pulling together the surfaces flatten out, when two spheres move into contact with each other. I'm just looking for a place to start.

@animation, that's it exactly.

@Skybar, thanks for the scene example. That's the correct end result, for some reason the caps aren't coming across when I look at it. Can this still work if the spheres move around? Or do they need to stay in one place?

@Mzigaid, you're absolutely correct :)

Link to comment
Share on other sites

@Skybar, thanks for the scene example. That's the correct end result, for some reason the caps aren't coming across when I look at it. Can this still work if the spheres move around? Or do they need to stay in one place?

Yeah I disabled the polycaps since the polys created doesn't really work, but I don't really know how you can fill holes like that otherwise so I figured putting the points in a group might open up for something else. And yeah it works if you move the spheres, it isn't very fast though because of the cookies (booleans).

Link to comment
Share on other sites

This is my first attempt at this. The attached scene file is somewhat hacked togehter. Feel free to improve it.

To get the bubbles in the initial positions, three equations need to be turned into expressions (This is all from the second paper, by Andrew Glassner, that Ian provided earlier.):

1. 1/rC=1/rB-1/rA (r = radius of spheres). This will keep the relative sphere sizes correct. There are three spheres, two that are visible and one larger one "C", that forms the inner wall of the bubble.

2. distance AB=sqrt((rA^2+rB^2)-(rA*rB)). This is distance between the centers of spheres A and B.

3. distance AC=sqrt((rA^2+rC^2)+(rA*rC)). This is the distance between spheres A and C. Sphere C is at world center.

I used the "surfsect" node to do the booleans. I was trying to use metaballs, but just couldn't quite get them to work right.

The shader is built into Houdini, the "thin film" material. I don't know enough about making shaders at this point to add in refraction. If anyone could offer tips on how to do it, it would be appreciated. The backgrounds are just some different HDRI images put into the environment light.

These are also just two spheres, but it's the starting point to do larger groups. The paper noted above explains how to add more.

Thanks for all the help!

post-9758-0-39232700-1384297104_thumb.pn

Bubbles_v1.4.hipnc

post-9758-0-54235000-1384297514_thumb.pn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...