# Energy conservation and rhoS

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

## 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 on other sites

Yes, that is true. The integral of a sum is the sum of the integrals. So if both terms are energy-conserving them their weighted sum will be as well.

##### 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 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 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

1. 1
Rutin
36
2. 2
3. 3
4. 4
5. 5

• 12
• 14
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633345
• Total Posts
3011439
• ### Who's Online (See full list)

There are no registered users currently online

×