Bubble Blowing Lab

Physical Optics & Fluids — Hologram interactive shader collection

Bubble Blowing Lab simulates the formation and optics of soap bubbles — thin spherical films of soapy water that produce vivid rainbow colors through thin-film interference. The shader captures both the dynamic formation of bubbles and their characteristic iridescent surface patterns.

The iridescence arises from thin-film interference: light reflecting from the outer and inner surfaces of the soap film travels different path lengths, causing constructive and destructive interference at wavelength-dependent angles. The shader computes this interference based on film thickness (which varies due to gravity drainage), viewing angle, and refractive index of the soap solution. Thicker regions at the bottom appear different colors than thinner regions at the top.

Bubbles form, float, interact with air currents, and eventually pop. The film thickness evolves over time as gravity drains soap solution downward, creating the characteristic horizontal color bands that shift before the bubble bursts. Interactive controls adjust bubble size, film thickness, wind, and lighting.

Technical Details

Experience this shader live at hologram-puce.vercel.app/bubble-blowing-lab