Ior to layer weight blend (facing output)

I understand that when converting from blend to ior, the following equation is correct:

IOR = 1/(1 - blend)

I’m trying to convert from IOR to Blend, but I’m finding if my IOR is above 2, then the blend value = 0. Here’s the equation if anyone might point me as to my error:

blend = - ((-IOR + 1) / X)

      IOR =   1/(1 - blend)
    1/IOR = 1/1/(1 - blend)
          =      1 - blend
1/IOR - 1 =        - blend
1 - 1/IOR =          blend

blend = 1 - (1/IOR)

2 Likes

Thanks, both equations produce an identical result in python, problem seems to be with my node set up then.

For example IOR 1.45 = blend 0.31034482758620685, but my node setup seems to be producing something around 0.440.

OK, I’ve simplified my nodes by using your equation and now it works. Not sure what I was doing wrong with the nodes there.

Thanks

1 Like