I'm trying out a fairly common material setup, mixing a diffuse and a glossy shader with a fresnel node. My issue is that my material has some backfaces owing to its construction. They render correctly using either shader on their own, and if I look at their normals plugged into an emission shader they appear to be treated correctly.

However if I use a fresnel node, the results come out strangely, as if the backfaces normals are being treated as flipped (I know of course they really are, but surely this should be ignored when rendering?).

Here's an image showing the issue: Normals and Fresnel Shading Issue

Left: Mesh with some flipped normals. Middle: Normal output of geometry node plugged into emission shader. Right: Fresnel node plugged into emission shader.

I know in most circumstances the solution would be to recalculate the normals, but the mesh I'm working with is a thin sheet that you see both sides of. Is this a bug or can anyone suggest a workaround?

  • $\begingroup$ I don't think this is a bug. I'm guessing the fresnel uses the direction of the normals to calculate what is facing the camera. $\endgroup$ Dec 4 '14 at 17:34
  • $\begingroup$ What about adding a very thin solidify modifier? After all, nothing is infinitely thin in the real world. $\endgroup$
    – gandalf3
    Dec 4 '14 at 19:08

If you use the Fresnel node that has an IOR, then this is the correct behaviour, as the IOR is computed taking the direction of the normal into account.

A quick solution would be to use the layer weight node and select "Facing". You can alter the effect using an RGB curves node afterwards. Fresnel is basically "Facing" with a blend of 0.5 and an exponential curve afterwards:

enter image description here

The example above uses exactly the same normal setup as you do, but by using "Facing" the flipped normal faces are treated the same as the regular ones.

  • $\begingroup$ Thanks! I thought this might be a solution, I wasn't sure what the math for the facing to fresnel conversion was though. $\endgroup$
    – BenSimonds
    Dec 4 '14 at 18:42
  • $\begingroup$ Oh wow, nodes can solve all of life's problems o.o . I expected to just see exhortations to not mix solid and planar geometry anywhere it can be seen in an art mesh. (Back in 2.4x i tried to make a dragon/tadpole tailfin on a subsurfed spaceship using a planar extention off the center of a mirror modifier and it gave me no end of trouble…) $\endgroup$
    – StarWeaver
    Dec 4 '14 at 21:17
  • 4
    $\begingroup$ Nice to see you here Gottfried. $\endgroup$ Dec 5 '14 at 3:42

So Greg Zaal tweeted me an even better answer, which is to take the inverse of the IOR value for backfacing faces as in the node setup below: Solution: use 1/IOR for backfacing faces.

Works great. Thanks Greg.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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