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

[BUG] Accessors with sparse storage but without bufferView fail validation #202

Open
seberoth opened this issue Nov 18, 2023 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@seberoth
Copy link

seberoth commented Nov 18, 2023

Describe the bug
If a accessor uses sparse storage but hasn't defined a bufferView, the validation fails with Message: Accessor[13] _bufferView: must be defined.
The gltf spec says thats allowed but the accessor MUST be initialized with zeros.

GLTF 2.0 Accessor specs

To Reproduce
Example glb file is attached

please complete the following information:

  • OS: Windows 11
  • SharpGLTF Version: 1.0.0-alpha0030

example accessor

    {
      "componentType": 5126,
      "count": 7251,
      "sparse": {
        "count": 5920,
        "indices": {
          "bufferView": 13,
          "componentType": 5123
        },
        "values": {
          "bufferView": 14
        }
      },
      "type": "VEC3"
    }

a0_005_ma__strongarms_int_l.zip

EDIT: Probably related Blender GLTF plugin commit: KhronosGroup/glTF-Blender-IO@9ea179a

@seberoth seberoth added the bug Something isn't working label Nov 18, 2023
@vpenades
Copy link
Owner

Yes, this is a known issue; for some reason I don't undersand (and I don't fully agree) Khronos accepts glTF with missing buffers as valid.

The problem is that supporting missing buffers breaks some stuff inside the APIs, so I am still reasearching for a proper solution.

@vpenades
Copy link
Owner

vpenades commented Dec 1, 2023

I recalled I already asked about this issue here KhronosGroup/glTF-Validator#189

I'll investigate a solution...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants