google / model-viewer

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

Switch from glTF-Sample-Models to the newer glTF-Sample-Assets #4534

Closed bhouston closed 11 months ago

bhouston commented 11 months ago

Per a previous discussion here, I have switched from the obsolete glTF-Sample-Models git repository for the various models used in the fidelity test to the newer glTF-Sample-Assets repository. I have also switched from a custom git checkout script to just using git submodules.

I had to remove a few tests from config.json unfortunately as they were relying on models that are not available in glTF-Sample-Assets because of licensing issues.

bhouston commented 11 months ago

Render Fidelity tests were initially failing because of submodule support issues. But I got those fixed.

Now they are failing because of this difference in the Khronos-TextureTransformMulti-Test - specifically the normal rows look different:

Screenshot 2023-10-25 at 9 37 15 AM

I am investigating it now.

bhouston commented 11 months ago

It looks like this change to the underlying asset makes the different renders appear to render more similar results. Thus I suggest we update the goldens for model-viewer & filament and go with this.

This is based on this analysis - that Babylon and gltf-model-viewer do not change their results, but the end results for everyone is much closer. I suspect that the way the normals were done before were exposing a bug in model-viewer and filament that was not handled but now that the asset is a bit more standard, that bug is no longer exposed.

BabylonJS's results on this test do not differ:

Screenshot 2023-10-25 at 9 41 57 AM

And filament results differ like model-viewer/three.js:

Screenshot 2023-10-25 at 9 43 41 AM

But gltf-model-viewer does not differ:

Screenshot 2023-10-25 at 9 45 31 AM

elalish commented 11 months ago

I agree with your analysis and suggestion - this is a pretty common type of update we need to do as sample bugs get fixed.