Photon mapping
Brief Description
In computer graphics, photon mapping is a global illumination algorithm based on ray tracing used to realistically simulate the interaction of light with different objects. Specifically, it is capable of simulating the refraction of light through a transparent substance, such as glass or water, diffuse interreflections between illuminated objects, and some of the effects caused by particulate matter such as smoke or water vapor. It was developed by Henrik Wann Jensen.
Detailed Description
In the context of the refraction of light through a transparent medium, the desired effects are called caustics. A caustic is a pattern of light that is focused on a surface after having had the original path of light rays bent by an intermediate surface. An example is a glass of wine on a table. As light rays pass through the glass and the liquid, they are refracted and focused on the table the glass is standing on. The wine in the glass also produces interesting effects, changing the pattern of light as well as its color.
With photon mapping, light packets (photons) are sent out into the scene from the light source. Whenever a photon intersects with a surface, the intersection point, incoming direction, and energy of the photon are stored in a cache called the photon map. After instersecting the surface, a new direction for the photon is selected using the surface's BRDF. There are two methods for determining when a photon should stop bouncing. The first is to decrease the energy of the photon with each bounce (i.e. remove some energy from the photon and deposit it at the intersection point). Using this method, when a photon's energy reaches a predetermined low-energy threshold, the bouncing stops. The second method uses a Monte Carlo method technique called Russian roulette. In this method, at each bounce the photon has a certain likelihood of continuing to bounce with the scene, and that likelihood decreases with each bounce.
To avoid emitting unneeded photons, the initial direction of the outgoing photons is often constrained. Instead of simply sending out photons in random directions, they are sent in the direction of a known object that we wish to use as a photon manipulator to either focus or diffuse the light. There are many other refinements that can be made to the algorithm like deciding how many photons to send, and where and in what pattern to send them.
Photon mapping is generally a preprocess and is carried out before the main rendering of the image. Often the photon map is stored on disk for later use. Once the actual rendering is started, every intersection of an object by a ray is tested to see if it is within a certain range of one or more stored photons and if so, the energy of the photons is added to the energy calculated using a standard illumination equation. The slowest part of the algorithm is searching the photon map for the nearest photons to the point being illuminated.
Most renderers use variants of the Monte Carlo aproximation. Such cases are Mental Ray, Final Render, and Brazil, though these methods require a lot of CPU power to give a clean result, and in the case of animation rendering they could be inefficient.
- This page was last modified 11:03, 19 September 2006.
- This page has been accessed 868 times.
- Content is available under GNU Free Documentation License.
- About CGWiki
- Disclaimers

