15
$\begingroup$

I know that the Fresnel and Layer Weight nodes do much the same thing, but with one accepting a proper Index of Refraction, and the other a value between 0 and 1. I have always used the Fresnel node as it allowed me to simply look up the proper IOR of any specific material online and plug it in. However, if I wanted to use Layer weight, how would I go about translating an IOR, which I've seen as low as .18 and as high as 2.5, into a value between 0 and 1 to get the same effect out of layer weight? Is there a conversion formula or ratio?

$\endgroup$
  • $\begingroup$ If you want to use a specific IOR I'd say just use the fresnel node.. I only really use the layer weight node when I don't care what the IOR is and I just want a certain effect ;) $\endgroup$ – gandalf3 May 2 '15 at 2:42
11
$\begingroup$

By comparing visual results from both LayerWeight's Fresnel and Fresnel Node on a test sphere I concluded that these settings give similar results:

enter image description here

Blend:  0.00  0.10  0.50  0.70  0.80  0.90  0.95  0.98  1.00
  IOR:  1.00  1.10  1.70  3.30  5.10  10.0  20.0  50.0  1000

The Y scale is logarithmic

Confirmed by Brecht (thanks) the conversion formula is:

  • IOR = 1/(1 - Blend)

  • Blend = 1 - 1/IOR


Layer Weight node:

  • Layer Weight Facing output mixes the two shaders based of angle of incidence.

  • The Fresnel output mixes them based on fresnel formula (Dielectric fresnel weight), which is a function of angle of incidence. The exact math is here: Wiki

  • The Blend slider adds additional blending between the two shaders: at 0 it will be green and at 1 it will be red.

    enter image description here

On the other hand the Fresnel node allows for proper IOR input:

enter image description here

I use Fresnel node when dealing with glass-like materials, where the light goes through - where it bends at the interface. I can set proper IOR for the interface this way.

I use Layer Weight node when dealing with reflectivity, it allows for better control over the transition on the surface (how smooth it is) and over how the materials are mixed (with that blend slider). This suits artistic approach better when you are eye-balling stuff.

$\endgroup$
  • 1
    $\begingroup$ If Blend is adding additional Blender, then when using the Layer Weight node, what determines the IOR that it's using? I don't really understand the complex math enough to follow much from that link. Is there a way to translate IOR into a value between 0 and 1 and use it in layer weight accurately? And if you could, would that be even close to physically accurate? $\endgroup$ – Drudge Apr 30 '15 at 20:20
  • 1
    $\begingroup$ @Drudge I don't know if it's physically accurate (depends on the coding that developers know) but by comparing the results from both nodes on a test sphere you can use formula: IOR = 1 - log(1 - Blend) $\endgroup$ – Jaroslav Jerryno Novotny Apr 30 '15 at 20:36
  • $\begingroup$ Correction: That formula is wrong it has a different graph function than what it should. It matches in the border cases but that's all. See the plot what the graph is. $\endgroup$ – Jaroslav Jerryno Novotny May 1 '15 at 9:23
  • 6
    $\begingroup$ The formula is IOR = 1/(1 - blend) $\endgroup$ – brecht May 1 '15 at 9:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.