Glossary · File formats

Meshopt compression

In short

Meshopt is a glTF compression method, defined in the EXT_meshopt_compression extension, that shrinks geometry and animation data. According to the specification its decoders run at around 1 GB per second on modern desktop hardware [1].

What Meshopt does

The extension provides a generic compression for binary data that is tailored to typical glTF content [1]. The focus is on fast unpacking: a 3D model should appear soon after download without the browser crunching for long.

Quantisation

Meshopt works cleanly with KHR_mesh_quantization by compressing already quantised data [1]. Quantisation stores positions, normals or UVs with fewer bits, for example as 16-bit integers instead of 32-bit floats [2]. For product views the loss of precision is usually invisible, while the data becomes much smaller.

Tool: gltfpack

The command-line tool gltfpack optimises glTF files for smaller downloads: it reorders data for the GPU cache, quantises, merges meshes and can compress with Meshopt [3]. It can also convert textures to KTX2 or WebP [3].

In the browser

In three.js the Meshopt decoder is registered with the GLTFLoader [4]. Files using this compression only open in viewers that support the extension, so check before passing the same file to third parties.

Meshopt or Draco?

Both shrink geometry. Draco reaches higher compression on some models; Meshopt is built for decoding speed. There is no blanket answer; measure on your own model.

From our library

All GLB files in our example configurators use Meshopt with quantisation, for instance the planetary gearhead, the beverage can and the window configurator (fictional products). The guide CAD to web 3D puts compression in context.

Related terms

  • Draco

    Draco is an open-source library for compressing 3D meshes and point clouds. In glTF the KHR_draco_mesh_compression extension uses it for geometry such as positions, normals, UVs and indices, but not textures. An alternative built for fast decoding is Meshopt.

  • GLB

    GLB is the binary form of glTF: the JSON description, geometry and textures are packed into one file. GLB is a common delivery format for 3D models on websites.

  • glTF extensions

    glTF extensions add capabilities such as compression, further material properties or instancing; they are listed in a public Khronos Group registry. Examples: KHR_materials_transmission for glass and EXT_mesh_gpu_instancing for many copies of one mesh.

  • KTX2 and Basis Universal

    KTX2 is a Khronos Group container format for GPU textures. With Basis Universal compression a texture is stored once and converted in the browser into whatever format the visitor's graphics card can use directly.

  • Core Web Vitals and 3D

    Core Web Vitals are Google's three metrics for loading (LCP), responsiveness (INP) and visual stability (CLS) of a page. A 3D viewer can worsen them if it starts on page load. More on our [3D product viewer](/en/3d-product-viewer/) page.

Examples to try

Example configurator · fictional product

Planetary gearhead

A planetary gearhead for sales and training: running drive with adjustable input speed, cut-away and exploded views, item numbers and technical data as sample values.

Industrial cells & machines · Opening and mechanism · Exploded or cut-away view · Notes on the model

Example configurator · fictional product

Beverage can 330 ml

A beverage can with three flavour designs, matt or gloss finish, condensation, single can, 4-pack or 6-pack – to turn and open.

Packaging · Colours · Materials and finishes · Options, modules and accessories

Example configurator · fictional product

Window and door configurator

A window and door system: fixed, tilt-and-turn, double sash or lift-and-slide door, width and height, material, colour and glazing bars – with opening and a profile section.

Doors & openings · Dimensions and sizes · Colours · Materials and finishes

More in our guides

Sources

  1. Khronos Group: EXT_meshopt_compression (glTF extension)
  2. Khronos Group: KHR_mesh_quantization (glTF extension)
  3. meshoptimizer: gltfpack
  4. three.js docs: GLTFLoader

← All terms in the glossary