How to optimize scene for dynamic lighting and distance field ao

there is a huge difference in FPS of Realtime Viewport (+20fps) and when I am in game (9FPS)

I used dynamiclight (Light Propagation Volumes). + distance field AO
my scene doesn’t have any particle or skeletal mesh.
I didn’t made any lightmapUV for objects in my scene

how can I optimize it to run faster and why there is such difference in fps of game and viewport?

Hi,

There may be two issues going on here.

I am working on dynamic lighting optimization myself and depending on what your are trying to achieve there may not be a lot of options right now. From what I hear, though, big changes are coming with better integration of VXGI from nVidia and Epics work on open world dynamic lighting with GI (not sure how related these two are, but my guess is quite a bit). I am excited for that but in the mean time I am trying to squeeze as much performance out of dynamic lighting as I can:

  1. Only use dynamic lights when you need to. Still dynamic lights seem to impact performance just as much as moving ones. I noticed this because I have a day night cycle and even when I turn off the sun motion my performance is awful.
  2. Unless they are important disable shadows from as many moving lights as you can. They are nice for effect but really hammer performance. I have a dynamic light that works as a sort of lantern for my character and when I disabled shadows my frames went from about 20-25 to about 80-100 per sec. (Only at night when the sun/directional lights are disabled.) Yeah it isn’t as cool to walk around and not see your shadow but 80 fps is nice. And for the day time, how much are tree shadows that stretch and move worth? =/

If anyone has any other dynamic light optimization ideas I’d love to hear too.

The other issue about having different fps in editor than in game may be caused by having a different editor screen size than game screen size increasing number of pixels rendered. By simply resizing my editor screen I can achieve a fps range of +/- 15 fps.

Another issue may be that your game is running at high settings but your editor window is running at lower settings. These can be changed under the world settings/engine scalability settings drop downs.

Hope any of this helped.

Best,
Matt