Photon Mapping

Photon mapping

The last 15-864 (Advanced Graphics) project was a photon mapping renderer, featuring caustics and indirect illumination. It was built upon a provided ray tracer that had nice support for loading textures, .obj files, and creating various shapes.

Technical features:

A sample of images I rendered:


Standard Cornell Box, with global illumination:
Cornell box

Cornell Spheres scene with global illumination:
Cornell box

Cornell Window, which more easily demonstrates that global illumination is working. The only light source is from outside the window on the right, so the only way for the right wall to get any light at all is by diffuse interreflection. [Used 16 samples/pixel]:
Cornell box

A scene I created, with no indirect illumination enabled:
scene


"Hobbit Hole" scene:
The three walls and floor use textures to achieve the bookcase, fireplace, floor paneling, and the window on the right wall (the window is actually a physical hole in the wall, with a point light on the other side). The table has a textured chess board on it (I know, it's only 4x4 instead of 8x8), with a refractive sphere. The "one ring" is on the floor, and behind it is a pyramid of reflective spheres (cannonballs perhaps?). A spider (loaded from a .obj file) is on the ceiling.

The spider object was obtained from turbosquid, and the ring (a simple torus) I created in Wings3d.

Photon mapping
Render Time: 240 minutes, distributed across 12 computers (completion time was about 20 min).
Settings: 1000x1000 pixels, 200k photons used, 200k caustic, 25 ray samples per pixel, 9 indirect rays per sample.
Total rays shot: 827 million!
Wallpaper: 1600x1200, 1280x1024


Without indirect illumination or caustics:


I later added support for participating media. I didn't have time to make complicated smoke volume objects, so the cubes of smoke look a little unrealistic, but still cool in my opinion:

The smoke is green on the right side due to scattering from the right wall. The second image shows a volume caustic created by the refractive sphere on top which directed light into the volume.