Graphics Reference
In-Depth Information
27.14 Software Interface to Material Models
For our applications of material modeling to rendering, we'll restrict our discus-
sion to a particular class of models: those composed of a finite part and an impulse
part, which we'll now characterize.
The “impulse” part of scattering describes phenomena like transmission
through boundaries between media, and mirror reflection: Radiance arriving from
one single direction generates radiance leaving in a single other direction (or, in
the case of simultaneous transmission and reflection, two other directions). These
are the phenomena for which the measurement of the BSDF is impossible, as we
described in Section 26.10.2. “Impulsive” scattering from
v o is described
by a single factor by which incoming radiance is multiplied to produce outgoing
radiance. We'll assume that for a given direction
v i to
v i toward a light source, there
are finitely many (usually two!) directions
v o ) is an impulse-
scattering pair. For each such pair, we'll have a constant m ,the magnitude of
the impulse, which is the factor by which incoming radiance is multiplied to get
outgoing radiance. Similarly, we'll assume that if we know
v o for which (
v i ,
v o , there are only
finitely many directions
v o ) is an impulse-scattering pair. To
simplify things, for the remainder of this section we'll say that there are exactly
two impulse directions
v i such that (
v i ,
ι 2 , with magnitudes m 1 and m 2 .
When we want to ray-trace, it's essential to recover these impulse directions
and the associated material properties; we'll need
ι 1 and
v o )
ImpulseArray getImpulsesIn(surfel,
where surfel is a SurfaceElement data structure that stores the geometric normal
at a point of some surface, the location of that point, the index of refraction of the
material on the side pointed to by the normal and on the other side as well, and the
shading normal (a vector used in shading computations, often interpolated from
geometric normals at nearby points). The array of returned “impulses” contains a
list of pairs (
v o values equal the input argument, and m is
the magnitude of the impulse. It's also useful to have the dual form
,
v o , m ) where all the
v
v i )
ImpulseArray getImpulsesOut(surfel,
which returns an array of (
) pairs, together with their impulse magnitudes.
In fancier versions of ray tracing that can handle area lights and glossy sur-
faces, it's also important to be able to evaluate the finite part of the BSDF for any
two inputs, that is, we need
v i ,
v
v i , v o )
float getBSDFFinite(
It's also useful to be able to “sample from the BSDF,” that is, to ask, given
an output direction
v o , for an input direction
v i where the probability density of
v i is proportional to f s (
v o ) . For a Lambertian surface, such a proce-
selecting
v i ,
dure would return a direction
v i in the upper hemisphere uniformly at random.
Sampling from the BSDF doesn't make literal sense if the BSDF contains
impulses, for in that case, certain BSDF values are infinite. Suppose, for instance,
that we have a material and a direction-to-light
v i in which 40% of the light is
mirror-reflected in a direction
ι 1 , while 60% is Lambertian-scattered. In this case,
 
 
 
Search WWH ::




Custom Search