I’m having an issue with planar reflections in 4.19 on the Oculus HMD.
I had been developing in 4.18. I migrated onto 4.19 due to a bug in 4.18 that prevented reflection captures from loading in a packaged game with streaming levels. That bug was fixed, but 4.19 has tanked my performance. It is a small arch viz project, so I am being somewhat aggressive with the visuals - but the performance was more than acceptable in 4.18.
After some trial and error, it seems to be the planar reflections that are causing the issue. In the editor viewport, the level runs at over 100 FPS, but when I test (or package the game) through the HMD, FPS drops to single digits if a reflection plane is anywhere in view (even if I set Max View Distance Override to very low).
So - is this a known issue? It seems to be specific to running through the HMD. My project is identical to the version I have in 4.18 - which was running fine.
Any ideas? (other than disabling planar reflections? They really help sell the scene).
I could not afford planar reflections from the beginning for my VR project. So I ended up rendering out a cubemap from my scene and implemented this texture in my water material. It is a fake reflection but it looked quiet good. So if you can’t fix your problem, perhaps this would be an option.
Thanks for the reply! I’ve yet to solve my problem and am trying to implement this. I can’t find any info about the DistanceLimitedReflections node…what exactly do I plug into the the TCube? I’ve tried a Cube Render target and 2D render target, but they won’t work.
I then looked into the ZEN Demo which is free to download and copied this function into my project. In general the ZEN Demo is quite interesting for VR because they have done some nice water effects which even run on mobile devices. Good for keeping your 90FPS in VR…
Thank you for joinging the thread Sam,
i attached some screenshots.
i have 90 fps on NoRef (deleted the reflection plane) and 30fps on Ref (in the level, does not matter if materials have planar activated).
GTX 1070, UE 4.19.1, Forward Shading, No Stereo Instancing
So I see a few things that are hurting your performance that might not be immediately obvious.
First, it looks like you have Anamorphic lens flare enabled and you need to disable this as it is extremely expensive and should not be used in VR projects.
Remeber that Planar Reflections duplicate your scene so you are basically paying the cost to render the scene twice. There are some controls that you can use to limit the Post Processing settings that are used so I would have a look at that limiting the types of settings that can be used.
In your CPU profile, you are spending almost a second(1,000 ms) of time with something called ScrenSaverInhibitor. Looking this up line looks like it could be because you are using the Control ScreenSaver blueprint node. Can you confirm that you are using that?
Everything else is looking pretty good so I would next have a look at something like Robo Recall to see if you are getting the same issues. Als,o do you only get this in the UE4 Editor or does it happen in a cooked and packaged version of your project? Try and pack your project up into an EXE and then run that to see if you are getting the same performance issues.
Thanks for looking into it!
The project runs as is at 90 fps in 4.18. Would you have an idea where this difference comes from?
I think that affects both of your first points as my scene is very low poly and able to afford extra effects.
I dont have the control screensaver blueprint node anywhere. I even ran a search for it.
Performance problems occur in both editor and packaged version.
Its really just simple: works 90fps in 4.18 - laggs horribly in 4.19
i managed to reproduce this performance degradation with the Realistic Rendering Template.
I believe this is the proof that something is affecting the planar reflection performance that came in 4.19
I attached the projects for 4.18/4.19 with the exact same configuration. 4.18 runs 90fps on my 1070 4.19 does not.
In my attachements here in the thread you can see that both are also equal on the gpu(not standing in the exact position), so there must be something else going on with 4.19.
I will add this to my answerhub question and try to file it in the bug tracker.