KhronosGroup/glTF

Clarification regarding `image` entries

Cyphall opened this issue · 1 comments

Hello, I have 2 questions about image entries that I cannot find the answer to in the specs:

  1. What happens when an image.uri points to a file which is missing?
    Does the GLTF asset file become invalid?
  2. What happens when an image entry has neither a uri field nor a bufferView field?
    This chapter seems to imply that at least one of them would be required but I could not find a place where it is explicitly stated.

Good catches!

What happens when an image.uri points to a file which is missing?

This doesn't make the glTF asset file itself invalid (as compared to, e.g., an URI syntax error) but of course prevents correct loading. A similar issue may happen if the file exists but cannot be decoded.

The spec does not currently provide any suggestions on how to handle unresolvable external references (this applies both to images and buffers); adding an implementation note seems reasonable.

What happens when an image entry has neither a uri field nor a bufferView field?

This would be invalid according to the JSON schema (Section A.21). This detail is not explicitly mentioned anywhere else so it also should be fixed.