Graphics Reference
In-Depth Information
Luminaires that do not create glossy reflection (e.g., highlights) provide so-
called “fill” or “diffuse” light. These create perceptual cues of three-dimensional
shape and softness, approximating global illumination and subsurface scattering.
Glossy-only sources create explicit highlights but no other shading. These are
useful to model the perceptual cues from practical lights. Practical lights are the
light sources that appear to be in the scene, as opposed to the invisible ones that are
actually lighting most of it. The term comes from film and theatre production; as
an example, in a film set of a dining room, very little illumination actually comes
from the candles on a table and the scene is more likely to receive illumination
primarily from bright off-camera stage lights. Glossy-only sources are particularly
useful for creating the perception of windows without dealing with the net impact
of those windows on scene light levels. The “Lambertian” and “glossy” reflectance
properties properly belong to the surface material, not the light, so using these
properties assumes a specific material and shading model.
In the real world, the light from an emitter may experience an unbounded
number of scattering events before it is perceived. It is often artistically useful
to shine a light on a specific object without incurring the computational cost or
global implications of multiple scattering events. A direct, local, or nonglobal light
source only scatters light from the first surface it encounters toward the viewer.
Beware that the term “local” is also used in lighting models to refer to lights that
are at a finite distance from visible parts of the scene.
One may wish to selectively disable shadow casting by lights. This can save
the computational cost of computing visibility as well as eliminate shadows that
may be visually confusing, such as those cast outward from a carried torch.
14.11.3.2 Applying the Interface to Direct Illumination
The key methods for incorporating the Light class into a renderer are
randomPoint and radiance .The randomPoint method selects a point on the sur-
face of the emitter uniformly at random with respect to surface area. (The term
“selected uniformly at random” is defined precisely in Chapter 30; for now, treat
it as meaning “every point is equally likely to be chosen.”) Because the point may
be infinitely distant from other parts of the scene, we represent the return value
as a homogeneous vector. For lights that have varying intensity over their surface,
a better choice of interface might be to select the emitter point with probability
proportional to the amount of light emitted at that point. Even further elaborations
might involve choosing luminaire points in a way that's random but guarantees
fairly even distribution of the points and avoids clustering. Stratified sampling,
discussed briefly in Chapter 32, is one such method.
The radiance method returns the incident radiance at a scene point due to a
point on the emitter (which was presumably discovered by calling randomPoint ),
assuming that there is no occluding surface between them. We separate genera-
tion of the emitter point from estimating the radiance from it so that shadowing
algorithms can be applied. We must know the actual scene point and not just the
direction to it in order to compute the radial falloff from noncollimated sources.
Listing 14.11 shows how to apply these methods to compute the radiance scat-
tered toward the viewer due to direct illumination. In the listing, point P is the point
to be shaded, w_o is the unit vector in the direction from P to the eye, n is the unit
surface normal at P , and bsdf is a model of how the surface scatters light (see
Chapter 27 for a full discussion of physically based scattering).
 
Search WWH ::




Custom Search