Wow, there is some seriously cool research happening in global illumination at the moment. I was trying to come up with a nice GPU assisted realtime method and decided rendering direct illumination to light maps on the fly and then gathering using pre-computed texture lookups per vertex would be the way to go.
This method has a few drawbacks though:
- Precomputing the lookups is slow, it’s basically a final gather pass with lots ray casting
- You need a unique parameterisation for your geometry
- It supports dynamic local light sources but not dynamic geometry
- You need to store the lookup coordinates for each vert
Turns out that this the same basic idea Dreamworks used on Shrek2, and sure enough their gather pass was the bottleneck (An Approximate Global Illumination System for Computer Generated Films).
The current state of the art seems to be the ’surfel’ approach that (I think) was invented by Michael Bunnell with his GPU Gems 2 article Dynamic Ambient Occlusion and Indirect Lighting, he approximates the mesh as a set of oriented discs and computes the radiance transfer dynamically on the GPU.
Turns out Pixar took this idea and now use it on all their movies, Pirates of Carribean, Wall-E, etc. The technique is described here in Point Based Approximate Color Bleeding. Bunnell’s original algorithm was O(N^2) in the number of surfels but he used an approximation hierarchy to get that down to O(N.log(N)), Pixar use an Octree which also stores a spherical harmonic approximation at each node.
What’s really interesting is how far Bunnell has pushed this idea, if you read through Fantasy Lab’s recent patent (August 2008), there are some really nice ideas in there that I haven’t seen published anywhere.
Here’s a summary of what’s new since the GPU Gems 2 article:
- Fixed the slightly cumbersome multiple shadow passes by summing ‘negative illumination’ from back-facing surfels
- Takes advantage of temporal coherence by simply iterating the illumination map each frame
- Added some directional information by subdividing the hemisphere into quadrants
- Chucked in some nice subdivision surfaces stuff in at the end
Anyway, I knocked up a prototype of the indirect illumination technique and it seems to work quite well. The patent leaves out loads of information (and spends two pages describing what a GPU is), but it’s not too difficult to work out the details (note the form factor calculation is particularly simplified).
Here are the results from a *very* low resolution mesh, in reality you would prime your surfels with direct illumination calculated in the traditional way with shadow mapping / shaders then let the sim bounce it round but in this case I’ve done the direct lighting using his method as well.


Disclaimer: some artifacts are visible here due to the way illumination is baked back to the mesh and there aren’t really enough surfels to capture all the fine detail but it’s quite promising.
This seems like a perfect job for CUDA or Larrabee as the whole algorithm can be run in parallel. You can do it purely through DirectX or OpenGL but it’s kind’ve nasty.