
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:
- disc based photon sampling to prevent overexposure at edges and corners
- For performance, adaptive sampling is used in the stratified sampling of area lights for soft shadows.
- photonmap irradiance estimate uses a cone filter. This helped reduce color bleeding and made caustics more accurate.
- distributable rendering - the renderer can take arguments specifying a portion of the image to render, and then output that to a text file. This allowed me to write a Perl script which distributes the render job across N computers (eg, 10) to get things done much quicker.
A sample of images I rendered:
Standard Cornell Box, with global illumination:
![]()
Cornell Spheres scene with global illumination:
![]()
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]:
![]()
A scene I created, with no indirect illumination enabled:
![]()
"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.
Wallpaper: 1600x1200, 1280x1024
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!
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.