Search code examples
gltf

GLTF validation error MESH_PRIMITIVE_ACCESSOR_WITHOUT_BYTESTRIDE


So i'm working on a OBJ/GLTF2 converter, and for simplicity i've decided to use one file for every kind of buffer, i have positions.bin (vertex) indices.bin Normals.bin and Uvs.bin the exported files open with windows 10 visualizer but the GLTF validator prints a bunch of MESH_PRIMITIVE_ACCESSOR_WITHOUT_BYTESTRIDE errors.

The file is structured so every buffer binary file have just one view and many accessor with offset (one for each face)

I'm doing something wrong ? or the validator isn't working as expected ? my data is tightly packed so i see no reason to have a ByteStride ...

I haven't an hosting so i'm using we transfer here, sorry for that

Example file


Solution

  • This question has been answered here: https://github.com/KhronosGroup/glTF/issues/1198

    To sum up the explainations is that the bytestride can be deducted by the software that reads the GLTF as long as the bufferview isn't shared among accessors, tightly packed data still have the bytestride, it just happen to be equal to the data length and MUST be specified when it can't be deducted.