9

52 Chapter 17: Rendering
The color of any specific point on a surface in
amodelisafunctionofthephysicalmaterial
propert ies of that sur face and t he light that
illuminates it. Two general shading a lgorithms:
local ill u mina tion and global illumination are used
to describe how surfaces reflect and t ransm it light.
Local I llumination
Local illumination algorithms describe only
how individual surfaces reflect or transmit light.
Givenadescriptionoflightarrivingatasurface,
these mathematical algorithms, called shaders
in3dsMax,predicttheintensity,color,and
distribution of the light leaving that surface. In
conjunction w ith a material description, different
shaders will determine, for example, if a surface
will appear like plastic or metal or if it will appear
smooth or rough. 3ds Max prov ides a robust
interface for defining a wide array of different
surface materials.
After defining how an individual surface interacts
with light at the local level, the next task is to
determine where the light arriving at the surface
originates. With the standard scanline rendering
system (page 3–1006) of 3ds Max, only the light
coming directly from the light sources themselves
is considered in the shading.
Formoreaccurateimages,however,itisimportant
to tak e into account not only the light sources,
but also how all the surfaces and objects in the
environment interact with the light. For example,
some sur faces block light, c asting shadows on
other surfaces; some surfaces are shiny, in which
case we see in them the reflections of other
surfaces; s ome surfaces are t r ansparent, in which
case we see other surfaces through them; and some
surfaces reflect light onto other surfaces.
Gl oba l I l lu mina ti on
Renderingalgorithmsthattakeintoaccount
the ways in w hich light is t ransferred b etween
surfaces in the model are called global illumination
algorithms. 3ds Max offers two g lobal illumination
algorithms as an integral part of its production
rendering system: ray-tracing and radiosity.
Before an explanation of how ray-tracing and
radiosity work, it’s useful to understand how light
is distributed in the physical world. Consider, for
example, the room shown in the illustration below.
Kitchen lit by two lights
This kitchen above has two light sources. One
theory of light considers the light in terms of
discrete particles called photons, that travel from
the light s ource until they encounter some surface
in the kitchen. Depending on the surface material,
someofthesephotonsareabsorbedandothers
are scattered back out into the environment.
Thefactthatphotonstravelingataparticular
wavelength are absorbed while others are not is
what determines the color of the surface.
Surfaces that are very smooth reflect the photons
in one direction, at an angle equal to the angle
at which they arrive at the surface, the angle of
incidence.Thesesurfacesareknownasspecular
surfaces, and this type of reflection is known as
specular reflection. A m irror is an example of
a perfectly specular surface. Of course, many
materials display some degree of b oth specular
and diffuse reflection.