In 2003 I completed a ray tracer project for an honors advanced graphics course. The initial implementation did not include global illumination, but several were added a couple of months later. In late 2004 I dug up the code and began adding support for primitive distributed (cloud) rendering support. Eventually I would like to perform a major re-write of this demo, scrapping the entire UI (which was provided by my university), and improving the feature support.
This version of the ray tracer supports distributed processing across many connected devices. Currently, servers and clients are running on both Windows and OSX. Using 16 connected devices (of varying performance) the tracer is able to complete scenes much faster than with a single device, often reducing rendering time for complex scenes from hours to minutes.
The following list describes the current set of rendering features:
Diffuse lighting with specular highlights
Post processing effects
Bump and parallax mapping
Oct-tree and kd-tree scene hierarchies
Motion blur effects
Distributed rendering support
Ray shading system
Reflective and refractive surfaces
Depth buffer support
Full HDR pipeline
Photon mapping is one approach to global illumination. Using a monte-carlo sampling method, a significant performance improvement is realized with an acceptable (and often unnoticable) degredation in lighting quality.
This approach works in two phases: first, photons are emitted from all light sources (limited by the total energy in the scene), and allowed to bounce from object to object until some threshold is reached. Each time a photon strikes an object, an entry (referred to as a photon splat) is stored in a kd-tree, to track the irradiance at the collision point.
Next, a forward ray tracing path casts rays through each camera pixel into the scene and determines the respective collision points. For each point, contributions from direct illumination are calculated generically and added to an estimate for the indirect contribution that is derived from a sampling of the neighboring photon splats of the collision point.
Ray Tracer Demo for Windows (840 KB)