Homework 4

Due: Tuesday, May 15, 2001

The goal of this written assignment is to test your understanding of probabilistic sampling techniques. These sampling techniques will be used in your next programming assignment, which will involve performing direct lighting calculations using Monte Carlo Integration.

1. Area light sources are typically defined by attaching an emission function to a shape. For now, we will assume the emission function is constant; that is, the outgoing radiance from the light source is independent of both position on the source and outgoing direction. Sampling an area light source involves choosing random points on the surface. The number of random points on any subset of the surface should be proportional to the surface area of that subset. This is called uniform area sampling.

1A. Describe an algorithm for generating a uniform distribution of points on a unit cylinder (radius 1, height 1). For this problem, ignore the circular disk at the base and top of the cylinder.

1B. Describe an algorithm for generating a uniform distribution of points on a unit cone (radius 1 on the plane z=0, and height 1; the tip of the cone is at z=1). As before, ignore the base of the cone.

1C. Describe an algorithm for uniformly sampling a unit sphere (radius 1, centered at the origin).

2. It is also important to develop methods for sampling reflection functions. For this problem, we will assume that the reflection function is based on a microfacet model. That is, each point on the surface contains a distribution of tiny facets. The microfacet distribution is written D(H), where H is the normal to the microfacet. For this problem, assume D(H) = (N • H)s, where N is the surface normal and s is the shininess. The cos α = N • H

Microfacet distribution functions return the number of facets of a given size oriented in a given direction H, or more simply, the total area of all the facets oriented in a given direction. Mathematically, this is written as dA(ω) dω = D(ω) dA dω; here the direction is the same as H and is the differential solid angle in the direction ω. Microfacet distributions may be interpreted as probability distributions if they are normalized. The normalization condition may be interpreted geometrically as the condition that total projected area of all the micofacets with different orientations is equal to dA. Therefore, the integral of D(ω) cos α dω must equal 1. The microfacet distribution function may be interpreted as a probability distribution function over projected areas.

Describe an algorithm to sample microfacet distributions functions. The algorithm should randomly return microfacet directions H according to the distribution D(H) = (N • H)^s

3. In the programming assignment, you will compute the amount of light reflected in a given direction by integrating over the upper hemisphere. The integrand is given by The Reflection Equation: ∫ D(H) L(ω) cos θ dω

3A. Suppose you perform the integral by randomly sampling over the area of the light source. What estimator should be used to compute an unbiased estimate of the integral?

3B. Suppose you perform the integral by randomly sampling microfacets according to the microfacet distribution. What estimator should you use in this case to compute an unbiased estimate of the integral?

Copyright © 2001 Pat Hanrahan