Download

UE5/Lumen - Abysmal Performance with many Lights

I migrated an UE4 map to UE5. It’s a dungeon environment with around 40 mostly small rooms, no natural light source, many small point lights.

Going from pre-baked light to Lumen resulted in a performance with less than 1 FPS.

The total environment has around 400 light sources, but there are only 4 to 8 visible per room. However, the abysmal performance happens in EVERY room, no matter how many lights are in view.

Is this supposed to be the current state of Lumen or am I messing something up?
I’m running UE5 on a 2080 RTX.

With that many lights, you might want to set MaxDrawDistance on each point light to an appropriate amount (room lights may be bigger than hallway lights for example). When I tested something similar it seems Lumen still tried to calculate from every light until I set this.

You might also want to set MaxDistanceFadeRange if you want some fading before the lights shut off completely at MaxDrawDistance.

1 Like

Thanks for your response! These are some good ideas and they helped improving the situation. Seems like Lumen doesn’t really care about lights being occluded by geometry. Unfortunately, the game remains unplayable even on a high-spec PC.

Using stat gpu reveals that the FPS rate is fairly okay as long as I don’t move. Once I start to turn, FPS drop heavily (i.e. from 50 FPS to 5 FPS). I guess it’s expected to have the heaviest hit upon moving?

Also, I notice that “Shadow Depths” takes up the most GPU power, sometimes peaking in the three digits.

Working on the illumination in UE is tough at the moment. GPU light builds have their flaws, Lumen is flawed… and moving back to CPU light builds feels like going back to stone age… :crazy_face:

Yeah, it’s tough to find the right balance with lighting sometimes. My suggestion would be to try hiding actors from your world to see if there is one type that is causing the most performance issues. If it’s just a matter of too many actors, you might look at combining meshes and/or light sources to reduce the count. Good luck!

1 Like

I want to add that my issues with Lumen seem to be primarily related to the “Virtual Shadow Maps”. When I disable VSM, the performance is acceptable.

However, as the shadow quality without VSM is pretty much unusable (no soft shadows for point lights, low accuracy etc.) turning off VSM on Lumen really isn’t an option.

I guess that Lumen, in its current state, simply isn’t ready for anything beyond a directional light source and maybe a small number of additional lights.

It is perfectly okay, as it is declared as “beta” everywhere. Just wanted to add my observations here, so people who build on a similiar game environment (dungeon with many point lights etc.) don’t set expectations too high, when turning to UE5/Lumen.

Virtual shadowmaps are in experimental for a reason, I wouldn’t even worry about their performance until UE5 1.0 or later.

1 Like

I wouldn’t even worry about their performance until UE5 1.0 or later.

i agree with this sentiment. i’ve driven myself crazy trying to diagnose issues with performance on the ever-changing ue5-main from github and the developers are breaking and changing things every single day. there are things changing in how the engine treats VSM and many dynamic lights. its a known thing and it is getting better

However, as the shadow quality without VSM is pretty much unusable (no soft shadows for point lights, low accuracy etc.) turning off VSM on Lumen really isn’t an option.

you can turn off VSM and use ray traced shadows just fine. sometimes the ray traced shadows are faster. sometimes messing with the console commands for r.LumenScene.DirectLighting.HardwareRayTracing 0 can help.

1 Like

Thanks for the comments. I know how to toggle VSM, but I’m not sure how to switch to ray traced shadows on UE5. Is it done in the project settings somewhere or does it take a console command?

you can turn off VSM and use ray traced shadows just fine. sometimes the ray traced shadows are faster.

Okay, so in UE5 project settings, I set everything from Lumen to Raytracing, disabled VSM, switched everything in the post process from Lumen to Raytracing… but still, I don’t get soft shadows from local lights (e.g. point lights) with raytraced shadows. Again, I’m not talking about directional light…, but individual, local lights.

With Lumen and VSM I can e.g. adjust the source radius of e.g. a point-light, thereby softening the shadows as it would in real life. This method works with Lumen and with baked lightmaps… but not with raytraced shadows.

r.LumenScene.DirectLighting.HardwareRayTracing 0

What is that supposed to achieve? I guess it’s meant to switch off raytracing completely in a Lumen enabled environment?

I’m confused…

i’m REALLY not sure how you aren’t doing what you want to be doing…

dont switch everything from lumen to raytracing.

look, virtual shadows. soft

ray traced shadows, soft

that command i told you… just ignore it.

I’m confused…

same. it would appear that you don’t know how to use the engine.

1 Like

Thanks for taking the time to demonstrate this, I really appreciate it. But I believe we’re talking past each other. When I say that…

With Lumen and VSM I can e.g. adjust the source radius of e.g. a point-light, thereby softening the shadows as it would in real life. This method works with Lumen and with baked lightmaps… but not with raytraced shadows.

…I literally mean just that.

Turning off VSM for high-end visuals really isn’t an option as purely ray-traced shadows are simply too inaccurate. E.g. the bigger (wider) a light source, the softer the shadow. This works totally fine with pre-baked light and Lumen/VSM, but fails with ray traced shadows:

virtual shadows, light source radius 1:

ray traced shadows, light source radius 1:

virtual shadows, light source radius 10:

ray traced shadows, light source radius 10:

virtual shadows, light source radius 20:

ray traced shadows, light source radius 20:

You can set the radius to whatever, the ray traced shadow will remain comparatively sharp. Also, note how precise the contact shadow with VSM enabled is (but that’s a different story).

The bigger the light source, the more inaccurate the ray traced shadow.
I hope the above demo clarifies my point.

it would appear that you don’t know how to use the engine.

Nobody does… :innocent: