8
Modeling Global Illumination with Radiosity 53
and so on until a maximum number of
iterations is reached or until no more surfaces
are intersected.
Ray-tracin g: Rays are t raced from the came ra through a
pixel, to the geometry, then back to their light sources.
The ray-tracing algorithm is very versatile because
ofthelargerangeoflightingeffectsitcanmodel.It
can accurately account for the g lobal i l lumination
characteristics of direct illumination, shadows,
specular reflections (for example, mir rors), and
refraction through transparent materials. The
main disadvantage of ray-tracing is that it can
be very slow for environments of even moderate
complexity. In 3ds Max, ray-tracing is used
select ively on objects w ith
ray-trace materials
(page 2–1353)
that specify ray-tracing as their
shading option. Ray-tracing can also be specified
for light sources as the method for rendering the
shadows they cast.
A sig nificant disadvantage of both ray-tracing and
scanline rendering is that these techniques do not
account for one very important characteristic of
global illumination, diffuse inter-reflections. With
traditional ray-tracing and scanline rendering,
only the light arriving directly from the light
sources themselves is accurately accounted for.
But,asshownintheroomexample,notonlydoes
light arrive a t a surface from the light sources
(direct lighting), it also ar rives f rom other surfaces
(indirect lighting). If we were to ray-trace an image
of the kitchen, for example, the areas in shadow
would appear black because they receive no
direct light from the light sources. We know from
experience, however, that these areas would not be
completely dark b e cause of the light they would
receive from the surrounding walls and floor.
In scanline rendering and traditional ray-tracing
(versions of 3ds Max prior to v5), this indirect
illumination is usually accounted for simply by
adding an arbitrary
ambient light
value that has no
correlation to the physical phenomena of indirect
illumination and is constant throughout space.
For this reason, scanline and ray-traced images
can often appear very flat, p art icularly renderings
of architectural environments, which typically
contain mostly diffuse surfaces.
Radiosity
To address this issue, researchers began
investigating a lternative techniques for calculating
global illumination, drawing on ther mal
engineering research. In the early 1960s, engineers
developed methods for simulating the radiative
heat transfer between surfaces to determine how
their designs would perform in applications
such as furnaces and engines. In the mid-1980s,
computer graphics researchers began investigating
the application of these techniques for simulating
light propagation.
Radiosity, as this technique is called in the
computer g r aphics world, differs fundamentally
from ray-tracing. Rather than determining the
color for each pixel on a screen, r adiosity ca lculates
the intensity for all surfaces in the environment.
This is accomplished by first dividing the original
surfaces into a mesh of smal ler surfaces k nown
as
elements
. T he radiosity algorithm calculates
the amount of light distributed from each mesh
element to every other mesh element. The final
radiosity values are stored for each element of the
mesh.