Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gltfpack: Validation errors (MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT) #58

Closed
Snafuh opened this issue Aug 29, 2019 · 5 comments

Comments

@Snafuh
Copy link

Snafuh commented Aug 29, 2019

Hi

The optimized files created via gltfpack.exe seems to contain some incorrect attributes and cannot be opened by some gltf importer (e.g. the Windows 10 build in 3D viewer doesn't open the files).

The gltf viewer on https://gltf-viewer.donmccurdy.com/ is able to open the files but returns following errors

MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT | Invalid accessor format '{VEC3, BYTE normalized}' for this attribute semantic. Must be one of ('{VEC3, FLOAT}'). | /meshes/0/primitives/0/attributes/NORMAL
-- | -- | --
MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT | Invalid accessor format '{VEC3, UNSIGNED_SHORT}' for this attribute semantic. Must be one of ('{VEC3, FLOAT}'). | /meshes/0/primitives/0/attributes/POSITION
MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT | Invalid accessor format '{VEC2, UNSIGNED_SHORT}' for this attribute semantic. Must be one of ('{VEC2, FLOAT}', '{VEC2, UNSIGNED_BYTE normalized}', '{VEC2, UNSIGNED_SHORT normalized}'). | /meshes/0/primitives/0/attributes/TEXCOORD_0
ACCESSOR_NON_UNIT | 2368 accessor elements not of unit length: 0. [AGGREGATED] | /accessors/0
@zeux
Copy link
Owner

zeux commented Sep 2, 2019

Yeah this is known/expected; as mentioned in the readme, technically the gltf files are not standard compliant and rely on non-standardized extensions to store data.

Having said that, it would be nice to have the builtin Win10 viewer work. I have noticed this before but didn’t pay much attention because I have seen many valid gltf files that it doesn’t open either. I will take a closer look.

@zeux
Copy link
Owner

zeux commented Sep 9, 2019

I'm going to keep this issue open for tracking; the core problem is due to quantized attributes not having a standard extension that validator recognizes, and I'm looking into extension standardization for this.

@zeux zeux changed the title MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT gltfpack: Validator issues MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT errors Sep 9, 2019
@zeux zeux changed the title gltfpack: Validator issues MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT errors gltfpack: Validation errors (MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT) Sep 9, 2019
@zeux
Copy link
Owner

zeux commented Sep 22, 2019

I've filed the proposal for an extension that can solve this issue - when/if the extension is ratified, gltfpack will be changed to comply with that extension (and when validator is changed accordingly, the validation errors should go away)

KhronosGroup/glTF#1673

@zeux
Copy link
Owner

zeux commented Dec 10, 2019

This is waiting for KhronosGroup/glTF-Validator#124 to get merged, once it is I can close this.

The Windows 10 viewer would need support for the extension to work; I don't have a lot of visibility into the entire software stack there but I've filed microsoft/glTF-SDK#51 which, when/if merged and propagated all the way to the viewer should result in the extension being supported as well.

@zeux
Copy link
Owner

zeux commented Jan 10, 2020

Closing as the validator change was merged. gltfpacked files should validate cleanly on recent builds - please feel free to open new issues if this is not the case for some files.

@zeux zeux closed this as completed Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants