Search Unity

Can I see the binocular VR view in the Unity editor or standalone?

Discussion in 'AR/VR (XR) Discussion' started by yoonitee, Feb 4, 2017.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    I want to view a 3D scene on my laptop so it would look something like this:



    Is there some setting I can turn on in Unity to do this? (Or maybe some asset or shader I can download to view this?)

    Then I could just put the Google Cardboard directly onto the laptop screen to do a quick test. I would imagine its quite simple, just render to texture with a distortion shader on it?

    I've downloaded Unity 5.6 and enabled VR.
     
    Last edited: Feb 4, 2017
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,853
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    Thanks! I hope Unity includes this in the final version of Unity 5.6. Seems quite important!
     
  4. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    OK, got that working. Another question, can I use my phone or tablet plugged into my laptop, as an input device to give the rotation of the camera for the VR view. Since my phone has a accelerometers in it but my laptop doesn't! In fact, I would like to strap my phone to my laptop so that as I move my laptop about the view changes accordingly. (This is all just for testing purposes). Or is there a USB accelerometer I can plug into my laptop to do a similar job while working in the editor?
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,853
    you can test rotation and those in game view, press ALT and use mouse to rotate.
    there were some other keys also i think for tilt and maybe more, mouseclick in gameview also equals cardboard toggle.
     
  6. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    Ah, thanks again. Now, I'll have to buy a Google Cardboard set to try it out! exciting. :)
     
  7. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    611
    At about 18m 50s I run the game in editor:

     
    Last edited: Feb 4, 2017
    yoonitee likes this.
  8. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    I don't suppose the Vive controllers would work with GearVR?

    Realistically, is it possible to create a HTC Vive game without actually having to fork out the cost of buying a HTC Vive?

    I mean it would be a nice thing to offer people. But then again I can't buy every platform in the world!

    ( I doubt Vive would send me a free dev kit! https://virtualrealityreporter.com/htc-vive-developer-edition-free/) Maybe I'll just have to borrow one.
     
  9. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Vive controllers and the base stations make half of the cost so it would not make much sense. Also GearVR does not have positional tracking so no, it's not realistic.

    Oculus does give hardware for good projects. https://developer.oculus.com/hardware-request-form/
     
  10. coeing

    coeing

    Joined:
    Mar 17, 2011
    Posts:
    231
    Just discovered a quick way to get a stereoscopic view in the Game View tab of Unity, so I thought I share it :) At least it works if you have two cameras (one per eye).

    1. Set the Field of View of the left and right camera to the one that fits the HMD you are using (e.g. 96 degrees for Gear VR, see https://www.vrheads.com/field-view-faceoff-rift-vs-vive-vs-gear-vr-vs-psvr)
    2. Set the Viewport Rect of the left camera to (X: 0, Y: 0, W: 0.5, H: 1) and the right camera to (X:0.5, Y:0, W: 0.5, H: 1)
    3. This should show the left camera on the left side of the game view and the right camera on the right side
    Binocular View.jpg

    Hope this helps!
     
  11. memoid

    memoid

    Joined:
    Aug 30, 2014
    Posts:
    10
    Hi All, I don't want to hijack the thread, so I'm not sure whether it's good to post here or start a new thread, but I'd like to do the same, but in an Oculus Rift project, but the above doesn't work.

    I have Oculus working fine in Unity, but in my GameView I'd like both left and right eyes displayed (preferably non-distorted), not just the left eye. I actually have two cameras in my scene, one is rendering objects on a layer called LEFT, and the other camera is rendering objects on a layer called RIGHT. This way I can render different objects to each eye. And this works fine. However, my GameView only displays the left camera, and I'd like it to display both, splitscreen.

    I tried the viewport thing mentioned above, and interestingly:
    - If I don't have the Rift HDMI connected, it works fine in GameView (left half shows left camera, right half shows right camera).
    - When I do connect the Rift HDMI, then when NOT playing it works fine in GameView (left half shows left camera, right half shows right camera).
    - When I press PLAY, then the left half of the GameView shows the left camera, but the right half shows nothing, just doesn't update at all (and of course in the actual rift, everything is squashed)

    As a test, I tried attaching Camera1 (LEFT) to Display1 and Camera2 (RIGHT) to Display2, and then opening two GameView windows, one showing Display1 and the other showing Display2. And I get similar results to the above.
    - If no Rift HDMI is connected, it works as expected: GameView (Display1) shows Camera1 (LEFT), and GameView (Display2) shows Camera2 (RIGHT).
    - When I connect the Rift HDMI, then when NOT playing, it works same as above in GameView.
    - As soon as I press Play, both game views show only the left objects! (and there is very weird ghosting inside the Rift).

    And again, if I set both cameras to Display1, with full viewport, it works really nice inside the Rift, but GameView shows only the Left eye.

    Is it possible to do what I'm after?

    P.S. I've attached a unity package with the 3 test scenes.
     

    Attached Files:

  12. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    how to get same in editor scene view?
     
  13. zmaxer

    zmaxer

    Joined:
    Jul 22, 2015
    Posts:
    4
    Thanks alot.
    For all the help
     
  14. toguae

    toguae

    Joined:
    May 8, 2018
    Posts:
    1
    3d View for binoculars you can check this website you will get your product easily they are selling lots of product and worldwide shipping

    Shop Online in Dubai
     
  15. finwefeanor

    finwefeanor

    Joined:
    May 11, 2017
    Posts:
    3
    It seems this is no longer available, maybe i am missing something but i assume google updated GVR package and there is no gvrmanager anymore. The point is, I couldn't find anyway to "enable stereoscopic view in the game tab". NurFace's tutorial also uses the old package i think so there is no headsetdemo in new package.
     
unityunity