KhronosGroup / glTF-Sample-Assets

To store all models and other assets related to glTF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken model

ArMuSebastian opened this issue · comments

Model: ChairDamaskPurplegold (GLB)

according to spec https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#glb-file-format-specification This chunk MUST be padded with trailing Space chars (0x20) to satisfy alignment requirements.
Screenshot 2024-02-29 at 23 34 35

The asset is correct. Its JSON section has 13972 bytes, which is a multiple of 4, so the next section is already aligned.

A different look at the data (in the "HxD" editor) may clarify that: The the JSON part ends with the } at a 4-byte-boundary. The subsequent bytes (two of which have been marked in the screenshot above) already are the size of the BIN chunk that comes after that, namely 2327444 bytes.

Khronos Sample Model Padding

Thanks, sorry for confusion!