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

GLTF extensions: KHR_mesh_quantization #124

Open
antzGames opened this issue Mar 6, 2024 · 0 comments
Open

GLTF extensions: KHR_mesh_quantization #124

antzGames opened this issue Mar 6, 2024 · 0 comments

Comments

@antzGames
Copy link
Contributor

Would be a great help if KHR_mesh_quantization is implemented in gdx-gltf.

To take full advantage of gltfpack from MeshOptimizer library you need KHR_mesh_quantization. Also EXT_mesh_gpu_instancing extention support would be helpful.

Exception when trying to use optimized gltf files:

Exception in thread "main" net.mgsx.gltf.loaders.exceptions.GLTFUnsupportedException: Extension KHR_mesh_quantization required but not supported
	at net.mgsx.gltf.loaders.shared.GLTFLoaderBase.load(GLTFLoaderBase.java:103)
	at net.mgsx.gltf.loaders.gltf.GLTFLoader.load(GLTFLoader.java:16)
	at net.mgsx.gltf.loaders.gltf.GLTFLoader.load(GLTFLoader.java:11)
	at com.monstrous.duckfield.Main.create(Main.java:169)

From gltfpack docs:

gltfpack substantially changes the glTF data by optimizing the meshes for vertex fetch and transform cache, quantizing the geometry to reduce the memory consumption and size, merging meshes to reduce the draw call count, quantizing and resampling animations to reduce animation size and simplify playback, and pruning the node tree by removing or collapsing redundant nodes. It will also simplify the meshes when requested to do so.

By default gltfpack outputs regular .glb/.gltf files that have been optimized for GPU consumption using various cache optimizers and quantization. These files can be loaded by GLTF loaders that support KHR_mesh_quantization extension such as three.js (r111+) and Babylon.js (4.1+).

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

No branches or pull requests

1 participant