google / model-viewer

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

Auto Generated USDZ flipped Normals #4434

Closed CrystalDesignMT closed 9 months ago

CrystalDesignMT commented 1 year ago

Description

When opening QuickLook with certain GLB's (exported by BABYLONJS) the auto-generated USDZ has flipped normals, causing Backface-Culling to render wrong faces. If i flip the Normals on the Model myself it is wrong in the 3D Scene but right in QuickLook AR.

As said this only happens on certain Models but i can't tell why, it certainly is a bug on one side ModelViewer or QuickLook but if you could tell why these Models are affected that could also be sufficient.

Live Demo

https://glitch.com/edit/#!/boatneck-twisty-bellusaurus?path=index.html%3A40%3A0

Version

Browser Affected

OS

AR

elalish commented 1 year ago

Actually, I would say it's most likely a bug in the three.js USDZExporter, @mrdoob. Thanks for including the repro model!

hybridherbst commented 10 months ago

Adding myself here 👀 There's no bug opened on the three.js side yet, right?

elalish commented 10 months ago

Not that I'm aware of.

CrystalDesignMT commented 10 months ago

Ok seems like a WebGLRenderer <-> QuickLook thing as explained in the three.js issue where they handle negative scaling differently. I guess nothing one can do here other than avoiding negative scaling.