BASE

gltfpack

gltfpack

Tool · Free

A local CLI optimizing glTF/GLB models: geometry, textures, animations, and draw calls. It helps accelerate web scenes and mobile loading.

Resource illustration: gltfpack

Open resource ↗

What you can use for free

Free native binaries and an npm version for mesh optimization, quantization, and animation processing. Native binaries are recommended for large files and KTX2/WebP texture compression; their capabilities should not be treated as identical to npm.

Access and limitations

Free native binaries and an npm version for mesh optimization, quantization, and animation processing. Native binaries are recommended for large files and KTX2/WebP texture compression; their capabilities should not be treated as identical to npm. Compressed output requires a compatible loader/decoder. Account for automatic mesh merging when objects need separate control.

Use cases

  • Reduce GLB file size before publication.
  • Configure asset optimization in the build.

Example workflow

A possible workflow; this is not a report of hands-on testing.

Example workflow with gltfpack: Reduce GLB file size before publication.

Before you start

  • The source file and its size; the scene or page where it is used.
  • The acceptable loss of detail and requirements of the final format.

Steps

  1. For the task “Reduce GLB file size before publication”: retain the original and choose a small sample for comparison.
  2. Apply the available optimization settings; compare the resulting file size and appearance.
  3. Open the saved file in the actual project and retain settings that offer an acceptable balance of quality and size.

Check your result

  • Important details, color, transparency, and behavior are preserved where they are used.
  • Compare source and output file sizes; check loading and final result quality.

Choosing gltfpack

Reduce GLB file size before publication.

Choose this when

  • Reduce GLB file size before publication.
  • Configure asset optimization in the build.

Requirements

  • For meshopt compression, configure a supporting loader and decoder.

Things to consider

  • Access terms: Free native binaries and an npm version for mesh optimization, quantization, and animation processing. Native binaries are recommended for large files and KTX2/WebP texture compression; their capabilities should not be treated as identical to npm. Compressed output requires a compatible loader/decoder. Account for automatic mesh merging when objects need separate control.
  • Terms of use: MIT for meshoptimizer/gltfpack; input assets retain their own licenses.
  • Automatic merging and node removal can change the structure referenced by application code.

Frequently asked questions

What can you use for free in gltfpack?

Free native binaries and an npm version for mesh optimization, quantization, and animation processing. Native binaries are recommended for large files and KTX2/WebP texture compression; their capabilities should not be treated as identical to npm.

What are the access terms for gltfpack?

Free native binaries and an npm version for mesh optimization, quantization, and animation processing. Native binaries are recommended for large files and KTX2/WebP texture compression; their capabilities should not be treated as identical to npm. Compressed output requires a compatible loader/decoder. Account for automatic mesh merging when objects need separate control.

What terms of use matter for gltfpack?

MIT for meshoptimizer/gltfpack; input assets retain their own licenses.

How do you get started with gltfpack?

For the task “Reduce GLB file size before publication”: retain the original and choose a small sample for comparison. Apply the available optimization settings; compare the resulting file size and appearance. Open the saved file in the actual project and retain settings that offer an acceptable balance of quality and size.

How do I preserve model parts for separate clicks and animations?

Optimization can merge meshes and remove nodes. If the application accesses named parts, consider -kn for nodes and -km for materials. After processing, check names and interactions in the target loader rather than only file-size reduction.

License

MIT for meshoptimizer/gltfpack; input assets retain their own licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • glTF
  • GLB
  • CLI

Sources

Other resources