What functions does Lumen provide in Unreal 5 and how does it work

Lumen in Unreal Engine 5 is a fully dynamic global illumination and reflection system. It works in Unreal Engine 5, so creators don't need to set it up themselves. It is designed for high-end visualization such as next-generation consoles and architectural visualization. So what features does it offer and how does it work?

global illumination

When the light leaves the source, it illuminates all surfaces that the light can reach. This is called direct lighting in computer graphics. In real life, light doesn't stop there, it bounces off surfaces, takes on a corresponding color, and illuminates other surfaces. Light bouncing off rough surfaces in all directions is called diffuse indirect illumination or global illumination. Light reflected specularly from a smooth surface is called reflection. Eventually, the light reaches the eye or camera to form an image.

In the past, global illumination for games had to be calculated offline because it was too computationally intensive to calculate in real time. This offline process is called lightmap baking. In Unreal Engine, lightmaps are baked using either CPU Lightmass or GPU Lightmass . Static lightmaps provide high-quality lighting, but require longer build times. They limit the game environment. Changing indirect lighting (such as moving a wall-mounted TV) can result in incorrect lighting, as shown in the following two images:

 

Games with dynamic scenes have traditionally relied on techniques such as irradiance probe-based lighting and ambient occlusion to approximate global illumination. High-quality real-time global illumination has always been difficult to achieve.

Lumen simulates the reflection of light around a scene in real time, changing the game world by automatically updating indirect lighting. This means players can destroy parts of the level, change the time of day, or flood parts of the level, and the lighting will actually change accordingly. No more " lighting needs rebuilding " messages. Game developers no longer need to rebuild lighting when making changes in the Unreal Editor - Lumen can handle it in real time.

Lumen provides high-quality real-time global illumination, including effects such as color bleeding and indirect shadows. Lumen supports an unlimited number of diffuse light reflections, which is important for scenes with bright surfaces such as the white pain in the scene below.

Lumen can not only solve the global illumination problem, but also the sky shadow problem. Sky shadows cause indoor environments to appear darker than outdoor environments. 

 

Lumen can also accurately spread light from emissive materials like lamps and windows without any additional performance cost. However, the emissive area is limited in size and brightness before noise artifacts appear. Propagating light from emissive materials is inherently more difficult than from manually placed light sources.

 

Lumen can also solve global illumination for translucent materials and volumetric fog, but at a lower quality. In the example below, the emissive logo mesh dynamically illuminates the volumetric fog.

reflection

Lumen can dynamically calculate the reflectance of surfaces of any roughness level. This replaces the need for precomputed reflection techniques such as reflection capture, planar reflections, and screen space reflections.

It's not enough for Lumen to address dynamic global illumination directly visible from the camera; Lumen also provides dynamic GI and shadowed skylights seen in reflections. This allows for more realistic and accurate reflections.

 

 

Lumen reflections can accurately simulate coated materials, such as car paint, where the outer coat has specular reflections, while the inner layers also have smoother reflections. This makes reflections from coated materials more realistic.

 

Ray Tracing in Lumen

Lumen uses ray tracing to calculate lighting effects. It uses an approximate version of the scene to achieve faster ray intersections. The scene can be viewed by switching to Lumen scene view mode. This view shows how the scene will appear in Lumen as Lumen traces rays to calculate global illumination and reflections.

 

By default, Lumen uses mesh distance fields, a software ray tracing technique. This is because it does not require a graphics card that supports hardware ray tracing. Distance fields represent mesh surfaces in a way that allows rays to intersect quickly.

 

 

Software ray tracing in Lumen also uses a global distance field, merging all meshes into one distance field. This provides very fast ray intersections even with many overlapping meshes - a common situation when working with heavily detailed Megascans assets. Epic demonstrated Lumen only using global distance fields in the Land of Nanite and Vale of the Ancients tech demos due to the large amount of mesh overlap in those scenes.

surface cache view

When light hits a surface, Lumen must evaluate the material and the incident light, which is expensive and inefficient. Multiple rays may hit the same point, and materials may have many texture lookups. To optimize this, Lumen caches surface information in its Surface Cache which is enabled by default.

The surface cache is populated by choosing which direction to snap to each mesh so that all surfaces are covered. As the player moves, Lumen will recapture nearby meshes into the surface cache atlas. Nanogeometry helps speed up these renders, although Lumen doesn't require it. Then, the surface is lit, including multi-bounce global illumination and sky lighting, which will be seen in reflections. Surface cache lighting can then speed up functions like global illumination and reflections.

Surface Cache is a key optimization in Lumen, but also has implications for content. Only meshes with simple exteriors are supported - walls, floors and ceilings should be separate meshes. Importing an entire room with furniture as a single mesh is not expected to work well with Lumen. Lumen requires a separate mesh to efficiently cache surface information.

 

The pink areas in Surface Cache View lack global illumination coverage. They would appear black in reflections and cause view-dependent lighting errors because only the lumen screen traces are active there.

 

Final Gathering and Denoising

Ray tracing is a demanding operation, so we can't trace many rays. At the same time, every pixel on the screen requires global illumination, which takes light from every surface into account. We can't trace rays in all directions, so we have to trace a small fraction. If we miss important ray directions, it will show up as noise, so we have to be strategic about which directions to trace and reuse traces as much as possible.

Lumen uses an advanced final gather algorithm based on radiosity caching to achieve diffuse global illumination. Lumen's final gather uses a screen space radiance cache to greatly reduce global illumination calculations for the main screen. Downscaled indirect lighting is integrated with full resolution material data to create full resolution shading.

The incoming light is filtered within the radiance cache, which greatly reduces noise and reuses a small number of ray traces between nearby pixels. This is different from a normal screen space denoiser, as we're still working in the downsampled radiance buffer space, which is much more efficient.

 

Lumen carefully determines the direction of traced rays. It checks for directions that had bright lighting in the previous frame, a technique called Importance Sampling of Incoming Lighting. Lighting from the previous frame is used to guide the raytraced position in the current frame, resulting in the same quality as tracing quadruple rays while running much faster. In the scene below, the white rays are selected using importance sampling.

 

Finally, Lumen separates nearby lighting from distant lighting and traces more rays for distant lighting to reduce noise through a technique called world space radiance caching. This is especially valuable when lighting interior rooms only with skylight coming in through small windows, and is critical to Lumen quality in interior environments.

 

For reflections on rough surfaces, Lumen reuses the screen-space radiance cache at no additional cost. This allows Lumen to provide a second layer of reflections on glossy coating materials such as car paint without performing two separate calculations, which would double the cost.

All of these sampling and noise reduction techniques are critical to Lumen's high quality and efficiency. While Lumen was not created for direct lighting, it is sometimes possible to fully light a scene using emissive geometry due to the fidelity of final gather. In The Matrix: Awakenings: The Unreal Engine 5 Experience , the experimental night mode utilizes only lumens global illumination and reflections to spread light from a grid of millions of emissive windows; the artist did not add any light sources.

 

performance and quality

Lumen relies primarily on Unreal Engine 5's temporal super-resolution algorithm for temporal upsampling to achieve 4K output. This gives the best final image quality compared to running Lumen natively at 4K at significantly lower quality settings.

Lumen can hit 60 FPS on next-gen consoles when the engine uses high scalable levels of global illumination and reflections, although the quality of these settings still needs improvement.

Among other things, Lumen can improve quality by:

  • Increased final gather quality in post process volume settings Leverage hardware ray tracing Leverage hit lighting when rays hit surfaces for higher quality instead of surface cache

With increased settings, Lumen can provide high-quality real-time global illumination and reflections for high-end architectural visualization.

That's all about Lumens in Unreal Engine 5. Hope you enjoyed this article and grasped its features and inner workings.

If you want to run Unreal Engine 5 efficiently, you can try Zanqi Cloud Workstation

However, if you want to experience the power of Lumen, the computing power requirements of the local computer are not low. In the actual operation of ue, you will encounter insufficient computer hardware configuration to drive the software, excessive hardware investment in the early stage, and excessive project file assets. If the project is large, the project takes a long time, local resources cannot be released, etc., it is recommended to try Zanqi Cloud Workstation , and the cloud production is one step faster.

Zanqi Cloud Workstation can provide UNREAL users with cloud production and output solutions to improve work efficiency. Users across the country directly connect to servers through cloud workstations to share a set of assets, and can directly create/modify project files on cloud workstations to reduce data transmission costs.

 

 

 

Guess you like

Origin blog.csdn.net/XDEMO_/article/details/132208221