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

TypeError while using gltfjsx to an animated model: Cannot read properties of null (reading 'array') #263

Open
BillySwaggyKidy opened this issue Jun 1, 2024 · 2 comments

Comments

@BillySwaggyKidy
Copy link

Hello, I am struggling to an error while using the gltfjsx command-line tool to turn an animated model into a TSX component.
My model is rigged using the rigify addon in blender 4.1 like the following:
Capture d'écran 2024-05-29 155126
Capture d'écran 2024-05-29 155157
Then I exported my model to the glTF 2.0 format with the following export configuration:
GLTF_export
When I check it first to the gltf viewer and it render correctly with the skeleton and the animation.
GLTF Viewers
So I try to use the gltfjsx command-line tool to implement into my code with the following command:

npx gltfjsx ./public/3d/avatar/mii_avatar.gltf --transform --types

But I got this error as a result:

prune: Removed types… Accessor (16)
prune: Removed types… Material (10)
prune: Removed types… Accessor (158)
instance: Instancing is not currently supported for animated models.
prune: No unused properties found.
prune: No unused properties found.
prune: No unused properties found.
TypeError: Cannot read properties of null (reading ‘array’)
at file:///C:/Users/billy/AppData/Local/npm-cache/_npx/16b3f312213fced0/node_modules/gltfjsx/src/bin/GLTFLoader.js:2425:40
at async Promise.all (index 0)
at async Promise.all (index 1)

I don’t know what I did wrong in my model maybe using rigify for my model is not the best option to export it on the web. 🤔
And It only happen with this file, if I use it with others gltf model from blender then it's work like a charm and generate the .glb and the .tsx component.
You can find enclosed a zip file containing my avatar model with his armature and his 3 animations.
Any help would be greatly appreciated.
Thank you in advance.
mii_avatar.zip

@campbellgoe
Copy link

did you try npx gltfjsx@latest or putting a different version instead of latest.

@patacoding
Copy link

try my issue maybe solve the problem
#273

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

3 participants