The goal of this assignment is to understand direct lighting from area light sources. This involves integrating the reflection equation given the area light source by Monte Carlo sampling. When you finish the assignment, you will be able to perform Monte Carlo integration for direct lighting in one of two ways:

- Randomly sample a triangular light source.
- Randomly sample a Gaussian microfacet distribution function.

You should review Chapters 9-12 in the

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.

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

B.Describe an algorithm for generating a uniform distribution of points on a triangle.

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 writtenD(α), whereαis the angle betweenH, the normal to the microfacet, andN, the geometric normal to the surface. For this problem, assume:

D(α) = e^{-cos2α/cos2β}where

βis an adjustable parameter controlling the width of the highlight. Note thatcos αis simply equal to(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 asdA(ω) dω = D(ω) dA dω; here the directionis the same asHanddω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 todA. Therefore,

∫ D(α) cos α dω._{h}= 1Note that the microfacet distribution function may be interpreted as a probability distribution function over projected areas.

For this problem, your job is to describe an algorithm to sample microfacet distributions functions. The algorithm should randomly return microfacet directions

Haccording to the normalized form of the distribution given. You can refer to the lecture on microfacet distributions for examples of how this is done for the Blinn microfacet distribution.

We generally want to 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ω

A.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?

B.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 © 2002 Pat Hanrahan