iridescenceThickness
Defines the thickness of the thin-film for the iridescence effect, which is the most direct and sensitive parameter for controlling the resulting interference colors.
Core Advantages
Its key advantage is flexibility. It provides a unified input that can accept a constant float for uniform thickness or, more powerfully, a texture or noise node for variable thickness, which is key to creating realistic, flowing iridescence.
Common Uses
Simulating flowing soap bubbles or oil films using animated noise or texture maps.
Creating uniform coatings (like on lenses) with a constant float value.
Rendering oxidized metals by using a texture map to 'paint' thickness variations.
Driving procedural animations by connecting a `TimerNode` to the thickness calculation.
How to adjust
Assign a node to `material.iridescenceThickness`. A `float` node creates a uniform color based on that specific thickness. A `texture` or `noise` node creates rainbow patterns, where the grayscale value maps to a thickness, cycling through the color spectrum (Newton's rings) as the value changes.
Code Examples
1// Use an animated noise texture to simulate flowing, variable thickness
2const thicknessMap = noise( uv().add( timer.mul( 0.1 ) ) );
3
4// Connect the animated map to the material's thickness property
5material.iridescenceThickness = thicknessMap;