Photon Mapping

Wed 31 December 2014
By Bram

With my latest game, The Little Plane That Could launched, it gave me a good opportunity to start some experimental coding. I would like to crack the challenge of real time indirect lighting. My idea is to use voxel-geometry only, and run a photon mapper on this geometry. Because the geometry is simple, the intersection tests (AABB vs ray) may be fast enough for real time use.

Below is an early result, where I shoot photons for direct light only, no bounces yet. It shows the raw photon hits, and a low-pass smoothed version of it. The light source is not visible, but is not too far above the pillar.

image0

I also tried flat shading the voxel faces based on the number of photons that hit it. The discontinuity between faces is too distracting though. So the next step is smooth shading the quads. A first attempt with Gouraud shaded quads looked pretty horrible, so I need to rethink that.

image1