KhronosGroup / glTF-Validator

Tool to validate glTF assets.
Apache License 2.0
372 stars 63 forks source link

`IO_ERROR` for file with absolute path references #229

Closed hybridherbst closed 3 months ago

hybridherbst commented 3 months ago

I believe this file is valid: NeedleSphereReference.gltf.zip

It's weird by design – it contains a https:// reference to its own .bin buffer. My understanding is that this is allowed.

glTF Validator currently complains with a severity 0 IO_ERROR, which I think is a bit misleading because it makes the glTF look invalid:

{
    "code": "IO_ERROR",
    "message": "Resource not found (https://uploads.needle.tools/gltf-cloud-ref/NeedleSphereReference/NeedleSphereReference.bin).",
    "severity": 0,
    "pointer": "/buffers/0/uri"
}
lexaknyazev commented 3 months ago

Yes, there should be a new warning for that. The spec allows absolute paths but they are not guaranteed to work.

echadwick-artist commented 3 months ago

In related news, it looks like relative paths are also flagged as errors.

BoxTextured does not cause any errors.

However, after editing the glTF to point the texture into a subfolder, the Validator spawns an error:

"issues": { "numErrors": 1, "numWarnings": 0, "numInfos": 0, "numHints": 0, "messages": [ { "code": "IO_ERROR", "message": "Resource not found (materials/Texture/CesiumLogoFlat.png).", "severity": 0, "pointer": "/images/0/uri" } ], "truncated": false },

BoxTextured.zip

BoxTexturedFolders.zip

lexaknyazev commented 3 months ago

@echadwick-artist Is it the drag-n-drop web version?

echadwick-artist commented 3 months ago

Oh. Yes, this was dragging from Windows Explorer.

lexaknyazev commented 3 months ago

Did you drag both the file and the materials folder?

echadwick-artist commented 3 months ago

Yes, like this: 2024-08-14 16_40_31-C__DGG_3D-Models_2024-08-08_MotM_SunglassesV-Ray_BoxTexturedFolders

echadwick-artist commented 3 months ago

It also causes the error if I use the "Select" link to pick and upload the .glTF file.