Glossary · File formats

glTF

In short

glTF (GL Transmission Format) is a royalty-free Khronos Group specification for the efficient transmission and loading of 3D scenes and models. In 2022 glTF 2.0 became the international standard ISO/IEC 12113:2022 [1].

Structure

A glTF file describes the scene as JSON: a scene graph of nodes, meshes, materials, cameras and animations. Geometry sits in binary buffers, textures as images [2].

  • .gltf: a JSON file plus external buffers and images.
  • .glb: everything in one binary file, see GLB.

Conventions worth knowing

  • Units: all linear distances are metres [2]. CAD data in millimetres must be converted on export, or the product arrives a thousand times too large.
  • Axes: a right-handed coordinate system with +Y up [2]. Many CAD systems use Z as the up axis, which the export must also handle.
  • Materials: a physically based model with base colour, metalness and roughness, see PBR [2].
  • Animation: movements such as a lid opening can be stored in the model as keyframe animation on nodes [2].

Extensions

Whatever the core does not cover is handled by extensions listed in a public registry [3]: compression of geometry and animation such as Meshopt [4] or Draco, GPU textures with KTX2, and material properties such as clearcoat or transmission for glass. A viewer must support the extensions a file uses.

Why glTF is the norm on the web

The format is designed for fast loading in real-time applications [1], is read by three.js, Babylon.js and model-viewer, and is written by Blender and many CAD tools. For a product viewer or configurator it is almost always the target format.

Every 3D model our example configurators load as a file is a GLB with Meshopt compression, for example the planetary gearhead or the perfume bottle (fictional products). The guide CAD to web 3D explains the conversion from CAD.

Related terms

  • 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.

  • PBR (physically based rendering)

    PBR (physically based rendering) is a rendering approach that describes materials with physically motivated values such as base colour, metalness and roughness. They then look believable under changing light and similar across different viewers.

  • Meshopt compression

    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.

  • 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.

  • Scene graph

    A scene graph is the tree structure of a 3D scene: each node has its own position, rotation and scale relative to its parent and can hold a mesh, a camera or further child nodes.

  • WebGL

    WebGL (Web Graphics Library) is a JavaScript API that lets web pages draw hardware-accelerated 2D and 3D graphics in the browser without plug-ins. It renders into an HTML canvas element using the device's graphics hardware.

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

Perfume bottle and box

A perfume bottle with box: glass colour, cap, label with your own name, open and unpack the box – with an exploded view.

Packaging · Colours · Materials and finishes · Own text or logo

More in our guides

Sources

  1. Khronos Group: glTF – Runtime 3D Asset Delivery
  2. Khronos Group: glTF 2.0 Specification
  3. Khronos Group: glTF Extension Registry
  4. Khronos Group: EXT_meshopt_compression (glTF extension)

← All terms in the glossary