Graphics Reference
In-Depth Information
As a trivial example, at least in the case where each p i is nonzero everywhere
on the domain, we could pick w 1 ( x )= 0.25 for every x , and w 2 ( x )= 0.75 for
every x . But more interesting cases arise when the weights are allowed to vary as
a function of the samples. We'll return to this in a moment.
Once we have chosen weighting functions, we take n 1 samples of X 1, j from
the first distribution, and n 2 samples from the second, and combine them in the
multisample estimator given by
n 1
n 2
F = 1
n 1
w 1 ( X 1, j ) f ( X 1, j )
p ( X 1, j ) + 1
w 2 ( X 2, j ) f ( X 2, j )
p ( X 2, j ) .
(31.97)
n 2
j = 1
j = 1
Veach shows that the multisample estimator F is in fact unbiased, and that with
suitably chosen weights, it has good variance properties. (An exactly analogous
formula works for three, four, or more samplers.)
What are good weight choices? The naive constant-weight approach is one;
another is closely related: If we partition the domain D into two subsets D 1 and
D 2 with D 1
D i ,
and 0 otherwise. This effectively says, “Use one kind of sampling on each part of
the domain.” One application of this is when we partition the space of paths into,
for instance, those with zero, one, two, ...specular bounces, and use a different
sampler for each. Another is when we're sampling from a Phong-style BRDF and
have to choose between a specular, a glossy, and a diffuse reflection.
D 2 = D and D 1
D 2 =
, we can define w i ( x )= 1 when x
31.18.5 Bidirectional Path Tracing
Path tracing makes its choice about extending paths based on the current point
(i.e., selectRay is a function of only x k ). But the actual lighting in a scene
may matter as well: If a bright light shines on a dark surface, considerable light
may still be reflected. And lots of dim rays reflected even from a low-reflectance
surface may converge to form caustics which are perceptually significant. In
recognition of this, Lafortune and Willems [Laf96] and Veach [VG94] indepen-
dently proposed bidirectional path tracing, in which paths are traced both from
light sources and from the eye. At a naive level, this sounds implausible: There's
essentially no chance that two such paths will ever land on the same point so that
light is carried all the way from the luminaire to the eye! But a simple trick (see
Figure 31.26) addresses this difficulty: We join the two paths with a segment! In
fact, we can join any point on the first path to any point on the second path with
such a segment, and compute the total transport along the resultant path.
Figure 31.26: A path is traced
from the light and the eye; each
point of the first path is con-
nected to each point of the second
to create paths from the lumi-
naire to the eye. These connect-
ing segments may, however, meet
occluders (shown as black seg-
ments), creating no net transport.
While the light-path and eye-path segments are all generated by tracing rays,
and hence are guaranteed to transport light, the joining segments may meet occlud-
ers that make them transport no light at all. This potential occlusion can waste a
great deal of path-tracing time and increase the variance of the pixel estimates.
When the joining segment is not occluded, the computation of the contribution of
the resultant path to the total transport is also very complex.
In practice, however, bidirectional path tracing tends to produce quite good
results, good enough that they can (with enough samples) be used as a reference
standard for evaluating other rendering methods.
To use the traced paths as samples for estimating the integral in the rendering
equation, we need to know not only the transport along the path, but also the prob-
ability of having generated the path. Computing this probability requires careful
 
 
Search WWH ::




Custom Search