From: Matt Pharr <matt@ph...>  20090725 20:43:42

(below) On Jul 25, 2009, at 12:00 PM, Fabian Giesen wrote: > Joe Meenaghan wrote: >> >> 1. I have differing information about the normalization term for the >> BlinnPhong BRDF and I'd like to know which is correct. In RealTime >> Rendering the authors suggest (m + 8) / (8 * pi) based on a >> derivation from Sloan and Hoffman. However, in Pharr and Humphrey >> (Physically Based Rendering, p.446) they calculate (m + 2) / (2 * >> pi). >> The definite integral solution demonstrated in the >> latter appears reasonable to me, so I'm uncertain. Normally I've >> associated the m+2 version as the normalization term for plain Phong, >> yet, Pharr and Humphrey are very explicitly referring to the Blinn >> BRDF >> and are using the half vector rather than the reflection vector in >> their >> discussion, and they are convincing. Is there something I'm missing? Unfortunately RTR doesn't seem to have a derivation, so it's hard to see precisely where the difference comes from. One general note is that the PBR book is normalizing a microfacet distribution, but RTR is (from a quick skim) normalizing a BRDF. So I think that the 2pi vs 8pi difference in the denominator comes from the fact that 2pi works out to be the right denominator for a normalized microfacet distribution, but if you fold in the 1/4 term that comes in the TorranceSparrow BRDF (discussed on p442 of the PBR book), then that covers that difference. The (m+2) vs (m+8) stuff in the numerator I don't have any insight on. As far as I know the PBR derivation is correct and I just wrote a short program to verify the result numerically and it all came out as expected. Hopefully Naty can chime in? > > I went through the same thing a few months ago. See the discussion in > the comments here: > > http://www.rorydriscoll.com/2009/01/25/energyconservationingames/ > > (Including a comment from Naty Hoffman who did the derivation > mentioned > in RTR). The exact normalization factor obviously depends on what > variant of the BRDF you use. I did the computation for typical > variants > of Phong and BlinnPhong here: > > http://www.farbrausch.de/~fg/articles/phong.pdf I think there is a bug in the BlinnPhong normalization there. In particular, I don't think that the first step of going from an integral over cos theta h to an integral of cos theta/2 is right (or neededthe microfacet distribution can be normalized fine in theta_h land.) A related note is that the extra cos theta factor doesn't come from it being a BRDF, but comes from the geometry of microfacetsi.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. > > (also referenced in the discussion above). Hope that helps! > > Cheers, > Fabian "ryg" Giesen > >  > _______________________________________________ > GDAlgorithmslist mailing list > GDAlgorithmslist@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithmslist 