Skip to main content
New Participant
September 9, 2015

OVRMirror (different content on main screen) help needed!

Hi
My goal is to develop an experimental setup where a subject is wearing a rift, performing a task and the operator gets some feedback icons showing on the main laptop screen, not visible through the rift.

I tried different things ending nowhere, and OVRMirror seems to be the best solution, attaching it to a third camera, child of LeftEye. But I get a black window! I'm using UNity 4.6.3 pro, Oculus 0.4.4 and DK1 Rift under Windows 8.
Anybody having the same problem could manage it and make it run properly?

I also read about a solution extending desktop and customizing viewport , but I imagine that it would require to hack OVR native scripts, which I don't feel comfortable with!

Any help will be much aprreciated!!!
Thanks
    This topic has been closed for replies.

    24 replies

    Up and Coming
    October 23, 2015
    It would be nice to have the ability to turn the HMD on and off somehow. I can delay the activation of the OVRManager gameobject to turn on the HMD at will, but there seems to be no way to turn it back off until the application closes, including the editor. It would also be nice if we could detect the presence of the HMD without turning it on.
    Inspiring
    October 23, 2015
    The C++ SDK has this function for testing the presence of the headset.

    Added ovr_Detect to OVR_CAPI_Util.h , which enables you to detect the presence of a headset without initializing LibOVR. This can be useful when a game has VR and non-VR modes.

    Not sure if that will be in Unity as well.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    October 24, 2015
    In Unity 5.2.2p1:
    VR: A camera can now target the main display backbuffer in VR mode by setting "Target Eye" to "None (Main Display)".
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux) Jungle Juice Sven Co-op
    Up and Coming
    October 27, 2015
    VR: A camera can now target the main display backbuffer in VR mode by setting "Target Eye" to "None (Main Display)".

    Anyone got this working?

    I've added a second camera, and set it's target eye to None. Also tried tagging it as MainCamera.

    main_display.png

    But I still see the VR Camera on the mirrored display...
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    October 27, 2015
    I haven't tried it yet, but based on my previous experiments with getting something else to display to the main window (viewtopic.php?f=37&t=27051), you have to disable mirroring at runtime by setting VRSettings.showDeviceView to false. Then the main display camera should appear in the window. I'm planning to try it soon as the other post I was using OnGUI to draw render textures to the main display. It would be nice to bypass that extra step. Please report back if disable mirroring fixes it.

    ccs
    Up and Coming
    October 27, 2015
    CCS: It was a good idea - but didn't work. 8-(

    Setting VRSettings.showDeviceView = false makes the mirror display solid background colour (whether a secondary camera with target eye none is present in the scene or not). Tagging it as MainCamera had no effect. Changign depth under/over the VR Camera had no effect.

    I'm on the latest 0.8 runtime.
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    October 27, 2015
    Target eye "none (main display)" doesn't work for me either. I see same blue screen in the window. In addition, my other post using onGUI drawTexture no longer works starting with 5.2.1p3, and I think it may be related to this. When you set VRSettings.showDeviceView to false now, there is this new thing they added in 5.2.1p3:

    (721694) - VR: Fixed VRSettings.showDeviceView showing the last frame in the VR headset. Now clear's to camera's background color.

    I'm guessing they are clearing every frame and it writes over what was there. Seems like some kind of camera order/depth issue so all you get is background color from VR camera.

    I'm going to play around a bit more and report to Unity if I can't figure it out.

    ccs
    October 27, 2015
    Confirmed and filed a bug report to Unity. I sent them my example project from the other thread which I changed around to show both OnGUI and target eye "none (main display)" is broken. 99% sure it is related to that bug fix they put into 5.2.1p3. I think this is the case because while running, you can click on the VR camera and change clear flags to "Don't clear" and then the main window camera and OnGUI will work again (don't try to use VR in this mode!!!!).

    So they are incorrectly applying the clear flags every frame, and it seems to ignore the camera depth as well. I tried adjusting depths thinking that might fix it, but no luck.

    ccs
    Up and Coming
    October 28, 2015
    Thank you CCS for confirming that and raising a bug!

    Also I found Canvas UI rendered to Screen-space no longer appears on the mirrored display as well. :-(

    Could you update your bug to mention that?
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    October 28, 2015
    I couldn't update the bug report directly, but I did respond the bug case email.

    Here is a link to the bug I filed on Unity:
    https://fogbugz.unity3d.com/default.asp ... l67j0fs7vl

    I'm sure they will fix this soon. It is too glaring of an issue not to, and they clearly were trying to add support for main window rendering based on the release notes.

    ccs