Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Oculus Mixed Reality Passthrough Mode API Via XR integration

Discussion in 'XR Interaction Toolkit and Input' started by slippyfrog, Aug 31, 2021.

  1. slippyfrog

    slippyfrog

    Joined:
    Jan 18, 2016
    Posts:
    42
    Hey folks,

    I've built my game and libraries on top of XR Interaction. With the mixed reality support just exposed on Oculus 2, is there a way I can integrate the pass through features while still maintaining use of the XR Interaction infrastructure?

    Is this planed to be exposed in the Unity XR API at some point? or would I need to port by work back over to the Oculus Integration framework to support mixed reality?


    Thanks
     
  2. dpcactus

    dpcactus

    Joined:
    Jan 13, 2020
    Posts:
    53
    You can run Oculus Integration together with XRI. You only need to add the VR Folder from the Intergration and add an OVRManager to the scene. The rest can stay the same. Cactus Cowboy Passthrough works this way.
     
    tenconmar and slippyfrog like this.
  3. slippyfrog

    slippyfrog

    Joined:
    Jan 18, 2016
    Posts:
    42
    @dpcactus - thanks for this info. I'll give it a shot!

    ** updated ** doubling back to verify, that dropping the OVRManager and OVRPassthroughLayer into the project did the trick!
     
    Last edited: Sep 5, 2021
    tenconmar likes this.
  4. OsamaElsharkawy

    OsamaElsharkawy

    Joined:
    Dec 1, 2017
    Posts:
    1
    @slippyfrog
    How did you manage that exactly?
    I’ve tried adding 1) OVR Manager + 2) OVR Passthrough Layer to the scene
    Beside the original XR Rig, and I had no luck
    Can you please tell how did you handle it in your situation
     
  5. aweed

    aweed

    Joined:
    Dec 19, 2021
    Posts:
    1
    Hi! I did the same , but no luck , please share how you did this , thanks!
     
  6. yolin2863

    yolin2863

    Joined:
    Jan 31, 2022
    Posts:
    1
    I put an OVR Manager in the scene, next to the XR Rig. Then added an OVR Passthrough Layer component to the XR Rig itself. It worked for me. Hope it helps!
     
  7. ForliReply

    ForliReply

    Joined:
    Dec 14, 2018
    Posts:
    4
    Also i can't activate passthrough with xr rig
     
  8. ForliReply

    ForliReply

    Joined:
    Dec 14, 2018
    Posts:
    4
    I think I found the problem, with the HDR field disabled on the referenced URP Pipeline assets, it works.
     
    avivXR likes this.
  9. efermerides

    efermerides

    Joined:
    Nov 23, 2020
    Posts:
    11
    Ok after much finagling here's how I got it to work. Used this article as a base (great tutorial) https://skarredghost.com/2021/10/01/how-to-passthrough-ar-oculus-quest-unity/ But do not follow the advice he gives on using XR Interaction kit (I tried it, seems probably no longer valid).

    Here's what worked: upload_2022-11-20_23-3-41.png

    I think the key was adding the 'XR Origin (Action based)' to the scene AFTER adding the OVRCameraRig.
    It doesn't add a Main Camera object to the XR Origin.
    Also make sure, that the CenterEyeAnchor is enabled (checkmark to the right of the blue camera icon):
    upload_2022-11-20_23-9-56.png

    @ForliReply the HDR enabled or disabled in the settings didn't seem to make a difference, for some reason :|

    Here's the setup:
    upload_2022-11-20_23-19-13.png
    and
    upload_2022-11-20_23-20-17.png
     

    Attached Files:

    Iwakura_Lain likes this.
  10. efermerides

    efermerides

    Joined:
    Nov 23, 2020
    Posts:
    11
    UPDATE:

    ***Getting XR interaction CAMERA + CONTROLLERS to work with Passthrough (using OVR camera rig)***

    1. Install the XR Interaction Manager package (seems to be important to do this BEFORE adding the OVRCameraRig from the Oculus Interaction)

    2. Follow the project and scene setup as described in this excellent tutorial https://skarredghost.com/2021/10/01/how-to-passthrough-ar-oculus-quest-unity/

    3. Place the OVRCameraRig inside the XR Origin (Action Based)

    4. Set the CenterEyeAnchor camera as Main Camera in the XR Origin (Action Based)

    5. Disabled the Main Camera in the XR Rig.

    6. Disabled the Left and Right hand anchors
    upload_2022-11-23_13-25-28.png

    7. Make sure the interaction managers selected for your controllers and interactables is the XR Interactions Manager (and NOT the OVRCamera rig or anything to do with the Oculus Integration)
    upload_2022-11-23_13-35-28.png upload_2022-11-23_13-37-43.png
     

    Attached Files:

  11. linus_geewe

    linus_geewe

    Joined:
    Nov 27, 2019
    Posts:
    1
    Hey, thank you so much!! I found this post after 7 hours of trying to set things up, it works fine on the Quest Pro.

    As an addition for beginners: This video explains how to set up the XR Interaction Handcontrollers:


    Cheers!
     
  12. vardnan

    vardnan

    Joined:
    Apr 16, 2022
    Posts:
    5
    Does anybody know if it is possible to make the passthrough API work with the OpenXR plugin? It seems to work when ONLY the Oculus plugin is enabled in XR plugin management, but when either OpenXR or both is enabled, the background simply turns black.

    I am trying to use the hand-tracking feature from XR Toolkit 2.3.0, which required the OpenXR plugin to be enabled, and ideally, I would combine this with the Oculus Passthrough API.
     
  13. FarmerInATechStack

    FarmerInATechStack

    Joined:
    Dec 28, 2020
    Posts:
    57
    This thread is helping me right now: https://forum.unity.com/threads/pos...ough-api-work-with-the-openxr-plugin.1412400/

    EDIT: just realized you're the OP :rolleyes: thank you for kicking off that additional thread and I'll keep this here in case anyone is looking in the future too. I'm also actively investigating this. If you want to stay in touch, you can find me on Discord or GitHub at the following username: farmerinatechstack.