Skip to content
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 KHR_mesh_quantization and EXT_meshopt_compression #89

Open
goldenratio opened this issue Mar 21, 2022 · 3 comments
Open

Support for KHR_mesh_quantization and EXT_meshopt_compression #89

goldenratio opened this issue Mar 21, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@goldenratio
Copy link
Contributor

goldenratio commented Mar 21, 2022

Hi,
I am trying to optimize meshes in .glb files using gltfpack,
gltfpack -i Soldier.glb -o Soldier-opt.glb -c

Pixi3D doesn't seem to render optimized 3d file. Further googling noticed three.js and playcanvas handles KHR_mesh_quantization and EXT_meshopt_compression

Minimal reproducible repo is here, https://github.com/goldenratio/pixi3d-poc-72
Any help is appreciated.
attaching models

@goldenratio goldenratio changed the title Support for KHR_mesh_quantization Support for KHR_mesh_quantization and EXT_meshopt_compression Mar 21, 2022
@jnsmalm
Copy link
Owner

jnsmalm commented Mar 21, 2022

Would be nice to support these, but seems like a lot of work to make it happen. I don't feel like digging into this right now, if anyone else does let me know :-)

@jnsmalm jnsmalm added the enhancement New feature or request label Mar 21, 2022
@goldenratio
Copy link
Contributor Author

goldenratio commented Mar 21, 2022

Attaching some additional minimal models
AnimatedMorphCube.zip

AnimatedMorphCube.glb (plain) - works well with Pixi3D
AnimatedMorphCube-meshquant.glb (KHR_mesh_quantization) - renders, but geometry is bit off
AnimatedMorphCube-meshopt.glb (EXT_meshopt_compression) - doesn't render. It needs client-side decoder. It's not a priority.

I will try dig into KHR_mesh_quantization. I suspect something to do with byteStride in gltf-parser

@MatsErdkamp
Copy link
Contributor

Quickly tried to implement meshopt compression by using https://www.npmjs.com/package/meshoptimizer. Got it working for a few meshes, but some were fully bugged out. Will try do add it properly soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants