Iridescence: Part II, Bubbles

In my last post on iridescence, I explained using the shellac shader, which is a physically correct way to create iridescence for animations. This example is how I create iridescence in things like oil spills, liquids, bubbles. This technique here is a non-physically correct method, but visually it looks correct...after all, isn't 3D just smoke and mirrors anyway trying to simulate reality?

To create the bubble material I use the tried and true Arch & Design Shader. The diffuse color is a non-issue here. The reflection is set to 1.0 (white), refraction is set to 0.95 with an IOR of 1.4.

The trick to this shader is the map in the reflection color slot. I use a swirl map. Initially, I set the base color to red, and the swirl color to green so I can see the swirl mix easily. Then when I got all of my swirl settings to look convincing, then I applied a gradient ramp map into into each the base and swirl slots. The idea was to create a rainbow spectrum, again, just using the colors red, green, and blue. For the base gradient ramp, I blended red to green. For the swirl gradient ramp, I blended green to blue. The end result of the swirl provides the whole mix with a rainbow type effect.

Finally to get the swirls to move around the bubbles, I just rotated the spheres, and keyed the rotation. This can also be achieved with a uvw map modifier with a animated gizmo to move the swirl around the sphere, but I opted for the rotation keying to give me variation among spheres.


  1. Just one question.. Why you do not get the black line around the shape of the material slot?

    I mean, with IOR 1,4 it's sure to have a black line in the material. I tried to do this material, following your tips, but it didn't work fine. The black line didn't let me to do the things well :S

  2. Good question. I didn't clarify here, but in the Advanced Rendering Options, switch the "Glass/Translucency treat object as..." to "Thin-walled"

  3. Thanks for clarifying!