Hardware lumen surface cache artifacts on nanite geometry

Hello,

We’ve recently switched to using hardware lumen on our project and started seeing some odd dark artefacts on some meshes.

These issues result in the lumen being generally darker and more unstable.

Screentraces are largely hiding the issue, but this really impacts the quality, especially in motion.

Looking at the surface cache and toggling some things, I can find the following

  • shot 1: lit mode, looks normal (screentraces are hiding the issue)
  • shot 2: surface cache, notice the dark unexpected artefacts that are not there in the lit view mode
  • shot 3: surface cache without the directional light, notice how it’s still there but less sharp and less intense
  • Shot 4: Surface cache with the directional light, but the max edge length factor is set to 10. The issue is greatly reduced.
  • Shot 5: disabled nanite, the issue is entirely gone

The meshes are quite simple, and the surface cache shouldn’t have issues with this.

The surface cache exhibits no problems when the geometry is non-nanite. This suggests that there may be an issue with the fallback mesh generation. (but that’s our guess based on the observations we made)

Any help on this is much appreciated!

Steps to Reproduce

  • Create a blank UE5.6 project, maximum quality
  • Import the mesh attached
  • Place the mesh in the startup level
  • Apply a lighter material. (makes the issue better visible)
    • EG this material comes with the engine content: /Engine/EditorMeshes/ColorCalibrator/M_GreyBall
  • Toggle the surface cache view mode on
  • Notice the dark artefacts, which result in unstable hardware lumen results.
  • Now, while in the surface cache Viewmode toggle the directional light off (eye icon > light types > directional lights)
    • Notice how the dark spots become less noticeable
  • in the static mesh settings -> nanite settings set the “max edge length factor” to 10
  • Hit apply
    • Notice how the issue is greatly reduced but is still not fully gone yet
  • Now disable nanite on the static mesh
    • Notice how the issue is gone entirely

It looks like the shadow and radiosity rays are hitting the nanite ray tracing proxy mesh surface when tracing from the surface cache. I’m going to submit a bug report for this.

Until the underlying issue is fixed, you can use `r.LumenScene.DirectLighting.HardwareRayTracing.ShadowRayBias` (for direct lighting), `r.LumenScene.Radiosity.HardwareRayTracing.SurfaceBias`, and `r.LumenScene.Radiosity.HardwareRayTracing.SlopeSurfaceBias` (for indirect lighting) to adjust the ray biases until the issue goes away. With the mesh you sent I had to set the DirectLighting ShadowRayBias to 9 and the Radiosity SlopeSurfaceBias 5 to completely eliminate the lighting artifacts. Hopefully this still provides adequate quality for you. Note that I had more luck with the radiosity SlopeSurfaceBias, than the SurfaceBias. The difference is that the SlopeSurfaceBias offsets the ray start along the surface normal direction, while the SurfaceBias offsets it along the direction of the ray.

Regards,

Lance Chaney

Hey Lance, Thanks for looking into this and creating a bug.

We’ll use the commands you sent us to work around it for now.

Is there any chance you could send us a link to the bug page so we can follow up as well?

Many thanks,

Sander

Yes, I will send through the public bug tracker once it has been made available. I’m just waiting on Epic for this.

Regards,

Lance Chaney

The public bug tracker came through this morning: UE-316311