โ† All examples

blender tools

Soap bubble material with thin-film colours

Build a soap bubble material: a reflective layer whose thin-film thickness grows from top to bottom like a draining film and swirls with noise, mixed over a transparent shader by Fresnel so the bubble is clear face on and iridescent at grazing angles. Use it for bubbles and iridescent films.

Recorded render of Soap bubble material with thin-film colours

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • graphcheck.py
  • material_soap_bubble.py
  • meshcheck.py
  • preview.png
  • test_material_soap_bubble.py
  • test_package.py
  • verification/native.json

How it works

Operator
baltor.material_soap_bubble
Parameters
material_name, top_thickness, bottom_thickness, swirl, swirl_scale, film_ior, assign
Result
One material with a node tree; assigned to the active object.
Blender
4.2 or later
Axes
Blender Z up, -Y forward
Units
metres

Recorded checks

blender 5.2.1 LTS (hash 9e2066aef7ef built 2026-08-25 02:12:34)

  • addon_install_and_enable
  • operator_runs_with_defaults
  • blender_data_matches_core
  • addon_disable_unregisters
  • script_mode_runs
  • clean_reopen_addon_file
  • clean_reopen_script_file
  • gltf_separate_export
  • engine_output_clean

Limits to consider

Needs the Thin Film inputs of the Principled BSDF (Blender 4.2 or newer). The film is shaded on a single surface with no refraction through a liquid layer, which suits thin bubbles but not thick soap water. Drainage follows the object's generated Z, so rotating the object rotates it. Rendered here with Cycles CPU only. Verified in Blender 5.2.1; written for the 4.2 API.