## Confused about near-specular reflection that is not energy conserving.

Practical and theoretical implementation discussion.
mgamito
Posts: 3
Joined: Fri Aug 01, 2014 4:26 pm

### Confused about near-specular reflection that is not energy conserving.

Hello,

I've been puzzled by a lighting problem that is giving non-intuitive results. I'm sure the answer must be very simple because this is really basic stuff.

Consider a ground plane with a near-specular brdf. The brdf is going to return extremely high values close to the mirror direction that drop off to zero quickly away from that direction. In the limit, a specular mirror would have a delta distribution with a single infinite value along the mirror direction and zero everywhere else.

Consider also a point light above the ground with an intenty Li. The reflected radiance Lr on a point x, on the ground, is:

Lr(wo) = brdf(wi,wo)*Li/r^2, where r is the distance from x to the point light and wi points towards the light.

Now, if the incoming direction wi is nearly aligned with the mirror direction, the brdf term will be huge and we have Lr > Li, which is not energy-conserving. How can this be?

The only thing I can think of is that point lights are not real physical lights, whereas a near-specular brdf is physically correct. The two solutions to the problem would then either be:

1- Give the point light a small radius and treat it as a spherical light.
2- If I insist on using the point light, I need to normalise the brdf to make sure it is always less than white.

friedlinguini
Posts: 89
Joined: Thu Apr 11, 2013 5:15 pm

### Re: Confused about near-specular reflection that is not energy conserving.

BRDFs can have spikes arbitrarily greater than 1 because you use them by integrating over some finite domain, and the integral should give you something less than one (a surface can't reflect more photons than it receives).
mgamito wrote:Consider also a point light above the ground with an intenty Li. The reflected radiance Lr on a point x, on the ground, is:

Lr(wo) = brdf(wi,wo)*Li/r^2, where r is the distance from x to the point light and wi points towards the light.
That formula can't be correct, because it doesn't stand up to dimensional analysis. Lr and Li have the same units, and a BRDF is dimensionless. That leaves units of length^-2 unbalanced. I assume that you have a 1/r^2 factor because you're calculating a direct lighting estimate by integrating over the surface of all lights. That means you need to have a surface area factor in there somewhere, which would make the units come out right. The surface area of a point light approaches zero, and multiplying that into your formula cancels out the infinity that's bothering you. If you were instead dealing with an area light, the brdf would spike at some infinitesimal portion of the light surface, but it would be balanced by near-zero values everywhere else.

mgamito
Posts: 3
Joined: Fri Aug 01, 2014 4:26 pm

### Re: Confused about near-specular reflection that is not energy conserving.

Hi,

I see what you mean. Basically, point lights and other delta lights use units of irradiance, instead of the more conventional area lights that use radiance. As such, delta lights cannot be plugged into the direct lighting equation because they don't obey the correct units. As you suggest, the problem would be solved if I gave the point light a small differential area dA, for instance I could make it be an infinitesimal disk oriented along the wi direction so that the geometry factor would be dA/r^2, instead of just 1/r^2. The infinitesimal dA would then attenuate the near infinity of the brdf near the mirror direction.

This basically corresponds to the first solution I initially proposed. Point lights and spot lights are ubiquitous in production environments and they're not likely to go away. A rendering implementation that internally converts delta lights into micro area lights could be interesting to study and it would be energy conserving.

My second solution about normalising brdfs in the range black <= brdf <= white for delta lights, on second thought, may not be so interesting because it would break convergence in the limit of an area light that gradually shrinks towards a delta - the moment the area became exactly zero, there would be a discontinuity in the lighting.

friedlinguini
Posts: 89
Joined: Thu Apr 11, 2013 5:15 pm

### Re: Confused about near-specular reflection that is not energy conserving.

There's no reason to give up on point lights; all I was trying to say is that having a BRDF that spikes above 1 is physically plausible. If a point light is bright enough to visibly illuminate a diffuse surface, then it's going to create a very bright highlight on a near-mirror surface. The intensity can become arbitrarily large, but it's OK because the size of the highlight simultaneously becomes arbitrarily small. The math is still doable, you just have to make sure you that you properly cancel out spiky PDFs, differential areas, etc.

papaboo
Posts: 46
Joined: Fri Jun 21, 2013 10:02 am
Contact:

### Re: Confused about near-specular reflection that is not energy conserving.

Regarding 2. You should never tweak your BRDF based on the light source type. That's a slippery slope. You wouldn't expect your material properties to chance based on what environment its in. Now, your BRDF is going to return values above one in some cases, which as Friedlinguini points out, is okay, because energy conservation means that the integral over the hemisphere is 1 or less, not the individual samples. Ideally every sample would be weighted by 1 or less, but that only happens if you have perfect importance sampling, which you only have for Lambert and specular surfaces. So if you want ot ensure that your BRDF is energy conserving, just integrate over it (using Monte Carlo) and check that it average weight is <= 1.

As for you light source issue. Yes, point lights are physically incorrect since the area is 0. But just think of them as an infinitely small area light and use as is. You can even derive a normalization term, such that the overall light emitted from a point/sphere light is radius invariant, even if the radius is 0.