Closed Sembiance closed 4 months ago
Although the error message could be more helpful, the file is technically incorrect.
The nodes
array contains the following element:
{"name":"�","mesh":63}
The relevant bytes in the file are:
0x22 0x6E 0x61 0x6D 0x65 0x22 0x3A 0x22 0xA3 0x22
" n a m e " : " � "
Assuming that the name value is supposed to be "£" (0xA3
in Latin-1), the corresponding UTF-8 bytes should have been 0xC2 0xA3
.
The
nodes
array contains the following element: Assuming that the name value is supposed to be "£" (0xA3
in Latin-1), the corresponding UTF-8 bytes should have been0xC2 0xA3
.
Ahh, gtocha. I don't have any control over how the GLB file is generated, I'm just using glTF-Validator to determine if I have a renderable GLB or not.
Although the error message could be more helpful, the file is technically incorrect.
Aye. It would be awesome if:
name
field would show up with a more useful message
info
property should still show, detailing the other properties of the modelBasically I feel that a single invalid character in a name
field should not cause the validation tool to not output any other info at all about the file. User entered data in fields like name
are more likely to have invalid data and I don't feel like that should prevent the validator from parsing all the more 'mechanical' parts of the file regarding the model itself, geometry, etcc
As UTF-8 decoding happens before JSON parsing, the validation tool cannot attribute incorrect octet sequences to specific properties; other software may have similar behavior. For example, the file cannot be imported into Blender and does not render in iOS glTF Viewer.
Even if loading succeeds, as in three.js (on which the model viewer is based on), the node shows its name as � instead of £.
I don't have any control over how the GLB file is generated
Consider reporting this error to the tool used for generating the asset.
That makes sense. Thanks.
Using the latest code checked out and built this morning, when running
gltf_validator --stdout font.glb
on the file in the attached font.zip yields the following error:Model loads up ok in modelviewer.dev and
assimp info font.glb
crrectly returns information about the file.