Page 1 of 1

Point lights and non-diffuse brdfs

Posted: Wed Apr 24, 2019 5:00 pm
by vchizhov
I've had a question that I couldn't answer myself and haven't found any formal derivation on the topic. If one has a point light with position \(\vec{c}\) and intensity \(I\), then the irradiance at point \(\vec{p}\) at some surface can be derived as:
\(E(\vec{p}) = \frac{d\Phi}{dA} = \frac{d\Phi}{d\omega}\frac{d\omega}{dA} = I \frac{\cos\theta}{||\vec{c}-\vec{p}||^2}\frac{dA}{dA} = I \frac{\cos\theta}{||\vec{c}-\vec{p}||^2} \)
Assuming that the brdf is constant \(f(\omega_o,\vec{p},\omega_i) = C = \text{const}\) the outgoing radiance from that surface point due to that point light can be computed as:
\(L_o(\vec{p},\omega_o) = L_e(\vec{p},\omega_o) + \int_{\Omega}{f(\omega_o,\vec{p},\omega_i)L_i(\vec{p},\omega_i)\cos\theta_i\,d\omega_i} =\)
\( L_e(\vec{p},\omega_o) + C\int_{\Omega}{L_i(\vec{p},\omega_i)\cos\theta_i\,d\omega_i} = L_e(\vec{p},\omega_o) + CE(\vec{p}) = \)
\(L_e(\vec{p},\omega_o) + CI \frac{\cos\theta}{||\vec{c}-\vec{p}||^2} \)
Which agrees with what one is used to seeing in implementations in real-time graphics. How does one motivate similar expressions for more complex brdfs considering the fact that radiance for a point light is not defined?

Re: Point lights and non-diffuse brdfs

Posted: Thu Apr 25, 2019 5:34 pm
by ingenious
Point and directional light sources are not physical and are commonly defined via delta functions/distributions. For a delta directional light, you take the solid angle version of the rendering integration (which is what you have above) and replace \(L_i\) by a an angular delta function, which makes the integral degenerate to a simple integrand evaluation. For a point light, which is a delta volume light, you would take the volume version of the rendering equation, i.e. the one where integrates over 3D space, and then again replace \(L_i\) by a positional delta function.

Re: Point lights and non-diffuse brdfs

Posted: Thu Apr 25, 2019 7:11 pm
by vchizhov
I am aware that a point light is not physical, I am just wondering how the commonly accepted formulae in real-time cg are motivated. They are using in most cases the intensity as if it were radiance, with brdfs defined in terms of radiance. Do you have a reference for the part where you mention that you're replacing the radiance with a delta function? That will also cause even more problems mathematically as it will turn out that you're multiplying distributions in some cases.
What I am looking for is a reference with a mathematically robust derivation that is consistent with radiometry definitions. Papers/books suggestions are welcome.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 1:12 pm
by friedlinguini
vchizhov wrote:
Thu Apr 25, 2019 7:11 pm
Do you have a reference for the part where you mention that you're replacing the radiance with a delta function?
Well, you have an integral over an angle that is non-zero if and only if it includes a singular direction. That's a delta function, isn't it? If you really need academic respectability to be convinced, maybe you should take a look at ingenious' publications. :-)
That will also cause even more problems mathematically as it will turn out that you're multiplying distributions in some cases.
Yup. You know what else causes problems? Perfectly specular reflectors and refractors, which also have deltas in their BSDFs. You have two choices when dealing with them--approximate them with spikey but non-delta BSDFs, or sample them differently. In general, you don't try to evaluate those for arbitrary directions; you just cast one ray in the appropriate direction. It's exactly the same for point and directional lights. Either use light sources that subtend a small but finite solid angle, or special-case them. You evaluate the integral (for a single light source) by ignoring everything but the delta direction and then ignoring the delta factor in the integrand. You can think of it as using a Monte Carlo estimator f(x)/pdf(x), where both the f and the pdf have identical delta functions that cancel out.

I don't have a specific reference for this, but the first place I'd look for one is the PBRT book.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 3:27 pm
by vchizhov
I understand it in the sense that you want just that one direction, however, I don't see how that solves the intensity vs radiance issue. After all the rendering equation considers radiance and not intensity.
If you really need academic respectability to be convinced, maybe you should take a look at ingenious' publications.
I would be very grateful if you could refer me to a publication of his that tackles this issue, I am not exactly sure how to find his publications from his username.
Yup. You know what else causes problems?
I mean purely theoretical problems, not specifically the ones you are referring to, though I meant precisely the case where you have a perfect mirror/refraction and a point light, since then you get a product of distributions.
I don't have a specific reference for this, but the first place I'd look for one is the PBRT book.
PBRT doesn't really go much further beyond implementation details, most of the arguments are of "an intuitive" nature, I want something a bit more formal. The closest thing I could find on the topic was from: http://www.oceanopticsbook.info/view/li ... f_radiance, namely:
Likewise, you cannot define the radiance emitted by the surface of a point source because \( \Delta A\) becomes zero even though the point source is emitting a finite amount of energy.
And seeing as the rendering equation uses radiance I want to understand how a point light source for which radiance is not defined fits into this framework.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 6:51 pm
by friedlinguini
vchizhov wrote:
Fri Apr 26, 2019 3:27 pm
PBRT doesn't really go much further beyond implementation details, most of the arguments are of "an intuitive" nature, I want something a bit more formal. The closest thing I could find on the topic was from: http://www.oceanopticsbook.info/view/li ... f_radiance, namely:
Likewise, you cannot define the radiance emitted by the surface of a point source because \( \Delta A\) becomes zero even though the point source is emitting a finite amount of energy.
And seeing as the rendering equation uses radiance I want to understand how a point light source for which radiance is not defined fits into this framework.
Here's what I found in PBRT after a brief search: http://www.pbr-book.org/3ed-2018/Light_ ... eIntegrand

It classifies point sources as producing delta distributions. It doesn't try to evaluate the incoming radiance directly, but instead evaluates the integral over incoming radiance, which is well-defined even with deltas.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 7:27 pm
by vchizhov
Thank you, I have looked through pbrt already, but just saying - "it's a Dirac delta" is hardly mathematically robust - there's no derivation. It doesn't even derive central relationships like \(\frac{\cos\theta}{r^2}dA = d\omega\).
It doesn't try to evaluate the incoming radiance directly, but instead evaluates the integral over incoming radiance, which is well-defined even with deltas.
The issue is that I am not convinced that it is well-defined, hence why I want to see a formal proof (be it through measure theory, differential geometry, or even starting with Maxwell's equations). For one thing the brdf is defined in terms of radiance, not in terms of intensity. And if it is indeed well-defined I want to understand the details why it so, and not just rely on hand-waving arguments. As in, have a similar proof to what I did above for the diffuse case, obviously the thing I derived above does not apply to a brdf that actually depends on $\omega_i$ however.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 9:34 pm
by friedlinguini
vchizhov wrote:
Fri Apr 26, 2019 7:27 pm
The issue is that I am not convinced that it is well-defined, hence why I want to see a formal proof (be it through measure theory, differential geometry, or even starting with Maxwell's equations). For one thing the brdf is defined in terms of radiance, not in terms of intensity. And if it is indeed well-defined I want to understand the details why it so, and not just rely on hand-waving arguments. As in, have a similar proof to what I did above for the diffuse case, obviously the thing I derived above does not apply to a brdf that actually depends on $\omega_i$ however.
"You didn't use real wrestling. If you use real wrestling, it's impossible to get out of that hold."
- Bobby Hill

If your concern is with undefined quantities, you might need to start by defining exactly you mean by a point light, since it's already a physically implausible entity. E.g., is it meaningful to have the dw or dA terms from your Lambertian derivation? Does it have a normal? Is it a singular point, or is it the limit of an arbitrarily small sphere? If it were me, I'd just start with a definition that is consistent with a delta distribution, because it's consistent with what I want to represent, I know it makes the math work, and I can actually start implementing something.

Beyond that, I'm not sure there's anything else I can say that will convince you without a lot more work than I have time for. Best of luck.

Re: Point lights and non-diffuse brdfs

Posted: Fri Apr 26, 2019 10:18 pm
by vchizhov
Thanks anyways, I appreciate it. I'll keep looking for a formal proof, and if I find one I'll make sure to link it for future readers.

Re: Point lights and non-diffuse brdfs

Posted: Sat Apr 27, 2019 10:40 pm
by ingenious
I mostly agree with you, vchizhov. My understanding is that the delta function is an ad-hoc construct, often defined as

\(\int_{-\infty}^\infty f(x) \delta(x - x_0) \, dx = f(x_0)\)

Note that the above is not a valid Lebesgue integral. A more rigorous, Lebesgue-compatible definition is as a measure:

\(\int_{-\infty}^\infty f(x) \, \mathrm{d} \delta_{x_0}(x) = f(x_0)\)

The whole point of this exercise is, in my understanding, for notational convenience: to write a specific discrete value \(f(x_0)\) as integral in order to avoid special-casing when you're working in an integral framework.

So if you really don't want to deal with delta functions/measures, you can explicitly special-case. For the rendering equation, this means avoiding the reflectance integral altogether and evaluating the integrand at the chosen location. So in effect you are defining the outgoing radiance at the shading point rather than defining some infinitesimally small light source. To also account for the contribution of other light sources, you'll need to sum that just-defined radiance with a proper reflectance integral. You'd do the same for plastic-like BRDFs that are the sum of perfect specular lobe and a smooth lobe. This seems like a more mathematically correct approach to me. It's more cumbersome though, that's why people prefer the more convenient (and controversial) approach of just thinking of it as defining a point light source instead.

Honestly, I like this discussion and I'd like to have a bullet-proof definition of everything that doesn't involve ad-hoc constructs. I myself try to avoid the use of delta stuff whenever I can. Volumetric null scattering is one example where I don't like the introduction of a forward-scattering delta phase function – there's a cleaner way to do it.