google / model-viewer

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

Update to v1.10.0 causing an issue with 3D model textures #3126

Closed PlainVisual closed 2 years ago

PlainVisual commented 2 years ago

Description

I created a personal project were i used Google modelviewer to display a 3D model in a webbrowser. This was done with v1.9.1 at the time. I noticed yesterday that my textures have problems. They look glossy and at some angles shows a strange patern.

I found out that there is an update to v1.10.0 and when i downgrade to v1.9.1 the issue is gone. I'am not a developer but can somebody help me out how or what this problem is causing with version 1.10.0.

I created the textures in substance painter and exported to gtlf 2.0 and then to an .glb file. Next was to compress the textures to KTX2.0 and used KHR_draco_mesh_compression

It was working fine before the update.

I can fix it with downgrading to v1.9.1 but need some advice to what causing the issue in v1.10.0. The link below is showing the model with the issue. I wait for the reactions before i fix it online to an older version.

Model with v1.10.0

Google-model-viewer-v1 10 0

Model with v1.9.1

Google-model-viewer-v1 9 1

Live Demo

https://webxr.michelvdlinden.nl/

Version

Browser Affected

OS

AR

elalish commented 2 years ago

That's very interesting, but when I drop your model into our editor it looks correct. I notice no your page that when I type __THREE__ into the dev tools console I get r137dev instead of r136 like I get with the latest MV. Are you somehow loading another version of three.js? It seems like they might be conflicting somehow.

PlainVisual commented 2 years ago

Hello Elalish,

Indeed in the editor the model looks correct. Thats whats strange about it.

I only use the provided documentation on the Google model viewer website. With previous version no issue. So not loading another version of three.js. I also suspect its three.js but how?

This is the scripts from the website; https://unpkg.com/focus-visible/dist/focus-visible.js https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js

When i go back a version no problem; https://unpkg.com/@google/model-viewer@1.9.1/dist/model-viewer.min.js

Then i see r133 and all looks fine

I think that version 1.10.0 is loading the r137dev

Is it possible to fix so that the model is displayed correct...

elalish commented 2 years ago

Arg, you're right! I must have had it linked locally when I built the npm version. Ugh; okay 1.10.1 coming shortly.

PlainVisual commented 2 years ago

Thanx for your quick response. Glad I could help out otherwise i was putting in the hours to figure out what was wrong with my model.