Inspecting GLB files to understand contribution of textures, vertex data to size

I converted my 40MB glb file to a KTX2 GLB file using [gltfpack](https://github.com/zeux/meshoptimizer/tree/master/gltf). New size is 5 MB! yeay!

I’d like to decrease it further. Now I have 2 options:

  1. Reduce the resolution of the texture (dont know how do that, but I guess can be done in blender)
  2. Do mesh decimation to reduce the number of vertices.

But I dont know which one is contributing more the the size. If it turns out the vertices are only 10% of the file size, then there is no point in decimating the mesh and losing the fidelity. How can I find the contribution of each in the GLB file?

[GLTFViewer](https://gltf-viewer.donmccurdy.com/) doesn’t help much other than providing a bunch of warnings and high level things.

Worth to try Command-line quickstart | glTF Transform

Here is Artist Guide - https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/KTXArtistGuide.md#compressing-to-ktx-with-gltf-transform

Using this tool it is possible to change texture resolution with given parameteres. Be careful and do visual checks, to avoid artefacts.

Use Draco compression, also available with this tool.

WIth gltf-transform inspect filename.glb command you’ll have this report for each mesh, each texture etc.

3 Likes

GLTF-Transform combined with Sandbox - https://glb.babylonpress.org/

1 Like

Quick and dirt alternative: drag file into here https://gltf.report/

Under “Metadata”. Maximize the data table to the right (size is the last column).