GLB vs GLTF: What's the Difference?
Understand glTF JSON, binary geometry and image packaging. Choose a self-contained file for GOTULE and check its real size, resource and extension limits before importing.
glTF is the asset format; .gltf and .glb are packaging choices
glTF describes a 3D asset for delivery to applications. It can describe scene objects, geometry, materials and other data; it is not simply a picture. In a .gltf file, JSON text describes the structure and references resources. Buffers hold binary data such as vertex positions and indices. Images provide texture data referenced by materials.
A .glb file uses the Binary glTF container: it packages JSON and can include binary resources inside one file. This is convenient for moving a small model between applications. However, the specification also permits GLB to reference external resources. The extension alone does not prove that everything is embedded.
The same small chair, in three packages
The first package can be valid glTF even though GOTULE rejects it. That is a viewer restriction, not evidence that the asset format is wrong. Selecting only chair.gltf does not give the browser access to its neighboring files. Renaming it to chair.glb does not embed the missing data.
| Package | What travels with it | Fits GOTULE Viewer? |
|---|---|---|
| chair.gltf + chair.bin + wood.png | JSON, separate geometry buffer and image | No: external dependencies are blocked |
| chair.gltf with embedded data URIs | JSON containing encoded buffers and images | Yes, if the data and limits are supported |
| chair.glb with embedded resources | JSON and binary payload in one container | Yes, if self-contained and otherwise supported |
When GLB is the easier choice
For a single-file handoff to this viewer, export GLB with geometry and images embedded. It reduces the chance of forgetting a companion file. Keep the editable source project separately: the delivery file is not a substitute for every authoring feature or project setting.
A .gltf package with separate resources can be useful in a pipeline that intentionally manages and serves those files. An embedded .gltf is another single-file option, but base64 encoding adds size overhead. GLB is not automatically compressed or always smaller; its contents and export settings determine the result.
GOTULE’s actual supported subset
The current code accepts .glb or .gltf with glTF asset version 2.0. The size limit is 20 × 1024 × 1024 bytes (20 MiB; the interface uses the label 20 MB). All buffer and image resources must be embedded. External paths and network URLs are blocked for both formats. Embedded images must be supported PNG or JPEG data.
The extension allowlist is KHR_materials_unlit, KHR_texture_transform and KHR_mesh_quantization. Draco (KHR_draco_mesh_compression), Meshopt (EXT_meshopt_compression) and KTX2/Basis textures (KHR_texture_basisu) are not supported. Other unlisted extensions can also be rejected; a valid glTF asset is not a guarantee of compatibility.
A node is an item in the scene hierarchy that can place a mesh. A mesh defines geometry using one or more primitives. A primitive groups geometry for drawing with a material and can contain many triangles; it is not a single triangle. GOTULE currently accepts only triangle lists: the mode must be omitted (the glTF default is 4) or set to mode=4. Points, lines, triangle strips and triangle fans are not supported.
The viewer also limits decoded resources and geometry: examples include at most 1,000 nodes, 500 mesh definitions, 1,000 primitives, one million vertices, 16 images and a 4,096-pixel maximum image side. Combined image pixels and buffer memory have additional caps. Being below 20 MiB is therefore necessary, not sufficient. It displays a static model; embedded animation playback and model export are not provided.
A small-file import checklist
- Keep the original project. Export a small test as an embedded GLB or self-contained glTF 2.0 without unsupported compression.
- Check the size and resource references. External dependencies exist only when the model actually references a separate .bin or image file. Other files merely being present in the same folder proves nothing. Resolve any referenced external resources during export.
- Open Model Viewer and try its demo. Then use the file-selection button to choose your own model; the viewer processes it locally rather than uploading it for conversion.
- Read the error category if it fails: external resource, unsupported feature, size/complexity, invalid file or no usable geometry need different checks.
- For a model that loads but looks dark, follow the lighting/material troubleshooting guide. Orbit and reset the view to inspect it; these controls do not repair its data.
A small download can still need substantial memory
A compressed image expands when decoded. A modest file can contain large textures or many separate parts, each adding work. Begin with a simpler export and reduce unnecessary texture resolution in your authoring application. Do not assume a phone has the same memory budget as a desktop.
The viewer’s restrictions protect browser resources; they are not a full conformance validator. If it rejects a valid but unsupported asset, revise the export or inspect it with a compatible tool rather than repeatedly selecting the same unchanged file.
File questions before exporting again
Is GLB a video?
No. It is a container for 3D asset data. It is not MP4, and GOTULE Viewer does not render or export videos.
Does GLB automatically reduce polygon count?
No. Repacking the same geometry does not simplify it. Reduce unnecessary geometry in a suitable modeling application if needed, then export again.
Can GOTULE merge a .gltf, .bin and images for me?
No. This viewer accepts one supported self-contained file. Use a suitable exporter to repack the asset first.