Fresnel - IOR?

I can’t follow the Unreal Documentation creating a simple IOR Fresnel control.
Does anybody know a simple Video or maybe already a Shader for Download that includes the node construct?

Thanks a lot, appreciate any little help!
cheers

I need it too, and If I found something I’ll share it!

Can you be a bit more specific? Do you mean a material parameter that’s available in the material instance?

Hehe… This is going to be very common now. All the people hyped about UE5 getting in trying it and then having their high expectation colliding with how different UE4 is to offline renderers.

Unreal uses Disney based PBR model, where you don’t really use IOR based fresnel anymore.

In real world, materials are divided in two groups, dielectrics and metals. Dielectrics have fresnel IOR range between roughly 1.2 to 1.8. Metals aren’t usually affected by fresnel at all. And the PBR shading model takes this into account.

In Vray, or Corona, the right workflow is to have your IOR at around 1.5 for dielectrics, and then either use the actual real world IOR value for a material if you have one, or just tweak it slightly in that 1.2 to 1.8 range to adjust how reflective your material appears. Glossiness (which in UE4 is inverted as roughness) is then the main driver of how shiny material appears. That’s the case for Vray/Corona too since addition of “glossy fresnel” which correctly reduces reflectivity as the roughness increases.

So the workflow in Vray/Corona these days is to keep reflection amount all the way at 1, have proper Fresnel IOR at about ~1.5 and mainly use glossiness to define material property. In UE4 it’s about the same, except you have this “Specular” input in the material. This may confuse you to think that the Specular input is actually reflection amount/multipler the same way in Vray/Corona, but actually, specular is a gradient between Fresnel IOR 1 and about 2.0 or something, with the default specular value 0.5 being roughly 1.5 to 1.6 fresnel IOR.

So with Unreal’s PBR material out of the box, the material is already correctly set up with average Fresnel IOR for most dielectric materials, and you can just star to tweak or map the roughness value to actually define the surface reflection properties of your material. Then you can also use the Specular to fine tune the amount of reflection if you want, but keeping it at default and not plugging anything into it works well for 95%+ of cases.

Then for non-dielectric, metal materials, just set Metallic value to 1, and in that case, the specular input will correctly have no effect. In real world, aside from some exotic cases, dielectric and metal materials aren’t really a spectrum, so you should mostly use just value of 0 or 1, not something in between. Unreal allows you to do that but that is in most cases for the purposes of plugging some texture data into it, for example if you have a texture mask of scratched painted metal where parts of the surfaces are exposed metal while other are dielectric paint material surface.

Lastly, unlike Corona/Vray, where you have to set diffuse all the way to 0 for proper metal materials, and use reflection color to color your metallic material, in UE4’s PBR shading system, Base Color defines diffuse color for dielectric materials and reflection color for metal materials, so you use the same base color slot for both. If you then had your metallic value to 0.5 (which you generally shouldn’t), then 50% of the base color is used for diffuse color and 50% for the reflection color.

So yeah, that’s it. I hope this will be useful fro all the archviz crowd attempting to use UE4 again. :slight_smile:

3 Likes

Hey thanks everyone and thanks Rawalache for your nice explanation. But to keep it practical. I need to control the falloff. In which I can control just two colors, only in the difuse slot (albedo). And not using the Emissive input.

Also… I want to achieve the opposite. I want a Black Falloff on the edges, and the difuse color in the center.

I followed the Unreal Doc, which you can find here.
https://docs.unrealengine.com/en-US/…nel/index.html

But for some reason, I can’t construct the nodes and I can’t get the Fresnel result.

I think it would be always a great help, if a simple project file is included to the documentation.
So you can download and look under the hood.

All I want, is a simple Fresnel construct, that blends two colors in the Difuse (Albedo) with a Fresnel Falloff.
I did it see in my video - but I also want a solution for the Roughness reflection.

And yes, of course I need a parameter to control the curve.

Thanks a lot for any little help,
appreciate it!
cheers

You should have got a message, hopefully with a material attached.

How about a logarithmic function or math node connected between the fresnel and the roughness pin? Perhaps a logarithmic function that’s compatible with a sphere, such as the formula for volume calculation of a sphere, or something similar.

You’ve basically got it!
For Roughness just use a Lerp node - to get it hold “L” and click in the material editor.
In my example I used a Clamp node just before I feed the alpha into he lerp node - in my case (for roughness) its basically useless, but can help avoid some strange behavior if you use color inputs for A and B.

thanks man… so the Lerp is basically a FallOff, right?

Argh, so you didn´t got my message :frowning:

Well, no, the Lerp is not a falloff, it is a blending function, that blends between those two inputs A and B, based on whatever grayscale texture or shader you plug into the Alpha input. Your desired falloff has to be created beforehand, and in your case, it´s created by the Fresnel node (you also just could put in a texture with such a gradient, that just would not be view dependent).

Fun fact: There are two different Fresnel Nodes, the one you use, and a function with some more inputs, but both should give you the same results with the same exponent inputs etc. You can make a double click on the fresnel function node to see, how it calculates it´s falloff.

Thank you guys, very interesting!