What is Draco compression?

Draco is an open-source library from Google that compresses 3D mesh geometry. Through a glTF extension, it can make GLB files much smaller to download.

Geometry (vertex positions, normals, UVs, triangle indices) is often the biggest part of a GLB that isn't a texture. Draco quantises and entropy-codes that data, and it can shrink geometry by a large factor, depending on the mesh and the quality settings.

Trade-offs

  • Decoding cost. The viewer must download a decoder (WebAssembly) and spend CPU time unpacking the mesh.
  • Lossy. Quantisation slightly moves vertices. That's invisible at sensible settings, but don't use it on precision CAD data.
  • Support. three.js, Babylon.js, model-viewer and Blender support it. Some tools don't.

Meshopt: the alternative

The EXT_meshopt_compression extension decodes faster and also compresses animation data. Many web pipelines now prefer it.

Textures first

In many models the textures, not the geometry, dominate file size. For our model library we left geometry untouched and re-encoded textures to 1024 px WebP, which cut many files to less than half their original size. Our web optimisation guide covers the whole process.

Written with AI assistance and reviewed by the Renderlyst team. Corrections welcome at alishbakhalid766@gmail.com.