Download

Optimizing VR interior scene with dynamic objects

Hi!

I’m having a hard time figuring out how to get above 40fps for an interior scene where essential object types are being dynamic, like the kitchen, walls, floors, etc. If anyone else is creating such content with success, how are you achieving it? Lights needs to be movable, else the shadows won’t fit the new dynamic models being swapped in runtime. Heck, I’m getting maximum 50 fps when all lights but the skylight have been deleted.
​​​​So 90fps seems a long way.

The gpu profiler tells me that there are still some post-processing going on, even if it’s set to 0 and/or disabled.

I’ve inserted the lines suggested in the ue4 VR best practice in the enginedefault file.

​​​​
​​

Any ideas appreciated, thanks.
​​​

Question is: have you tried with no dynamic shadows ( ie bake everything ), just for testing purpose?
How many draw calls you have?
What is the polycount?
What GPU you’re testing the entire thing?

Being an interior you should be able to get better results because you have more control, so 40fps could depend on an old GPU or just bad optimization.

I would try the following:

  • Create empty scene, test in VR the framerate
  • Add base geometry from the interior ( walls, floors ), test fps
  • Add the other geometry ( without reflections enabled ), test fps
  • Bake the level, test fps
  • Enable dynamic lighting, test fps

By doing this you should evaluate wheter or not to use an hybrid solution ( distance field indirect shadows ) or tricking the entire setup by having multiple levels streaming for each object, which is madness but could work

Try running tests on a packaged build of your app. The editor also has some overhead that can drop the framerate a bit.

I wouold say that you need to be careful with dynamic lights. Having a lot of them is definitely going to impact performance, especially if they’re all casting shadows.

Thanks for responses. Well, yes of course the scene needs to have dynamic lights, else it looks like shit when changing objects. But I did think of another way.
Dynamic lights are being updated each frame, right?
So if you could run the lights through an array and set all to updateFreq 0, and then when objects are being swapped, I can run a function with array looping through lights again and set updateFreq to 10 (or another corny number), and then delay and updateFreq 0 again.

In my ears, this would be something like the hole grail for dynamic lights in vr.
Do you know if this is possible somehow?

Need to say that I discovered the Set Component Tick Interval node, but I can’t say it’s making a huge difference. Shadows are still reloading asap. What I mean here, is that if I could get the lights to update, say each second instead of each frame, that would be interesting.