Graphics Reference
In-Depth Information
Another application of light-space projection is a projective spot light. Real
theatre lights are often modified by placing a gobo or cookie slide immediately
outside the light source's iris (see Figure 14.33). This colors or selectively blocks
emitted light, projecting an image or shape onto the scene. In computer graphics,
one can modulate the incident light at a point P in the scene by the value stored
in an image at the corresponding location in the light's projection of P to achieve
this effect. This is used to create nonround and nonuniform spot-light apertures, to
simulate the complex patterns of real spot-light reflectors, and to simulate shadows
from off-screen objects, such as a spinning fan in a ventilation duct.
Figure 14.33: A photograph of
spiral patterns created by real
gobos
in
spotlights
(Credit:
R.
Gino
Santa
Maria/Shutter-
14.11.9 A Unified Point-Light Model
This section describes a model for luminaires with extents that are small in com-
parison to the distance between them and the points to be shaded. Under this defi-
nition of small, each luminaire can be approximated as a single point. This unifies
several common light models. It was introduced and favored particularly for fixed-
function graphics processors but remains widespread due to its simplicity.
A fixed-function unit implements a specific algorithm directly in circuitry
or microcode. Such units are often controlled by parameters but cannot per-
form general-purpose computations the way that a programmable unit or general-
purpose processor can. That is, they are not computationally equivalent to Turing
machines. A processor typically contains a mixture of programmable and fixed-
function units. For example, few architectures allow the programmer to alter the
cache replacement strategy, but most allow arbitrary arithmetic expressions within
programs. Graphics architectures may embed entire rendering algorithms in fixed-
function logic. Fixed-function hardware naturally limits the programmer's expres-
sion. However, it is extremely power-efficient and is less expensive to design and
produce than general-purpose computation units. Thus, hardware architects face a
design tradeoff based on current costs and goals.
At the time of this writing, fixed-function graphics units have gone in and out
of fashion several times. Fixed-function lighting logic is currently eschewed in
most devices, although at least one (the Nintendo 3DS [KO11]) released in 2011
embraces it.
We do not recommend the unified model presented in this section for new
implementations built on programmable shading or software-based rendering
APIs. The model is difficult to incorporate in a useful way into a physically based
rendering system, limits the flexibility of the lighting model, and is a weaker
abstraction than the models presented in subsequent chapters.
It remains important to be familiar with the model inspired by fixed-function
logic for several reasons. Both legacy devices and a handful of new devices still
use this model. The model may return to favor in the future. Many programmable
graphics pipelines are still based around the fixed-function lighting model because
they evolved from fixed-function implementations or must work with assets and
tools originally designed for those implementations.
The basic idea of the model is that we can represent spot, directional, and
omni-lights with a single, branchless lighting equation for a spot light with homo-
geneous parameters. The center of the spot light is ( x , y , z , w ) , where w = 1
indicates a spot or omni-light and w = 0 indicates a directional light. If we param-
eterize the angle between the axis of the spot light and the edge of its cone, then
an angle of
stock.com).
π
radians gives an omnidirectional light. The only remaining issue is
 
Search WWH ::




Custom Search