Skip to main content
korinVR
Honored Contributor
August 12, 2021
Solved

Oculus Integration 31.0 Passthrough API does not work

Has anyone managed to enable the passthrough function?
https://developer.oculus.com/experimental/passthrough-api/

 

I've tried the Oculus Integration 31.0 passthrough sample scenes, but I'm getting the error "Failed to initialize Insight Passthrough. Passthrough will be unavailable." OVRManager passthrough related options are enabled. I confirm I'm using Oculus runtime v31 and OVRPlugin 1.63.0, and the experimental system property is enabled.

 

<uses-feature android:name="com.oculus.experimental.enabled" android:required="true" />
<uses-feature android:name="com.oculus.feature.PASSTHROUGH" android:required="true" />

>adb shell getprop debug.oculus.experimentalEnabled
1

 

It seems OVRP_1_63_0.ovrp_InitializeInsightPassthrough() fails.

    korinVR
    korinVRAnswer
    Honored Contributor
    August 13, 2021

    I've just found the Passthough API only works on IL2CPP/ARM64. It might be one of the pitfalls.

     

    I brought confusion by starting this thread, so I wrote a step-by-step guide to build the passthrough scene.

     

    - Create a new 3D template project with Unity 2021.1
    - Open Build Settings and switch to Android platform
    - Open Project Settings and switch "Color Space" to Linear
    - IMPORTANT: And change "Script Backend" to IL2CPP and enable "ARM64" Target Architectures only
    - Open Project Settings > Install XR Plugin Management and click "Install XR Plugin Management", enable "Oculus" plugin
    - Import Oculus Integration 31.0 (and click "Yes" "Restart" "Upgrade" when dialogs appear)
    - Open the "AugumentedObjects" scene in Assets/Oculus/SampleFramework/Usage/Passthrough/Scenes
    - IMPORTANT: Select OVRManager and enable "Experimental Features Enabled" and "Passthrough Capability Enabled" (I feel the line "Requires Experimental Passthrough Capability enabled in the project settings" below is a bit confusing)

     

    - IMPORTANT: And you need to enable the Quest experimental system property. This property will be reset when you reboot the Quest.
      - Open Package Manager and install "Android Logcat" from Unity Registry
      - Open "Window > Analysis > Android Logcat" (make sure Quest is connected)
      - Select "Tools > Open Terminal" from the top-right button
      - Execute "adb shell setprop debug.oculus.experimentalEnabled 1"

     

    - Back to Unity and "Build and Run"

     

    Now it should work 🙂

    Katsuomi Kobayashi ( @korinVR ) at FrameSynthesis Inc.

    53 replies

    August 12, 2021

    You should check which version of the Oculus XR Plugin you're using in the package manager. There was a recent preview version that addressed an initialization issue similar to the passthrough issue people are describing here (only works if splash screen is enabled).

     

    [1.10.0-preview.1] - 2021-05-19

    • Fixed issue #1325113, where hand tracking was not working on Quest/Quest 2 when the Unity splash screen was disabled
    Participant
    August 13, 2021

    Nice to see my bug reports getting fixed

    dilmerv
    Meta Employee
    August 13, 2021

    Interesting, I've followed everything suggested here as well as doing many different tests but still no luck, all I see is a black background and no passthrough.

     

    Here're my packages just in case someone knows the issue:

     

        "com.unity.xr.management": "4.0.7",
        "com.unity.xr.oculus": "1.10.0",
     
    Unity Version: 2020.3.16f1
     
    I've also tested every single passthrough scene under SampleFramework > Usage > Passthrough > Scenes 
     
    I will keep testing and if I fix it I will post the solution.
     
    Thanks everyone

     

    korinVR
    korinVRAuthorAnswer
    Honored Contributor
    August 13, 2021

    I've just found the Passthough API only works on IL2CPP/ARM64. It might be one of the pitfalls.

     

    I brought confusion by starting this thread, so I wrote a step-by-step guide to build the passthrough scene.

     

    - Create a new 3D template project with Unity 2021.1
    - Open Build Settings and switch to Android platform
    - Open Project Settings and switch "Color Space" to Linear
    - IMPORTANT: And change "Script Backend" to IL2CPP and enable "ARM64" Target Architectures only
    - Open Project Settings > Install XR Plugin Management and click "Install XR Plugin Management", enable "Oculus" plugin
    - Import Oculus Integration 31.0 (and click "Yes" "Restart" "Upgrade" when dialogs appear)
    - Open the "AugumentedObjects" scene in Assets/Oculus/SampleFramework/Usage/Passthrough/Scenes
    - IMPORTANT: Select OVRManager and enable "Experimental Features Enabled" and "Passthrough Capability Enabled" (I feel the line "Requires Experimental Passthrough Capability enabled in the project settings" below is a bit confusing)

     

    - IMPORTANT: And you need to enable the Quest experimental system property. This property will be reset when you reboot the Quest.
      - Open Package Manager and install "Android Logcat" from Unity Registry
      - Open "Window > Analysis > Android Logcat" (make sure Quest is connected)
      - Select "Tools > Open Terminal" from the top-right button
      - Execute "adb shell setprop debug.oculus.experimentalEnabled 1"

     

    - Back to Unity and "Build and Run"

     

    Now it should work 🙂

    Katsuomi Kobayashi ( @korinVR ) at FrameSynthesis Inc.
    dilmerv
    Meta Employee
    August 13, 2021

    Super cool and I was about to try ARM64 thanks, let me try it and see if it works, I appreciate your feedback

    dilmerv
    Meta Employee
    August 13, 2021

    I can also confirm that IL2CPP/ARM64 does the trick, I will post my GitHub project tonight for anyone to try it out.

    August 13, 2021

    Katsuomi you are da bomb!  Huge kudos - the "Script Backend" to IL2CPP and enable "ARM64" were what I was missing...

    JeffNik
    Honored Contributor
    August 13, 2021

    I just built my own basic scene - without starting from one of the sample scenes, and got it to work (THANKS KARSUOMI!)... Note that the "Passthrough API" developer page that tells you how to set up the scene seems to omit that you need to add an "Overlay Passthrough" script on a objeect in your scene. Thanks for all your research, folks!

    Fectar
    Participant
    August 13, 2021

    I Stopped trying.
    Have tried Unity 2019 and 2020
    Have tried IL2CPP and ARM64
    Have tried Clean project
    Have tried OpenGL3 and Vulkan
    Have tried Enabling it on the Camera
    Have tried adb shell getprop debug.oculus.experimentalEnabled

    Still getting a black background and an error in logcat.

    Fectar
    Participant
    August 13, 2021

    Final try with 2021.1 seems to have fixed it... korinVR your tutorial worked like a charm!

    dilmerv
    Meta Employee
    August 14, 2021

    All,

     

    I ended up creating a new GitHub repo with solutions from everyone here, shoutout to korinVR for the amazing work and provided solution on target architecture and scripting backend which helped me solve this.

     

    This GitHub Repo has been tested with 2019 LTS and 2020 > 

    https://github.com/dilmerv/OculusPassthroughDemos

     

    Also I made a YouTube video showing the process step by step:

     

    Thanks everyone and I can't wait to keep testing MR with Oculus Quest 2 !

     

    Dilmer

    August 15, 2021

    In my project, the OpenXR plugin was automatically set as active. If you're running into issues, do everything in the post marked as solution and then go
    Oculus > Tools > OpenXR > Switch to OpenXR

    Did a quick test in Gravity Lab
    https://twitter.com/MarkSchrammVR/status/1426813781624066057

    Participant
    November 9, 2021

    Has anyone had pass through suddenly stop working for Unity builds? I just started developing this weekend with Quest 2. I had a helluva time getting it working, but after finding the adb command and checking everything else, I finally got it working yesterday. I ran one of my builds this morning, it was working fine. After work, I fired it up again and no more pass through. I’ve reset multiple times, running the adb setprop after each restart. Adb returns 1 when I do a getprop. I’ve rebuilt and downloaded other projects that should work, but pass through just wont activate in Unity apps. I can turn it on just fine by double tapping. It’s really, really frustrating. It’s like dev mode in a bad state or something. Logcat throwing ‘Failed to initialize Passthrough’ again. 😞 

    Up and Coming
    November 9, 2021

    I could not get passthrough working no matter what I tried, including all of the suggestions in this thread. The Quest 2 I was using is on runtime 34.xxx, I have another Quest 2 still on runtime version 33.xxx and the example worked like magic. Is it possible your Quest updated its runtime? I am not sure when 34 was released...