CSci 5108: Programming Assignment #3
*
due: 9pm, Tuesday, March 23
Rendering requires the computation of many different types of integrals. In this
assignment you will take a close look at how
pbrt
computes the radiance reflected from
a surface in a certain direction by integrating the surface's reflection function (BRDF)
against incoming light from all directions.
Because these sorts of integrals generally don't have analytic solutions,
pbrt
numerically estimates their value by Monte Carlo integration. As you are now well
aware, the variance of a Monte Carlo estimator manifests itself as noise in a rendered
image. It is therefore very important to the quality of your rendered image to choose
samples from the domain of integration such that variance in the integral estimate is
minimized.
Importance sampling
is a variance reduction technique that draws samples
using a distribution that has the same shape as the function being integrated. This means
that we are more likely to choose samples which will make a large contribution to our
estimate. In this assignment you will explore various approaches for sampling irradiance
on scene objects due to an infinite area light source (environment light) and explain why
and when certain approaches are preferable to others.
Background Reading
Read Chapters 13 (especially 13.5), 14 (especially 14.3) and 15 (especially 15.6.5) in the
pbrt
book. This assignment will require a solid understanding of importance sampling,
so please read these chapters carefully.
Important Notice:
Older versions of the
pbrt
book have a typo in the multiple
importance sampling equation on page 676. The code in
core/transport.cpp
is correct,
but the equation given in the book is wrong. Instead of multiplying both summations by
the factor
1/(
n
f
+
n
g
)
, the first summation (sum over samples drawn from a PDF from
f
)
should be scaled by
1/
n
f
. The second summation should be scaled by
1/
n
g
.
Part 1 – Basic Monte Carlo Integration
Question 1
:
Write a program to verify numerically that
=
(4
x
2
0
2
)
1/ 2
dx
. Use the
Monte Carlo method and 2500 random numbers.
Part 2 – Importance Sampling an Infinite Area Light
In the real world, light incident on an object comes not just from light emitters, but is
reflected or scattered from all directions. One way of approximating this effect in
pbrt
is to use an environment light (infinite area light), which defines light entering the scene
from all directions due the surrounding environment. Environment lighting can greatly
enhance the realism and richness of your renderings. However, since computing
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Interrante,V
 Computer Graphics, Monte Carlo method, importance sampling, pbrt

Click to edit the document details