CS184 Lecture 33 summary

Radiosity

When light makes specular reflections from one surface to another, we already saw how to simulate the results using ray-tracing. However, objects can also receive light that reflects off other objects diffusely. Ray-tracing is not effective for this situation. The light coming off a diffuse surface has equal intensity in all directions, so a ray-tracing algorithm would have to sample all the directions on a hemisphere. In effect, every surface in the environment would become an area light source. This is way beyond what ray-tracing can handle.

Radiosity is a completely different approach to dealing with diffuse reflection (btw, diffuse reflection is often called scattering because it is not centered around a reflection angle). Radiosity takes advantage of the undirectionality of diffuse reflection to speed things up. That is, light rays coming from a "small enough" patch of surface to another small enough patch will all have about the same intensity, because diffuse intensity doesnt depend on direction. Its never necessary to consider the directions of the light sources that illuminate the two patches because they wouldnt affect the coupling between the surfaces anyway (only the brightness over each patch). To put it another way, there is only one number that we need to assign to each patch which is its brightness, and we dont need to say anything about the light sources that illuminate it because the brightness is enough to determine how much light it reflects in all directions.

Once we have the light-coupling coefficients between all patches of surface, we have to solve a large system of linear equations to find out the brightness of all the patches because every patch acts as both a source and receiver.

Intensity or Radiance

For radiosity, we need to get precise about what we mean by intensity of light (or radiance). Since light rays have both direction and "location" (as in what points they pass through), we have to measure energy per unit time per unit area and per unit solid angle. The units of energy per unit time is watts. So

Radiance is radiant energy per unit time, per unit area, per unit solid angle.
Its units are watts/m2/steradian

This definition can be a bit confusing, because we will talk about the radiance at a point, or in a given direction. What we mean in those cases is:

Radiance at a point p: is the energy per unit time per unit solid angle striking an infinitesimal area dA containing p, divided by the area of dA.

Radiance in a direction L: is the energy per unit time per unit area within a range dw of solid angle about L, divided by dw.

This is just like density: e.g. we can talk about the density of an object as mass/volume, but we can also talk about the density at a point as the ratio dM/dV, where dV is a small volume containing the point, and dM is the mass inside that volume.

Form Factors

The coupling between surface patches is expressed using form factors. The form factor Fjk between patch j and patch k is the fraction of energy Bj emitted by patch j that is caught by patch k. Not all the energy received by patch k is reflected, and in fact the amount that it reflects is a fraction rk, which is related to its diffuse reflection coefficient Kd. So in fact what it radiates due to illumination from patch j is

Bk = rk Fjk Bj

Since many other patches may illuminate patch k, its total radiant energy is:

Bk = rk S Fjk Bj

To compute the form factors, let's consider infinitesimal patches first. Let the patches be dAj and dAk, and let r be the distance between them. We also need the angles between the patch normals and the line between them, call these qj and qk respectively.

If we assume that the patch j is a diffuse reflector, its apparent intensity is the same in all directions (Lambertian assumption). But that doesnt mean its radiated power is the same in all directions. The patch will have the same brightness, but subtend less area when viewed away from its normal. In fact, the area subtended falls off as the cosine of the angle from the normal to the direction of view.

To compute the power at radius r, we consider the hemisphere of radius r centered at the patch dAj. We know that the power isnt distributed evenly, but falls off as cos qj. There is a simple geometric interpretation of this. The radiant energy incident on a patch dA at radius r on the hemisphere is equal to the projection of this patch on the filled circle of radius r, divided by the area of this circle, which is pr2. Thus the intensity from the patch dAj which is received by an element dA at distance r is:

Rj cos qj dA / pr2

And the last step for computing Fjk is to figure out how much of this energy reaches dAk. This depends on how much area subtends on the hemisphere of radius r. Once again, this depends on a cosine. Specifically, the area dA on the hemisphere is

dA = dAk cos qk

And so the energy radiated by dAj and caught by dAk is

Bj cos qj dAk cos qk / pr2

Whence the coupling coefficient Fjk is obtained by dividing this quantity by Bj and is

cos qj dAk cos qk / pr2

To get the coupling coefficients between larger patches j and k, we must integrate this quantity over the areas Aj and Ak, and divide by Aj.

The radiosity equations

Once we have the coupling equations:

Bk = rk S Fjk Bj

we can add an emissive term to some of the surfaces so that we have lighting in the environment:

Bk = rk S Fjk Bj

Then, given the known quantities Fjk and rk, we have n linear equations in the n unknowns Bj. We can solve them to compute the brightness of each surface patch Bj.

Here is an example of an environment (known as the Cornell box, this example taken from the BMRT examples directory) computed with (left) and without (right) radiosity. Note the absence of indirect illumination from the colored walls in the right-hand figure.

cornell12.jpg (39782 bytes)

The source code for the left-hand figure (taken from BMRTs examples directory) is here. The right-hand figure simply has radiosity turned off.