UE5 Lumen Implementation Analysis

Discussion in 'Game Development (Technical)' started by UWA4d, Jan 27, 2022.

  1. UWA4d

    UWA4d New Member

    Dec 6, 2021
    Likes Received:
    Lumen is UE5’s GI system, it is different from the traditional real-time GI which only includes the contribution of indirect diffuse reflection. It also includes indirect diffuse reflection and indirect highlight, providing a new set of complete indirect lighting. Lumen supports both hardware-based RTX and software-based Trace algorithms. The starting point of this article is that Lumen GI uses the process, algorithm, and data structure analysis of indirect diffuse reflection part based on software Trace to understand the basic principle and operation mechanism of Lumen from a macro perspective.


    The core of Lumen includes the following parts:

    • The simplified expression of unique scenes. The scenes that provide GI reflection in Lumen are not composed of models but are composed of these model simplified proxy MeshCards.
    • Based on the intersection acceleration of the distance field, the core acceleration structure used by the software Trace in Lumen is GlobalDistanceField and MeshDistanceField. The lighting expression is separated from the scene structure. There are two core components for buffering lighting information in Lumen: One is AtlasTexture that stores the highest precision lighting, each SubTexture corresponds to a MeshCard, and also corresponds to a small slice of the scene entity model; The other component is Voxel, which is generated during the runtime and is the main part of Lumen’s light information expression.
    • GI solution based on Screen Space Probe, SSGI is integrated into the solution process, MeshCard AtlasTexture lighting solution based on MeshDistanceField Trace, Voxel lighting solution based on GlobalDistanceField Trace and other GI algorithms.
    Data Structure
    1. Intersection Acceleration Structure
    There are two main Tracing intersection acceleration structures in Lumen: Distance Field and HZB in 3D space. Distance Field is divided into Mesh Distance Field (hereinafter referred to as MDF) and Global Distance Field (hereinafter referred to as GDF). MDF/GDF is used to accelerate the intersection of models (MeshCard/Voxel) in 3D space, and Hierarchy Z-Buffer (hereinafter referred to as HZB) is used to intersect SSGI’s RayCast in screen space.

    2. MDF/GDF
    Without BVH, RayTracing can only take uniform steps along the light direction with a fixed step length and intersect the scene after each step. In order to penetrate thin slices and small models without errors, the step size needs to be infinitely small. And for operational efficiency, it is hoped that the step length is as long as possible, and the two requirements are completely opposite. The diagram of the uniform step is as follows:

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer