Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Huge performance difference on the same phone btw Cardboard and Gear VR

Discussion in '5.6 Beta' started by fariazz, Jan 17, 2017.

  1. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    I'm running the exact same project using Unity 5.60b3, in a Samsung Galaxy S6 Edge+, for Gear VR and the new natively supported Cardboard (in both cases, using "virtual reality supported" on the player build settings).

    In the Gear VR the game works really smoothly, almost the same as in the Rift. In the Cardboard, however, the game is unplayable. You move your head around and there is a considerable lag and "stepped" movement, not smooth at all.

    I haven't installed the Google VR SDK, I'm simply playing with what comes by default on Unity.

    Is this normal / expected behavior to have such a difference using the same phone?
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    I would not expect that at all. Can you please file a bug report with a repro project that we can look at? And please post the case id back on this thread.
     
  3. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Thanks for the fast response! The bug report is uploading (I'm on a very bad connection so will take a while) and the code is here: https://github.com/fariazz/mosquito-vr
     
  4. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Bug case 871514
     
  5. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
  6. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    @jazzpablo The way you describe it actually sounds like expected behavior, not a bug. The Gear VR headset contains a high-performance IMU in order to make head rotation low-lag. If you build for Cardboard, Unity's VR stack will use the telephone's IMU rather than the one in the Gear, which isn't meant for VR use.

    Laggy head rotations in Cardboard is what Cardboard is all about. That's why Daydeam ready phone must adhere to various hardware guidelines, including a low-lag IMU :)
     
    LightOwl likes this.
  7. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    There is also the fact that Gear VR has deep level direct kernel connections to talk to the hardware/drivers directly where cardboard is going through the regular SurfaceFlinger system graphics handling.

    The other killer is that Cardboard does no re-projection which means any hitch or frame drop is immediately apparent. You'd be very surprised how much re-projection matters on Gear VR to get their smooth frame rate.
     
  8. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    @jazzpablo For Mosquito VR that you posted, you should also look into performance optimizations on your scene. You are running at Fantastic quality (in fact the only quality level you support) which is going to be very demanding. Your whole scene has 90K verts and 45K tris, most of which appear to be just the trees! You should be able to do something about lowering the poly count on those, maybe even using shaders and much simpler polygons to get some of the same effect.
     
  9. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Very interesting. It's really apparent how far the Gear VR has come and how much you guys and Samsung must have worked to get to current performance. But it's also obvious that Daydream (for whatever reason) isn't there yet... I hope you will get there! :)
     
  10. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi, @WendelinReich
    Fully respecting your superior knowledge, expertise, etc but wasn't @joejo talking about Cardboard (rather than Daydream)? How does Daydream compare to Gear VR? (I'd hope positively!)

    Anyway I was fascinated to read all of the above -- really enlightening! Thank you!

    Rupert
     
    WendelinReich likes this.
  11. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    @Arkadeb221 Thanks for the clarification. You are correct.

    Daydream is only on a couple phones as of right now, whereas Cardboard is much more broadly supported (including iOS). Daydream has full async re-projection and a deep swap chain to boost performance above that of Cardboard. I haven't done a comparison between GearVR and Daydream but I am sure they have their strengths and weaknesses, most notably that Daydream is not platform limited as long as min spec hardware/OS are available. GearVR is Samsung only (which means it is much easier to wring the last bits of perf out) but is limited to just that platform.
     
    Arkade likes this.
  12. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    @jazzpablo I took a look at your project and what you are seeing is down to the fact that Cardboard does not do re-projection in any way. Your app barely breaks 30fps in Cardboard and so you see a lot of jitter and latency. GearVR limits our render rate to 30fps but substitutes re-projection for every other frame and so you experience this as a smooth running VR application.

    In general you are not going to be able to expect the same level of performance between GearVR and Cardboard as they are just not the same performance or feature wise. Your best comparison would be between GearVR and Daydream.
     
    Arkade likes this.
  13. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Does bare Nougat have VR stack or that is unique to daydream devices? I mean the underlying stack to support async repro and other low level features not the whole daydream experience.
     
  14. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    I believe that is Daydream specific and not a part of system Nougat but I am not entirely sure on that. Even if it is part of the system, if the hardware doesn't support Daydream the whole thing will fail to init. It's an all or nothing feature.
     
    WendelinReich and 00christian00 like this.
  15. fariazz

    fariazz

    Joined:
    Nov 21, 2016
    Posts:
    55
    Thanks a lot @WendelinReich and @joejo for looking into this, and for the complete explanations! This makes a lot of sense and it's really interesting. Didn't know about re-projection or even that the Gear VR had it's own IMU (I thought it was just a viewer with some lower level API's for rendering)

    Regarding scene optimization, yeah I had fixed the quality to high as I was trying different options. It looked the best on the Gear VR when on high (even with this number of polygons, it handles it quite well), so was trying to see if that forced the phone to do a better job when on Cardboard.