Documentation on Pass through?

I have an existing model viewer that I am going to add pass through to in VR mode but can’t find any documentation on how to do that - I am looking at the sample scene but will there be docs on this?

Original Post on Discord

by user 103054507105067008

You mean AR passthrough on Quest etc.?

The difference is just that it’s AR not VR – that’s it. In an AR session we get the proper background blending mode passed from Quest and react to that by setting the background color to alpha=0, so that the AR composited image shows through

I think I’ve figured it out thanks

by user 103054507105067008

Cool! Mind letting me know what was unclear / how we can improve the docs?

I simply had to add the passthrough UI script and look at how it worked differently to open Passthrough. I was migrating an AR scene to it so I had to separate out the hierarchies of XR Rig and WebAR Session root separately

by user 103054507105067008

You mean “passthrough UI” from the presence platform sample?

I did find the Web AR session root sort of worked in passthrough AR but it wasn’t showing the reticle for placement on surfaces as expected but it would randomly appear mid air - I’ve opted to not let WebAR Session Root do anything in passthrough or VR

by user 103054507105067008

yup!

by user 103054507105067008

That does the same, regular WebXR with the AR button will give you passthrough already on Quest 2 / 3 / Hololens etc, PassthroughUI just calls it “Passthrough” instead of “AR” since some people were confused, and adds that “Open on Quest” button

So “I want pass through on Quest” == “add WebXR component and make sure AR is on” → done

Nice and easy how you did that

by user 103054507105067008

@herbst🌵 How can I tell if we are in AR in a VR headset, as in AR passthrough/mixed reality? I got it checking for AR which fires for AR mobile and Quest Passthrough then VR fires for VR in Quest but I want to detect if I am on mobile AR or VR headset AR

by user 103054507105067008

At this point you’re basically in “feature detection land”, from a WebXR perspective both is the same -

  • you can use isQuest() to detect the Oculus browser;
  • you can check if this.context.xrCamera is mono or stereo
  • you can check if input sources are tracked-device or screen

really depends on what you want to do differently in an AR session on a phone or on a headset

Mainly just reparenting of a 3d object to the XR rig and hiding any AR mobile stuff

by user 103054507105067008

How do you check if this.context.xrCamera is stereo or mono?

by user 103054507105067008

It’s a camera array so either has one or more elements

“more” is also e.g. for Looking Glass and other fancy devices - then it’ll be like 42

it’s of type ArrayCamera then