• ⚠️ Mod Release Rules now apply to this board.

    All mods must include a license, source code (for executable mods), and proper attribution.

    Read the full rules here before posting.

Thin Film Interference (TFI) for Blender Artists

UriahGnu

Member
Nov 14, 2025
15
25
I hope this will be helpful for anyone trying to use TFI in their materials, as this will allow you to visualize the approximate result directly in Blender, and a similar setup could be made for Substance Painter.

  1. Get the lookup table from KSA, it is located in __Content/Core/Texture/ThinFilmInterferenceWaveform.png__
  2. Sample this in your shader and make sure the Color Space is **Non-Color** (Linear) and set the extension to **Clip** instead of Repeat.
  3. Sample your diffuse and thin film textures as I've done, and make sure your thin film texture is set to **Non-Color** (Linear)
  4. To lookup the thin film color result, you need to convert your thin film texture (0.0 to 1.0 range) into a UV texture coordinate, this is incredibly easy as the value of the texture can be directly used as the UV.x coordinate, simply use a Combine XYZ node and plug the TFI color into X, leaving Y at 0.0, now your TFI texture is using the KSA TFI texture as a lookup table.
  5. Mix > Soft Light blend the resulting TFI color with the diffuse texture color, as an approximation of the Mesh.frag shader, but if you really want to be accurate you would have to implement a Fresnel and the following function, which I don't think is necessary in Blender, but I've included it anyway.
interference *= 1.0 + pow(1.0 - cosTheta, 2.5) * 0.5;

vec3 overlayBlend = mix(
2.0 * sampledColor * interference, // if base < 0.5
1.0 - 2.0 * (1.0 - sampledColor) * (1.0 - interference), // if base >= 0.5
step(0.5, sampledColor)
);

return mix(sampledColor, overlayBlend, intensity);

- The last nodes which mix the color based on the sign of the Y position is just to compare the original diffuse color with the resulting color, but is not necessary to include.
- Make the Thin Film LUT a function (group) for re-use!

Blender Thin Film Shader.jpg

Blender Thin Film LUT Function.jpg

KSA Blender Thin Film Comparison.jpg
 
Last edited:
  • Like
Reactions: Terra Incognita