Jump to content

OpenXR Passthrough not working (Unity)


Recommended Posts

Hi!

I've been building my app in unity (2021.3.33f1) and bumped into an error log:

"CompositionLayerPassthroughAPI HTC_Passthrough feature instance not found."

Passthrough worked in previous version of the app. Now I just get black background. I'm using "VIVE OpenXR Plugin 2.2.0" with enabled Composition layer and Passthrough features in the XR Plugin Management. I'm also starting the passthrough with:

void OnEnable()
    {
        ID = CompositionLayerPassthroughAPI.CreatePlanarPassthrough(LayerType.Underlay);
    }

What might be an issue there? Please help!

Link to comment
Share on other sites

  • 1 month later...

Hi @MichalSun @pmanakhov,

Could you double check again if Composition Layer and Passthrough is checked?

If it is checked, could you try unchecked and checked again?

image.png.b45ec2b8a463d0a3d52bd78d5368092e.png

And, will it work using our sample scenes under "Assets\Samples\VIVE OpenXR Plugin\<version>\VIVE OpenXR Samples\Samples\Passthrough\Scenes" folder?

image.thumb.png.26ad9ae08abd4109da6b85438161dca9.png

Link to comment
Share on other sites

  • 3 weeks later...

I ran into the same problem. The sample scene worked fine, so I looked at the differences. and found that I had to change the camera settings.

You need to set Clear Flags to Solid Color and then background to a color with 0 opacity.

I think it would be good to mention this in the explanation at
https://developer.vive.com/resources/openxr/unity/tutorials/passthrough/

It now only describes that you should copy the gameobjects from the sample scene, but if you already have a camerarig in your scene you don't want to do this.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...