All writing

Inspect and validate a GLB before publishing it

Read a tiny model's mesh report and separate format validation from checking it in a viewer.

Last updated

Menus and supported features can change. Compare the source-check date below with your current app version.

App · APP
Official documentation · not hands-on tested Sources checked:

A 3D file does not tell you what’s inside just by looking at its filename. When a model is slow to open or looks incomplete, inspecting the contents can tell you where to start. This exercise uses one tiny GLB with a mesh made from three vertices and no textures. A mesh is the surface built from points and faces; a texture is an image applied to that surface.

glTF Transform offers inspect to list the contents of a file and validate to check it against the format specification. Use these checks before handing a model off to a website or another editor. The commands follow the official CLI reference. I checked the structure of the practice file, but did not run these CLI commands for the article. The cover is an illustration.

1. Download the reference file

Save the practice triangle GLB in a fresh folder. It has one triangular face and no textures or animation. Having a known input makes it easier to learn which entries in the report matter. For your own files later, keep the original export. Renaming another format to .glb does not make it a GLB.

2. Install the CLI and open the practice folder

Install Node.js from its official download page. Open PowerShell on Windows or Terminal on macOS or Linux. Use cd "path to your folder" and then dir or ls to confirm that the file is there. Run these lines one at a time.

node --version
npm install --global @gltf-transform/cli@4.5.1
gltf-transform --version
gltf-transform inspect practice-triangle.glb > glb-inspect.txt
gltf-transform validate practice-triangle.glb

The first and third lines check the installed programs. The install line selects the CLI version used in this guide. The redirection operator > writes the inspection report to glb-inspect.txt. Use a different report name if you need to preserve an existing one. Validation results print in the terminal. Neither step edits the model.

3. Read the report against what you expect

Open glb-inspect.txt in a text editor. Look for the mesh named PracticeTriangle. The input has one mesh and uses three vertex positions, with no indices or textures. Labels and empty sections may be presented differently by different versions of the tool. If you expect materials, textures or animation in your own export, check that they are present before diagnosing a blank preview.

For a larger file, see whether heavy geometry or large textures dominate the report. This gives you a reason to choose a specific optimisation. Changing texture settings will not help a GLB that has no textures. Keep the report so you can compare it with a later version of the same model.

4. Validate the format, then check the actual viewer

If validation reports an error, record the first message and its location so you can investigate it in the exporting application. Warnings need context: look at the affected feature and decide whether your target viewer supports it. A clean format report is not a test of lighting, appearance or load speed in a browser. Open the model in the intended viewer for those checks. If either command cannot find the input, check the terminal folder and exact filename first.

The exercise is complete when you can reopen the report and explain what the file contains. If your next step is to reduce image sizes in a GLB, see the texture resize walkthrough.

Sources & further reading