# Problem with definition of BSDF and radiance

When I was reading theory behind physical based rendering I noticed that definition of BSDF and radiance has some problems. For example BSDF of purely specular surfaces is zero almost everywhere and infinite in one point or radiance of directional light is zero for almost all directions except for one where it is again infinite.

This causes problems in rendering equation.

$$L_0(x, \omega_0)= \int_{S^2}{\rho(x, \omega_i,\omega_0)L(x, \omega_i)\,\mathrm{d}\sigma_\perp(\omega_i)}$$

For purely specular surface this integral has to be zero, from strict mathematical point of view. This is because the BSDF is zero (solid angle)-almost everywhere. You can argue that BSDF is infinite in one point and you have to take this point into account. But how do you know what is the reflectance of the surface at that point? From the infinity you can really tell. Furthermore from mathematical standpoint of view you cannot integrate infinite valued function, even if you could than the only sensible answers would be zero or infinity.

I know these are subtle problems and in practice can be solved with few ifs but I would like to have theory without holes. I believe that if you embrace these problems in theory than it helps you with placing those ifs in the right place.

How to deal with this problem?

Not sure entirely but as I can remember Erich Veach in his thesis address this problem only slightly and tries to get away with it by saying that BSDF and radiance are distributions. This is problematic, you cannot multiply two distributions, which is needed in rendering equation. For example when a light from directional light hits specular surface than you need to multiply two Dirac delta functions together.

The question is: Is there any work which reformulates rendering equation, BSDF and radiance in such a way that it does not suffer from mentioned problems?

What is the state of the art theory behind raytracing? Is is still Erich Veach's thesis?

(I'm only aware of work of Christian Lessig, but his work is still beyond my mathematical reach.)

I already have proposal how to deal with this problem. I define BSDF and radiance as measure. The basic idea works fine, but the whole theory of light transport needs to be redone to find out if it really works.

The main purpose of this question is to find out if someone else already did it, so I can read it and then focus my energy somewhere else.

• I don't see yet why the dirac deltas are a problem. While it is impossible to compute that with a computer using sampling (hence the ifs), the mathematics are clearly defined, right? Looking forward for somebody who can clarify that. Besides, in nature there are no real dirac deltas / infinity values since there are no perfect mirrors; but I guess that is another topic. – Wumpf Sep 10 '15 at 10:08
• As long as BSDF and radiance can be dirac deltas at the same time than the rendering equation(as it is) is not mathematically well defined. Even if only BSDF would be allowed to be Dirac delta and we would formally treat BSDF as distribution than radiance needs to be smooth function in order to be mathematically 100% correct. But radiance under no way can be smooth function e.g. sharp shadows form discontinuities in radiance. – tom Sep 10 '15 at 10:25
• Yes in reality you cannot have perfect mirrors, point and directional light sources or pin hole cameras. But we write programs where these things are and we need a theory which underpins them. – tom Sep 10 '15 at 10:31
• @tom The rigorous mathematics that underlies delta distributions is measure theory. See the definition of the Dirac delta as a measure. I don't know off the top of my head of a work specifically treating the rendering equation in the context of measure theory, but pretty sure all this stuff is well-founded at the level of mathematical physics. – Nathan Reed Sep 10 '15 at 18:28
• (Disclaimer: I Am Not A Rendering Person.) At any surface point $x$, the role of the BSDF is to act as a linear operator mapping the incident light $L_i$ to the exitant light $L_o$. Now there is no problem with $L_i$ and $L_o$ both being distributions, i.e. linear functions $D(\mathbb S^2)\to\mathbb R$, because addition and scalar multiplication of distributions is well-defined so they form a vector space. When $L_i$ and $L_o$ are functions we can represent the BSDF $\rho$ as a distribution, but if they're not we can still speak of linear transformations. – Rahul Sep 11 '15 at 6:24