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

Make inverseBindMatrices optional #492

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Conversation

danwillm
Copy link
Contributor

@danwillm danwillm commented Jul 1, 2024

The spec mentions that inverseBindMatrices in skins are optional, but tinygltf produces an error when trying to load a model with none defined.

Each skin is defined by a REQUIRED joints property that lists the indices of nodes used as
joints to pose the skin and an OPTIONAL inverseBindMatrices property that points to
an accessor with inverse bind matrices data used to bring coordinates being skinned into 
the same space as each joint.

@syoyo
Copy link
Owner

syoyo commented Jul 1, 2024

Good find! Confirmed https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-skin

tinygltf produces an error when trying to load a model with none defined.

Could you possible to contribute a minimal glTF file which contains skin but no inverseBindMatrices? I'd like to add it to unit tests.

@danwillm
Copy link
Contributor Author

danwillm commented Jul 1, 2024

Just added a test for it. I can't upload the exact glb I'm trying to parse but I've made a mimimal example and uploaded it.

@syoyo syoyo merged commit cfbec35 into syoyo:release Jul 3, 2024
8 checks passed
@syoyo
Copy link
Owner

syoyo commented Jul 3, 2024

Thanks! Merged!

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

Successfully merging this pull request may close these issues.

2 participants