WebAR demo of creating depth image of real-world using 'depth-sensing'

Hi BJS devs, I’m new in the forum. :wave:

I’ve worked on a WebAR demo project that use ‘depth-sensing’ feature.
The demo shows a realtime depth estimation on Chrome for Android.

WebXR Depth Sensing Module is an experimental API of WebXR Device API, and I’ve been interested.
I published this project on my GitHub.

Thank you!!

11 Likes

Loooks great !!! @RaananW I wonder if there are any part that should be added in Babylon ?

1 Like

We have an open issue for that, I just never managed to get started.
Depth sensing is very interesting. especially the way the data is being provided to you (CPU/GPU data is available).
I am constantly trying to find time to implement those wonderful features. On my TODO list for sure :slight_smile:

1 Like

Ahh cool, let me add the PR here is someone wants to follow it: [XR] Implement an AR Depth Feature · Issue #11876 · BabylonJS/Babylon.js · GitHub (Please correct me if it is the wrong one)

3 Likes

If one day Apple stop being a jerk with mobile web I will be able to test :wink:

1 Like

You have a flag you can enable in the settings! It does nothing, but it’s there. Thank you apple for adding a useless on/off switch :upside_down_face:

2 Likes

Agreed!

they do have a bunch of useless on/off switches, that’s why i switched to android.

:rofl::joy:

1 Like

Woah very cool demo! It’s impressive how many cool new features get added in AR every day :open_mouth:

1 Like

highly cool demo – @drumath2237. I really like how you used dom-overlay feature real-time like that with grayscale. very easy to read repo as well. thank-you for sharing.

there is a doc on how to add XR features - i feel it’s missing some nuances of considerations like enter/exit vr type of things, but it’s a good starting point if somebody in the community had time:
WebXR Features Manager | Babylon.js Documentation (babylonjs.com)

2 Likes

Thank you so much for your reply.

I have started to try to implement the WebXR depth sensing feature somehow. (with some API proposals)
However, this is still a work in progress.

I’d like to ask someone’s opinion because I’m not familiar with contribute open source projects.
@sebavan @RaananW

With my mobile phone, Google Pixel 4a 5G, I have checked it works correct with cpu-optimised mode (it seems that pixel 4a doesn’t support gpu-optimised mode)

2 Likes

Looks cool, I ll leave it to @RaananW as I know pretty much nothing about XR :slight_smile:

That looks great! If you want help to open a pull request so I can review the code please let me know.

We always make sure that the feature is fully configurable and fully documented.

1 Like

Thank you @RaananW !
I’ll open a draft pull request now.