Very poor performance on a large scene with dynamic lighting

Hello guys,

I am working on a fairly big and open scene (currently contains a landscape, large rock meshes, buildings and some other architectural assets) and have recently tried switching to dynamic lighting due to the fact that using Lightmass wasn’t working too well (ridiculously long build times of up to 2 hours or sometimes longer on Preview quality, very high memory usage etc).

I tried using a dynamic lighting setup, both with and without Distance Field Shadows/AO, I like how it looks, but the frame rate drops to about 9-15 fps (from 30 when using Static Lighting). I haven’t tried setting up LODs yet, but I don’t really have any particularly heavy meshes in the scene, mostly just slight bit detailed placeholders. The only way I could get it back up to around 30 fps was by deleting literally everything from the scene… I tried deleting only specific objects to see if they might be causing the framerate to drop, but it wouldn’t really change much until the scene was empty or almost empty.

Any ideas how I could fix this issue? Or should I just stick with Static lighting?

There are so many variables for this question to be answered correctly :confused:
It depends on polygon counts, drawcounts, amount of materials applies to each mesh, transparancy, masks, settings in the dynamic lighting, your gpu, the ue4 settings and more.

We would need waaay more detailed info.

Actually I don’t think we need way more detailed info, it will drop FPS when you use dynamic lighting. You can’t get around that, dynamic CSM (Shadow maps) for a start are heavy, you can try using RT (Ray traced shadow option) set your CSM to a certain distance then let RT take over from then.

It says in the docs "The cost of Distance Field AO is primarily GPU time and video memory. In a fairly large Fortnite level, with the camera still, it costs 3.5ms on a Radeon 7870 at 1080p resolution. The worst case when the camera is rotating rapidly is ~6ms. For reference, SSAO costs 1ms with this setup. ~150mb of distance field volume textures were used. "

So using DFAO is going to cost you as well.

For our open world game, the plan is use higher end machines that can run everything dynamically then come back and lightmap everything at the end when were done with the scene. This obviously depends on the size of the lightmaps.

The whole purpose of lightmaps and static lightning building is to save computing power when the game runs. I believe lighting calculation and AA are the most expensive operations so the FPS drop from 30 to 9-15 seems possible.

You can try to lower lightmaps resolution to increase the build speed.

You should be able to use level streaming so you can split the whole world into smaller levels that will be loaded/unloaded seamlesly as player moves near/far and you should be able to build lighting always only for the level you are currently working on instead of all the world.

To improve dynamic lighting performance you can also try to limit lights that cast shadows (these are more expensive).

Last but not least check the global Lightmass section under World Settings; there are many options that can affect both static and dynamic lightning performance greatly.

2019 and ue4 is still terrible at handling open worlds with dynamic lighting. Unlike cryengine which can get 120 fps+ with the same setup xD

Its not just performance, I’m having a terrible time getting consistent NICE looking results in 4.24.3, HOPE they fix things in 4.25 or I might need to reassess . Lighting is everything and its getting OLD having horrible lighting, KILLING reality, period. I see over and over on forums that lighting setup is far too complex. Again, hoping 4.25 FIXES all of that ~!