Image Synthesis Assignment 5: Importance Sampling

Due: April 3

Description

The focus of this assignment is efficient rendering with complex illumination, such as the natural environment lighting in the above images. Rendering from these representations requires that we approximate the integral over all lighting directions for every image sample. Therefore, high variance in the illumination can lead to noisy images, since it is possible to underestimate the integral by failing to sample small, bright regions in the environment map. One solution is to sample the illumination such that bright areas are more likely to be sampled than dark areas. This technique is called importance sampling, because it assigns greater importance to certain sample points over others. For this assignment you will improve pbrt's support for rendering from environment maps by importance sampling the illumination.

Step 1 (Theory)

Read the paper draft Monte Carlo Rendering with Natural Illumination, which describes in detail importance sampling algorithm you need to implement. You should be comfortable with the concepts before you attempt to write any code for this assignment. Also, you may want to [re]read the monte carlo chapters in the pbrt book.

Step 2 (Implementation)

Download this zip file containing the skeleton code and scene descriptions you will need for this assignment. This files contains a plugin stub (envlight.cpp), binary for a reference implementation, example images, and a VS2003 project for the EnvironmentLight source model you will use to implement importance sampling. The scenes folder contains several pbrt scene files along with environment maps for indoor and outdoor illumination. You should use low (2-4) image and light sampling rates for development and debugging, since this will speed up rendering significantly and still reveal the type of problem you are dealing with in this assignment: noise reduction.

Step 3 (Results)

Importance sampling the illumination allows us to generate high-quality images using much lower sampling rates than you would need with random sampling. For example, the above images were rendered with the same sampling rate (16 light samples), with random sampling (left) and importance sampling (right). For part 3 of this assignment you will demonstrate the effectiveness of your importance sampling implementation by rendering images with environment map lighting. For each scene, you will vary the sampling rate and compare images with and without importance sampling. Use 300 x 300 image resolution and 8 image samples for all renderings, both random and importance sampled lighting. Specifically, you are required to render the following scenes for comparison:

Submission

Write a short web page describing the algorithms you implemented for importance sampling. Email the TA as usual. The web page should consist of a link to your code and images comparing random and importance sampling for the scenes and sampling rates listed in step 3.