July 27, 2023 Hana Trieu

Grasping Lumen in Unreal Engine 5 for Architectural Visualization

Lumen in Unreal Engine 5 is a fully dynamic global illumination and reflection system. It comes ready to use in Unreal Engine 5, so creators don’t have to set it up themselves. It was made for next-generation consoles and high-end visualizations like architectural visualization. So what features it provides and how it works? Let’s grasp it with iRender.  

Global illumination

When light exits a light source, it illuminates all surfaces that the light can reach. This is called direct lighting in computer graphics. In real life, light does not stop there, it bounces off surfaces, taking on their color, and illuminates other surfaces. Light that bounces off in all directions from a rough surface is called diffuse indirect lighting or global illumination. Light that reflects specularly from a smooth surface is called a 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 for real-time. That offline process is called lightmap baking. In Unreal Engine, lightmaps are baked using CPU Lightmass or GPU Lightmass. Static lightmaps provide high-quality light but require long build times. They constrain the game environment. Changing indirect lighting like moving a wall-mounted television leaves lighting incorrect as demonstrated in these two images below:

Traditionally, games with dynamic scenes have relied on techniques like irradiance probe-based lighting and ambient occlusion to approximate global illumination. High-quality real-time global illumination has been difficult to achieve.

Lumen simulates light bouncing around the scene in real time, enabling changes to the game world with indirect lighting automatically updating. This means players can destroy parts of levels, change the time of day, or flood portions of levels, and the lighting will realistically change accordingly. There will be no more “LIGHTING NEEDS TO BE REBUILT” messages. Game developers no longer have to rebuild lighting when making changes in the Unreal Editor – Lumen handles it in real time.

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

Lumen not only solves global illumination but also handles sky shadowing. Sky shadowing causes indoor environments to appear darker compared to outdoor environments.

Lumen also accurately propagates light from emissive materials like lamps and windows, without any additional performance cost. However, there are limits to how small and bright emissive areas can be 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, although at a lower quality. In the example below, the emissive sign mesh is dynamically lighting up the volumetric fog.

Reflections

Lumen can dynamically calculate reflections off of any surface, with any level of roughness. This replaces the need for precomputed reflection techniques like reflection captures, planar reflections, and screen space reflections.

It is not enough for Lumen to only solve dynamic global illumination for what is directly visible from the camera; Lumen also provides dynamic GI and shadowed skylight that is seen in reflections. This allows for more realistic and accurate reflections.

Lumen reflections can accurately model coated materials, like car paint, which has a mirror-like reflection from the outer coat while also having a glossier reflection from the interior layer. This allows for more realistic reflections of coated materials.

Ray tracing in Lumen

Lumen utilizes ray tracing to calculate lighting effects. It uses an approximate version of the scene for faster ray intersections. This scene can be viewed by switching to the Lumen Scene View Mode. This view shows how the scene appears to Lumen when it 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 video card with hardware ray tracing support. Distance Fields represent mesh surfaces in a way that allows rays to intersect them very quickly.

The software ray tracing in Lumen also uses a Global Distance Field which merges all meshes into one distance field. This provides very fast ray intersections, even when there are many overlapping meshes – a common scenario when using lots of detailed Megascans assets. Epic demonstrated Lumen in the Land of Nanite and Valley of the Ancients tech demos using the Global Distance Field exclusively due to the heavy amount of mesh overlap in those scenes.

Surface caching

When a ray hits a surface, Lumen has to evaluate the material and incoming 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 the surface information in its Surface Cache, which is enabled by default.

The Surface Cache populates by choosing a direction to capture each mesh so all surfaces will be covered. As the player moves, Lumen recaptures nearby meshes into the Surface Cache atlas. The nanite geometry system helps accelerate these renders, though it is not required for Lumen. The surfaces are then lit, including multiple bounce global illumination and sky lighting, which will be seen in reflections. The Surface Cache lighting is then ready to accelerate features like global illumination and reflections.

The Surface Cache is a key optimization in Lumen but also has content implications. Only meshes with simple exteriors can be 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. Separate meshes are required for Lumen to efficiently cache surface information.

Pink areas in Surface Cache View lack global illumination coverage. They will appear black in reflections and cause view-dependent lighting errors, as only Lumen screen traces are active there.

Final gather and denoising

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

Lumen uses an advanced final gather algorithm based on radiance caching for diffuse global illumination. Lumen’s final gather uses a screen-space radiance cache to greatly reduce the global illumination calculation from the main screen. The downsized 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 the few ray traces between nearby pixels. This is different from a normal screen-space denoiser because we are still working in the downsampled radiance cache space, which is much more efficient.

Lumen carefully determines which directions to trace its rays. It examines directions that had bright lighting in the previous frame, a technique called importance sampling of incoming lighting. The lighting from the previous frame is used to guide where it traces rays in the current frame, resulting in the same quality as tracing four times as many rays while running much faster. In the below scene, the white rays were chosen using importance sampling.

Finally, Lumen separates nearby lighting from distant lighting and traces significantly more rays for distant lighting to reduce noise through a technique referred to as world-space radiance caching. This is particularly valuable when lighting an indoor room exclusively by sky lighting coming through a small window, and is crucial for Lumen’s quality within indoor environments.

For reflections on rough surfaces, Lumen reuses the screen-space radiance cache with no additional expense. This allows Lumen to provide a second layer of reflections on glossy coat materials like car paint without having to perform two separate calculations, which would double the cost.

All of these sampling and noise reduction techniques are crucial to Lumen’s high quality and efficiency. While Lumen was not created for direct illumination, it is sometimes possible to illuminate scenes completely with emissive geometry owing to the fidelity of the final gather. In The Matrix Awakens: An Unreal Engine 5 Experience, the experimental nighttime mode utilizes only Lumen global illumination and reflections to spread the light from millions of emissive window meshes; no light sources were added by the artists.

Performance and quality

Lumen relies mainly on temporal upsampling with Unreal Engine 5’s Temporal Super Resolution algorithm for 4K output. This provides the best final image quality compared to running Lumen natively at 4K with significantly lower quality settings.

Lumen can attain 60 FPS on next-generation consoles when the engine uses the high scalability level for global illumination and reflections, though quality with these settings still needs improvement.

In other directions, Lumen can scale up in quality by:

      • Increasing the Final Gather Quality in post-process volume settings
      • Utilizing hardware ray tracing
      • Utilizing hit lighting when rays hit surfaces for higher quality instead of surface caching

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

That’s all about Lumen in Unreal Engine 5. Hope you have enjoyed the article and grasped its capabilities and inner workings.

If you are looking for a solution to speed up Unreal Engine 5 rendering, with real-time Lumen or Path Tracer, don’t miss our powerful RTX 4090 machine.

iRender - The best render farm for Unreal Engine 5

We offer a single RTX 4090 machine for faster rendering in Unreal Engine. Built with a powerful AMD Ryzen™ Threadripper™ PRO 3955WX CPU, 256GB RAM, and 2TB NVMe SSD storage, this machine can handle even the most demanding Unreal Engine scenes.

iRender allows users to use many servers on one account. Therefore, for big projects having tight deadlines and needing faster rendering, you can use multiple machines simultaneously just like using multiple independent computers. 

Let’s see how our single RTX 4090 machine helps speed up Unreal Engine 5 rendering:

Best of all, we have just released an iRender GPU desktop application, allowing you to fully utilize our services easier, and more efficiently. 

Let’s enjoy our 100% Bonus Program today and render faster!

iRender – Happy Rendering!

Reference source: unrealengine.com

Related Posts

The latest creative news from Unreal Engine Cloud rendering.

Grasping Lumen in Unreal Engine 5 for Architectural Visualization
, , , , , , , , , , , , , , , , , , , , , ,

Hana Trieu

iRender - Happy Rendering, Happy Training!
Contact

INTEGRATIONS

Autodesk Maya
Autodesk 3DS Max
Blender
Cinema 4D
Houdini
Daz Studio
Maxwell
Nvidia Iray
Lumion
KeyShot
Unreal Engine
Twinmotion
Redshift
Octane
And many more…

iRENDER TEAM

MONDAY – SUNDAY
Hotline: (+84) 912-785-500
Skype: iRender Support
Email: [email protected]
Address 1: 68 Circular Road #02-01, 049422, Singapore.
Address 2: No.22 Thanh Cong Street, Hanoi, Vietnam.

Contact
[email protected]