Graphics Reference
In-Depth Information
Figure 31.25: The image on the left was made by sampling the BRDF of the rough surface;
the nearer slabs are rougher than the distant ones. Four light sources of varying sizes
produce different glossy reflections. The image on the right used sampling on the light
sources. The upper right in the first picture is preferable to that in the second; the lower
left in the second picture is preferable to that in the first. No one sampling strategy is best.
(Note that the scene is also lit by a weak light above the camera, and that the slabs all have
a small diffuse component, letting us see their general shapes.) (Courtesy of Eric Veach.)
zero. An alternative approach is to trace the ray through P to x , but then sample
a point x uniformly at random on the light source, and connect x to x .Nowthe
path certainly carries some radiance.
The second approach initially seems far better than the first approach, since
the paths will always conduct some light. But what if the surface is very rough?
Then the BRDF in the xx direction may be nearly zero, and so the contribution is
again very small. Figure 31.25 shows the results in practice.
Clearly we want to use one sampling strategy in estimating the integral in
some cases, the other in other cases, and a mix of the two in still other cases. This
is where multiple importance sampling comes in. Before we discuss that, there's
one point worth noting: If you have two estimators, one with large variance and
one with small variance, and you average them, you're in trouble: It's really hard
to get rid of the variance except by taking lots of samples. Informally speaking,
the central idea of multiple importance sampling is that it provides a way to work
with a kind of average of two estimators without letting the larger variance of one
of them creep into the later computations.
To describe multiple importance sampling, we return to the abstract setting:
We're trying to integrate a function f on some domain D , and we have two
different sampling methods that produce samples X 1, j , j = 1, 2,
...
and X 2, j ,
j = 1, 2,
with density functions p 1 and p 2 , respectively.
To estimate the integral using samples from the two different distributions, we
need only produce two weighting functions, w 1 and w 2 ,from D to R , with two
properties:
...
= 0.
w 1 ( x )= 0 whenever p 1 ( x )= 0, and similarly for w 2 and p 2 .
It generally makes sense for both weighting functions to be non-negative, in which
case both vary between zero and one.
w 1 ( x )+ w 2 ( x )= 1 for any x with f ( x )
Search WWH ::




Custom Search