Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -840,23 +840,31 @@
Thin-film iridescence
-------------------------------------

_Iridescence_ is the occurrence of rainbow-like color fringes in the reflection when a thin dielectric film with thickness on the order of the wavelength of light is placed on top of a material, due to wave interference between the various electromagnetic reflection modes within the film. To model this, there is assumed to be such a thin-film sitting on top of the base substrate (whether metal or dielectric), parametrized only by:
_Iridescence_ is the occurrence of rainbow-like color fringes in the reflection when a thin dielectric film with thickness on the order of the wavelength of light is placed on top of a material, due to interference between light reflected from the film's top and bottom surfaces, including internal reflections. To model this, we assume such a thin film sits atop the base substrate (whether metal or dielectric), parametrized by:

- **`thin_film_weight`**: the coverage (presence) weight of the film,
- **`thin_film_thickness`**: the thickness of the film in micrometers ($\mathrm{\mu m}$), mostly affecting the spacing of the fringes,
- **`thin_film_ior`**: the index of refraction (IOR) of the film, mostly affecting the hue of the fringes
- **`thin_film_thickness`**: the thickness of the film in micrometers ($\mathrm{\mu m}$),
- **`thin_film_ior`**: the index of refraction (IOR) of the film.

The coverage weight functions as a blend between the BSDF with and without the presence of the film, and thus allows one to dial the effect without altering the shape and saturation of the color fringes.
The thickness and IOR together affect the intensity, spacing, and hue of the color fringes. The coverage weight acts as a blend between the BSDF with and without the presence of the film, allowing the overall strength of the effect to be adjusted without altering its structure or color.

The currently recommended thin-film model is that of Belcour and Barla [#Belcour2017]. The shape and color of the fringe patterns in the reflection from the film will be affected (as described by Belcour and Barla) by the complex IOR of the adjacent media above and below the film, which in general are a statistical mix of metal and dielectric below and coat and ambient medium above (which the fuzz is index-matched to). Figure [ior_configs] illustrates the eight possible different structures depending on the presence of both the film and coat, each of which leads to different Fresnel effects due to the differing IORs at the interfaces.
The currently recommended thin-film model is that of Belcour and Barla [#Belcour2017], which pre-integrates interference effects using Fourier-domain convolutions and Gaussian filtering. This method efficiently produces high-quality fringe patterns in an RGB rendering context, but it can be challenging to implement and may introduce inaccuracies in some cases, as it assumes that Fresnel amplitude and phase coefficients remain constant across each spectral band, which limits the model's ability to capture wavelength-dependent dispersion effects.

![Figure [ior_configs]: Schematic of all 8 possible IOR configurations, including those involving the thin-film.](images/IOR_configs.svg width="95%" align="center")
A more direct alternative is a "locally spectral" approach that computes reflectance per light path by evaluating the full Fresnel and Airy interference stack -- including complex amplitudes, polarizations, and phase shifts -- at specific wavelengths sampled per path. This can begin with fixed red, green, and blue wavelengths, but better results are achieved by stochastically sampling wavelengths from approximate camera sensitivity curves. This enables convergence to neutral gray for very thick films and avoids the high-frequency color banding that fixed RGB wavelengths can produce. The same wavelengths can also be reused to model dispersion (as described in the Translucent base section), while all other BSDF components are free to ignore them and operate in RGB as usual. This approach uses only the Airy summation from Belcour and Barla (Equation 3 from [#Belcour2017]) but requires additional per-wavelength computations and assembling the necessary formulas from multiple sources rather than a single reference.

Regardless of which approach is chosen, several considerations apply to both:

- The shape and color of the fringe patterns in the reflection from the film will be affected by the complex IOR of the adjacent media above and below the film, which in general are a statistical mix of metal and dielectric below, and of coat and ambient medium above (to which the fuzz is index-matched). Figure [ior_configs] illustrates the eight possible different structures depending on the presence of both the film and coat, each of which leads to different Fresnel effects due to the differing IORs at the interfaces. In principle the implementation should account for all of these configurations accurately, though the precise modeling of these effects is left to the implementation.

In principle the implementation should deal with all these physical configurations correctly, though modeling of the precise effect is implementation-dependent. In practice, this wave-optics effect is most easily incorporated directly into the Fresnel factor of the microfacet BSDFs of both the metal and dielectric-base layers. (For this reason, this effect is not represented by incorporating an explicit thin-film Slab into the model).
- In practice, this wave-optics effect is most easily incorporated directly into the Fresnel factor of the microfacet BSDFs of both the metal and dielectric-base layers. (For this reason, this effect is not represented by incorporating an explicit thin-film Slab into the model.)

Note that in the case of the dielectric base, the thin-film should also generate color fringes in the transmission lobe. This is important for example when rendering soap bubbles (see [#Belcour2017]).
- In the case of the dielectric base, the thin-film should also generate color fringes in the transmission lobe. This is important for example when rendering soap bubbles (see [#Belcour2017]).

In the case of the metallic base the physics is somewhat ambiguous since, as described in the Metal section, the Fresnel factor for metal is defined according to the Schlick-based "F82-tint" parametrization which does not specify the underlying physical complex IOR. We suggest here that some reasonable approximation is employed to map the Fresnel factor to the best matching effective complex IOR, for example that described by [#Gulbrandsen2014].
- In the case of the metallic base the physics is somewhat ambiguous since, as described in the Metal section, the Fresnel factor for metal is defined according to the Schlick-based "F82-tint" parametrization, which does not specify the underlying physical complex IOR. We suggest here that some reasonable approximation is employed to map the Fresnel factor to the best matching effective complex IOR, for example that described by [#Gulbrandsen2014].

- Because the thin film is non-absorbing and interference-based, it only redistributes the probabilities of reflection and transmission; therefore, it should not violate energy conservation.

![Figure [ior_configs]: Schematic of all 8 possible IOR configurations, including those involving the thin-film.](images/IOR_configs.svg width="95%" align="center")

</br>

Expand Down