9

54 Chapter 17: Rendering
iterations is reached or until no more surfaces
are intersected.
Ray-tracing: Rays are traced from th e camera t h rough a
pixel, to the geometr y, then back to their light sources.
The ray-tracing algorithm is very versatile because
ofthelargerangeoflightingeffectsitcanmodel.It
can accur ately account for the global il lumination
characteristics of direct illumination, shadows,
specular reflections (for example, mirrors), 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 with ray-trace materials
(page 2–1512) 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 i l lumination, 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 at a surface from the light sources
(direct lighting), it also arr ives from 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 because 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 ligh t value that has no
correlation to the physical phenomena of indirect
illumination and is constant throughout space.
For this reason, scan line and ray-traced images
can of ten appear very flat, particularly renderings
of architectural environments, which typically
contain mostly diffuse surfaces.
Radiosity
To address this issue, researchers began
investigating a lternative techniques for calculating
global illuminat ion, drawing on thermal
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 f urnaces 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 gr aphics world, differs fundamentally
from ray-tracing. Rather than determining the
color for each pixel on a screen, radiosity calculates
the intensity for all surfaces in the environment.
This is accomplished by first dividing the original
surfaces into a mesh of smaller surfaces k nown
as elements. The radiosit y algorithm calculates
the amount of light distributed from each m esh
element to every other mesh element. The final
radiosity values are stored for each element of the
mesh.