Patrick Angell

cs6650 Path Tracer

 

GOALS OF THE PROJECT

 

The goal of this project was to be able to see the diffuse lighting effects of the Cornell box.  More specifically I was looking for the ‘bleeding’ of the red and green walls onto the respective sides of the boxes in the middle of the scene.

 

SOFT SHADOWS

 

I implemented the soft shadows by taking random samples from the light and averaging together the results.  Because the light in the scene is two triangles I took samples from each one.  The samples were treated as point light sources so that points higher up on the walls turned out brighter.  Here are two images showing the difference between the use of soft shadows with 50 samples and soft shadows with 20 samples.

 

 

 

These pictures were done using the normal as the one sample from the surface of the first object hit with a ray.  I used these to determine whether I was getting good samples for the surfaces.  This is because all of the images I’ve been getting have a very dark ceiling and I’m not exactly sure why that is.

 

DIFFUSE LIGHTING FOR THE CORNELL BOX

 

For path tracing I took stratified random samples for each pixel in the screen.  Then for the point on the object that the ray intersected I took several samples from there out into the scene. I used the equations that Pete Shirley gave us in class for getting a random point on a hemisphere.  I then multiplied that point by the matrix made using the normal of the surface hit.

 

I did direct lighting using the soft shadows algorithm with direct paths to the light.  Then path tracing was used for the indirect lighting.  I did this in order to speed up my computations since I was running this on my laptop.

 

Here are some of my final images:

 

This first image was done using only a few samples, but still illustrates one of the difficulties I ran into by not clamping the color values and dividing through by the largest component, IF it was greater than one.

 

Here’s an image from when I first started clamping, but was using the wrong values for the surface colors.  There are only 20 samples per surface

This image uses clamping for the colors as well and was done with 100 samples per pixel.

This image took over 12 hours and used 600 samples per surface because I used 4 samples per pixel by150 samples on the surface.