Update: This initial work on Binary glTF has led to the KHR_binary_glTF extension, which should be used instead of CESIUM_binary_glTF.
Starting with Cesium 1.10, the new Binary glTF extension makes 3D models 10-30% faster to load, especially models with a lot of geometry. To use it, select the Binary glTF option in the Cesium model converter, which will return a
.bgltf file that can be loaded with Cesium 1.10 or later using the same API as usual.
Read on for the under-the-hood details.
glTF is a JSON format with binary payloads for geometry, textures, animation key frames, and skin inverse-bind matrices. These resources are referenced by uri using a glTF
buffer, so they could be separate from the JSON:
or embedded using a data uri:
Previously, the Cesium model converter base64-encoded external resources for simplicity.
Cesium 1.10 introduces support for Binary glTF (CESIUM_binary_glTF), a glTF extension that defines a binary container format containing the glTF JSON and binary resources (and shader sources).
Binary glTF layout.
Binary glTF has the convenience of a single file, like using data uris, but is smaller since binary data is not base64-encoded, and faster to load since base64-decoding is not required at runtime.