glTF-Sample-Viewer icon indicating copy to clipboard operation
glTF-Sample-Viewer copied to clipboard

Validation inconsistency between Viewer and Validator

Open JCash opened this issue 2 years ago • 2 comments

The validator reports an error on this example file, but the viewer accepts it without any issue.

I feel like this is a slippery slope when it comes to the standard of glTF format. If tools have to make unspecified changes in order to show a broken file, then we'll have huge problems in finding tools that work well together, which defeats the purpose imho.

E.g. I use this library to load files: https://github.com/jkuhlmann/cgltf It's well used library.

The https://github.khronos.org/glTF-Validator/ tool reports the error "message": "Node 1 is not a root node."

The https://github.khronos.org/glTF-Sample-Viewer-Release/ simply seem to patch the file and shows it. It doesn't notify the user that the file is invalid.

babylon.js also patches the file, but also shows the error.

So, which is correct? The Validator or the Viewer?

Here is the model in question: model.zip

JCash avatar Jan 08 '24 08:01 JCash

Viewers like those of babylon.js or three.js generally try to show the file as quickly as possible, and won't run into every issue that the glTF Validator can find. Running the "glTF Validator" suite would typically happen in parallel, if it's run at all, and could be shown as a visual warning. I agree it'd be a nice addition if this viewer could run the validation suite and display those results as well.

donmccurdy avatar Jan 11 '24 02:01 donmccurdy

Adding glTF-Validator support is planned and will be added soon

UX3D-haertl avatar Apr 23 '24 09:04 UX3D-haertl