Marker based BabylonAr Demo not working

Hi, I was trying out the Marker-based Babylon AR Demo but it is not working. As soon as the camera opens up, the scene crashes, and the camera gets stuck there. I am referring to the following demo : https://www.babylonjs-playground.com/#A35FHZ#1
And marker for the demo which I am using is: https://raw.githubusercontent.com/syntheticmagus/BabylonAR/master/src/cpp/aruco-meta-marker-tracker/markers/meta_marker_0-1-2-3.png

I have tried this demo across different phones which support AR:

OnePlus 7T
Poco F1
Samsung Galaxy S10e

Plz suggest the solution

Pinging @syntheticmagus and @RaananW who may help when they come back from their vacation.

Yup @syntheticmagus is the mastermind behind this demo and should be able to help soon-ish

Hi surabhi_arora,

Thanks for your patience! The problem is with the logic for choosing a camera, which is not very robust and can end up attempting to start video on a camera it’s not allowed to access if the browser chooses to expose that camera ID. I’ll try to update BabylonAR and get a fixed Playground out later today, though I don’t think there’s a clean way to do this camera selection “automagically” in the general case so I’ll probably end up just adding a way to provide your own video texture when the “automagic” logic doesn’t work for your device.

With all that said, however, I would not necessarily recommend building too much on top of the BabylonAR way of doing this particular kind of AR because this capability might actually be supported through WebXR soon. I’m not sure that’ll be ready in the immediate future, and it almost certainly won’t work on all devices; but once it’s available and works on the devices you care about (which, given your list of Android phones, seems likely) that should definitely be the preferred approach. And, best of all, it’s already supported in Babylon.js! :smiley:

1 Like