WebXR - No immersive-ar + stereoscopic vision?

So I want to make a simple scene where I can walk around AND use my glasses (so 2 cameras, one for each eye)

From github I see we we need to choose “immersive-vr” or “immersive-ar” .

Is this a technical limitation I’m not aware of?

I feel like, if we know the camera’s position and rotation from “immersive-ar”, we would be able to, in the worse case scenario, render “immersive-vr” with that info

Adding @RaananW our XR expert to the party

WebXR asks you for the type of session you want to start in order to make sure your device supports this mode. So yes, you will need to provide one of them. On certain devices AR will also provide the camera feed, which you might not want in a VR scenario.

It’s not possible to start both sessions at the same time.

Thanks, now I understand that, I guess it’s as when you make the context in webGL

Please let me rewrite my goal as I may be using the wrong terms. I want to wall around while using glasses.

What glasses? AR glasses like the hololens? VR glasses like the quest? What other features do you want to use? Do you care about detection of walls? do you want to place something on the floor?

Hi RaananW

I took some days to try myself, read all the documentation and experiment

I want immersive-ar with Stereo Camera

I tried to change the camera myself, but no luck. Also, editing the canvas has no effect

Oh, and I’m using my own phone with simple Google glasses, basically a holder. No Oculus or similar

It all depends on your device capabilities. A phone is not capable of rendering 2 eyes for AR, only for VR. The hololens (for example) can render 2 eyes AR experiences.

Why is that? I mean, from WebXR we get the camera’s relative position and angle. After that, I feel is just a normal Babylon application.

Walking in a virtual environment with a real 3D effect (Stereo Camera)

I’m using a Samsung S20 Pro, but my target is any phone with WebXR

Oh, but the camera feed is just single camera, is that?
What about fully virtual environment? walking + Stereo Camera without AR?

I guess you should ask google :slight_smile:

AR requires the app to show you “what you see” as a background. The phone is not able to simulate your eyes, it has a single camera it is using for AR scenarios.

That is VR, not AR. You can do that, sure. You will need a cardboard-style device (or the deprecated google daydream) for that to work properly

But when I use “immersive-vr” with the helper, I can’t walk

That’s because the device doesn’t support tracking.
If you want tracking in VR you will need to use a device that supports it. Those are hardware limitations that we sadly can’t help with

Thanks a lot

1 Like