Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Cavity in UE 4


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 B_old   Members   -  Reputation: 665

Like
0Likes
Like

Posted 04 November 2013 - 06:08 AM

How do you think the cavity parameter in the Unreal Engine 4 material model is used. The course notes say it describes small shadows. In what way is it different from baking AO into the color texture for example?



Sponsor:

#2 Tasty Texel   Members   -  Reputation: 1334

Like
0Likes
Like

Posted 04 November 2013 - 06:35 AM

According to course notes the cavity is simply a factor which affects the highlight intensity directly. Cavity basically models very small scale AO as far as I know.



#3 B_old   Members   -  Reputation: 665

Like
0Likes
Like

Posted 04 November 2013 - 07:02 AM

According to course notes the cavity is simply a factor which affects the highlight intensity directly. Cavity basically models very small scale AO as far as I know.

Do you remember where you read that? I cannot find the part about affecting the highlight intensity in the these course notes. Does it only affect the highlights or the diffuse lighting as well?



#4 Tasty Texel   Members   -  Reputation: 1334

Like
0Likes
Like

Posted 04 November 2013 - 08:06 AM

It should theoretically also affect the diffuse part, but the notes say nothing explicitly about that.

Page 9:

BaseColor, Metallic, and Roughness are all the same as Disney’s model, but Cavity parameter wasn’t
present, so it deserves explanation. Cavity is used to specify shadowing from geometry smaller than
our run-time shadowing system can handle, often due to the geometry only being present in the normal
map. Examples are the cracks between floor boards or the seams in clothing.The most notable omission is the Specular parameter. We actually continued to use this up until
the completion of our Infiltrator demo, but ultimately we didn’t like it. First off, we feel “specular” is
a terrible parameter name which caused much confusion and was somewhat harmful to the transition
from artists controlling specular intensity to controlling roughness.Artists and graphics programmers
alike commonly forgot its range and assumed that the default was 1, when its actual default was Burley’s 0.5 (corresponding to 4% reflectance). The cases where Specular was used effectively were almost
exclusively for the purpose of small scale shadowing. We found variable index of refraction (IOR) to be
fairly unimportant for nonmetals, so we have recently replaced Specular with the easier to understand
Cavity parameter. F0 of nonmetals is now a constant 0.04.

Edited by Bummel, 04 November 2013 - 08:07 AM.


#5 dw9   Members   -  Reputation: 168

Like
1Likes
Like

Posted 05 November 2013 - 03:14 PM

I'm not sure what they are doing in UE4, but it seems to me that you would want cavity to scale the grazing angle specular contribution and also scale the diffuse. If it simply scales the specular it would shadow even if the reflection is coming straight from the view direction. Simply scaling the fresnel term might give reasonable results. Something like:

 

  F = f0 + (1.0 - f0) * (1.0 - H.V)5 * (1.0 - cavity)

 

Or you might need to scale the entire fresnel term by a view dependent cavity.

 

  F *= 1.0 - (1.0 - H.V) * cavity

 

I haven't tried any of this yet, so take this with a grain of salt.



#6 B_old   Members   -  Reputation: 665

Like
0Likes
Like

Posted 06 November 2013 - 02:40 AM

I agree with you that it probably is doing more than just scaling the specular. Thanks for your suggestions!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS