Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

VR without cardboard sdk and without occulus sdk

Discussion in 'AR/VR (XR) Discussion' started by amanieux, Jul 15, 2016.

  1. amanieux

    amanieux

    Joined:
    Jul 15, 2016
    Posts:
    5
    hi
    i an new to unity, i want to do a vr app that works with any android phone and that does not require the user to install google cardboard so i wanted to understand if unity had a basic VR library that does not use cardboard sdk nor occulus sdk just sbs rendering with 360 head tracking, is this possible ? ( i am suprised to see that the unity vr samples i find can only work for gearvr).
    what are the downside, other than missing cardboard library barrel distortion correction and occulus library chromatic aberration correction ? will i get a lower frame rate or more drift in the head tracking ?
    thank you
     
    Last edited: Jul 15, 2016
  2. scottunity

    scottunity

    Joined:
    Feb 1, 2014
    Posts:
    72
    So what headset are you planning to use if not Cardboard or Oculus?
    Where's it getting head tracking from? It will have to access the Android accelerameter etc. No poitn in Unity re-inventy what Google and Oculus have already been working on.
     
  3. amanieux

    amanieux

    Joined:
    Jul 15, 2016
    Posts:
    5
    you are right, i don't care which VR library is used internally so i rephrase my question this way : do you have a unity vr code sample that works with any android phones, including the sony z5p in 4k ? ( cardboard works fine in 1080p on this phone but has a bug in 4k) :
    )
    i see unity made VR app such "tuscany HD" and "tuscany dive" that works in 4k on my sony z5p so it must be possible.
     
    Last edited: Jul 15, 2016
  4. amanieux

    amanieux

    Joined:
    Jul 15, 2016
    Posts:
    5
    the last reason i want to use as small as possible a VR rendering library is performance.
    i see a bad performance on this very basic unity made app : https://play.google.com/store/apps/details?id=com.ORParga.Virtual_Monitor_Resolution. when i look awaw from the textured quad my frame rate is 54 fps as soon as i put a single pixel from the textured quad in my viewport, frame rate drops to 34 fps, it does not make any sense on a snapdragon 810 (even at 4k resolution). unity must have a spatial optimisation structure that may be good for 1 million triangles but it has a very bad overhead for a scene composed of a few triangles.
     
    Last edited: Jul 18, 2016
  5. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    90
    Another possibility is to use the Durovis Dive Unity Plugin. I worked with it and it's a really lightweight, easy to learn SDK. The missing BarrelDistortion was replaced with a fisheye camera effect and the correct placement of the eye focus is calculated by simple math I've written. Check it out :)

    https://www.durovis.com/sdk.html
     
    maxizrin likes this.
  6. amanieux

    amanieux

    Joined:
    Jul 15, 2016
    Posts:
    5
    thanks Dive Unity Demo Project 2.1.5 run fine (but there is some drift in the tracking) after it was converted to unity 5.35 and i did "un-ticked the android tab in the plugin screen for "libdiveSensor" in the X86 folder and ticked it in the armeabi folder." do you have an option so can we see the frame rate ?
     
    Last edited: Jul 20, 2016
  7. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    90
    The drift issue can be solved by placing the smartphone on a flat surface for about 20 seconds. So the gyro can calibrate itself. And for showing the framerate I use this -> http://wiki.unity3d.com/index.php?title=FramesPerSecond
    I create 2 visibility layers, one for the left eye, one for the right one. Place the component on 2 gameobjects and make each visible on either the left eye or the right eye. So the framerate is even visible, when looking through the vr glasses. :)
     
    Last edited: Jul 21, 2016