Jasper Liu, Zihan Liao, Junming Chen, Jinglun Zhang
"Real-time global illumination has always been a holy grail of computer graphics."
Lumen is a dynamic global illumination and reflections system implemented in Unreal Engine (UE) 5. Lumen Global Illumination solves diffuse indirect lighting. For example, light bouncing diffusely off a surface picks up the color of that surface and reflects the colored light onto other nearby surfaces, creating an effect called color bleed. Meshes in scenes also block indirect lighting, which also produces indirect shadowing.
The magic of Lumen is that it provides infinite diffuse bounces within a limited time. In this project, we aim to explore how Lumen realizes real-time global illumination and improve the rendering efficiency without compromising too many visual effects.
In this final project, we aim to explore and implement the core and essential idea behind Lumen. Ignoring the complex engineering and framework limitations, we want to build a global illumination renderer that traces the ray to collect direct light, but uses a Radiosity-based method for accumulating indirect light as Lumen does. Our goal is to achieve amazing global illumination quality faster than our Path Tracing baselines running on CPU.
In general, the difficulty of real-time global illumination lies in solving the rendering equation:
By discretizing the equation and breaking the continuous surface into surface elements, we are able to reach the following linear equations:
where \(B_i\) represents the radiosity of the i-th surface element, \(B_{e,i}\) is the emission from the i-th surface element and the form factors is given by:
Now the question is, how to efficiently solve the above linear equation. One way is to use Gaussian elimination, but the time complexity goes up in cubic order with respect to the number of surface elements.
Lumen incorporates two new idea: surface and radiance cache. They store \(B_i\) and the corresponding material information at t-th time step, and use them to update the Bs at t+1-th time step.
This method relies on one condition to converge quickly and accurately to the true global illumination solution: the radiosity of the i+1-th surface element at t-th time step does not differ significantly from itself at t-th time step. And this condition is generally true in scenarios where real-time rendering is needed.
To calculate \(B_i\) at t+1 time step, we need to know what surface element is able to contribute to \(B_i\). This still requires us to sample numerous outgoing radiance and perform raytracing. And we need to perform these operations for every surface element.
Our goal is to preserve the real-time rendering efficiency while not compromising too much of the visual effect. Specifically, we aim to explore the dynamic combination of radiosity calculation using radiance cache and distance field in Lumen.