Skip to content

[glTF 2.1] Multiple Binary Chunks in GLB #2611

Open

Description

@akmorgan99

More flexible GLB buffers and chunk layout

The binary file format (GLB / .glb) version 3, being introduced with glTF 2.1, will have the following additional features:

  • Multiple chunks are allowed to be used as glTF buffers.

  • glTF buffers explicitly refer to chunks in the GLB file by index in a new "chunk" property.

  • Definition change for the location of the glTF JSON data: The first chunk that is a JSON chunk is the glTF data (rather than requiring the glTF JSON chunk to be the first chunk in the file).

  • The order and layout of chunks in the GLB file is more flexible, allowed to be any order, so long as there isn't a non-glTF JSON chunk before the JSON chunk containing the main glTF data.

The existing behavior of glTF 2.0's first buffer implicitly referring to chunk 1 in the .glb file (when "uri" is not set) will still be supported for backward compatibility. This implicit behavior ONLY happens with files where the JSON chunk is at chunk 0, the buffer chunk is at chunk 1, there is only one buffer without a "uri", and that buffer is buffer 0.

Use cases

Using a single buffer chunk in a GLB file can lead to issues when the buffer is very large, such as:

  • Compatibility with languages that have a maximum size of managed memory byte arrays.

  • Compatibility with JSON parsers interpreting the "byteLength" property as a double-precision float.

Furthermore, the more flexible chunk layout allows placing custom chunks before the glTF JSON chunk, which can be useful for cases where data is needed at the start of the file, such as streaming use cases. glTF 2.1 does not define any such cases, but this flexibility allows for extensions, applications, or future glTF versions to define this without breaking compatibility with binary file format version 3. For example, having a thumbnail binary chunk at the start of the file is being considered.

Why this design

Extending the implicit behavior of glTF 2.0 to allow multiple buffers to implicitly refer to multiple chunks was considered, but the explicit behavior makes things clear and enables use cases such as using a pre-glTF-JSON chunk as a buffer chunk, which would be impossible with the implicit behavior.

Activity

  1. javagl commented on Jul 7, 2026

    @javagl
    Contributor

    I'm nearly a bit surprised to see this as its own issue, because a considerable part of this was already anticipated and discussed as part of #2594 (comment) , but it can certainly make sense to make this explicit (but also to have that link to the other issue, because they are at least related)

  2. added this to the 2.1 milestone on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions