COMP 870 - Advanced Image Generation - Assignment 3

Ryan Schubert
October 26, 2006

Ray Tracer Used

Same as was used for assignments 1 and 2.

Global Illumination with Path Tracing

For this project I implemented traditional path tracing, without direct lighting.
The decision at an intersection is:

Along the way...

Despite the conceptual simplicity of path tracing, things didn't work out perfectly right off the bat.
At first I was (incorrectly) attenuating the color values from the diffuse rays before realizing that the sampling essentially resulted in the same thing. As a result, everything was extremely dark AND I got fun artifacts along corners where the attenuation factor was actually dramatically increasing the color values because the distance was well below 1.
Corner effects from incorrectly weighting diffuse rays with 1/dist^2 attentuation.

Initially I was just doing a uniform sampling of my hemisphere for diffuse rays and then weighting the color returned by the dot product with the normal. This sample would then return to my reconstructor and was averaged with all the other samples--as if they were all weighted equally! This will obviously result in a significant darkening as more samples per pixel are used, as well as a very quick 'falloff' factor as the angle between a surface normal and the light increases. This can be seen in this early image:
Cornell box with a single relfective sphere. 784 samples per pixel with jittered sampling and a box filter reconstruction.

After correcting the above problem, I had a little trouble getting the 'light' value set to something that looked good. My initial attempts were too dim:
Far too dark! 2300 samples per pixel with jittered sampling and a box filter reconstruction.

Still too dark, but getting better! 2700 samples per pixel with jittered sampling and a box filter reconstruction.

Final Results

I modified my ray tracer for this assignment to allow the user to specifiy a chunk size (in samples per pixel) and then a total number of chunks to compute. After each chunk, the image up to that point is saved to disk for incremental viewing. The final image was rendered with a chunk size of 100 samples per pixel (took around 20 minutes depending on what else the computer was doing) and is probably still running now... As of 5:05 AM, Friday this is the latest image:
3700 samples per pixel with jittered sampling and a box filter reconstruction. The left wall is red, the right wall is green, and the back wall, floor, and ceiling are all white. The left sphere is partially reflective with a yellow diffuse componant, the right sphere is reflective and refractive.
I'll likely continue to add newer images onto this page as they become available, but I'll leave the above image up as of the 5:05 AM version :)



3:00 PM, Friday. 7100 samples per pixel with jittered sampling and a box filter reconstruction.

3:26 PM, Saturday. 15,200 samples per pixel with jittered sampling and a box filter reconstruction.


Scene file used: cornell.scn

Code

Feel free to email me for part or all of the code for this project. res at cs.unc.edu.