Download

Dynamic lighting runs @ higher fps than Static lighting in a large scene, is this normal?

I have a very large suburban scene with over 3000 objects that have 4096x4096 textures, few of them have 64x64 lightmap resolution, most have 128x128 and some large ones are up to 512x512, after about 5 hours of building lighting on medium settings on my mid-range gaming pc with a i-3 cpu 16gb memory and a radeon r9-380 4gb gpu, the scene looks good but its running at an average of 44fps, min 40fps, max 48fps outdoors, and around 52 indoors. When using fully dynamic lighting with distance field ambient occlusion turned on and the main light set to 4 dynamic shadow cascades the scene runs at about 56fps - 64fps.

I expected to atleast stay above 70fps after building the lighting so this hardly seems normal to me because as far as I know and have experienced until now static lighting should always run faster than dynamic, have you had an experience where dynamic lighting runs @ higher fps than Static lighting in a large scene, if it isn’t normal what could be causing it?

Lightmaps take up quite a lot of memory. With such a large scene, you’re going to be shoving a whole load of lightmap textures into the VRAM. The lower FPS is likely caused by the amount of lightmap information being loaded/unloaded as you move around.

I don’t have a lot of experience with it but from what I’ve learned from the forums, use lightmaps for small, linear spaces and dynamic lighting for large sandbox areas.

Use console command

r.Shadow.Preshadows 0

to determine whether preshadows from the stationary directional light are causing problems for you.

Are you using Static or Stationary? They’re both referred to as “static lighting”, but Stationary lights have a few limitations that can make them more expensive than a fully Dynamic light.

You should profile it more specifically and list the results. stat unit to see where the frame rate is being affected(game thread, gpu, etc). If it’s gpu, stat gpu will give you a simplified list of things running in that frame on the gpu.

@wickerman123 Thanks, I think that makes the most sense.

@Luoshuang the fps went up after I tried the command, there’s definitely something wrong with the shadows.

@rosegoldslugs my directional light is stationary & everything else is static, I’ll try and bake with all lights set to static and update when I have time.

Thanks for the help guys.