Re: [Algorithms] Lighting (HDR)
Brought to you by:
vexxed72
|
From: Matt P. <mat...@gm...> - 2009-07-25 23:23:42
|
On Jul 25, 2009, at 3:49 PM, Fabian Giesen wrote: >> >> A related note is that the extra cos theta factor doesn't come from >> it >> being a BRDF, but comes from the geometry of microfacets--i.e. the >> projection of a microfacet with angle theta_h from the actual surface >> normal projects to a differential area scaled by cos theta_h on the >> actual surface. > > I didn't mean to imply that you tack on an additional factor of > cos(theta) because it's a BRDF, but rather that the reflection > equation > (and also the rendering equation) contain the cos(theta) normalization > term, while the original Phong and Blinn-Phong shading models don't, > so > the BRDF for these original formulations has to divide through by > cos(theta) to get rid of the term in the integral, violating > reciprocity > in the process (and being generally physically implausible). Which is > why modern formulations don't do this. That's sort of an over simplification. For example, The Torrance- Sparrow BRDF has both 1/cos theta_i and 1/cos theta_o terms, not to make the old shading models match with the new reflection equation, but intuitively to account for the fact that as you approach grazing angles, the total projected area of all microfacets seen along a ray increases (and goes to infinity at grazing when you hit the point of your ray going through all of the microfacets!) (It is also reciprocal.) However, one generally includes a microfacet geometric attenuation term which (lo and behold) accounts for microfacets shadowing each other and in turn makes things behave properly at grazing angles. (At least 'modern formulations' in my world do, for what that's worth.) (I'm still not following what this other normalization term is attempting to achieve or how exactly it was derived.) -matt > > Anyway, Naty already explained the discrepancy between this and the > formula from RTR in the comments of the article I linked to. I'll > quote, > first from Rory: > > "I did manage to talk to Naty about this at GDC. He said that a > few people have asked him about the derivation of the specular > factor in the book, and that he had gone through it himself and > got the exact same answer as Fabian. The value they mention in > the book is just an approximation of that result." > > And then from Naty: > > "About the approximation we chose, we were not trying to be strictly > conservative (that is important for multi-bounce GI solutions to > converge, but not for rasterization). We were trying to choose a > cheap > approximation which is close to 1, and we thought it more > important to > be close for low specular powers. Low specular powers have > highlights > that cover a lot of pixels and are unlikely to be saturating past > 1." > > -Fabian "ryg" Giesen |