Sign in to follow this  
Alundra

[PBR] Fresnel fade out

Recommended Posts

Hi,
Is it really more physically correct to fade out the fresnel ?
In MJP sample it's like that :

// Fade out spec entirely when lower than 0.1% albedo
fresnel *= saturate(dot(specAlbedo, 333.0f));

In Unreal it's like that :

// Anything less than 2% is physically impossible and is instead considered to be shadowing
return saturate( 50.0 * SpecularColor.g ) * Fc + (1 - Fc) * SpecularColor;

Is it possible to know from where it comes because that seems recent to do that.
Thanks

 

Share this post


Link to post
Share on other sites

This is a hack that lets you multiply your cavity (specular occlusion) maps into your reflectivity maps. If the cavity map is black, that means that no light can reach this area (like a shadow mask), so you don't want to draw any specular in there, as no light = no specular. If you don't have specular occlusion / cavity data, then don't worry about this yet.

Share this post


Link to post
Share on other sites

I never really get what cavity is really because that looks to be ambient occlusion to me.
For example this link : https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/#cavity
I never understand why DiffuseMap * CavityMap gives an important touch on the rendering.
Would be easier to see a real difference with and without in a case where it has a sense.
To me that results to DiffuseMap * AmbientOcclusionMap...

Edited by Alundra

Share this post


Link to post
Share on other sites

Most lighting occlusion stuff is a hack to be honest :D

Ambient occlusion should darken the ambient light reaching an object, but shouldn't really darken the direct lights. E.g. if an object has some dark AO maps that tell you that it's in a corner, but then you shine a spotlight directly on that object, the AO maps should be ignored by the spotlight.

However, cavity maps tend to be lighter/sharper than AO maps, and they're used by every light source. They indicate areas where light has trouble reaching, even if it's being directly lit by a close up spotlight.

Share this post


Link to post
Share on other sites

Ok, I see here page 78 it's explained and also says it comes from Schuler in Shader X7 :
http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr_v2.pdf
Apparently it's because these area are too small for the shadow map so the cavity map is used there.

Small scale occlusion: In Frostbite we handle small occlusion by letting artists bake micro-occlusion directly inside textures. Cavities, creases or cracks are also too small to be handled by the shadow map. Thus, the micro-occlusion is applied on both the direct and indirect lighting. We chose to separate micro-occlusion into two parts: diffuse and specular micro-occlusion. They are both derived from the same micro-occlusion information .
Edited by Alundra

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this