Jump to content

Soap bubble generation


Recommended Posts

Hi Everyone,

this is my first post.

I've been following this forum since I started my MA back in September.


Straight to the point I'd like to generate a bubble generation system like the video below.

What I'm interested in is how the bubbles generate from the plastic ring and how to replicate that same thing in Houdini.



Do you have any idea on how to achieve it?


Many thanks in advance.

Link to comment
Share on other sites

You could do a particle sim with like ~10 particles coming out of the ring. Copy metaballs onto those particles and get the majority of your particles floating in the air.


For the bubble connected to the ring, I think going with a volume-based approach would probably be easiest.


Take the last bubble (or bubbles) and get the size of the sphere it generates. Stamp a bunch of spheres between that particle and the ring, gradually resizing from the bubble size to the ring size. VDBfromPolygons for those, VDBsmoothSDF the volume. Clip off the bits on the other side of the ring.


If you convertVDB that into polygons, you should have a nice mesh for your ring->bubble connection. You could probably VDB all the bubbles if you wanted. Then just add some low resolution, animated noise to the mesh.

  • Like 1
Link to comment
Share on other sites

Hi Travis!

Many thanks for the reply,

Metaballs and particle system was the approach I adopted, but I couldn't figure out how to connect it to the ring :)


Your idea seems great, I'll give it a go with the VDBs and will post the .hip file here :)

Thanks again

Link to comment
Share on other sites

  • 4 weeks later...

Hello Again!
have another problem on which I've been banging my head against.
I've created a particle system with spheres copied and then vdbs and I have my temporary bubble generator.
I've found the Thin Film Vop which works very well if I render it with the "Raytracing" renderer, but it won't work at all if with PBR, (maybe I'm doing something wrong, but this is my first time inside vop level).
The only problem with the Thin film Vop is that I don't know how to randomize the reflection and at the moment, when I launch a render they all look the same.
Is there any way I can randomize the reflections for each sphere? maybe using the colors from the noise map of the Thin film vop, activating reflections only in a certain range, or maybe using a grey scale noise map to control where it reflects and where not.
Also is it possible to have a parameter that allows me to offset/rotate the environment map of the Thin Film vop?

I've attached a test scene file for you to look at..it is very basic, but should explain the problem I hope.


Thanks in advance just for taking the time to read:)


Link to comment
Share on other sites

I didn't know about the Thin Film Vop. Thanks for the info because I might need that soon. Although I usually build that kind of thing with a dot product and a few other nodes for better control. PBR uses a special data type represented as a yellow "f". Take a look at a Lighting Model Vop for example. A lot of the nodes have been re-written to support that relatively new data type when they introduced the PBR render engine but not all of them. You'll have to stick to Raytracing in this case.



Link to comment
Share on other sites

Hi Francois,


I'm still playing around in vops, but still haven't figured out a way to alter the position of the environment map as I would do with an environment light in object level.

Thanks for the reply anyways:)



Link to comment
Share on other sites

I had a look inside the Thin Film Vop because when varying the input P I didn't get any change on the environment map like I expected. It turns out that this P input only affect the oily pattern. If you don't provide an environment map and you apply an offset on the P you'll see a difference between with and without the offset.


If you want to the same to the environment map, you can dive inside and learn from what they're doing and hack it. But you want to do is go inside the "do_reflections_if_level_zero" node and rotate the global N and plug it into nN after normalizing it and you'll see the map rotating.

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.

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...