Volumetric Lighting with Froxels
How modern volumetric lighting is achieved with frustum-aligned voxels, with a focus on volumetric fog rendering.
Where volumetric lighting comes from
As the graphical fidelity of video games has increased, the desire for photorealism has only gotten stronger and stronger. Nowadays games striving for photorealism make use of Physically-Based Rendering (PBR), modelling real-world phenomena like energy conservation, microfacet geometric detail and indirect illumination. As graphics hardware has gotten more and more powerful games have become capable of drawing more and more geometric detail with impressively realitic visual results.
However, in the real world lighting doesn’t exist in a vacuum - light interacts with particles found in the air, clouds and fog, which affects the light that refracts off of a surface before reaching the eye. For example, if you look at distant hills on a sunny day, you’ll notice that the colour of those hills blends more towards the colour of the sky based on how away they are from you.
What’s happening here is that light is interacting with the particles in the atmosphere on its way from the hills to your eye. The further light has to travel to reach you, the more of the atmosphere it has to travel through and thus the more particles it has to interact with.
This is the case with other media made up of sparse particles, like clouds, fog and smoke.