# Creating a Liquid Bubble Effect

I saw some really cool 3d work here, and I want to know how to recreate this.

What I want in the answer:

1. How the particle system works (or model)

2. How to color the layers (the blue, red, and orange)

3. How to animate it (bubbling up and down)

1. It looks like the model is made using technique similar to metaballs in blender. To Create metaballs, in object mode Add > Metaball > Ball, and Add > Metaball > Plane for the surface
2. That kind of material can be achieved usin position from Geometry node, adding Separate XYZ, plugging z output to Math node set to "modulo" with unconnected socket at 1, and then plugging the output to color ramp. The color can then be plugged into whatever kind of shader you want to use (diffuse, glossy, emissive etc.) In this i added the multiply node; by changing the value of it you can alter the band width. In color ramp, it is important to notice the interpolation set to constant.
3. If you create the metaballs used to make the scene in Object mode (not edit mode) they can be animated as any normal object (position/rotation/scale)

Here i animated two metaballs on a metaplane only in z position and two keyframes each.

• Great answer! But where does the ColorRamp connect to? Can I connect it the material surface?
– Alex
Jun 2, 2016 at 0:42
• @AlexSafayan you can connect it to the color socket on any shader you want, the example looks like a diffuse shader. Jul 23, 2016 at 21:05

I have just created aquick node setup for the animation with Animations Nodes Addon

Basically you put a MBall plane as suggested on the previous answer. Then you pick a MBall and duplicate it wit the instancer node. Then you create a loop with those instance to perform some procedural operations.

Balls are scattered on X and Y via the Randomize vector. To animate them on the Z axis we just use a sine function that is feeded with the frame number. To offset the animation I use the index factor of the loop.

A random number is used to give some sort of random scale to the metaballs.

• can you please add more details to the answer? Without an explanation of the logic behind the node setup, this answer is hard to understand.
– user1853
May 19, 2016 at 14:02
• Yes of course. Just updated. May 19, 2016 at 15:55

I can at least answer point 2.: In the material node, take a color ramp with the height of the actual vertex as input. Set the color ramp's interpolation to "constant" and connect its output to a diffuse shader. You can now control which color you will get on which height.