CS 563 Advanced Topics in Computer Graphics
Applications of Photon Mapping

by Curt Ferguson

 

Introduction and Overview

Photon maps are arrays of information that represent particles of light emitted from a light source and stored as they hit surfaces within a scene. Photon Mapping can be used for Caustics, Color Bleeding, Participating Media, Subsurface Scattering, and Motion Blur.

Caustics are the photons from a light source that are reflected and refracted by specular surfaces before interacting with a diffuse surface. An example of caustics is the light patterns on the bottom of a swimming pool.

Color Bleeding is the phenomenon of light reflecting from one surface to another. The surface acts as a secondary light source, imparting its color onto the second surface. All photon mapping effects can include color bleeding by adding color to the photon properties.

Participating Media is calculating the scattering effect of light as it passes through a media. Examples are the haze effects of atmosphere, smoke and dust.

Subsurface Scattering is the way light scatters inside a dense material before being either absorbed or leaving the material at a different location. All non-metallic materials are translucent to some degree.

Motion blur is the effect that arises when a camera shutter remains open for an extended period of time and the motion that has occurred over this interval is visible in a single snapshot.

 

 

Practical 2 Pass Algorithm

The rendering equation for surface radiance can be expressed aswith the outgoing radiance being equal to the emitted and reflected radiance of the surface.  The location of the photon is x, and w is its direction.

The reflected radiance is an integral of the entire range of reflected angles,and takes into account the BRDF. The BRDF is dependant on the position x , and direction w of the photon. It is calculated for both the specular and diffuse components.

The incoming radiance consists of luminescent, caustic, and diffuse components.

The equation is rewritten by separating the BRDF and incoming radiance. The common components are then combined, giving four integrals with which we can approximate the lighting conditions:

Direct Illumination:
Specular and Glossy Reflections:
Caustics:
Indirect Illumination:

 

     When a photon hits a surface, it can perform these calculations to find its intensity. To store all the photons, a photon map is generated. These maps will usually contain millions of photons, and accessed constantly as the scene is rendered. For these reasons, a bsp tree is commonly used. It also turns out that more photons are needed for caustics that the other three types, as caustics need a high density of photons to achieve their effect. Because of this, photons are separated into a global photon map and a caustic photon map.

     In global photon mapping, the photons are emitted towards all objects, to be used as rough estimations for the surfaces light level. Global Photon Maps also use shadow photons, which act as negative photons, passing through obscuring objects and allowing for quick calculation of areas in shadow.

     Caustic photon maps only stores caustics. Knowing this, caustics can be emitted from the light source towards only specular objects.

[2]

A three-dimensional Radiance Estimation is applied to find the density of photons around a given point. Either a variable size sphere or fixed size sphere is used to calculate the radiance estimate.

Variable size spheres are commonly used because they can quickly calculate the caustic intensity and still achieve smooth transitions.

The disadvantage of using the variable sized sphere technique is that these smooth transitions reduce the crisp edges found between areas of high photon densities and neighboring empty regions. Filtering is applied to the caustic values, to enhance the edges between high concentrations of caustic photons and areas in shadow.

[3]

Caustic without filter   

    Caustic with cone filter

 

 

Participating Media

      Participating media simulates the scattering of light photons through media. Photons passing through the media are either absorbed or scattered. For this, a volume photon map is used to record where the absorption occurs.

     Participating media is a modification to previous photon mapping techniques as it removes the assumption that light travels in a vacuum, allowing for light interaction with translucent materials like dust, air and clouds.

 The volume rendering equation is used to calculate photon values. The change of radiance in the direction . [1]

scattering coefficient
absorption coefficient
in-scattering
emission from the medium
Volume Rendering Equation
The optical depth is

Phase Functions are calculations for the distribution of scattered light in a participating media. Phase functions approximate the direction a photon will reflect when it encounters a particle of the material. This is similar to a BRDF.

The Henyey-Greenstein phase function with a forward variable g.

 g = 0.0,                                g = 0.4,                                 g = 0.9

Ray marching is the estimation of in-scattered light. It calculates the light in a process of stepping along the path of a ray, and summing the number of photons in the region through volume estimation. Adaptive ray marching allows the ray to find the intensity of a non-homogeneous media, including shadow effects and caustics.

For a single ray, the ray is divided in equal segments, which determine the lighting amount of the participating media.

To calculate shadow rays, which considers if any segment of the ray is occluded from the light source by an object, secondary rays are sent out from each segment.

 

 Volume radiance estimation is the 3 dimensional equivalence of surface radiance estimation, with the photon density being estimated by spherical volume.

 

 

Subsurface Scattering

      Subsurface Scattering is a specialized form of participating media, considering materials that are dense enough to be solids. It considers the interaction of photons with a solid object, beneath the surface. This is an important consideration, as all non-metallic materials are translucent to some degree. Marble, skin, and plants all exhibit lighting effects due to subsurface scattering.

      Subsurface Scattering is rendered uses ray marching with Russian roulette sampling techniques. The in-scattered radiance is retrieved from a photon map.[4]

 

 

 

Motion Blur

        Motion blur is the effect that arises when a camera shutter remains open for an extended period of time and the motion that has occurred over this interval is visible in a single snapshot. Photon mapping is one of the techniques used to render motion blur.

[7]

Temporal super-sampling is the process of displaying multiple "times" of a scene at once, giving the effect of motion blur. Three techniques are:

a) An accumulation buffer is used to hold the changes over time of the scene.
b) The standard radiance estimate attaches the photons to a moving object and displaying the photons captured over a given amount of time.
c) The time dependent radiance estimate which generates a 4th dimensional photon map. The time dependent radiance uses the additional property of time along with position, and a volume rendering equation that also considers time must be used. This method has the advantage of properly rendering reflections over time, but at a decrease in rendering speed.
[7]

 

 

 

References:

[1] Henrik Wann Jensen: "Realistic Image Synthesis using Photon Maps", AK Peters Publishing 2001, Ch. 8-10, pp 85-137

[2] Henrik Wann Jensen: "Global Illumination using Photon Maps". In "Rendering Techniques '96". Eds. X. Pueyo and P. Schröder. Springer-Verlag, pp. 21-30, 1996

[3] Henrik Wann Jensen: "Rendering Caustics on Non-Lambertian Surfaces". In Proceedings of Graphics Interface '96, pp. 116-121, Toronto 1996.

[4] Henrik Wann Jensen, Stephen R. Marschner, Marc Levoy and Pat Hanrahan: "A Practical Model for Subsurface Light Transport". Proceedings of SIGGRAPH'2001.

[5] Henrik Wann Jensen and Per H. Christensen: "Efficient Simulation of Light Transport in Scenes with Participating Media using Photon Maps". In Proceedings of SIGGRAPH'98, pages 311-320, Orlando, July 1998

[6] Martin Fuhrer: "CPSC 651 Project: Photon Mapping" <http://pages.cpsc.ucalgary.ca/~fuhrer/courses/651/project/> 2003

[7] Mike Cammarano and Henrik Wann Jensen. "Time Dependent Photon Mapping". Proceedings of the 13th Eurographics Workshop on Rendering, Pisa, Italy, June 2002