I’ve been researching on this node and have only found the theoretical explanations of it so far.
Basically, The Fresnel node outputs which percentage of light would be reflected off a glossy layer, with the rest being refracted through the layer. At grazing angles more light will be reflected than refracted as happens in reality.
My question is, what’s the Math that Blender used to calculate that 0-1 gradient? What’s the Mathematical formula for that?
Since Fresnel Effect contains both Reflection and Refraction, does Blender use Vector Reflection and Vector Refraction formulas to calculate Fresnel somehow?
Vector Reflection formula: r = i−2[(i∙n^)n^] , such that, r is the reflected vector, i is incident vector and n^ is the normal vector.
I have Vector Refraction formula too but it’s so long to be written in here.
Thank you
Even though there’s an accepted answer.
If you have some input, please don’t hesitate to share some insights.
The Fac from the node gives you the Fresnel Reflectance at its Normal angle and view.Iirc the Fresnel formula uses the dot product from normal angle and view. eG.From F0 to F90° angle if used on a sphere.Based of your IOR input ofc.
At this side you can see the most used Fresnel formulas
Hi, I’m researching and have raised some questions, please help me if you don’t mind:
Question 1.
Just to make sure, the Fresnel node only considers the Dielectric (non-metal) Fresnel, doesn’t it?
So that I can skip over the Conductor (metal) Fresnel’s formula which includes Imaginary Number.
Question 2.
Blender’s algorithm for Fresnel Effect uses Dot Product, right?
And by definition, Dot Product function outputs:
1 if the angle between 2 vectors were 0 degrees (straight on view to surface).
In other words, the incident vector and surface’s normal is parallel.
0 if the angle between 2 vectors were 90 degrees (glancing angle).
In other words, the incident vector and surface’s normal is orthogonal.
BUT, here’s what I don’t understand, considering this image:
The straight on view on surface clearly doesn’t output value 1. This is the opposite of the definition of Dot Product.
Meaning, Blender somehow flipped the Dot Product’s 0-1 values?
The cosi is used to have a fraction based on normal angle at view angle,to calculate the Fresnel reflectance.
This means it is Normal Face geometry and view depending how much reflectance you get.
The cosi within the Fresnel formula gives you the Fresnel reflectance as fac output not the dot product.The dot product is used for calc the Fresnel.Without the cosi you dont have a angle in the Formula,if that makes sence.
Thanks a lot for being thoughtful.
I’m trying to translate the codes to Mathematical language. After that, I’ll try to comprehend the Fresnel Equations Wikipedia page to understand the original intuition of the original Math.
1 - Dot(Geometry Normal, Geometry Incoming) = Layer Weight/Facing, which has nothing to do with Layer Weight/Fresnel or the Fresnel node. Not in a direct fashion anyway.
To preview data values like this, you may be better off switching to View Transform/Raw or Display Device/None to prevent any remapping.
Not sure what you mean with Vector Reflection and Vector Refraction. Fresnel is only supposed to be used to calculate how much reflection there is in slot #2 of Mix shader. Slot #1 of the Mix Shader can contain pretty much any fixed Shader Mix of absorption shaders (Refraction, Diffuse, SSS, Translucency, Sheen, pretty much anything surface shader without glossy).
Be aware that to produce the same result on the backside of thin geometry, 1/IOR has to be used for the IOR value. Otherwise you’ll get Snell’s window which is normally the desired effect.
Usually you plug in whatever normal modification you plug into building block shaders for a manual setup. Might want to not do it to make it less expensive.
Afaik, all shaders treat the Normal input the same way, but some shaders are more prone to shading artifacts if used in certain specific ways (which I sometimes do to fake nap direction in some fabrics).