Announcement

Collapse
No announcement yet.

FPS drops by 50% in VR when introducing SceneCaptureComponent2D in a map

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

    FPS drops by 50% in VR when introducing SceneCaptureComponent2D in a map

    Hi,

    I'm creating a simple map with targets and a rifle to which I attached a scope that uses the SceneCaptureComponent2D camera. When that camera component is present in the rifle blueprint my fps drops from 90 to 45 in the packaged noeditor version when playing on Oculus Rift (in Steam VR and Oculus Home). In Unreal Editor 4.19 it works without flaw. The render target texture is 512x512 pixels with a FOV of 2. I tried everything: reduce render texture below 100 pixels, reduce rgb quality, uncheck all the Component2D options, reduce amount of details in the map--which is already very low--. Nothing works. When I remove the camera component it works fine. I use the simple method of putting the camera component in front of the scope that is projecting to a lens at the other end of the scope.

    Other VR games with scoped-rifles available on the market and produced with Unreal play without flaw on my ovr. It is not a question of gpu (GTX980TI) nor system performance.

    Anyone has an idea?
    Thx
    Last edited by OpAnaconda2430; 08-08-2018, 09:25 AM.

    #2
    As a reference I uploaded screenshots of my Unreal configs.

    Comment


      #3
      In 4.19 (and saw it in 4.18 too) the Rift constantly re-inits render buffers with a scene renderer in play (and sometimes with stereo layers too), you can check your log for it spamming buffer re-inits.

      You can "alleviate" it by changing the render target resize method so that it doesn't re-allocate entirely "r.SceneRenderTargetResizeMethod 2", but that doesn't fix the underlying issue.
      r.SceneRenderTargetResizeMethod Control the scene render target resize method:
      (This value is only used in game mode and on windowing platforms.)
      0: Resize to match requested render size (Default) (Least memory use, can cause stalls when size changes e.g. ScreenPercentage)
      1: Fixed to screen resolution.
      2: Expands to encompass the largest requested render dimension. (Most memory use, least prone to allocation stalls.)

      I'm pretty sure it has been reported already but I don't know a ticket # offhand.

      This is a Rift exclusive issue AFAIK, no such problem exists on Vive.


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        #4
        Thanks for the support Mordentral, really appreciated. I implemented the extra code in my project config "DefaultEngine.ini" but as you previously mentioned, it does not reduce the stuttering in the noEditor packaged version with the Rift. When played in VR game mode directly from Unreal it works fine since it is windowed.

        Pavlov game's scoped rifles work fine on my Rift and it was made with Unreal. I wonder how the developer "davevillz" managed to code his project in order to avoid that problem. I'll try to get in touch with him and come back to the forum with a solution so other can use it. In the meantime, should anyone has a solution for the packaged version please share.

        Comment


          #5
          Originally posted by OpAnaconda2430 View Post
          Thanks for the support Mordentral, really appreciated. I implemented the extra code in my project config "DefaultEngine.ini" but as you previously mentioned, it does not reduce the stuttering in the noEditor packaged version with the Rift. When played in VR game mode directly from Unreal it works fine since it is windowed.

          Pavlov game's scoped rifles work fine on my Rift and it was made with Unreal. I wonder how the developer "davevillz" managed to code his project in order to avoid that problem. I'll try to get in touch with him and come back to the forum with a solution so other can use it. In the meantime, should anyone has a solution for the packaged version please share.
          Its a new issue, he likely is working off of an older engine version, also it shouldn't matter packaged or not.

          I don't have consistent enough access to a Rift to debug and bug report it myself but have had it brought up many times recently.
          Last edited by mordentral; 08-08-2018, 02:18 PM.


          Consider supporting me on patreon

          My Open source tools and plugins
          Advanced Sessions Plugin
          VR Expansion Plugin

          Comment


            #6
            Mordentral, would you recommend calling the "r.SceneRenderTargetResizeMethod" through the main blueprint class nodes instead of adding it directly in the DefaultEngine.ini? Any config I'm adding to .ini files such like fullscreen mode=2 etc is not working but when I' using a node in the project it works. And if you would be using nodes how would you express it?

            Comment


              #7
              FYI, I've got an answer from Pavlov VR dev and he's indeed using version 4.15, hence the reason why his scoped rifles work without stutter. Unfortunately I can't open my project in 4.15 to try it out, it seems impossible to open newer project version into earlier Unreal versions. Let's hope that 4.20 remedied to that problem. I just downloaded it. Will come back with the results.

              Comment


                #8
                I migrated my project to 4.20. The packaged version is still stuttering with the SceneComponent2D actor in it. Strange thing always remains that no stuttering happens in Unreal VR Preview. It is absolutely seamless framerate. I can't figure out why is that. There something going on with the packaging of the project but I can't nail it. I tried many options such like to lock the framerate to 90, etc, doesn't work. There are so many options only in the Packaging Settings - Rendering...I don't know where to start and it takes a while going through all these options one by one and try packaging everytime. I'm desperate.
                Last edited by OpAnaconda2430; 08-10-2018, 12:40 AM.

                Comment


                  #9
                  Should anyone want to try my Unreal packaged map on your Oculus and test the fps drop and stuttering with the SceneComponent2D actor I'd be glad to hear of your result. Try to move the guns around and see if the framerate drops or stays smooth.

                  OneDrive: https://1drv.ms/u/s!AtwKGzBk3VOojbZHFkG6xZ2HOnjXXQ

                  Use right-hand controller and hold "grab" button before firing with the trigger button. Press B for map restart and A to close.
                  Last edited by OpAnaconda2430; 08-22-2018, 11:56 PM.

                  Comment

                  Working...
                  X