CS 6620: Advanced Rendering (Fall 2009)

Instructor: Kavita Bala 

Homework 3: Monte-Carlo Rendering (Indirect Illumination)

Due Friday, April 3 2009, 10pm

Check the FAQ for updates

Do this assignment in the same groups as Homework 2


We are going to add indirect illumination to our Monte Carlo Ray Tracer.
  1. Indirect Illumination: Extend your ray tracer to perform hemispherical sampling to compute illumination.
    1. Add a method to your Camera class called setNextEventEstimation(String state).
      1. If state is "off", both direct and indirect lighting are computed using hemispherical sampling.
      2. If state is "on", direct illumination is computed using the techniques specified in Homework 2 and indirect illumination is computed using hemispherical sampling.
    2. Add a method to your Camera class called setHemisphericalSamplingMethod(String method).
      1. If the method is "uniform", pick rays uniformly over the surface of the hemisphere.
      2. If the method is "cos", pick rays according to a cos(theta) distribution.
      3. If the method is "brdf", pick rays using importance sampling of the BRDF. You will only have to deal with Lambertian and isotropic Ward BRDFs in this assignment. To sample according to the Ward BRDF, read the paper "Measuring and Modeling Anisotropic Reflection" (by G Ward, check CMS for a copy of the pdf if you can't find it on the web). You have already implemented an isotropic Ward material (cs6620.material.Ward) in your ray tracer. Sample the isotropic Ward BRDF using the equations described in this file (Note that the equations given in the paper are NOT right).
  2. Direct Illumination: In homework 2 you added a Camera class called setShadowRaySamplingMethod(String method), where method could be "uniform", "area" or "power". Add one more type of method, "weightedbalance". If method is "weightedbalance" then use the weighted balance approach described in class to combine two different sampling approaches of lights: light area sampling and BRDF sampling. Implement this part only after you are done with brdf sampling from above.

Hints:

  1. Ward importance sampling: Remember that Ward has a diffuse component as well as a specular component. In order to importance sample it, pick a uniform random number (u) between 0 and 1. If u <= rho_d then sample diffuse, else if rho_d < u <= rho_d + rho_s, sample specular, else absorb. Modify your evaluation of your estimate value accordingly.
  2. Lambertian surfaces: For Lambertian materials, set your absorption probability according to the average reflectivity. Clamp absorption for surfaces with average reflectivity close to 1 to 0.1.
  3. All the scenes you should turn in rendered images for are posted in CMS. Three examples have been included: the Cornell box to show indirect illumination, a weighted balance example, and a scene showing Ward model and soft shadows.

Page maintained by Kavita Bala