CPSC 651 Home Page
Student Projects
Photonic Leaves Home

CPSC 651 Project: Photon Mapping

Umm, Photonic What?!?

This project serves a springboard into my Masters research, the realistic rendering of plants using photon mapping techniques.  Photon mapping is a two pass algorithm developed by Dr. Henrik Wann Jensen at Stanford University. The first pass involves shooting photons from light sources into a scene and storing the photons in surface or volume maps.  These "photon maps" describe the light flux throughout the scene - in my case, they describe the flux along the surface of leaves (hence the project name - get it??) During the second pass, we shoot camera rays from our viewpoint to sample the scene, retrieving flux values stored in the photon maps to compute pixel brightness.

Why Photon Mapping?

 
Photon mapping is a global illumination rendering technique.  It is able to capture all the diffuse-to-diffuse reflections in a scene, something that classic ray tracing algorithms cannot accomplish.  Subsequent rendering schemes, such as radiosity and bidirectional Monte Carlo raytracing, have been able to produce scenes with global illumination, but at varying costs. radiosity requires huge amounts of memory and the scene must be partitioned into tiles - no mean feat for a scene with many complex surfaces (eg. a tree with hundreds of branches and leaves that exhibit much curvature).  Bidirectional Monte Carlo raytracing tends to produce noisy images because we sample only a subset of all posssible rays.  We could reduce the image noise by increasing the size of our subset, but then the process slows down considerably.  

Through the use of photon maps, some clever stochastic techniques (eg. Russian roulette), and kernel density estimation of photons, photon mapping solves all the aforementioned problems to a large extent.  Photon mapping alllows us to render high quality images of arbitrarily complex models in a fraction of the time required for traditional methods. As well, photon mapping supports advanced lighting and reflection features, such as color bleeding and scattering of light within participating media.  These effects are frequently observed when light passes through leaves or reflects off surfaces, making photon mapping a promising choice in the rendering of plants.


Seeing is Believing


Below we compare two images of a lilac, the first one rendered using classical ray tracing with Rayshade and the second one rendered with photon mapping using Dali.  In both cases, lighting arrives from a single area light source with identical size and positioning.  Note how the hard shadows of Rayshade obliterate the interior of the model.  Through a combination of global illumination and diffuse transmission, Dali allows light and shadows to interact in the shadow areas.  Hard to believe that all these years our l-system software has relied on Rayshade to produce plant renderings...


Dali: This lavender lily looks lovely!


Find Out More

For more information about this project, check out the following links:


Acknowledgments

Thanks to Henrik Wann Jensen for providing his photon mapping renderer Dali. His helpful suggestions and comments were invaluable! Thanks also to Radek Karwowski for assistance with cpfg.


CPSC 651 Home Page
Student Projects
Photonic Leaves Home