glTF KHR_materials_iridescence and Thin-Film Optics

The KHR_materials_iridescence extension introduces physically based thin-film interference to the glTF 2.0 standard, allowing 3D rendering engines to accurately simulate color-shifting optical phenomena without requiring custom shaders. By defining properties such as film thickness, index of refraction, and intensity, the extension enables real-time renderers to recreate materials like soap bubbles, oil slicks, insect wings, and pearlescent coatings with cross-platform consistency.

The Physics of Thin-Film Interference

In standard physically based rendering (PBR), specular reflection calculates light bouncing off a single surface boundary. In reality, materials with thin transparent coatings feature two reflective interfaces: the exterior air-to-film boundary and the interior film-to-base substrate boundary.

When light hits this thin film, reflections from the top and bottom boundaries travel slightly different distances. Depending on the wavelength of the light, the film's thickness, and the viewer’s angle, the overlapping light waves either amplify (constructive interference) or cancel out (destructive interference). This mechanism causes the visible spectrum to shift dynamically as the viewing angle changes.

Key Capabilities of the Extension

KHR_materials_iridescence augments glTF's core metallic-roughness PBR workflow by defining how this interference layer alters specular reflections. It establishes several standardized parameters:

  • Iridescence Factor (iridescenceFactor): A scalar value (and optional texture) determining the intensity of the iridescence effect. At zero, the material reverts to standard metallic-roughness reflections.
  • Index of Refraction (iridescenceIor): The refractive index of the thin film itself. This controls the phase shift and reflectance magnitude at the film interfaces, directly altering the color palette produced by the interference.
  • Film Thickness (iridescenceThicknessMinimum and iridescenceThicknessMaximum): Defines the thickness range of the layer in nanometers. A corresponding thickness texture maps normalized values between these boundaries, allowing localized variation across a 3D model.

Optical Precision Without Custom Shaders

Before KHR_materials_iridescence, digital artists relied on arbitrary color-ramp textures or custom Fresnel shaders to fake color shifts. These approaches failed under varying lighting conditions and lacked consistency across different rendering engines.

The extension standardizes an analytical approximation of the Airy equations for wave interference. Render engines read the provided nanometer thickness and refractive index to calculate phase differences and Fresnel equations directly in real time. This ensures that the hue shifts correspond to true optical wavelengths and react realistically to dynamic environment lighting.

Real-World Material Applications

By isolating thin-film physics into modular parameters, the extension enables high-fidelity simulation of specific material categories:

  • Fluid Films: Soap bubbles and oil slicks on wet pavement, characterized by low indices of refraction and variable nanometer thicknesses that shift dynamically.
  • Biological Iridescence: Peacock feathers, beetle shells, and butterfly wings, where structural coloration depends on microscopic surface layers rather than pigments.
  • Industrial Coatings: Anti-reflective glass, tempered metals showing heat discoloration, and pearlescent automotive paints.