Search Unity

Lag, Black Bars, Low Fps When Using Wmr In The Editor

Discussion in 'Windows Mixed Reality' started by Bovine, Apr 12, 2019.

  1. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    83
    Hi There

    I have a lenovo WMR headset which works fine outside of Unity but I've noticed it being a bit juddery when playing from within the editor. I have a very beefy laptop (hexa core i7, RTX2070) so I am pretty sure this isn't the issue and games run smoothly.

    I notice also that if the game window is not rendering in Unity, that the view in the Lenovo drops to a few FPS only and there are huge black areas when moving my head form side to side - even slowly.

    Am I missing a setting or two here, or is this lag to be expected when using WMR within Unity?

    Thanks
    H
     
  2. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    295
    Hey Bovine, which editor version are you running on when you see this behavior?
     
  3. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    83
    Thanks for getting back to me. I was initially working on the recent beta but dropped to the most recent stable release - 2018.3.12f1

    I just tried a scene with 5 cubes, default scene, skybox and it's hitting ~100fps in the editor. If I unplug the WMR headset this jumps to ~1200 FPS. I'm going to look at the profiler to see what is happening and perhaps the frame debugging too
     
  4. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    83
    Oddly this seems fine to me this morning in 2018.3.12f1. Profiling shows that ~8MS is spent on v-sync, which may be expected. Technically that's turned off, but maybe that's just not something you can turn off for VR.

    I will rebuild my demo scene in 2018.3 and see if I am still getting the jitter on those prefabs.

    It is still definitely the case that if the game window isn't rendering, that I see noting or very low FPS in the VR headset, but maybe this is expected?
     
  5. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    83
    So I started setting up a VR scene again. Checking it into source control so I could monitor changes, but it didn't come to that. It seems very low near clip planes drive my Lenovo WMR Headset bonkers - I had it set to 0.05 in the near clip plane and even objects that were within a few meters were rendering badly in the headset with clear and obvious duplicates. Dropping to 0.2 and putting a collider around the head so hands cannot clip into it easily, appears to be the solution.

    Probably I am misunderstanding but I would have thought a 5 or 10cm near clip plane would be reasonable for VR situations.

    Note that I still find the headset renders nothing to 3fps if the game window is not active.
     
  6. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    295
    Are you using anything other than the cubes in your scene? Do you have any scripts, are you using MRTK, is there any other variable introduced?

    I just tried an empty scene with 1 cube and .05 near clipping plane like you mentioned and I am seeing a steady 95 fps with the game view hidden (not in focus). If you're able to upload a repro project where you're seeing this behavior I am happy to take a peek at it.