Announcement

Collapse
No announcement yet.

Planar reflections KILLING performance in 4.19

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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).

    #2
    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.

    Click image for larger version

Name:	StaticReflection.jpg
Views:	2
Size:	148.5 KB
ID:	1459818
    Attached Files

    Comment


      #3
      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.

      Comment


        #4
        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 :-)

        Click image for larger version

Name:	image_135923.jpg
Views:	1
Size:	494.1 KB
ID:	1465070
        Last edited by andtheand; 04-23-2018, 03:00 PM.

        Comment


          #5
          I got the same issues. This needs to be resolved https://answers.unrealengine.com/que...nce-in-vr.html

          Comment


            #6
            Originally posted by FATBACHELOR View Post
            I got the same issues. This needs to be resolved https://answers.unrealengine.com/que...nce-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.

            Comment


              #7
              Originally posted by Sam Deiter View Post

              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: https://answers.unrealengine.com/que...nce-in-vr.html
              There is nothing here that justifies the performance loss.
              Attached Files

              Comment


                #8
                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


                Comment


                  #9
                  Originally posted by Sam Deiter View Post
                  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
                  Last edited by jinzay; 04-30-2018, 04:56 PM.

                  Comment


                    #10
                    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
                    Attached Files
                    WeTransfer is the simplest way to send your files around the world. Share large files up to 2GB for free.
                    Last edited by jinzay; 05-03-2018, 09:56 AM.

                    Comment


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

                      Comment


                        #12
                        Originally posted by Sam Deiter View Post
                        I can't get your download link to work. Can you post on Dropbox or Google Drive?
                        https://we.tl/6TI8sjgDk1
                        the forums strangely cut the urls

                        Comment


                          #13
                          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?

                          Comment


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

                            Comment


                              #15
                              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.

                              Comment

                              Working...
                              X