Hardware-Accelerated Global Illumination
by Image Space Photon Mapping

Abstract

We describe an extension to photon mapping that recasts the most expensive steps of the algorithm -- the initial and final photon bounces -- as image-space operations amenable to GPU acceleration. This enables global illumination for real-time applications as well as accelerating it for offline rendering.

Image Space Photon Mapping (ISPM) rasterizes a light-space bounce map of emitted photons surviving initial-bounce Russian roulette sampling on a GPU. It then traces photons conventionally on the CPU. Traditional photon mapping estimates final radiance by gathering photons from a k-d tree. ISPM instead scatters indirect illumination by rasterizing an array of photon volumes. Each volume bounds a filter kernel based on the a priori probability density of each photon path. These two steps exploit the fact that initial path segments from point lights and final ones into a pinhole camera each have a common center of projection. An optional step uses joint bilateral upsampling of irradiance to reduce the fill requirements of rasterizing photon volumes. ISPM preserves the accurate and physically-based nature of photon mapping, supports arbitrary BSDFs, and captures both high- and low-frequency illumination effects such as caustics and diffuse color interreflection.

An implementation on a consumer GPU and 8-core CPU renders high-quality global illumination at up to 26 Hz at HD (1920x1080) resolution, for complex scenes containing moving objects and lights.

Acknowledgments

We thank the anonymous reviewers and Evan Hart (NVIDIA) for substantial suggestions, Unknown Worlds Entertainment for the the pre-release Onos model from Natural Selection 2, Dan Fast (Williams) for 3D modeling, and Qi Mo (UNC), Kefei Lei (Williams), and Eric Enderton (NVIDIA) for proofreading. Lionel Fuentes noted an error in the published version: "inverse cosine" should read "cosine" in the description of the bounce map. The code below is now correct.

Data

Models:

See also the additional results and code listed below.

Additional Results

All illumination in these images is dynamic and global. There is no ambient or lightmap term.

Additional, unpublished performance results from our experiments.

An early screen capture of our SIGGRAPH exhibition game demo is available. This uses an aggressively optimized implementation and mixes local and global illumination models.

Implementation Guide

The files below are modified up versions of the key pieces of source code used in our experimental setup. These are intended to assist others in implementing or experimenting with our algorithm. They have been heavily commented in support of that goal. This code won't compile as is because it is missing the surrounding game engine infrastructure, which we are not releasing.

Please keep in mind that this is research code released to further scientific progress and education. We do not provide technical support for this code and it is not a product. We have not produced a standalone binary or plug-in for distribution. There is no warranty on the code, so use it at your own risk. Although the algorithms and data sources are fully described in the paper, we cannot release the full project or data files directly for intellectual property reasons. All code is copyright 2009 Morgan McGuire, all rights reserved.

The files provided in ispm.zip are:

  • ISPM - complete implementation of the rendering algorithm
  • Photon - statistical photon representation
  • PhotonVolume - repacking of Photon for radiance estimate on the GPU
  • GBuffers - shader for producing deferred-shading geometry buffers
  • GFXPhotonVolumeArray - helper for transferring PhotonVolumes to the GPU
  • BounceMap - sample bounce map shader
  • PhotonVolume - shader for generating photon volumes from the data in GFXPhotonVolumeArray and performing the actual radiance estimate
  • Upsample - joint bilateral upsampling filter (bilinear kernel)
In addition, the major support classes have been released in the G3D Innovation Engine version 8.0 beta 1. These include SuperBSDF, SuperShader, Material, ArticulatedModel, GBuffers, TriTree, and Tri classes. The version of TriTree in G3D is a bounding interval hierarchy that is about 2x faster than the kd-tree used in our experiments.

BibTex

@inproceedings{mcguire09imagespace,
 author = {Morgan Mc{G}uire and David Luebke},
 title = {Hardware-Accelerated Global Illumination by Image Space Photon Mapping },
 booktitle = {Proceedings of the 2009 ACM SIGGRAPH/EuroGraphics conference 
      on High Performance Graphics},
 year = {2009},
 month = {August},
 day = {1},
 location = {New Orleans, Louisiana},
 publisher = {ACM},
 address = {New York, NY, USA},
 url = {http://graphics.cs.williams.edu/papers/PhotonHPG09/}
 }