Best way to create bubbly foam?

I’m trying to create a bubbly foam but am running into some issues and what I’ve thought of doesn’t look good enough.

Basically what I did was create a foam material with SSS (basically like in the BlenderGuru beer tutorial), created a particle hair system on the foam mesh to scatter bubbles (icosphere with glass shader) around it, disconnected the bubbles to a seperate mesh and used boolean on the foam. So basically my foam consists of two meshes (thousands of bubbles with glass shader and foamy stuff between the bubbles with white’ish SSS) It’s far from being realistic (low-particle example here) so I’ve been looking for other ways and found this thread:

Most submissions seem to be using different software and don’t go too deep into details of how they were made but the thread has some beautiful bubbly foam.

I’ve been curious to know if something like this or this can be done in Blender?

Preferably procedurally through shaders, but I’m assuming the best way would just be the heavy way of using tens of thousands of icosphere particles and booleaning them like I’ve been doing but unfortunately my computer crawls to a halt when I go around 10k particles and convert them to a mesh so I’ve been unable to properly test it.

It still leaves me with a few questions, in the renders I linked to above there are a lot of very tiny bubbles between the bigger ones, how would I do that with particles since everything I try with hair particles leaves me with a lot of overlapping bubbles, so the bigger bubbles would be full of smaller bubbles etc which I guess wouldn’t look good and cleaning that up manually bubble by bubble might take years. Some of my high-particle tests haveresulted in destroying the foam mesh, so I can’t imagine how I would fill the foam of those tiniest of bubbles.

Does anyone have some tips of the most efficient way to handle something like this? Are there some tutorials out there perhaps that I’ve missed? (I thought I scanned the web thoroughly enough, but perhaps not)

Yes, you can do it in Blender using volumetric procedural shaders.
I did post a result a few years back, but need to find it/redo it if I should show it for you.
However, Nishant_neeraj, did a really good job using the same technique in his featured beer. He promised a tutorial, but I have not followed his progress there so I don’t know… but contact him and I think he could give you a few good tip on how your shader should look :slight_smile: (or wait until I had the time to sit down a few hours…)

1 Like

if I remermber well there is a tut at YAFARAY too
check it out

happy bl

1 Like

Thanks, I checked out Nishant_neeraj’s post and it looks awesome. Tried shooting him a message, hopefully he has some tips :slight_smile:

I’d greatly appreciate any tips you could give as well, I’d love to learn as many different ways to do this as possible, I always find the different methods people use interesting.

I’m really interested to understand how to do these volumetric holes/bubbles throughout the mesh. I’ve been trying to use displacement with volume scatter/absorbsion nodes but I’m just not getting it. My displacements don’t look volumetric at all.

I’m wondering if “Point Density Textures” could help here and if that should be something I investigate further. I’m a bit of a newbie when it comes to Blender so apologies for that.

EDIT: So I’ve found a way to create volumetric holes in the foam, similar to a sponge as is mentioned in this thread but then the question remains how I’d get the bubbles to only appear in the holes.

It was the best I got so far:

foam attempt.blend (2.0 MB)


Thanks for the reply Jeacom, looks good.

I tried combining your method with the volumetric sponge method (nodes here):

Here’s the volumetric scatter/absorption shader alone

Here it is mixed with your method:

I love the smaller bubbles you get between the bigger ones with the way you mix the two voronois although they might not be clearly seen in my attempt.

1 Like

Hi Everyone.
I’ll combined the 2 materials and i think i reach a good result.
What you guys think?

1 Like