Lumen, shadow noise, foliage and performance

Hello everyone,

I would like to ask some help, orientation when working with foliage and lumen, but before let me share what i’m using:

Raytraced Ambient Occlusion
Raytraced shadows
Lumen Reflections (surface cache)
Lumen Global Ilumination
Raytraced Translucency

I recently start working with foliage in my project, however i started facing some hard time working with dense foliages and trees.

  1. I’ve created a PCG with Hi gen for grass and other plants, only trees isn’t using. I’m also set wpo to low range, even so, the performance in 1080p inside the forest is about 30~40fps. When profiling the gpu i found some hits:

1.1 SW Rasterize (trianges) = 6,49 ms
1.2 RenderDeferred Lighs - DiffuseIndirectAndAo = 3,39ms , Lights - DirectLighting - UnbatchedLights = 6,68
1.3 PostProcessing = 3,09

  1. The shadows in flickering and with some noise, is it possible reduce or solve completely?

Below one video of example, i believe will be possible to see the noise in the shadows:

Thanks in advance.

Unfortunately your video compression is so strong that I cannot tell what I’m meant to be seeing, but I can say a few things.

  1. Lumen GI and reflections cannot run concurrently with Ray Traced Ambient occlusion. If one is on then the other is off, which by the looks of it is RTAO.
  2. RT translucency is under a soft deprecation. It’s still in the engine, but it’s broken with enough features that it really should not be used. It could cause all sorts of transparency and performance problems.
  3. Megalights would be a better fit for managing noise bc the RT shadow denoiser really isn’t that good.
  4. Unbatched lights means you have non nanite geo sucking up a lot of processing power. You should make that nanite as much as possible.

Also, Fortnite’s solution to manage noise was just to cut foliage from lumen entirely, which really is probably your best bet. Remove it from consideration, it will still receive GI and shadowing through SSAO.

1 Like

Hello, thanks for the suggestions, i’ll check each of them, about the video i changed to a new one, hope this one become more visible the flickering /noise, also adding this one:

Frankly that might just be RT shadow or VSM noise, I’m not even sure that’s lumen.

I’ll look also in the shadow, one thing: increasing the resolution, helped a bit at least. But i’ll keep looking, appreciated the help, if you find or have any ideas to test, let me know.

I tried a lot of things but couldn’t find any way to improve this, still a lot of flickering , tried change TSR, disabled ray traced shadows, change vsm settings, but no success. I really thinking in use screen space instead lumen, i’ll lose the desired effect , but avoid this crazy flickering noise in shadows.

Does the foliage have contact shadows enabled? That really noisy cheap shadowing looks it to me.

Hello, yes, it is enabled.

There’s your answer. That’s where that small scale grainy noise in the shadows is coming from. Lumen noise is a different issue though and is usually the larger blotchy soccerball sized noise. Grass doesn’t play well with lumen, so it’s usually best to exclude it from both raytracing and distance fields. If you use HWRT lumen, then it uses the RT scene, if you are using SWRT lumen, it uses distance fields. “Affect Distance Field Lighting” and “Visible in Ray Tracing” are the entries to look for, disable them.

1 Like

Hey Ironic, thanks for helping, I did try disabled them (contact shadows and Distance field lighting), but didn’t notice much improvements:

Also i tried tweak the parameters :
Virtual Shadow Maps in Unreal Engine | Unreal Engine 5.5 Documentation | Epic Developer Community

I also disabled the visible in ray tracing but the shadows gone, but i got you.

i’ll test Nvidia Rtx GI to see if will happen the same effect, i’ll post the results here.

Well, with RTXGI occurs similar artifacts.

I have the same issue, and I believe it has to do with the stochastically-sampled nature of the lighting-process and screen-scaling (r.screenpercentage XX).

In my experience the effect scales with smaller percentage values (increased interpolation) and since some of the pixels are literally ‘not there’ in the history, you get holes in the data-set powering the algorithm, and the splotches.

Couple observations.

r.TSR.History.SampleCount 32 (max current value) helps smooth the interpolation with increased samples over time.

r.TemporalAA.HistoryScreenPercentage 200 will increase the resolution of the screen-data stored in the history buffer and yes you will pay for this, but obviously provides additional data at some level, hence a better picture. I WANT to say the optimum value is actually a multiple of r.screenpercentage but I can’t find the link where it was explained by this was so (sorry). eg: r.screenpercentage 66 means you would want to use a HistoryScreenPercentage of 66, 132, or 198.

^^^ please BS-detect this if you know otherwise, I don’t want to spread false information but I recall it was a wierd-correllation and it seemed to stick (or I mandala’d)…

r.Lumen.HardwareRayTracing (in 5.5 here), costs me ~1frame but noticably smooths the image. NOT DLSS-majick-sauce perfect, but pretty-darn-close. It also adjusted the lighting a smidge, so it is not apples-to-apples w/software ray-tracing in that regard.

Ultimately, DLSS seems to just-fix the issue… I will assume Epic gets there at some-point, but otherwise the rest of the above has had positive results to smooth things out for me.

1 Like

Hey Frenetic, thanks for the suggestions, using TAA helped a bit, but the noise still there, using vsm and taa e and adjusting the shadows also seems a little bit better than raytraced shadows. But doesn’t look good and the performance seens suffer a bit more. i believe other parameters is need to help improve the Lumen GI.

In this article from unreal: Lumen brings real-time global illumination to Fortnite Battle Royale Chapter 4 - Unreal Engine

they mention to disable screen trace in foliage, do you guys know how to that?

Would be r.Lumen.ScreenProbeGather.ScreenTraces ?

You just make sure you’re using the two-sided foliage shading model. Lumen skips screen trace hits for it.

You do not use any cvars.

2 Likes

Okay, using two side already, doesn’t seem to remove the noise like the article, so what else could we try to stabilize the noise?

Not the two-sided checkbox. You need to be using the two-sided foliage shading model. It also isn’t going to fix all types of noise, only that which is caused by screen traces.

1 Like

Got you, doubled checked:

Thanks Akiras. I’ll keep looking in a way to imrpove this artificats/noises .

I tried something here, helped a bit:

Changed the skylight leaking and full skylight leaking distance to 0,1.

Result changed, but reduced the flickering and noise: