Seeking Expert Tips: Keep Large AR Models Stable in WebXR

:thought_balloon: Problem Summary:
When tracking a house model (parent mesh with 100+ child meshes) from a wall-mounted marker in WebXR, the model drifts 40cm at 2 meters distance . I need stability within 5cm even at 20 meters .

:building_construction: What I did is that when tracker found, then place an anchor with the marker and attach it to the node.

Expected Result: House stays anchored within 5cm of its real-world position, even If I am at 20m far from the marker.
Actual Result: House drifts 40cm If I am at 3m far from the marker.

:books: Playground Request:
If any expert here can give me advice on what to do, I’d really appreciate it! Or, if you can share a minimal WebXR example demonstrating stable large-model anchoring at a distance, it would help debug!

I tested on chrome android for 3 phones that gave the same results.

(Tags: webxr ar #Drift #3DModeling)

Hello and welcome :slight_smile:

I’m not sure that your issue depends on either BabylonJS or WebXR
Specifically, about this :


I don’t know exactly what VR/AR headset you are using, but taking the Quest3 as an example :

  • The rotation tracking will remain good on far distances (angle measurement between camera features works whatever the distance)
  • The position tracking is AS BAD as the distance is big. Basically, it’s done using a variant of multicamera SLAM which is highly depend on binocular parallax : the multiple camera have a distance between each other (let’s say 15cm) and the shift of features from a camera to another ables to compute distance and therefore position tracking. The farest the distance, the more precise angles need to be, which quickly reach the limit of pixel-precision of cameras

That said, 40cm shift at 3m is not normal :thinking:
Do you have some tracking issues at the same spot (in front of the house) in other VR apps ?

A lower framerate might also impact the tracking. What is your FPS/frametime currently at?

I didn’t test but it’s not lagging, so i think 30-60 fps

I am using an android smartphone, not a headset.
so you mean there us no solution for that if my phone got far away from the mesh?

Outch, ok. I understand now ^^

I’ll let other experts speak, but to my mind I’m afraid you have no chance with Smartphone… WebXR for smartphones is mainly based on monocular version of SLAM… Eventhough some smartphones can handle pretty good depth sensors, you will always have very poor result on position tracking at far distance, due to lack of paralax… Still, rotation tracking should be ok though

Ok so you mean if the user used a more advanced AR headset, then the accuracy will be so much better?

For sure.

Cool, but I still want the best practice way to setup anchors in the scene with the image or multi image tracking to get the best results.
hope someone have experience with that.