Planar reflections KILLING performance in 4.19

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.

It’s been a while, but I think I read about this function in this post:
https://answers.unrealengine.com/que…lection-c.html

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…

The texture is a Texture Cube which I rendered out like described here: https://answers.unrealengine.com/que…ernal-use.html

"Place actor of type “Scene Capture Cube” on the map, in place where you want shot the cubemap from.

Now, create new asset of type “Cube Render Target” (in “Materials & Textures” menu).

Select the actor you placed on the map and set its “Texture Target” property to the newly created render target asset.

Now right click on the render target and select “Export”."

Not realtime as I said, but better than nothing :slight_smile:

I got the same issues. This needs to be resolved https://answers.unrealengine.com/questions/782355/419-planar-reflections-performance-in-vr.html

Can you submit a GPU capture by hitting CTRL + SHIFT + COMMA. Then sort it but most expensive and send a screenshot of that.

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

As i wrote in my thread: [4.19] Planar reflections performance in VR - XR Development - Epic Developer Community Forums
There is nothing here that justifies the performance loss.

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.

Let me know if you have any other questions!

Cheers-

Sam

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

Hey thread,
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.

https://we.tl/6TI8sjgDk1

If you also find any difference in both version that might be the cause, this would be the better solution :smiley:

I can’t get your download link to work. Can you post on Dropbox or Google Drive?

the forums strangely cut the urls

Stumbled upon same problem , planar reflection causes some insane CPU lag in VR even if it has couple of meshes to render. Any progress on this?

Same issues. Just migrated from 4.18.3 to 4.19.2 went from 90 FPS to 60 on gtx 1070 oc edition

Just as i wrote on the answerhub:
If you set the Planar Reflection Quality to anything else than 100% in 4.19 it locks your framerate somehow. 4.20 is working fine.

Is there a workaround or fix? I’ve set the misc property quality to .5 (looks like they clamp this to 20 in code) but it seems to help yet does not resolve the issues.

This is still happening in 4.22.3 on Rift. (SDK 1.36 and 1.40)
It’s fine on Index.

Still an issue in 4.24.1 with Index.

Is there are any fix for this issue? I have same problem with 4.21.