Professional Documents
Culture Documents
Light Cuts
Light Cuts
±
Computer Graphics, Volume 22, Number 4, August 1988
Gregory J. Ward
Francis M. Rubinstein
R o b e r t D. Clear
85
SIGGRAPH '88, Atlanta, August 1-5, 1988
x~Io
Incoming ray ]nco " ~ Is_ ~-
~ S u r f a c e location
Incoming ray
Incoming ray
A combined ray trueing and radiosity approach was designed In our e n h a n c e m e n t of the basic ray tracing technique, indirect
by Wallace to take a d v a n t a g e of the c o m p l e m e n t a r y properties of illuminance values are cached in the following m a n n e r :
the two techniques [13]. Wallace divides energy transport into four
" m e c h a n i s m s : " diffuse-diffuse, specular-dlffuse, dlffuse-specular, and If one or more yalues is stored near this point
specular-specular. He then proceeds to account for most of these Use stored value(s)
interactions with clever combinations of ray tracing and radioslty E[se
techniques. Unfortunately, there are really an infinite n u m b e r of C o m p u t e and store new value at this point
t r a n s p o r t m e c h a n i s m s , such as specular-specular-diffuse, which are
neglected by his calculation. The generalization Wallace suggests The c o m p u t a t i o n of a new value uses t h e " p r i m a r y m e t h o d . " The
for his approach is equivalent to view-~ndependcnt ray tracing, technique for finding and using stored values is called the
which is even more expensive t h a n general radiosity [7].
"secondary m e t h o d . " T h e primary m e t h o d is invoked to calculate a
new value the first time it is needed, which is when the secondary
3. Diffuse I n d i r e c t I l l u m i n a t i o n
method fails to produce a usable estimate from previous calculations
O u r development of an efficient ray tracing solution to diffuse (Figure 2). Determining the appropriate range and presenting a
interrefleetion is based on the following observations: surface-independent storage technique are the two main points of
this paper, Before we explore these issues, we present a basic com-
• Because reflecting surfaces are widely distributed, the compu- putation of indirect illuminance.
tation of diffuse indirect illumination requires m a n y sample
rays.
86
Computer Graphics, Volume 22, Number 4, August 1988
°, )
3.1. T h e I l l u m i n a n e e I n t e g r a l
Illuminanee is defined on a surface as the integral of luminance
over the projected hemisphere [9]:
2x 2
fILO,,OOSOsinOdOd, R v
oo
where O = polar angle F i g u r e 3: The split sphere model, A surface element is
¢ = azimuthal angle located at the center of a half-dark sphere.
87
SIGGRAPH '88, Atlanta, August 1-5, 1988
The inverse of the estimated error is used in a weighted aver- Caching indirect illuminance is simple and efficient. The error
estimate results in a m i n i m u m of primary evaluations and a nearly
age approximation of illuminance:
constant accuracy. Sections of the scene that do not contribute to
the image, directly or indirectly, are not examined since no rays
Z Wi (~) Ei reach them. Areas where the indirect illuminance varies rapidly,
(5) from changing surface orientation or the influence of nearby objects,
E(F) i~ will have a higher concentration of values. Flat areas without
nearby influences will have only a few values. Dynamic evaluation
w i (F) obviates surface discretization and presampling, so scene representa-
i~s tion is not restricted.
Figure 5a shows three colored, textured blocks on a table
1 illuminated by a low-angle light source. Figure 5b shows the place-
where: w i (~) = ment of indirect illumlnance values. Note that the values crowd
Ri
"~-~" + ~l- g ( ~ ) . ~ ( ~ i ) around inside corners, where surfaces are in close visual contact, and
outside corners, where the surface curvature is large. Also, the
Ei = computed illutrtinance at ~i space between and immediately surrounding the blocks is more
densely populated than the background, where only a few values are
Ri = harmonic mean distance to objects visiblc from ~i spread over a wide area. This distribution is different from the stan-
dard radiosity technique, which computes values at grid points on
S = {i:wi(~) > lla } each surface. By selecting value locations based on the estimated
illuminance gradient, a more accurate calculation is obtained with
a = user select~J const~,t fewer samples.
Averaging illuminance values over surfaces results in lower
The approximate illuminance, E ( P ) , is given by the weighted mean pixel variance than produced by standard ray tracing techniques.
of all " a d j a c e n t " illuminance values. The weight of a value is equal Figure 5e was produced by a pure Monte Carlo computation that
to the inverse of its estimated error, without the constant terms t h a t used as many rays as the calculation of Figure 5a. The speckling
are valid only for the s p l i t ~ p h e r e (4/~._and x/2). An itluminance results from inadequate integration of the indirect contributions at
value with an error of zero (P~ equal to P ) will have infinite weight. each pixel. Since every pixel requires a separate calculation, only a
All values with an estimated error less than a will be included in few diffuse samples are possible over the hemisphere. ]f a sample
the set of adjacent illuminances, S . If S is empty, a new primary happens to catch a bright reflection, the illuminance computed at
illuminance value must be calculated at ~ . (An efficient method for that point will be disproportionately large. Caching permits a
determining the members of S is given in the next section.) better integration to be performed less frequently, thereby obtaining
a more realistic rendering than is feasible with pixel-independent ray
The constant a is directly related to the maximum approxima- tracing.
tion error. When the approximation is applied to the split sphere,
the error is less than 1.4aE, where E is a straight average of Ei
3.3. Illumlnance Storage
over 5'. In general, the illuminance gradient may be larger or
smaller than the split sphere, b u t it will always be roughly propor- For the secondary method to be significantly faster than the
tional to a . It is interesting to note that for a less than or equal to primary method, we need an efficient technique for finding the
1, S will not contain any value farther than the average spacing or members of S (Equation 5). W i t h o u t placing any restrictions on
with a surface normal more than 90 degrees from the test location. scene geometry, an octrce permits efficient range searching in three
Intuitively, such a value would be expected to have 100% error. dimensions [1]. A global cube is identified that encompasses all
finite surfaces in the scene. When the primary method calculates a
In practice, additional tests are required to restrict the values
included in S . The ray recursion depth must be considered so that new indirect illuminanee at a scene location, the global cube is sub-
values computed after one or more bounces are not substituted for divided as necessary to contain the value. Each illuminance, E i , is
stored in the octree node containing its position, /~i, and having a
final illuminances. This is easily prevented by keeping separate
size (side length} greater t h a n twice b u t not more than four times
value lists at each recursion level. A different problem arises from
our generalization of the split sphere model. Equation (4) assumes the appropriate "valid domain," aR~. This guarantees that the
stored illuminance value will satisfy the condition for S in no more
that motion in any direction is equivalent to motion in z . As a
result, the set S can include illuminance values that tie on objects than eight cubes on its own octree level, and a value with a small
shadowing the test point, P (Figure 4). We therefore introduce a valid domain will only be examined in close-range searches. Each
node in the octree will contain a (possibly empty) list of illuminance
test to reject illuminanee values that are "in front" of i f :
values, and a (possibly nil) pointer to eight children. (A two-
dimensional analogy is given in Figure 6.) To search the tree for
values whose valid domain may contain the point P , the following
(6)
recumive procedure is used:
This algorithm will not only pick up the nodes containing ~ , but
will also search nodes having boundaries within half the cube size of
~ . In this way, all lists that might have an illuminance value
whose valid domain contains /~ will be examined. The worst case
88
~ Computer Graphics, Volume 22, Number 4, August
I
1988
f-
/
F i g u r e 5b: Blocks with illuminance value locations in
blue.
89
SIGGRAPH '88, Atlanta, August 1-5, 1988
90
@ ~ ComputerGraphics,Volume22, Number4, August1988
91
SIGGRAPH '88, Atlanta, August 1-5, 1988
5. D i s c u s s i o n 7. A c k n o w l e d g e m e n t s
Because our averaging technique was derived from a simplified O u r t h a n k s go to the reviewers for their c o m m e n t s , and to
model (the split sphere), it is i m p o r t a n t to s t u d y its performance in S a m B e r m a n for his continuing support. We would also like to
situations where the model is not predictive. T w o such cases are t h a n k the LBL C o m p u t e r Science Research D e p a r t m e n t and the
illustrated in Figure 11. T h e y are both related to bright, localized U C B Center for E n v i r o n m e n t a l Design for the use of their equip-
reflections, such as those t h a t m i g h t result from a spotlight or mir- m e u t . O u r special t h a n k s go to Bill Johnston and P a u l Heckhert.
ror. If a bright spot is partially hidden by an occluding surface, or This work was supported by the Assistant Secretary for Conserva-
on the horizon, t h e n small changes in element location and orienta- tion and Renewable Energy, Office of Building Energy Research and
tion can result in large changes in illuminance. The averaging tech- Development, Buildings E q u i p m e n t Division of the U.S. D e p a r t m e n t
nique we have developed will n o t respond appropriately, and the of Energy u n d e r C o n t r a c t No. DE-AC03-76SF00098.
error related to a will be m u c h larger t h a n t h e original split sphere
model. However, bright spots also make trouble for the Monte 8. R e f e r e n c e s
Carlo calculation, which requires a higher sample density to find and 1. Bentley, Jon Louis and Jerome Friedman, " D a t a Structures for
integrate such l u m i n a n c e spikes. There is no known lighting calcu- R a n g e Searching," A C M Computing Surveys, Vol. 11, No. 4,
lation t h a t can track these small "secondary sources" efficiently. 1979, pp. 397-409.
O u r technique uses a smaller value for a together with a higher
M o n t e Carlo sample density to model these effects, with a 2. Cohen, Michael and Donald Greenberg, " A Radiosity Solution
corresponding increase in complexity. for Complex E n v i r o n m e n t s , " Computer Graphics, VoL 19, No.
3, July 1985, pp. 31-40.
92