Rendering equation
From CGAFaq
The rendering equation is a way of describing the way light moves through an environment. Loosely speaking, the light leaving a point in space in a given direction is equal to the light emitted from that point, plus the contribution of all the other light which hits that point scattered in the outgoing direction. When someone talks about solving the rendering equation, they often just mean figuring how much radiance (intuitively, light) arrives at points on the image plane, which corresponds to the brightness of pixels in a rendered image. Global Illumination algorithms like radiosity, Monte Carlo path tracing, and Metropolis light transport are numerical methods for solving the rendering equation.
In rendering, two basic things happen to light: it moves along straight lines or rays through open space, and it is scattered by surfaces with which it comes into contact. Here's one way of writing the rendering equation that describes these phenomena:
The left side of the equation is the quantity being measured - the radiance leaving from a point in an outgoing direction
. The point
is commonly a point on a surface, though the equation is valid for any point in space. The first term on the right side is the radiance emitted from the point
in the direction
. Usually this term is positive for points of a scene which correspond to light sources and zero everywhere else. The remaining integral takes all the radiance in the scene which hits
and determines how much of it is scattered in the direction
. The first term in the integral,
, is the incoming radiance: the radiance traveling along a direction
which hits
. The scattering function
, called the bidirectional scattering distribution function or BSDF, determines the amount of radiance which is scattered from the incoming direction
to the outgoing direction
. The scattering function gives a description of the materials in a scene. The final term, called the foreshortening term, accounts for the angle at which incoming radiance hits
relative to its normal
. These quantities are integrated over
, which is a sphere, i.e., the set of all directions.
The rendering equation can easily be rewritten in terms of light arriving at a point, that is:
This equation says that the radiance leaving in direction
is the same as the radiance which arrives at another point
from the reverse direction. Note that
now appears on both sides of the equation. Not surprisingly, many global illumination algorithms work by evaluating the rendering equation recursively.
The function is the ray casting function, which determines the first point on a surface hit by a ray starting at
and traveling in the direction
. Evaluating this function tends to be the most expensive operation when evaluating the rendering equation since the ray needs to be tested against all of the scene geometry. This problem has motivated many geometric data structures that reduce the amount of work needed to determine the nearest hit.
The foreshortening term has a simple geometric explanation. Imagine a small piece of a surface being hit by a number of parallel rays of light perpendicular to the surface. Now imagine the same set of rays light hitting a surface which is rotated by an angle
with respect to the first surface. The same amount of light is now distributed across a larger piece of the surface, as seen in the image below. This relationship is obvious: the surface gets darker as it turns away from the light. Specifically, it dims by a factor of the ratio of the areas illuminated on each surface. This ratio can be calculated by thinking of these areas as two sides of a right triangle:
. Since
is the same angle as the angle between the normals of the two surfaces, the ratio is equal to
.
notation used for the rendering equation is adapted from Eric Veach's thesis.
History
The rendering equation was presented to the graphics community by Jim Kajiya in his paper entitled (strangely enough), "The rendering equation." This paper also presented some of the first computer-generated images which displayed all the different paths of light transport, including caustics and diffuse reflection.


