Monte Carlo Ray Tracing

Ryan Schmitt

CSC 473 (Spring 2011) - Zoe Wood, PhD.

Cornell Box with global illumination via Monte Carlo integration.


The ray tracers we developed for this course were missing one feature in my opinion: a full global illumination algorithm. Our ray tracers supported a subset of global illumination, namely reflection, refraction, and (hard) shadows, but they only computed direct illumination lighting. The problem with this is that the rendered images lack indirect illumination, which adds a significant amount of perceptual realism to our scenes by modeling the way light bounces around to illuminate areas that are not in direct light. Out of the existing full global illumination algorithms (e.g. point-based color bleeding, photon mapping, radiosity, etc.) I chose to implement Monte Carlo ray tracing.

Monte Carlo ray tracing applies the Monte Carlo integration technique to estimate the incoming radiance at any point in a scene. This is accomplished by tracing multiple randomized rays, generated by sampling a hemisphere aligned with the surface normal, from our primary ray intersection into the scene and computing the radiance at those points (potentially including another Monte Carlo integration for the indirect illumination). All these radiance values are attenuated based on distance and Lambert's cosine Law, summed, and averaged as per Monte Carlo integration. This technique is called Monte Carlo ray tracing and provides a full global illumination solution.

Strengths of Monte Carlo ray tracing:

Disadvantages of Monte Carlo ray tracing:



These results were obtained on an Intel core i7 920 running at 3.5 GHz with 6GB of memory. The coding was done using C++ with the boost and glm libraries.

Cornell Box @ 512x512, 16xAA, 32 area light samples, 64 monte carlo samples: 2 hours 33 minutes.

Simple Cornell Box @ 512x512, 16xAA, 32 area light samples, 64 monte carlo samples: 2 hours.

Bunny Tasty @ 1280x960, 16xAA, 16 area light samples, 0 monte carlo samples: 12 minutes.

Bob Somer's cool.pov @ 960x540, 9xAA, 25 area light samples, 32 monte carlo samples: 6 minutes

bunny_jumbo.pov @ 640x480, 0xAA, 0 area light samples, 0 monte carlo samples: 2 seconds (6m3s w/o BVH)

bunny_jumbo_tris.pov @ 640x480, 0xAA, 0 area light samples, 0 monte carlo samples: 5 seconds (17m28s w/o BVH)

POV files

Future Work

This project will serve as a comparison to the work I plan to implement for my thesis. I am planning to extend this project to support point-based color bleeding and utilize the GPU for the cube face rasterization required by PBCB.


Windows Executable - unZip and run 'ray_tracer.exe' under Windows.

Source Code - unZip and use 'make' or open with Visual Studio 2008 or newer.


Matt Pharr , Greg Humphreys, Physically Based Rendering: From Theory to Implementation, Morgan Kaufmann Publishers Inc., San Francisco, CA, 2004.