Photon Mapping

Introduction to Photon Mapping

Ray tracing is a fast rendering technique developed several years ago which have been used by talented artists to produce several stunning pictures. 

Compared to scan-line renderer, ray tracing is a huge improvement because it can render objects image reflections in mirror-like surfaces.

Cornell box rendered with ray tracing

One drawback of ray tracing, however, is that it cannot render indirect illumination. Indirect illumination comes from light reflected from other objects around. Therefore, any part of an object which is not directly lit by a light source or which is obscured by another object is rendered black.

To help compensate for the missing indirect illumination, ambient illumination value was added to ray tracing. Ambient lighting, however, is the same everywhere in a scene or on each models which tends to produce flat shadings. Clever shadows computing algorithm, such as the one found in A:M when you set the darkness property of your lights to anything less than 100%, can fake indirect illumination even better.

Better faking technique of indirect illumination have been developed by artists who understood the interaction between light and surfaces. Among those techniques is the extensive use of secondary lights, even negative lights, placed at critical locations within the scene in order to simulate indirect lighting. This technique eventually developed into the skylight technique which is essentially an array of light designed to simulate indirect light coming from a sky (see skylights). Skylights, however, cannot be used in an indoor scene setting and still cannot fake inter-reflection from other objects.

Today, there exist several rendering techniques which can compute indirect lighting. However, because those techniques take the indirect illumination into account, they are all much slower than ray-tracing alone. Imagine a scene where there is not only a few lights but thousands even millions of lights. Anyone who have used a skylight at least once will immediately have a feeling of the huge time that such a scene would take to render. This is, in essence, what a typical global illumination renderer tries to achieve.

Cornell box rendered with Photon Mapping

But don't get discouraged yet. Among those techniques, Photon Mapping is one of the most efficient algorithms which can render illumination effects like indirect illumination and caustics.

And A:M uses an implementation of the Photon Mapping technique for those effects. With the current implementation, the Photon Mapping may be used to render indirect illumination or caustics but not both at the same time although it is possible to produce an image with both at the same time by compositing two renders: one with the indirect illumination setting and the other with the caustics.

Warning! long render time ahead!

This said, I guess I will never warn often enough, even though it is one of the most efficient algorithm, it is nevertheless much slower than ray tracing. So if you are trying to cut render time by every means, then photon mapping is probably not for you.

Next: An overview of Photon Mapping and how it fits within the renderer categories.