2010/05/26

Bubbles are really simple to do. A little bit of soap, some water, and voilà! Unfortunately, it’s not so easy in 3D. Bubbles are so thin that light is interfering and a lot of colors are visible. But interference colors are not rendered by MentalRay…So I’ve made this Bubble Shader Compound for Autodesk Softimage 2011! It renders very well on spherical ICE particles.

Bubbles are visible just because there is an environment. They are mix of transparency and reflections. To see bubbles, you have to connect an environment shader or have one plugged in your pass.To have bubbles render fast, you must have a low number of reflection rays (2 to 4 is enough), the number of refraction rays depends on the numbers of superposed bubbles in your picture.

This Shader Compound is made for Educational purpose, and it is fully commented. It is a full complex render-tree material, with a lot of nodes. To make it as a compound is the only way for make it usable. Have a look inside it!

It is not a real interference color rendering, it’s just a simulation. The goal is to allow full control to artist, without physical consideration.

If you make some pictures with this shader compound, please, don’t forget credits and send me your results. If you have any suggestion for making this compound better, just send me an email!

Quick documentation:Effects:Exaggerate effect: you can make effect more or less visible, more or less exaggerated. Less than one is more correct.Color transparency: usually, bubbles are not filters, transparent color is not affected. But sometimes, depending of your environment, reflect color could not be enough to see well the bubble. You can try ‘color affect transparency’ in those cases.

Interferences:Spectral cycles: the number of ‘rainbow’ seen in the bubble. Usually more than one...Spectral Offset: if you want to have the color you want on the bubble, you can cycle spectral color to have the one you want at the place you want. It’s just a rainbow color sliding.Saturation: If you find the bubble too colored, you can desaturate it here.Fresnel attenuation: at 0, all the bubble is colored and reflective, at 1, just the edge of the bubble are colored (more realistic).

Noise:Noise intensity: you can make the bubble more or less noisy. 0 means no noise, with perfect rainbow, 1 or more mean disturbed bubble.Noise scale: to adapt the noise pattern to the size of your bubbles. The smallest is the scale, the biggest is the pattern.Use external noise and External noise input: Disable the internal compound noise and take the scalar input as new noise. If you want a more controlled noise (like a logo on your bubble…), you can override the internal noise and branch the shader you want here.