glTF to Meshopt GLB Compression Ratio Improvements
Converting raw glTF assets to binary GLB files using the
EXT_meshopt_compression extension dramatically reduces
asset size while maintaining fast runtime decoding. On average, meshopt
compression shrinks raw geometry data—specifically vertex buffers and
index arrays—by 60% to 80%, yielding geometry files that are 3x to 5x
smaller than their uncompressed counterparts. When applied to complete
assets, overall file size reductions typically range from 40% to 70%,
depending on the ratio of geometry data to texture data.
Geometry-Specific Compression Rates
Raw glTF stores geometry as uncompressed floating-point buffers and raw integer indices. Meshopt applies quantization, index reordering, and specialized bit-packing filters tailored to distinct vertex attributes:
- Index Buffers: Meshopt re-indexes geometry into triangle strips and encodes edge relationships. Index data typically sees an 80% to 90% reduction, shrinking 32-bit or 16-bit indices down to roughly 1 to 2 bytes per triangle.
- Vertex Positions: Quantized from 32-bit floating-point numbers into 16-bit integers, position attributes generally achieve a 50% to 65% reduction.
- Normals and Tangents: Octahedral encoding and byte-level quantization compress normal vectors by 60% to 75%, reducing 12-byte vector sets down to 2 or 4 bytes per vertex.
- Texture Coordinates (UVs): Quantized to 16-bit normalized integers, UV buffers routinely compress by 50% to 60%.
Secondary Transport Compression (Zstandard and Gzip)
Meshopt is uniquely structured to produce byte streams with low entropy that favor universal compression algorithms. When served over the web with standard HTTP compression, the efficiency increases further:
- Raw glTF + Gzip: Yields an average 30% to 50% size reduction, but parsing remains computationally heavy for the browser.
- Meshopt GLB Standalone: Achieves a raw 3x to 4x reduction without needing network-level compression.
- Meshopt GLB + Zstandard/Brotli/Gzip: The combined pipeline yields a 5x to 10x total reduction compared to raw, uncompressed binary buffers. The pre-filtered byte alignment ensures standard LZ-based compressors compress the asset far more efficiently than raw floating-point data.
Overall Asset Impact: Geometry vs. Textures
The total reduction percentage of a .glb file depends
heavily on the model's composition:
- Geometry-Heavy Assets (CAD, photogrammetry, high-poly scans): Overall asset size drops by 70% to 85%, as geometry constitutes the bulk of the binary payload.
- Balanced Assets (Game characters, architectural props): Overall asset size drops by 40% to 60%.
- Texture-Heavy Assets: If a model contains megabytes of standard PNG or JPEG textures, meshopt alone will only yield a 10% to 25% overall reduction. To achieve maximum efficiency, meshopt is typically paired with GPU texture compression (such as KTX2 with Basis Universal) to achieve equivalent 70%+ savings across the entire asset.
Compression Trade-off: Meshopt vs. Draco
While Google Draco can achieve slightly higher raw compression ratios (typically 5% to 15% smaller than meshopt), Draco requires significant decompression time on the CPU. Meshopt balances high compression ratios with decoding throughput exceeding 1 to 2 gigabytes per second via WebAssembly and SIMD, eliminating runtime frame-rate drops while still eliminating up to 80% of the raw geometry payload.