I'm currently looking at the way the matte metal have been implemented in PBRT but I don't understand. What I talk about is the method CreateMetalMaterial.
Mainly, I would like to know what the following line is doing ?
Spectrum::FromSampled(CopperWavelengths, CopperN, CopperSamples);
By example, copperN and copperK are statics ! So why do we need all theses stuffs to just have some constants ? (If they are constants) ?
Thx for you help
Thanks,
-matt
> --
> You received this message because you are subscribed to the Google Groups "pbrt" group.
> To post to this group, send email to pb...@googlegroups.com.
> To unsubscribe from this group, send email to pbrt+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pbrt?hl=en.
>
Check out the "Transforming Between Distributions" section (p. 660 in 2nd edition) for the background theory. That in conjunction with the relationship between solid angle and surface area measures from "Integrals Over Area" on p292 of the second edition should make it more clear. (If not, then ask again!) (That stuff is also covered in corresponding parts of the first edition, but I don't have the page #s handy.)
Thanks,
-matt
> I guess the thing i'm struggling to understand is that it looks as
> though for a constant area ( btw, is it constant light sample area, or
> is it ray differential area ? I don't have the code to hand just now )
> then as a light source moves further away, its sample PDFs go sky high
> ( r^2 )
This part is correct; basically, as the light moves farther away, it subtends a smaller part of the hemisphere around that point. Its PDF (with respect to solid angle over the hemisphere) therefore has to become larger so that it is still normalized--i.e. when you integrate the PDF over the hemisphere, it should be a constant--as the light gets smaller, more of the hemisphere has a zero PDF for sampling the light since the light isn't visible at all in those directions, so the PDF in the remaining part of the hemisphere has to get larger to compensate.
The 1/cos theta stuff is there for similar reasons; as the light tilts toward being more oblique as seen by the point, less of the hemisphere is covered by the light -> the PDF has to get bigger to compensate.
> and quickly overpower the PDF weights from the brdf which
> messes the MIS power heuristic up.
Remember that the MIS estimator is written as w(x) f(x) / p(x), where w(x) is the MIS weight, p(x) is the PDF, and f(x) is the function being integrated. The intuition is that although w(x) gets big, the 1/p(x) term cancels out that effect. (It's worthwhile to do the thought exercise to work through what happens to w(x) and p(x) (and the w(x)/p(x) term) under various scenarios of p(x) being a good fit to the integrand, p(x) being a poor fit but another sampling strategy being a good fit, etc...
-matt