Unreal Engine 5 is finally out for the masses, and it can now be used for production. The new iteration in Epic’s massive undertaking takes the gaming industry forward and sets new boundaries. The recently launched Matrix tech demo, which can now be downloaded from the Epic Games Store, showcases all of the latest features of the engine. One of these features is Lumen. Today we will look into what Lumen is, why it is a technological marvel, and why it can be considered a massive leap forward in terms of performance and optimization.
What Does Unreal Engine 5 Lumen Do?
Lumen, in the layman’s language, can be described as ray tracing, but much less intensive. Also, it completely runs off hardware, cutting the need for dedicated RT cores found in Nvidia RTX-powered graphics cards that are specialized for ray tracing. Lumen traces rays, but differently. To understand how differently, let us quickly lookup how hardware-based ray tracing works.
Light bounces off surfaces. This means any beam of light isn’t almost ever completely absorbed by any practically-existing body. This is why light entering from a window will always bounce off the area it is incident upon, and light up the entire room.
But, working out how each ray of light will bounce from surfaces will require a lot of computation power. Rendering a single frame can take hours. But, in video games, we do not have that much time. Graphics cards are required to render such ray-traced frames 60 times a second, which was practically impossible.
So, graphics engineers had come up with a clever technique to bypass this problem. The solution was faking lighting. In this process, a level was designed, and then the computer was allowed to work out the lighting for the scene. Then the shadows and lit-up portions were applied as a “texture” to the current models. This “texture” is called a cube map, and the process is called rasterization. This process has a lot of down points. For starters, if a single object in the scene is moved, the entire cube map had to be re-recorded, which slows down the development process to quite an extent. But, over almost two decades of optimization, rasterization has got too good at its job. These days, in a lot of cases, rasterized lighting can beat ray-traced lighting. But, what is the difference between rasterization and ray tracing?
Ray tracing is real-time. This means that the path taken by the rays of light is individually calculated by the graphics processor 60 times a second. This significantly improves lighting because each ray of light now travels exactly as it would do in real life.
But, these dedicate high-performance RT cores are very resource hungry. These cores are among the chief reasons why graphics cards have gone from sipping power from the PCIe x16 slot to becoming power hogs, pulling more power than an entire low-end system under full load. This is a problem that needs to be carefully addressed because as technology advances, we should shift towards better performing but less resource-hungry hardware.
So, what does lumen do? It mixes up software-accelerated ray tracing with hardware-accelerated systems. On unsupported graphics cards, lumen uses just software-accelerated ray tracing. This software-accelerated method works by creating distance fields for each asset in-game, essentially low-resolution models of the scene, and records the ray-traced lighting for this low-res scene. Then, the low-res scene is upscaled and displayed at the monitor’s native resolution.
The upscaler Unreal Engine 5 is much like Nvidia’s DLSS, except it can run on any hardware, from the consoles to Linux-based systems. Lumen also uses the screen space reflections to quite an extent in very demanding surfaces like car windshields and mirrors.
But, this process has its own set of issues. To start with, it completely fails in the case of large in-game objects like mountains. Also, since it works with low-res footage, most of the details of the original asset are gone. Thus, light leaking is a huge issue.
Although the technology is nowhere near perfection, it is a massive leap forward in video-game lighting. The results are much better than classic rasterization in most cases, and with more fine-tuning, it can become the second-biggest alternative to hardware-accelerated ray tracing.