Search Unity

Question Enabling passthrough for both Meta and Pico using OpenXR

Discussion in 'VR' started by Yann_de_Couessin, Apr 27, 2023.

  1. Yann_de_Couessin

    Yann_de_Couessin

    Joined:
    Jan 2, 2015
    Posts:
    39
    Hey !

    I was wondering after following many tutorials what was the best solution the get a passthough experience for both Meta and Pico users.

    AFAIK, there isn't a "Passthough OpenXR" yet so I'll have to use 2 rigs : OVR and PXR based prefabs but is there a clean way of making a unique XR RIG that enables passthough selectively ?

    Thanks for your time !
     
  2. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    501
    The rig itself doesn't need passthrough components, you just need to add the relevant Oculus components (at runtime) / call the pico sdk and set the camera clear color to 0,0,0,0.
     
    DevDunk likes this.
  3. Yann_de_Couessin

    Yann_de_Couessin

    Joined:
    Jan 2, 2015
    Posts:
    39
    DevDunk likes this.
  4. Yann_de_Couessin

    Yann_de_Couessin

    Joined:
    Jan 2, 2015
    Posts:
    39
    So here's a little update regarding your advice @Thomas-Mountainborn :

    • One RIG like you said, based on the Complete XR Origin Hands Set Up prefab.
    For that I used XR interaction toolkit with XR Hands

    upload_2023-5-11_13-12-47.png

    • One gameobject per platform with specific scripts (including passthrough activation stuff)
    upload_2023-5-11_13-13-11.png
    upload_2023-5-11_13-13-31.png

    • One RoomscaleManager that allows me to handle and memorise alignement regarding to a physical roomscale. It includes an enum (Active build) where you can choose between Meta, Pico and ARCode. The chosen platform will then enables required scripts at start.

    upload_2023-5-11_13-15-24.png

    I'm sure there's plenty of room for improvement since I'm a C# junior but it works like a charm and I can work on a unique UI with different UXs (VR or AR) without 3rd party stuff thanks to Unity's interaction toolkit and NGO.
     
    Last edited: May 12, 2023
    DevDunk likes this.
  5. mrphilipjoel

    mrphilipjoel

    Joined:
    Jul 6, 2019
    Posts:
    60
    In my project, we really want to avoid using the Full SDKs, and are wanting to just use OpenXR, but seems like, you can't get passthrough with OpenXR alone, well, maybe you could with Oculus now, but not with Pico, because they aren't updating their OpenXR plugin anymore.
     
    Yann_de_Couessin likes this.