google / model-viewer

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

scaling problem #1713

Closed FlowmasterVFX closed 3 years ago

FlowmasterVFX commented 3 years ago

Under android ar button, my 3d objects scale about 5 to 10 times too big in the scene, so that the object can no longer be recognized as such. When I try other examples from the web, it is always correct. I am using Cinema 4D R23 and there is a known problem with exporting GLB. Therefore I tried different online converters (obj to glb) and also exported 3D objects from Blender as glb. It's always the same scaling problem. Does anyone know a solution? Here is an example with the scaling issue from me: https://kuckkuck.com/portfolio/case-4/ Many thanks Chris

elalish commented 3 years ago

glTF models are always in units of meters according to the spec. A common problem is that an editor may be using different units and not bother converting to meters on export. Opening the GLB in another editor won't help, because it will assume the units are correct. You'll need to determine the scale error yourself and apply it manually to the root node, either in an editor or even by hand editing the JSON.

elalish commented 3 years ago

And make sure to file a bug on Cinema 4D! They must export GLBs as meters to be spec compliant.