From: Fabian Giesen <f.giesen@49...>  20090725 22:49:53

> 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.) theta_h is not theta/2 in general, correct. That's why I specifically note that L=N and hence all angles are in the same plane; for general configurations, the halfway angle might lie in a different plane than the angle between N and L, so the result depends on the second angle (phi) as well and the whole process gets a lot more complex. > 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. 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 BlinnPhong 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. 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 multibounce 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 