I just happened to come across this on blendswap, which then pointed me to a youtube video that shows how to set up a node group that gives you some much easier (and probably more realistic) control over fresnel reflections, taking roughness and minimum reflectance into account :)
The author of the video didn’t provide a link to download the node group, so I figured I’d copy his setup and upload it here.
Download node group
Inside the group:
Note: I never actually downloaded that file on blendswap, for all I know it’s identical :S
- Fac – Use this to reduce the reflectivity (e.g. plug your specular/refl map in here)
- Shader – The first (non-reflective) shader (e.g. Diffuse, SSS, refraction…)
- Shader (Refl) – The reflective shader (e.g. a Glossy shader)
- Power – The fresnel exponent – use this to make the edge more or less reflective relative to the center
- Min Refl – The least amount of reflectivity (in the center where the surface normal points at the camera)
- Roughness – Set this to the same as the roughness of your Glossy shader. The higher the roughness, the less reflective the edges are (roughness = 1 will mean the Min Refl value is used everywhere)
Differences between this node and the video:
- The Min Refl value (called F-0 in the video) is gamma corrected – meaning lower values have a smaller influence. The default value (0.2) is the same as the default value in the video (0.04, not gamma corrected). The isn’t necessarily less physically accurate, just easier to control. Color management is a bitch.
- The shader inputs and outputs are not included in the video, but I figured we might as well include them because the setup is the same every time. I could have included the Glossy shader in the group as well because it will almost always be pure white and use the same roughness as the group, but you might sometimes like to use a more complicated reflection setup with layered Glossy shaders.
There really needs an easier way to share node groups with others.
“I never actually downloaded that file on blendswap, for all I know it’s identical :S”
Hehe, mine and yours are about the same exact thing, minus the Gamma node and shader inputs.
I’m glad to know that you approve this node setup. As you are the basicly Shading “Guru” of the Cycles world. :P
Hah nice! But I was just copying the video really, he’s the real guru :P
It might be a good idea to include the normal input into the node group.
Definitely! Great idea.
Did you setup the fac input at the top or the node to be used for spec maps? The main reason why I’m asking, is because according to marmoset, spec maps should actually be roughness maps, because most objects have similar reflectivity, and it’s really the roughness that changes the most.
I’m probably not explaining it well, so here’s the article (Scroll down to “All Hail Microsurface”):
btw, your footer still says all content copyright 2014. Might want to look into fixing that :)
I’m wondering on how to translate the power value in to a IOR value in order to being able to set a proper physical input.
Most likely the fresnel node included in Blender would work better for doing that.