iridescenceIOR
Provides the Index of Refraction (IOR) for the thin-film layer in an iridescence effect, a key physical parameter that determines its color response.
Core Advantages
Abstracts the complex physics of thin-film interference into an intuitive physical parameter and seamlessly integrates with the Three.js physical material system, greatly simplifying the creation of advanced materials like soap bubbles or oil slicks.
Common Uses
Simulating the iridescence of soap bubbles (IOR ≈ 1.34) or oil slicks on water (IOR ≈ 1.47).
Creating pearlescent or color-shifting car paints and special plastics.
Approximating the structural color of organisms, like beetle shells or bird feathers.
Rendering oxidized metal surfaces or multi-coated lenses.
How to adjust
Modify the `material.iridescenceIOR` property (a number) in JavaScript. Changing this value directly affects the color spectrum of the iridescence, rather than simply strengthening or weakening the effect. For example, changing from 1.33 (water) to 1.7 (oil) will shift and alter the interference colors across the surface.
Code Examples
1// In a physical material, iridescenceIOR works with other iridescence properties
2material.iridescence = 1;
3material.iridescenceIOR = 1.33; // Thin-film IOR
4material.ior = 1.0; // Substrate IOR (air)
5material.iridescenceThickness = thicknessMap; // Thickness controlled by a texture