Computer

This is Lumen, the alternative to Ray Tracing in Unreal Engine 5

  • Light maps that consist of rendering the lighting of the scene from a point of the camera on a high-power server. This information is converted into a texture that will then be applied to the scene. The result? The light does not change with the position of the objects, it is false.
  • Shadow maps that consist of making the GPU render the scene as if the light source were the camera to store only the depth map and then use it as a texture to simulate shadows.
  • Ambient occlusion to mark which points have to be darkened or illuminated more.
  • Use of environment maps, including environment cubes to simulate reflections.

All this comes from the fact that rasterization cannot represent the transport of light efficiently, its operation is like a painter who uses color techniques to create the sensation of illumination, but this is a limitation in order to achieve greater graphic fidelity.

The representation of materials

Ray Tracing Evolution

Historically, we have managed to represent a material in rasterization through a combination of textures and shader programs to manipulate them, which are known as pixel shaders in DirectX and fragment shaders in Vulkan. However, the fact that rasterization does not represent well the behavior of light on objects results in a poor representation of materials.

In the real world, when light falls on a highly polished metal ball, it does not behave the same as if it passes through a wooden ball. We cannot forget that refraction is the change in direction and slowness that a ray of light experiences when passing from one medium to another with a different refractive index. It is impossible to represent light in its real physical behavior in a simulation, so what we do is represent it as much as possible to our perception.

The idea with global lighting and technologies such as Lumen is to have a representation of the materials that is true to our perception in the real world, simulating how each material emits light indirectly.

What is Lumen?

Lumen

Lumen is nothing more than what we call a software Ray Tracing algorithm, but such a name is misleading because the first conclusion that is drawn from it is that it is a program in the CPU performing ray tracing when it’s not like that. Actually any GPU can run the algorithm through the software that runs its cores, which are called shader programs. The problem, as in rasterization, comes from a specific point, the calculation of the intersection between the rays and the scene.

The solution at the hardware level has been to add a small piece of hardware in each of the GPU cores to carry out this task, the problem is that they allow the use of Ray Tracing as an aid to rasterization, to execute a series of effects of very simple global lighting. Additionally, ray tracing as opposed to rasterization requires the use of complex tree data structures, which greatly reduces the speed at which intersection computations can be performed.

So the Epic solution goes through a system that does not use such a data structure and that is where the key is. Since the algorithm has actually been designed for new generation consoles, which, although they have specialized units to execute the intersection calculations, have a series of difficulties due to limitations of the RDNA 2 architecture.

Is Lumen Better Than Ray Tracing?

The answer is directly no, and this is not said by us, but by Epic itself and is that the level of precision in global illumination that can be achieved with Lumen is limited, since we have to take into account that it is a solution designed for the creation of video games, where rendering speed is key. So at the level of detail it is not so good, but there are parts in Lumen it will equal Ray Tracing and, therefore, it will be preferred to this as it is lighter to execute and requires fewer resources from our system.

PS5, Xbox Series and RDNA 2: limitations

Cover SoC PS5 Xbox

AMD’s commitment to Ray Tracing has come with the RDNA 2 architecture, which they have managed to place in many places and where one of the workhorses has been precisely the implementation of this technology within their GPUs two years after it did NVIDIA. However, they have done so with certain limitations in their implementation: the BVH tree traversal that stores the scene information is not performed by the intersection unit.

This is a huge cut in performance, making the RX 6000 perform worse when it comes to applying such algorithms. Luckily, new hardware comes out on PC every year, but what about consoles? This is a full five years with the same hardware and the same hardware limitations. Hence the existence of Lumen, it is a solution to bring global lighting to the PlayStation 5, Xbox Series S and Series X consoles without its limited power being a choke for it.

And what happens on the PC? Lumen will be used in a multitude of console games, because Unreal Engine 5 will be widely used and those games will be brought to the computer with little change. Despite the fact that it is a technology designed for the limitations in Ray Tracing of RDNA 2, this does not mean that it is exclusive to AMD.

Related Articles