Graphics Reference
In-Depth Information
f s (
, making sampling “proportional to” the BSDF impossible. But
what we'd like, in this case, is for the sampling procedure to return
v i ,
ι 1 )=
ι 1 40% of
the time, and to return a vector
v i uniformly at random on the hemisphere the
remaining 60% of the time. To further extend the example, if the magnitude of the
impulse remained at 0.4, but the material absorbed 30 % of the light hitting it and
scattered the remaining 20% in a Lambertian fashion, we'd expect the procedure
to return
ι 1 40% of the time, NONE 30% of the time, and a uniformly distributed
random vector
v i the remaining 20% of the time. For this, we need a procedure
like
v o )
Vector3 getSampleIn(
although such a procedure may, in the case of highly peaked BSDFs, prove to be
very slow unless the material model has been designed in advance to make such
sampling efficient.
Sometimes it suffices to get a sample where the probability density of a par-
ticular direction
v o ) , but whose
probability distribution p is somewhat similarly shaped to the BSDF; in this case,
we need to know not only the sample direction, but also a “factor” given by
v i isn't exactly proportional to the BSDF f s (
v i ,
f s (
v i ,
v o )
,
(27.46)
p (
v i )
although such an adjustment isn't needed for the impulse terms, because they can
be sampled from exactly. In this case, we need a procedure with a signature like
v o , float &factor)
Vector3 getWeakSampleIn(
in which the adjustment factor is set when the sampled vector is returned.
Corresponding procedures for sampling outgoing directions in proportion to
the BSDF, or for sampling either incoming or outgoing directions in proportion
to a cosine-weighted BSDF, are also useful. Indeed, the cosine-weighted versions
are the ones we'll primarily use in writing a path tracer and photon mapper in
Chapter 32.
27.15 Discussion and Further Reading
Correctly modeling scattering is central to making renderings look realistic: For
directly illuminated surfaces, our eyes essentially observe the BSDF, so making it
right is important. Pharr and Humphreys [PH10] discuss the modeling of BSDFs,
and a software interface to them, in extensive detail.
There's a huge literature on scattering models, and it's worth reading at least
one or two of the early papers—perhaps the Torrance-Sparrow or Cook-Torrance
or Blinn-Phong papers—to get an idea of all the complexities.
Lawrence [Law06] addresses the very practical question of how to make com-
putational models for scattering that are (a) expressive enough to match measured
data and (b) simple enough to admit relatively easy sampling strategies.
We began this chapter by discussing how objects transform light fields, and
promptly shifted to talking about surfaces made of materials; this factorization
is great for reducing the complexity of light transport (e.g., it lets us use the
 
 
 
Search WWH ::




Custom Search