Sign in to follow this  

Energy conservation and rhoS

This topic is 1109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to read a bit about PBR and I have a doubt about a term rho_s for the Torrance Sparrow model that is referenced as a scaling coefficient.  Is that right to assume that including this the following formula is right from an energy conservation point of view: 
 
 click
 
Pardon me if this is complete bogus, but I am still trying to understand. If the above is wrong how can I combine specular and diffuse? 

 
Thanks!

 

EDIT:

To clarify,  my reasoning was that as long the specular BRDF and the diffuse one are energy conserving they shouldn't be more than 1 right? Now if rho is in the range of [0 ... 1] the above formula should guarantee that the sum of the two is 1. But is that correct? 

Edited by jjtulip

Share this post


Link to post
Share on other sites
That is not the only factor that needs to be considered for conservation to be ensured between specular and diffuse.  That is simply a linear interpolation between them.
 
The F, G, and D terms affect how much specular there is as well, and should also be factors in how much is left over for diffuse.
I haven’t found a simple and efficient way to account for each of the various D and G factors (simplifying or eliminating Monte Carlo methods etc.) and these are typically ignored in games.
 
F, however, is typically a standard Schlick Fresnel, and typically makes the most noticeable difference in the exchange between specular and diffuse.
Note that how much is left over for diffuse is not based on how much meets the observer’s eyes.
For the specular you see, you have to apply Fresnel based on your viewpoint, but to determine how much is left over for diffuse you have to apply it from the light’s point of view.
 
If your F term is this:
SchlickFresnel( fSpecReflectance, fVdotH ) // Based on V·H.
then the conservation factor to determine how much goes into diffuse in general is this:
(1.0 - SchlickFresnel( fSpecReflectance, fLdotN )) // Based on L·N.
 
Your diffuse would be multiplied by both (1.0 - ?s) and this term.


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites

That is not the only factor that needs to be considered for conservation to be ensured between specular and diffuse.  That is simply a linear interpolation between them.
 
The F, G, and D terms affect how much specular there is as well, and should also be factors in how much is left over for diffuse.
I haven’t found a simple and efficient way to account for each of the various D and G factors (simplifying or eliminating Monte Carlo methods etc.) and these are typically ignored in games.
 
F, however, is typically a standard Schlick Fresnel, and typically makes the most noticeable difference in the exchange between specular and diffuse.
Note that how much is left over for diffuse is not based on how much meets the observer’s eyes.
For the specular you see, you have to apply Fresnel based on your viewpoint, but to determine how much is left over for diffuse you have to apply it from the light’s point of view.
 
If your F term is this:

SchlickFresnel( fSpecReflectance, fVdotH ) // Based on V·H.
then the conservation factor to determine how much goes into diffuse in general is this:
(1.0 - SchlickFresnel( fSpecReflectance, fLdotN )) // Based on L·N.
 
Your diffuse would be multiplied by both ?s and this term.


L. Spiro

 

 
Gotcha, thanks!
 
Just to be sure, when you write 
 

Your diffuse would be multiplied by both ?s and this term. 

It is actually (1 - ?s) and the term, right? 

 

 

 

And last question: I usually use a scalar value in [0...1] derived from refractive indices for the fresnel (I always see this term referenced as R0 or F0). But I very recently bumped into some sources that suggest the usage instead of the specular colour, is that really the correct route? In case, should the fSpecReflectance be my regular spec colour ( R,G,B in [0...1] ) scaled by the R0 value? 

 

 

 

Share this post


Link to post
Share on other sites

It is actually (1 - ?s) and the term, right?

You are correct. I have modified my post to reflect this.
 

In case, should the fSpecReflectance be my regular spec colour ( R,G,B in [0...1] ) scaled by the R0 value?

I have never seen this. The Fresnel term is in-the-end one of the terms that will eventually be multiplied by the specular color, which should yield the same results whether you send 3 terms into an equation to be modulated at the end or you find the modulation factor and then multiply by the 3 terms. One is faster than the other in terms of graphics computing. I’d stick to the standard way in regards to this. Without seeing what you are referencing I can’t say they are exactly the same result, but I doubt there is a difference worth the trade in performance, assuming there is any difference at all.


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites

This topic is 1109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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