Search Unity

Sudden extreme fps drop using Vive/SteamVR - controllers and plane stay visible

Discussion in 'AR/VR (XR) Discussion' started by Tech-Labs, Feb 7, 2018.

  1. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    I'm working on a project using SteamVR and the HTC Vive plus controllers.
    This morning everything worked fine. Then without any changes, software installs, restarts or anything when I run the game the following happens:
    - The default SteamVR square white plane remains visible on the floor
    - The default SteamVR controllers remain visible
    - My scene is visible too
    However, instead of a nice acceptable frame rate, the frame rate drops to about 1fps. Everything seems to work, it's just the remains of the SteamVR default scene and the extreme slow fps.
    I've uninstalled Steam and SteamVR. Rebooted, etc. Still happens!

    Any ideas?

    Thanks!

    Marco
     
  2. StickyHoneybuns

    StickyHoneybuns

    Joined:
    Jan 16, 2018
    Posts:
    207
    When your game is running click on the scene tab and see if you are getting any warnings in the console. About two months ago without any warning I started to get a memory leak warning when running steamVR plugin. I re-installed Unity created a new scene with nothing in it and still get the memory leak. Apparently this is a known bug. Fortunately the memory leak only occurs in the editor and not in the final build. So check that and see if the same is happening to you.
     
  3. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    The Console does not report any problem. Two warnings that are innocent, no errors and just a bunch of print-commands from my code.
    I will however, do a quick empty scene test.
    Thanks!
     
  4. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
    Make sure your gameview is maximized in playmode.

    It makes a huge difference in frame rate:
    https://www.solidearthvr.com/2017/01/15/judder-maximize-unity-labrenderer/

    Also, I've noticed that open dialogs of some plugins cause a huge problem with framerate. For example, having the probuilder dialog open in play mode caused a bunch of frame timing spikes last time I tried.
     
  5. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Thanks Solid.
    I'll try the full screen, although (if it helps) the question then remains why? Nothing seemed to have changed between the Play session before and after. It's also doesn't show as spikes in the Profiler, just continuous low fps.
    I've tried turning of the VR support in the Player options. Obviously no Vive issues then. The Profiler reports something of about 92% editor, while when VR support (just OpenVR) is turned on the editor rates as about 84% in the Profiles. No real strange issues seen in the Profiler.
     
  6. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
    Do you still have the same issue if you run the steamVR example scene?

    Also check your Supersampling, Always-On Reprojection, and Async Reprojection settings (below are mine):



     
  7. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Hi again Solid,

    I'll be working on it today. Thanks for the other suggestion! Although I'm doubtful if this could be the problem, because I've never touched those settings and the problem suddenly appeared between to Play sessions within the editor. At the moment I'm guessing it has something to do with or a plugin I'm using (InstantVR) or the latest update of the SteamVR plugin in combination with something.
    I'll post an update later. Thanks again! Appreciated!!
     
  8. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Well, I'm no closer to solving it, but I might have some additional info that may lead to a solution!

    First I've tried the the settings you indicated Solid. No luck.

    First I loaded a clean project with the Instant VR pluging (for the Vive controllers etc). Works like charm.
    I've reloaded my project. Cleaned all VR files out.
    Then I installed the latest SteamVR plugin from the Asset Store and ran it with a default simple camera. Same issue!
    However, something interesting is happening.

    When I look in one direction (let's call it south) everything is fine. The SteamVR pop-up shows just "Unity.exe" as running and the Framerate indicator in the Settings of SteamVR is great.
    When I rotate towards the opposite direction (north) then halfway around the problems start. The default white square floor (plane) appears as do the two controllers. "In the air" I see the "wait" windows of Steam and the system tries to show both (my Unity scene and the default Steam-No-Application-Is-Running scene) at the same time causing the frame rate to drop from 140fpd to 6fps.

    The attached screen shot of the Display Mirror option show (dimly because of the flickering) the "wait" screen and a piece of the default floor. When I rotate left about 90 degrees, it disappears and my scene runs fine.
     

    Attached Files:

  9. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
    I'm betting it's the InstantVR plugin. Have you tried with just the SteamVR example scene without the InstantVR plugin?
     
  10. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Yeah I was thinking the same. The strange thing is it worked without a hitch and now it doesn't. It works in a clean project, but not in my existing project. There must be some settings somewhere that is acting up, probably indeed in combination with the plugin.
    Back to testing.
    I'll triple check my handful of scripts, perhaps test it on another computer.
    Thanks!
     
  11. konradkunze

    konradkunze

    Joined:
    Jan 11, 2017
    Posts:
    10
    Hi, we are experiencing a similar very strange effect. From one day to another, our game suddenly starts to horribly stutter. This does not always happen but randomly at any time while playing. It is hard to reproduce because there seems to be no obvious indication what makes the studdering to start.
    Some notes on it:
    * It also happens in the final build, not only in the Unity Editor.
    * While it happens, the Unity performance profiler just shows huge spikes in "other" of the GPU performance (so we can't nail it down) (see attachment)
    * While it happens, the SteamVR profiler instantly fills the whole area with "idle". (see attachment)
    * It seems not to be related to performance as it is happening on multiple machines (with different hardware) and with all quality settings. (Even if we set our game to low QL and run it on a NVidia 1080)
    * We had this on NVidia and AMD cards.

    The issue seems only to happen when running with the HTC Vive. When we start the game with Oculus Rift, it seems not to occur.

    Any idea on what this is?
     

    Attached Files:

  12. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
  13. dukevr

    dukevr

    Joined:
    Dec 12, 2017
    Posts:
    3
    Hi, I experienced the exact same issue with white square on the ground, and controllers and trackers visible within my application. Some precisions :
    - i'm using the wireless module on the headset
    - it occurred on the build version
    - i've not been able to reproduce it since it occurred !

    Did someone find something helpful about that ?
     
  14. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    For me it usually is due to the number of DrawCalls. Sometimes I simply have too many objects. So I try to minimized the objects if I can (also using SetActive()). I've also found that using the Vive Pro the FPS drops even further, although I would need to look into that further.
     
  15. dukevr

    dukevr

    Joined:
    Dec 12, 2017
    Posts:
    3
    Hi, thanks for your reply !
    You mentionned that it occurred even with an default scene, if I remember well. Anything new about that ?
    On my side, the fact is that it happened only twice, so no way to reproduce it.
    And I don't own the Vive Pro, only the Vive
     
  16. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    I’m wrecking my brain trying to remember what it was. I remember a lot of uninstalling and reinstalling to ni avail. And the obecjr number.
    Can’t seem to remember how I solved it! Sorry.
    If I remmeber something I’ll reply again.
     
  17. solidearthvr

    solidearthvr

    Joined:
    Jan 23, 2017
    Posts:
    50
    A lot of times my Vive get's into a funny mood where it starts juttering like crazy and the only thing that seems to help is to reboot.
     
  18. Timmy_Dev

    Timmy_Dev

    Joined:
    Feb 24, 2022
    Posts:
    1
    For reference, if anyone else ever has this issue; for me it was an extremely simple fix/error. But I am currently using URP, and I had accidentally changed the Render Scale setting in the URP Asset under Quality. I had it set to 2 while playing around with FPS and how it looked, and forgot to change it back. It changed the FPS from a ~70fps down to ~2fps with Oculus Quest 2 headset on, and somehow nearly invisible on computer. So if you ever have an issue with it only crashing fps while your headset is actually on your head and connected, this could be it, or just that your settings are too high for your VR headset to handle alone.
     
    Deltigre likes this.