KhronosGroup / glTF-Sample-Assets

To store all models and other assets related to glTF
255 stars 30 forks source link

Broken model #109

Closed ArMuSebastian closed 4 months ago

ArMuSebastian commented 4 months ago

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
lexaknyazev commented 4 months ago

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

javagl commented 4 months ago

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

ArMuSebastian commented 4 months ago

Thanks, sorry for confusion!