Graphics Reference
In-Depth Information
R is an integrable real-valued function, and X is a
random variable on the interval [ a , b ] , with distribution g , then f ( X )
g ( X )
Theorem: If f :[ a , b ]
is a random
variable whose expected value is b
a f ( x ) dx .
The proof is almost exactly the same as before:
E f ( X )
g ( X )
= b
a
f ( x )
g ( x ) g ( x ) dx ;
(30.64)
= b
a
f ( x ) dx .
(30.65)
Inline Exercise 30.9: Suppose that X is uniformly distributed on [ a , b ] . What's
the pdf g for the variable X ? What does this importance-sampled single-sample
estimate say about integrating f using X to produce a sample? Is it consistent
with the single-sample estimate theorem? What happened to the extra factor of
( b
a ) ?
Just as before, if we use n samples instead of one, the variance of the estimate
decreases as n .
The value of this nonuniform-sampling technique is that if you make the
density function g be exactly proportional to f , then something quite interesting
happens: Each sample of the random variable
f ( X )
g ( X )
is the same (i.e., the random
variable f ( X )
g ( X ) is a constant). This means that the variance of the estimator is zero!
Unfortunately, to make g exactly proportional to f (i.e., g = Cf for some C )
and to make it a probability distribution, we need
1 = b
a
g ( x ) dx
(30.66)
= b
a
Cf ( x ) dx
(30.67)
= C b
a
f ( x ) dx
(30.68)
In other words, the constant C is just the inverse of the integral we're hoping to
compute. To get the ideal benefit of this approach, we'd need to know the answer
totheproblemwe'retryingtosolve!
All is not lost, however. Suppose that the function g is larger where f gets
larger, and smaller where f gets smaller, etc., albeit not in exact proportion. Then
the variance of the weighted-sampling estimator is lower than that of the uniform-
sampling approach. The use of such a function g is known as importance sam-
pling, and g is sometimes called an importance function.
In practice in graphics, for a scene containing only reflection, we're usually
trying to estimate the integral that appears in the middle of the rendering equation,
L ( R ( P ,
v i ) ,
v i ) f r ( P ,
v i ,
v o )
v i ·
n ( P ) d
v i ,
(30.69)
v i S + ( P )
for a fixed
v o and P . We know the reflectance function f r (it's a property of the
material at P ), but we usually don't have much idea apriori about how the factor
 
 
Search WWH ::




Custom Search