Iridescence - Thin Film Shading
Introduction
Iridescence from thin-film interference is caused by a thin layer of one material on top of another.
The node refers to these two materials as film and base. In the example above, the film is oil and the base is water. For a soap bubble, the base would be air, as it is only a single layer of soap..
In general, let IOR and thickness generate the colours. Setting a base colour will likely not give you what you expect.
Getting started
Download the included .blend file, but open your own project. Use file > append and choose the iridescence file. Append "Thin Film Main" in "NodeTree". Alternatively, append any material in the "Material" folder. All required node groups will automatically be imported too. Those node groups are name coded, to easily separate them from your own.
For opaque materials:
Connect the colour output to the base colour of a principled BSDF node, this will be the base material. Make sure that it is metallic, or the reflections won't be tinted properly, a glossy node also works.
Always connect an (empty) normal map node. The node group system doesn't have an effective way of setting a default map. So this step is necessary, even when you aren't planning on using a normal map texture. Set Film IOR and Film thickness like explained below.
For film on a transmissive base like water, glass or air:
Start the same way as before, but set the Base Transmission to 1, you should also set the Base IOR. Don't use the thin-film colour on the transmissive material
Settings
Film IOR
The film index of refraction determines most of the effect behavior. It can be found on sites like this one, or for more exotic materials this one (only use the n value).
Common values are ~1.5 for glass-like materials and up to 3.3 for metals.
Larger film IOR makes the same effect visible at much smaller thicknesses (see thickness). It also greatly decreases the effect that the viewing angle has, thereby also decreasing the amount of visible colour bands.
When looking up the refractive index for anodized metals, look for the oxide that actually makes up the film. So titanium dioxide instead of titanium itself.
Film Thickness
The thickness determines where in the spectrum the iridescent colours lie. Those spectrums depend on film IOR. Use charts like these for reference if you're looking for a specific colour:
These charts are often in nanometer, in the node it's in micrometer. This is because it results in values that are more easy to use in blender. Common values range from 0.02 to more than 2.0. For large thicknesses the colours will fade (see Colour Blending)
Varying the thickness with a texture and can greatly enhances the look. Examples of these are irregular natural materials, swirls in fluid or a metal that wasn't heated equally on al parts.
Gamma
Setting the gamma to a value higher than 1.0 increases the "strength" of the colours produced. This can achieve a more stylized result, or negate the effects of certain colour management settings.
Angle Effect
This should only be used in some specific cases . Setting Angle Effect to a value other than 1.0 can take away from the physical accuracy. However, advanced car paints can use complex mixes of randomly oriented metal flakes, to achieve more extreme colour changing effects (example: chromaflair). This is doesn't happen with regular thin film settings, but a higher Angle Effect can recreate it.
Note: While decreasing IOR would also increase colour changing over angle, changing it has other consequences and introduces unwanted side effects.
Colour blending
As thickness increases, the interference effect fades and colour bands blend. This happens at different rates for different wavelengths. So it not only desaturates but also introduces new hues. Values of 0.5 to 1.0 are recommended.
Base IOR
The index of refraction (see film IOR ) of the material underneath the film. It only has an effect when Base Transmission is non-zero. In that case it influences the alpha mask and the strength of the interference under certain angles. When possible this should be set correctly to ensure physical accuracy, although small changes are only barely visible.
Note: this has no influence on the IOR value of the glass or refraction shader you mix with using the alpha. Make sure that is also set accordingly.
Base Transmission
Adjusts the internal computation, resulting in a different interference pattern and alpha mask. If Base T ransmission is 0, iridescence renders as if double sided-normals is active.
When Base Transmission is larger than 0.5 it activates an effect where part of the light is given an 180° phase shift. This makes it so that a thickness of 0 micrometer results in black, where it would be white otherwise. Recommended values are 0 or close to 1.
Base Colour
Determines colour absorption of the material underneath the film. In most cases this should be near white. It only affects the light that reflects off of the base material, not the part that reflects from the film directly. So if the colour is set to RGB(100%,0%,0%), there can still be green and blue in the reflection. An example of a material using it is copper-coloured car paint. It contains a film that generates yellow interference, but is paired with red FeO2(rust).
Normal
The normal input should always have a normal map connected, even if it doesn't use a texture. When using a normal map texture, those angles are taken into account for generating the interference patterns. This is able to create colour variation on flat surfaces.
Discover more products like this
iridescence spring24 spring23 summer22 PBR bfcm22 loveblender spring21 Shader reflections bcon22 bfcm23 summer23 bfcm24 bfcm21 Cycles summer24 winter24 photorealistic spring22