Back to the blog

3D

GLB and glTF: one model, packed two ways.

GLB and glTF hold the same model: glTF as text with its data in other files, GLB as one file. How each is opened, with nothing uploaded.

By 4 min read

A .gltf file, its .bin and its pictures, beside one GLB holding them all

glTF is the 3D format the Khronos Group made for handing models around, as JPEG is for photos. It comes in two packings. A .gltf is a text file that describes the model and names other files for its data; a .glb holds the description, the data and the pictures in one.

The difference is only the packing.

Both describe the same things: the same shapes, materials, pictures and animations, in metres, standing on Y. A .gltf names its data in a .bin file and its pictures as PNG or JPEG files, or carries them as long runs of text inside it. A .glb puts them all in one binary file, which is smaller and easier to send.

A .gltf without the files it names opens with parts missing, or not at all. That is why a .gltf often seems to have lost its textures.

Open a .gltf with its files.

Open the glTF viewer and choose the .gltf, its .bin and its pictures together, or drop them all at once. The page finds each file the .gltf names, in any folder, and says by name which one is missing if one is.

The files are packed into one GLB in your browser without anything in them being decoded or written again, and drawn from that. A GLB opens on its own.

What it holds.

Details lists the parts, triangles, materials, pictures and animations, and the glTF extensions the file uses, such as Draco or meshopt compression, which open too.

Turning a .gltf into a .glb, and the other way round, is under Change the format: nothing in the model is decoded or written again.

Further reading

Topics: glb vs gltf · gltf viewer · open gltf file · gltf bin file · gltf to glb · gltf missing textures

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool