Model-viewer: Support for "MESHOPT_compression" GLTF Extension

Created on 21 Apr 2020  路  3Comments  路  Source: google/model-viewer

I was recently looking into @zeux's work on https://github.com/zeux/meshoptimizer/
this is mind blowing compression tool

I can confirm that normal gltfpack compression with "KHR_mesh_quantization" works Model Viewer 0.10.0

but when I compressed the model with meshoptimizer codecs (-c) it didn't work on Model Viewer 0.10.0

I got

GLTFLoader.js:267 THREE.GLTFLoader: Unknown extension "MESHOPT_compression".

So ya it would be great to see this added to model viewer

A little how to is also mentioned here https://github.com/zeux/meshoptimizer/tree/master/gltf

this is the size I got when I did the compression

Screenshot 2020-04-21 at 11 45 05 AM

Thanks :)

Most helpful comment

The current draft is MESHOPT-prefixed but I am hoping that this extension will be standardized as EXT/KHR because it quite neatly fills large gaps in existing compression capability - it's not just animation, but even in geometry land point clouds and morph targets can't be compressed by Draco. Of course the plugins are welcome regardless :)

All 3 comments

@karanganesan in our tests we almost always got better results with Draco compression. but it would of course be welcome to have another supported extension but not sure what the performance implications are.

My assumption is that Draco comes out slightly ahead on raw geometry compression, but Meshopt decompresses much more efficiently on the client. Meshopt also compresses animation, which Draco does not. So, either may be a reasonable choice depending on your needs.

I don't expect a MESHOPT-prefixed extension would be supported directly by three.js, but there is interest in making THREE.GLTFLoader more extensible for customization (https://github.com/mrdoob/three.js/pull/19144). Support in <model-viewer/> would probably require that.

The current draft is MESHOPT-prefixed but I am hoping that this extension will be standardized as EXT/KHR because it quite neatly fills large gaps in existing compression capability - it's not just animation, but even in geometry land point clouds and morph targets can't be compressed by Draco. Of course the plugins are welcome regardless :)

Was this page helpful?
0 / 5 - 0 ratings