Update Pending: See post 72 for update v2.2
Hey everyone! Welcome to the colorful update of v2.1 of the thin-film interference node group which was originally adapted from @prutser’s OSL code.
Here is pruster’s original thread.
This new update generalizes Snell’s law for lossy incident media (such that R+T is always 1 when the films are not lossy), adds absorption, and allows the dielectric inputs and outputs to be calculated with RGB values like everything else.
Only the “Interference”/“Thin-Film Interference” node group is under a CC BY-NC-SA 4.0 license, but its output can be used for any purpose:
Here is v2.1 (most recent update: 8/21/18 4:15 a.m. ET)
Here is v2.0
Here is v1.0
10 new materials, 9 of which are examples of what situations you can simulate with the node group, have been added:
(All rendered at 500 samples)
There are many, many more combinations of substrate and surrounding media that you can simulate–not to mention all the possibilities of films you can add!
While the render times might be slightly different, the results for previous materials from v2.0 should appear exactly the same as in v2.1, so the following images are still correct (the glass results from v2.0 onward are less noisy and very slightly brighter):
Respective render times (min): 9:33.97 and 7:10.44 (500 smaples)
Respective render times (min): 6:49.82 and 4:44.92 (500 smaples)
Future possible updates (in no particular order):
- Substrate roughness: find a roughness curve that mimics the (square root of the) roughness of the principled shader
- Roughness in a film: not necessarily the same as the substrate roughness due to the interference effects (can probably be simulated well with large scale textures as the thickness input)
Enjoy using the materials and node group!