Realistic thin film iridescence

  • April 11, 2018
  • 1,018 Downloads
  • 31 Likes
  • Blender 2.7x
  • Render: Cycles
  • Creator: Moony
  • License: CC-0
You must be logged in to download.

Description:

This cycles shader has been designed to try and produce a semi realistic thin film iridescence effect. I created it by combining offset R, G, B sine waves to try and recreate the iridescent spectra as shown on websites like this ("Colours of a Soap Film")

http://soapbubble.wikia.com/wiki/Color_and_Film_Thickness

To use this shader:

Min Thickness = Minimum thickness of the thin film (in nm)

Width = Width of the thin film effect. So if your min thickness is 50 and your width is 25, the thin film effect will create colours consistent with a film that varies from 50nm to 75nm (the maximum thickness colour will appear at glancing angles). Use zero width if you want a uniform thin film thickness.

Phase = This is the phase of the thin film effect. If you want to replicate your thin film material having a higher IOR than the substrate (e.g. oil on water), set it to -1. If your substrate has a higher IOR than your thin film, set it to +1. Avoid using other values as the results may be unpredictable.

Blend = This controls the angle of the falloff. Smaller values lead to your min thickness colour covering a larger area.

Falloff = this controls how the colours fade as the thin film gets thicker (larger values will fade the colours more leading to more pastel colours).

Use the following parameters carefully as they'll completely change the iridescent spectrum. I arrived at the default figures after much experimentation and have based it on a soap/water film. In theory - by changing these parameters you can simulate any thin film material over any substrate, but I don't know how these numbers relate to real world IORs - so you'll just have to experiment/eyeball it.

Red Sequence = This is the base sequence for the red sine wave. Higher numbers lead to more compact sine waves (more stripes).

Green Offset = This offsets the green sine wave relative to the red and thus changes the overall iridescent spectrum.

Blue Offset = Same as Green offset.

Linear = Changes the falloff to linear on the x-axis rather than layer weight facing. Can be used if you want to vary the thin film thickness using a texture and it not change with viewing angle. Use values between 0 and 1 if you want some combination of the effect.

The images associated with this blend are just examples of what you can do with this node group. You can do stuff like colour flip car paint, oil stains on water, iron tempering colours etc. Note: these materials are not included in the blend file itself - only the base node group is given.

Note - this material also contains my 'microroughness' node as release here https://www.blendswap.com/blends/view/91209

If you want to use the iridescent node in you own material - just copy the "iridescence" node group, paste it into your own material and plug it into the colour slot of whatever shader you want.

Comments:

  • TreyClaine profile picture
    TreyClaine

    Can you do some drink & food materials please?

    Written April 20, 2018
  • Moony profile picture
    Moony

    There is a specific request function on Blendswap if you want stuff like that. My focus with materials tends to be on more interesting effects and unusual approaches.

    Written April 22, 2018
  • 54gt5hy5gtfGT5 profile picture
    54gt5hy5gtfGT5

    How did you manage to apply the effect to the first image and get a black material? I've fiddled with all the settings and even tried using a mix shader with it but it keeps showing up on silver :/

    Written April 12, 2019