Search
  • ychen3129

Lumen Requirements, features, Limitations, common problems, visualization Notes



Lumen:

Previously in UE4, we have dynamic lighting or static lighting. Now we have a new option Lumen. It's all about dynamic global illumination and reflections.

Therefore, no need for setting up lightmap UV and doing light baking for lumen.

_________________________________________________________________________________________

What is Lumen? a general overview.


Lumen is using multiple ray tracing methods to solve Global illumination and reflections

What is those multiple ray tracing methods?

  • Screen tracing (screen space tracing)

Trace rays against the screen

used to cover the mismatch between the full triangle rendered by nanite and proxy mesh being ray-traced by lumen.

  • Ray Tracing (software or hardware)

Software ray tracing:

Works for any hardware supporting shader model 5

using signed distance fields

which requires Generate Mesh distance fields enabled in the project setting


Hardware ray tracing(higher quality): using hardware ray tracing

supports most geometry types and skinned meshes too

scales up better to higher qualities

the only way to achieve high-quality mirror reflections


  • Surface Cache (automatic parameterization)

Taking lighting information, ray hit points, material properties,

then generate cards for each mesh from multiple angles offline

_________________________________________________________________________________________

Requirements

  • support shader model 5 and direct3d 11 or higher

  • hardware interface of direct X 12 or later and the video card that supports it

  • Playstation 5 and Xbox that have performance hardware ray tracing

  • GPU: Nvidia RTX 2000 and higher or AMD RX6000 higher

_________________________________________________________________________________________

Features:

  • Global illumination (light bleed, indirect shadowing)

  • infinite diffuse bounces

  • Lower quality GI for lit Translucency and Volumetric Fog

  • Final Gather (skylighting, sky shadowing)

  • Emissive materials can propagate the light (Lumen's final gather)

  • Indirect specular, Reflections for the full range of material roughness values

  • Glossy reflections on translucency

  • Reflection support clear coat materials

  • Supports material ambient occlusion, which provides reliable self-occlusion skeletal meshes.

__________________________________________________________________________________________

limitation

  • Do not support mobile

  • Lumen GI cannot be used together with static lighting, static lights are not supported

  • Foliage is not very well supported (due to downsampled rendering and temporal filters while rendering foliage)

  • Lumen final gathering have significant noise for moving object (under development)

  • Mirror Reflections are not yet supported on translucency (under development)

  • no high-quality dynamic GI on translucency

  • too small or bright emissive area might cause noise artifacts

Software ray tracing limitation

  • Only static meshes, instanced static meshes, hierarchical instanced static meshes, and landscape are represented in a lumen scene.

  • Foliage must be enabled with affect distance field lighting from foliage tool setting

  • Foliage becomes overshadowed because transparent materials are ignored by distance fields, mask materials are treated as opaque.

  • For materials, world position offset is not supported (because this overrides the distance fields)

  • levels need to be made out of modular pieces, walls, floors, ceilings should be separate meshes. (wall no thinner than 10cm to avoid light leaking)

  • Large meshes like mountains will have poor representations and may cause self-occlusion artifacts

  • Mesh distance field resolution is assigned based on the imported scale of the static mesh, adjust the distance field resolution scale in mesh details if the mesh is significantly scaled in the scene.

  • Distance fields can not represent extremely thin meshes or one side meshes seen from behind

Hardware ray tracing limitation

  • significant scene setup cost in large scenes (more than 100,000 instances), becomes very expensive with many overlapping meshes

  • Skinned Meshes incur a large cost to update the ray tracing acceleration structures each frame proportional to the number of skin triangles.

  • Static mesh using Nanite, hardware Ray Tracing can only operate on the proxy mesh. if we are having mismatches, change the fallback triangle percent to a higher value on the proxy mesh (in mesh detail tab>nanite setting tab>fallback triangle percent)

  • Screen Traces are used to cover the mismatch between the full triangle mesh rendered by Nanite and the fallback(proxy) mesh being ray traced by Lumen. If the mismatch is too large, set the fallback relative error to a higher value to reduce incorrect self-intersection artifacts.

__________________________________________________________________________________________

Common problems


  • Remove a mesh that you don't want to contribute to indirect lighting:

if using software ray tracing, uncheck affect distance field lighting.

if using hardware ray tracing uncheck visible in ray tracing section.

  • small meshes appear black in mirror reflections

raise lumen scene detail (post process volume>lumen scene detail)

(Increasing lumen scene detail value increases how much the detail of the surface cache?)

or the other way around, select the small mesh, go to its detail tab, and enable select emissive light source. this is going to indicate this mesh should be part of the surface cache.

For small emissive light source mesh that was ignored, we can also enable emissive light sources to fix them.


__________________________________________________________________________________________


Using lumen


Project setting

When using lumen, uncheck and allow static lighting in the project setting.

This would save some static lighting overhead with shader permutations, and also allow for material ambient occlusion input and bent normals to work with lumen GI.

(note, bent normal are way expensive than ambient occlusion)


For projects that have light baking data loaded, we can enable Force no precomputed lighting in the world setting to remove the lightmap data.



To enable lumen

Go to project setting, under global illumination tab, choose Lumen



Set reflections method to lumen is recommended

The reflection capture resolution sets the quality of lumen

For using hardware ray tracing, enable the hardware ray tracing

this would use hardware raytracing for all ray tracing

after turning on the hardware ray tracing,

For the ray lighting mode which determined the lumen reflection mode:

the surface cache is faster

Hit lighting for reflection is better quality


if we are using software ray tracing,

Global tracing is faster

Detail tracing is better quality

__________________________________________________________________________________________


post-process volume

Post-processing volumes override the GI and reflection set in the project setting.

(If we don't want to override, we can disable the override.)

In short, for those setting in post-process volume, higher value=higher quality= higher GPU cost.



Visualization

  • Mesh Distance Field (Show>visualize>Mesh Distance field)

A visual representation of what software ray tracing will be tracing against.


Increasing the Distance field resolution scale on the mesh detail would make the ray tracing more accurate, of course, more resolution means more performance.

  • Lumen Visualization (Lit>Lumen)

There is overview

Lumen Scene

Reflection

Surface cache


Turn on the card visualize mode by type in: r.Lumen.Visualize.CardPlacement = "1"


for those yellow and pink meshes means there are not enough cards or no cards at all for the surface cache. This is due to the size of the mesh in the scene.

Enable Emissive light source on the detail of the mesh would force it to be part of the surface cache.

By default, the maximum number of lumen cards for each mesh is 12, for any particular mesh we can change the card number by opening up the mesh editor, go to its detail tab and changing the Max lumen Mesh Cards value. (32 is the highest it can go)


________________________________________________________________________

more info on Lumen documentation

https://docs.unrealengine.com/5.0/en-US/lumen-global-illumination-and-reflections-in-unreal-engine/


49 views0 comments

Recent Posts

See All