Rasterized Voxel-based Dynamic Global Illumination
Beginning of 2012 I actually started to work on this technique. At that time I wanted to extend my engine with dynamic indirect lighting. Since I was mainly working with in-door scenes, I needed something that could efficiently handle a high number of dynamic light sources of different types (point, spot and directional lights).
Below you can see two screenshots with the Crytek Sponza scene illuminated by one directional and twelve medium sized point lights. On the left side only direct illumination, on the right side additionally Rasterized Voxel-based Dynamic Global Illumination is utilized.
Initially a voxel grid representation of the scene is created dynamically by utilizing the graphics hardware rasterizer. Since the voxel grid only contains 32x32x32 cells this step is surprisingly fast. Then the voxels are illuminated by each dynamic light within the grid boundaries. To prevent light leaking directional lights as well as large point and spot lights reuse the shadow maps that where generated for the direct illumination. The illuminated voxels are then converted to virtual point lights and propagated across the grid, according to the Light Propagation Volume technique as proposed by Kaplanyan and Dachsbacher. During this propagation step the initial voxel grid is used to account for geometric occlusion. Finally the propagated virtual point lights are applied to the scene, thereby generating the indirect illumination. To cover large realistic game environments several nested voxel grids can be utilized. You can find a detailed description of this technique in my article within the GPU Pro 4 book.
Below I listed the most important things to know about this technique:
After I had submitted my article for the GPU Pro 4 book I worked a bit further on this technique. Due to the discrete voxel grid representation of the scene, rapidly moving objects that contribute to the indirect illumination (i.e. are part of the voxel grid) cause flickering. To counteract this problem I added one additional step. Before applying the propagated virtual point lights of the current frame to the scene they are interpolated with those of the last frame.
You can download the latest demo including the entire source code here: