The shader can be used in the reflection color slot of a VRayMtl material through a VRayOSLTex, with the Fresnel option for the material turned off (the shader does its own Fresnel calculations).
The shader code and a sample scene are here: thinfilm.zip
UI Text Box
type
info
The hdr image is not provided as part of the sample scene. Feel free to replace it for a similar lighting result.
Section
Column
width
100%
Parameters
thicknessMin - the minimum thickness of the thin film, in nanometers.
thicknessMax - the maximum thickness of the thin film, in nanometers.
thickness - a texture map that specifies the actual thickness of the film between the specified min and max thickness values. Normally this would be something like a noise map to give some variation to the interference effect. If this is left blank, the thicknessMin parameter specifies the film thickness.
nmedium - refractive index of the medium surrounding the material. Normally this is set to 1.0 for air.
nfilm - refractive index of the medium that the thin film is made of.
ninternal - refractive index of the medium below the thin film.