Reducing GLTF size. Which fields BJS need to load a GLTF-Scene?

I’ve just exported my gltf and now I’m wondering if all those field we really need to work with GLTF?
I have only a few questions about them.

  1. Accessors. As I understand it’s some kind of statistics of the mesh? Can we remove this section from GLTF? :grinning:
  2. Tangents. As official specification states: “A unit XYZ vector defining a tangential direction on the surface.”. Hm I don’t understand the difference. Then why do we need to store “rotation” as well? Is it not the same? I mean one is based on another and can be computed at runtime.
  3. bufferViews” - do we need this to store in gltf? I think it’s the most important part for working with “buffers” so it both can’t be removed, right?

What do we actually need to succefully loading gltf-models in BJS?

The buffers contain the data that is used for the geometry of 3D models, animations, and skinning. The bufferViews add structural information to this data. The accessors define the exact type and layout of the data.
When tangents are not specified, client implementations SHOULD calculate tangents using default MikkTSpace algorithms with the specified vertex positions, normals, and texture coordinates associated with the normal texture.

First of all, we need a valid GLTF/GLB file, then some luck :slight_smile:

Full GLTF reference - https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.pdf
Short GLTF Guide - https://www.khronos.org/files/gltf20-reference-guide.pdf

2 Likes