🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

An apparent dilemma with the Cook-Torrance BRDF

Started by
3 comments, last by Chen96 3 years, 6 months ago

Let's say I use a GGX distribution to model the NDF part of Cook-Torrance, such as here: https://de45xmedrsdbp.cloudfront.net/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf​

When the roughness is low, value of NDF can go up to well above 1, something in the range of hundreds of thousands. Therefore the whole BRDF would evaluate to a big number.

Now, say we have a single directional light source, a smooth surface (low roughness), and a camera. The half vector is equal to the surface normal, and we try to evaluate the amount of light reflected from surface to camera:

Lo(x, w) = brdf(x, h, v, n, l) * Li(x, l) * dot(n, l), where h=n

Then apparently, the outgoing radiance is stronger than the incoming radiance at the surface by hundreds of thousands?

That's my first question. If we convert incoming radiance to camera to our final pixel value, how does it make sense that reflected radiance can be stronger than the light source?

Now's my second question. I understand radiance's unit is a watts per area per steradian. To evaluate the actual light landed on the imaging sensor, I have to compute the rendering equation (integrate the same brdf*Li for all light incoming from every direction). After this integral, I'm sure the integrated radiance will have a value less than the original light source, since BRDFs are designed to integrate to 1 over hemisphere. However, doesn't this contradict the approximation we are using to compute pixel values in real-time graphics (using radiance directly to compute pixel value)?

Any help is appreciated, thanks.

Advertisement

I just took a shower and I might have this figured out. Here are what I think the errors in my mental model are.

correction #1:

To compute outgoing radiance, BRDF should be applied to the surface irradiance, not incoming radiance. My hypothesis is, it is not realistic to expect the surface to receive a good amount of light from a single light ray carrying some radiance. If anything, the irradiance should approach zero, as the only incoming radiance has a solid angle that is infinitesimal.

(edit: I guess what I'm trying to say is, it's nonsense to calculate surface irradiance from some radiance along a single incoming direction. They don't have the same units)

correction #2:

It's actually completely okay for the outgoing radiance along a single direction to approach infinity, even if it's reflected from a surface with a finite amount of irradiance. In my question, I was trying to draw equal signs between radiance and irradiance. This is wrong, as the outgoing radiance has an infinitesimal solid angle (also they use completely different units). Given a surface that reflects light around its hemisphere, it's completely reasonable to have radiance approach infinity along some set of directions. Since the integral of the outgoing radiance around the hemisphere is still finite or even small.

These are my intuitions so far. I don't think I chose the best wordings as it's still a little confusing in my head. Please add or correct me ?

Your intuition is correct about punctual light sources: they don't fully make sense because they're impossible. ? Point lights work like scaled dirac delta functions where they're infinitely narrow in terms of solid angle, but still integrate to 1. The radiance would have to infinitely high to satisfy those terms, which is of course physically impossible. Thus the intensity of a directional light isn't really in units of radiance, it's more like “irradiance when N == L”. I'm not sure if this is the same course notes you linked to above since that link doesn't work, but Naty has a quick overview of the math for point lights on page 23 of his course notes: https://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf​

Things work out a lot better if you deal with actual area light sources or full lighting environments. If you do that you can then work with the BRDF in it's more “natural” form: the BRDF is multiplied with the incoming radiance and cosine factor as part of a full integral about the hemisphere surrounding the normal.

And you're also correct about how outgoing radiance relates to the irradiance and total reflected energy: it's ok for radiance to be high for some viewing directions as long as it “events out” over the full set of viewing directions This is called out as equation 3 in Naty's course notes, which basically says that “if you integrate the BRDF multiplied with the cosine factor over the hemisphere, the result should be less than or equal to 1”.

@MJP Thanks MJP! That clears it up for me, I can always count on you ?

This topic is closed to new replies.

Advertisement