Bubble Shader

by NM-8 in Materials, Shaders, Textures

To use the shader you just need to append the BUBBLES material from the blend file. (File/append/ locate the file and choose /materials/BUBBLE )

color: set the color of the bubbles
scale: set the scale. it can change over the surface using textures, which wont squeeze the bubbles, but rather sets their size in solid steps, in order to blend from small bubbles to big ones.
transparency: change the transparency of the bubbles along the bubbles shape, to set the thickness of the walls between them. beerfoam will have a value about 0.8 and soapbubbles about 1.5-2
translucency: how much light gets through the surface, to lighten darker sides of your bubblemesh.
roughness: soapbubbles will have 0.0 roughness, while dirty water bubbles need a higher value 0.5-1
absorbtion: a value of 0.0 lets you see through, while higher values will darken the inner parts and absorb light.
alpha: use a ramp to blend the mesh into liquids, using this parameter. it ignores bubbleshapes (unlike the transparency value).
bump: set the strength of the bump. usually a value of 1 results in spherical glossyness.
offset: If you want to animate the bubbles, this vector can be used to move the texture. in many cases the mesh moves, but you want the bubbles to stay in place, like wave-foam. here you can use the input/geometry node's position vector to let the bubbles stay put.