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

Can I write inverseBindMatrices with modeler? #91

Closed
aoisensi opened this issue Oct 17, 2024 · 4 comments · Fixed by #92
Closed

Can I write inverseBindMatrices with modeler? #91

aoisensi opened this issue Oct 17, 2024 · 4 comments · Fixed by #92

Comments

@aoisensi
Copy link

It is [][16]float32.

@qmuntal
Copy link
Owner

qmuntal commented Oct 17, 2024

You can write it using modeler.WriteAccessor:

modeler.WriteAccessor(doc, gltf.TargetArrayBuffer, data)

Note that data must be [][4][4]float32, not [][16]float32.

I've added a helper to read/write inverseBindMatrices in #92.

@aoisensi
Copy link
Author

Thank you! <3

@aoisensi
Copy link
Author

I'm not completely sure, but it seems that you can't specify a target for inverseBindMatrix.
glTF-Validator says there is an error.

@aoisensi
Copy link
Author

When I output glTF, an ACCESSOR_INVALID_IBM error occurred, and just deleting the target of the bufferView made it work normally.

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 a pull request may close this issue.

2 participants