google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.68k stars 799 forks source link

WebXR Depth Occlusion Support #3534

Open hybridherbst opened 2 years ago

hybridherbst commented 2 years ago

Description

Seems this has shipped in Chrome a while ago and would bring model-viewer's WebXR closer to SceneViewer parity. https://chromestatus.com/feature/5742647199137792 I'm not sure if there's already a three implementation but thought it's worth opening this here. Might be related to some of the post-processing feature requests (bloom, AO, etc.).

OS

AR

akssieg commented 2 years ago

I started working on figuring out how to put together depth occlusion + light estimation + hit test with WebXR. Is there a plan to support these things via Model-Viewer? How much is the project time frame?

elalish commented 2 years ago

depth occlusion hasn't been added for the same reason that xr-environment is not on by default: it doesn't meet our quality bar. I actually find myself generally turning off the depth occlusion feature in Scene Viewer because it was confusingly wrong so often. Then again, I haven't tested in a while - has AR Core improved here?

hybridherbst commented 2 years ago

I generally agree, but for context we do have some projects where clients inquire about depth occlusion (or rather, complain about the lack of it). It's not something that I'd want to have on by default for everything for sure, but project-specific it can make a lot of sense.

AR Core's depth occlusion unfortunately still isn't great. I think iOS went the better way there (they're only doing a depth-aware people mask, not general scene depth)...

elalish commented 2 years ago

PRs welcome!

amin-prvn commented 1 month ago

Hi @elalish, I'm using latest model-viewer version and use ar-mode scene-viewer, I want to use object blending (depth api) option but it has not been shown in right top of the screen, but also in some app like ikea I saw that is show and you can enable and disable it. Is there any way to have this option in scene-viewer provided by model-viewer? My website: IMG_2964 Ikea app: IMG_2963

elalish commented 1 month ago

Is the option not available under the ... menu? I thought we only had it off by default.

amin-prvn commented 1 month ago

Is the option not available under the ... menu? I thought we only had it off by default.

No this is not in 3dot menu, how can I enable that?

elalish commented 1 month ago

I honestly don't know. @AdrianAtGoogle is there a way to allow depth occlusion to be toggled by the user while having it start in an off state?

amin-prvn commented 1 month ago

I honestly don't know. @AdrianAtGoogle is there a way to allow depth occlusion to be toggled by the user while having it start in an off state?

Tnx for your attention. Actually depth occlusion not working at all in scene-viwer, also this is good to toggle it on/off. Hi @AdrianAtGoogle can you help us in this subject?

elalish commented 1 month ago

Actually, maybe I should have pointed this to @eugenecys instead.

amin-prvn commented 3 weeks ago

Actually, maybe I should have pointed this to @eugenecys instead.

Thank you for your response, but no one answer me. Do you have any idea how can i activate depth option when using model-viewer ar-mode : scene viewer?

Hi @eugenecys can you help me?