Kevin Steele

CS 6650

Programming Assignment #5: Metropolis Light Transport

 

 

I implemented the Metropolis Light Transport algorithm using image intensity as the image contribution function. I found that when using this function, it was best to weight all mutations and paths as equally probable. Otherwise, the image variance is much larger.

 

I used three mutation strategies:

 

1.      Perturb the path by a small amount. The first segment (from the eye) is perturbed according to Veach’s lens perturbation. The remaining segments are perturbed about a cone as discussed in class.

2.      Replace all segments except the last one. This accomplishes the same goal as bi-directional mutations, where the last segment must stay on the light when the light source is around a few corners, as in Veach’s contrived teapot scene.

3.      Replace the entire path. This helps to give more equal coverage to the entire image intensity function.

 

Using the Cornell box, the following images illustrate the three mutation strategies:

 

Perturbations only

New path head

New path

 

 

I give all mutation strategies equal probability of being selected for a mutation possibility. The following image uses all three mutations with an average of 200 mutations per pixel (note that a bug is giving the shadow the wrong color):

 

 

 

 

Spectral sampling

 

Rather than sample three or more wavelengths separately, I used Veach’s suggestion to normalize a spectral sample by its luminance, then add that sample to the accumulating density image.

 

 

I implemented Veach’s direct lighting refinement, which entails running the MLT algorithm on paths with more than 2 segments, and adding this image to a direct lighting image computed using path tracing. For images where there is a lot of direct lighting, the improvement is dramatic. It is less so for portions of an image with no direct lighting (the Cornell box ceiling, for instance):

 

  

 

Left: no direct lighting.  Right: direct lighting added—the directly lit walls have much less noise.

 

 

Caustics

 

My MLT caustics work to a degree, though the darkening in the MLT images indicates some bugs in my code.

 

    

 

Left: path traced caustic, 25 samples per pixel.  Right: MLT caustic, avg. 200 mutations per pixel (equal running time for Veach).

 

 

This image shows that in the limit, my MLT implementation can yield a better caustic.

 

 

This image was rendered (overnight) with an average of 3000 mutations per pixel.

 

 

Light source outside of scene (completed after the deadline)

 

I experimented with a scene that has mostly indirect lighting and the light source is in another room.

 

 

 

Path traced with 40 samples per pixel.

 

Path traced with 1000 samples per pixel. This is less noisy than the 1000-mpp MLT image.

 

MLT using average of 250 mutations per pixel. For Veach this and the 40-spp path-traced image above had similar run times. I suspect that a more optimized implementation of MLT than mine would also yield similar run times. This image is less grainy than the path-traced image, though it is not as clean as it could be. There are also some bugs in the mutation code causing the door to glow and the sphere’s caustic to all but disappear.

 

MLT using average of 1000 mutations per pixel. It is surprisingly grainy considering the number of mutations. I believe that one drawback of MLT is that it has inherently higher variance in darker regions of the image.