Project 13

Photon Mapping

Ray Traced View

Here's a rough example of photon mapping. My implementation has a couple bugs, especially with photon intensity, but overall this image shows the basic concept.

One of the immediate differences between photon mapping and path tracing is the ability to render caustics. This particular render uses a caustic map, which tracks photons which first hit reflective or refractive objects

This is the same scene above, but now I'm only using a caustic map, as opposed to both a caustic map and a global illumination photon map. In my opinion, this render looks better than the previous, although it took much longer to compute.

Photon map

Here's the photon map which accepts hits whose first bounce happens diffusely.

Here's the caustic map. Notice the second caustic on the wall. I really like this approach. I have a feeling I could combine this with monte carlo illuminiation and get some pretty satisfying results.

Bugs

At first I wasn't dividing my photon intensity by the total number of photons. Although dividing the intensity of each photon by the total number of photons helped even out the global illumination intensity, all photons are really dark now.

Here I was dividing the photon intensity by distance squared. Some photons were actually being placed outside the scene as well.

Can't figure this one out...