KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.12k stars 1.13k forks source link

KHR_draco_mesh_compression: Clarify required status of attributes #1867

Open UX3D-haertl opened 3 years ago

UX3D-haertl commented 3 years ago

If I understood correctly: If KHR_draco_mesh_compression is defined in the extensions_required field, only compressed data should be kept.

Therefore, indices and attributes of the primitive should be omitted (as well as the referenced bufferviews and buffers if they are not used elsewhere). To make this possible, attributes should no longer be required or should not have the requirement to consist of minimum one item, if KHR_draco_mesh_compression is defined in the primitive.

If this is the desired functionality, it would be a good idea to explicitly state it in the documentation of KHR_draco_mesh_compression

donmccurdy commented 3 years ago

Therefore, indices and attributes of the primitive should be omitted...

The primitive's attributes (and indices, if applicable) are always required, even without fallback uncompressed data. They reference accessor definitions, containing all of the normal properties except the bufferView property. The accessor definitions are required to determine the count, type, and other properties of the compressed data. The compressed data in the Draco bitstream will not necessarily have all of that data.

The Conformance section gets into this a bit, but feel free to open a PR suggesting clarifications!

UX3D-haertl commented 3 years ago

Thanks for the clarification :) I opened a PR to clarify the accessor properties