google / model-viewer

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

Missing geometry on scene-viewer #3849

Open MajorMeerkatThe3rd opened 2 years ago

MajorMeerkatThe3rd commented 2 years ago

Description

When loading this model in the scene-viewer, parts of the geometry is missing. It should be three planes and three cubes, but only the three planes are visible. The GLTF seems to be in order, no issues when I check the model details on https://gltf-viewer.donmccurdy.com/. This does not happen in WebXR or when the scene-viewer was created via the model-viewer (with this page at least https://modelviewer.dev/editor/).

Is there a difference in how I load the scene-viewer compared to the example below? I couldn't find anything.

Live Demo

A very easy CodeSandBox to reproduce the issue: https://codesandbox.io/s/6rrwto

The model (three cubes and three planes): https://shapediverviewer.s3.amazonaws.com/v3/gltf/example.gltf

It works when I load the same model on the model-viewer editor and select "Default AR Mode to Scene Viewer". I looked at the code of the model-viewer and how the scene-viewer is loaded there and I could not find a difference.

Version

scene-viewer 1.0 / 1.1

Browser Affected

-

OS

AR

elalish commented 2 years ago

Can we have some screenshots of the difference between the two ways you launched scene viewer?

@AdrianAtGoogle Any ideas?

MajorMeerkatThe3rd commented 2 years ago

Hey @elalish ,

sure, so here you can see how it should look like and how it does look like when I start the scene-viewer via the model-viewer.

And here is how it looks like when loaded directly in the scene-viewer as I show in the CodeSandBox.

Cheers

ukito-pl commented 2 years ago

Hi, I am also experiencing this issue with missing geometry. Problem appears if more than one node has the same name! According to the GLTF spec, property "name" should not be interpreted as unique value, it is not even required. If I remove the name properties from nodes, everything works fine, but if two nodes have the same name it all breaks down. It really is a strange and very troublesome bug! Modifing all exsiting models to work around such a simple issue is a real pain.

Can we expect any fix soon?

MajorMeerkatThe3rd commented 2 years ago

Thank you @ukito-pl for finding what the issue is! Let's hope that there is a fix soon.

MajorMeerkatThe3rd commented 2 years ago

@elalish I tested it myself as well, it is really the name property of nodes. Once you remove the names (or assign unique ones), it works.

jukibom commented 2 years ago

Yep, verified here too - doesn't happen on a colleagues' old phone which hasn't updated SceneViewer (/Google app).

This model doesn't work, it breaks in weird ways (some submeshes become transparent, others fail to render entirely) Talia 1G.zip

This model works (same but manually edited the nodes with gibberish strings to make the names unique) Talia 1GTest.zip

Switching over to WebXR as a reasonable stopgap for now but SceneViewer still provides the best experience, sadly (especially on older devices)

elalish commented 2 years ago

@jukibom Can you give us some feedback on the experience delta? We'd really like to ensure WebXR has the best experience, so knowing the problem areas would be very helpful.

jukibom commented 2 years ago

Sure, I'll move that over to discussions to keep this clear (edit: https://github.com/google/model-viewer/discussions/2413#discussioncomment-3816595)

As for this issue, is there a way for this to be reported to Scene Viewer devs as a regression?

elalish commented 2 years ago

It's been reported and the regression identified. A fix should roll out over the next week or two.

goout commented 2 years ago

a same issue, hope on soonest fix

kremisi commented 2 years ago

I have a similar issue, hope it'll be fixed soon, I'm following this git to receive good news.