-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for "MESHOPT_compression" GLTF Extension #1164
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 (mrdoob/three.js#19144). Support in |
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 :) |
FWIW this extension is available as EXT_meshtopt_compression and is exposed in three.js, you just need to call setMeshoptDecoder on the GLTFLoader and that's it. Example: mrdoob/three.js#21111 |
@zeux any examples about how can I do that? I've not been able to access the Three.JS scene. |
Sorry, I can't understand... Is there a way to do this on ? |
@arthurrmp if you're hoping to use |
Is this something |
Sure! How common is it relative to DRACO? Are there any performance tradeoffs? |
Would be awesome to see usage stats but unfortunately I don't have them! I'm working on an implementation in glTF-Transform (both encode and decode) now, and will make that available as a GUI option in https://gltf.report/, alongside Draco, as well. My impression of the performance implications so far:
|
Small correction: it should be ~6.5kb (gzip -1 produces 6657 byte file from meshopt_decoder.js). There's also a few hundred bytes that you pay for the plugin in three.js loader but presumably model-viewer already pays that cost by virtue of using the loader with that plugin integrated. |
Sounds great! I'm getting more issues related to animation, so it seems related features will be getting more important. |
Opened: #2706 |
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
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
Thanks :)
The text was updated successfully, but these errors were encountered: