Closed AlexanderProd closed 3 years ago
fixed it by doing a verbose output using the -v
flag in gltfjsx
.
oh thats interesting, could still be a bug if it took away something that was needed for skinned meshes
oh thats interesting, could still be a bug if it took away something that was needed for skinned meshes
Yeah thats true, I just played around with it and it fixed it by chance haha. Shall we reopen the issue?
I have a glb file with animated joints and a camera moving along a path, when load the model in gltf-viewer.donmccurdy.com the animation plays completely and I can switch to the Camera "Main_Camera" to see the camera movement.
Here a quick recording of how it should look like, excuse the choppiness my macbook has a hard time recording and rendering the webgl at the same time. :D
https://user-images.githubusercontent.com/3080903/121669396-8fc26700-caac-11eb-8549-c72d8f963da5.mp4
But when I convert the model to JSX using gltfjsx, load it in react and play the animation it only plays one of the animation tracks which is one joint, not the whole animation which is composed of multiple tracks, the camera movement being one of them.
Here also a quick screen recording of how it looks, also confusing is the weird lighting change. https://user-images.githubusercontent.com/3080903/121669878-1bd48e80-caad-11eb-942a-40008b6f4fc6.mp4
This is the content of
actions["animation_0"]._clip
. As you can see there are multiple tracks with axes and the Main_Camera animated.The gltfjsx output also only contains one group with the name "Axis-5", the actual model has "Axis-1" to "Axis-7", with 1,2,3 and 5 animated.
Given that the animation plays perfectly in the gltf web viewer using three.js the .gtlb file must be correct and the problem happening during the conversion to jsx.
You can reproduce this by loading the attached
.glb
file in gltf-viewer.donmccurdy.com and under cameras selecting "Main_Camera".I've also attached my output of gltfjsx using the command
yarn gltfjsx public/model.glb -p=6
. I've setmakeDefault
to true inPerspectiveCamera
and added auseEffect
to playanimation_0
. I'm not sure if the exportedPerspectiveCamera
is the same asMain_Camera
.Archiv.zip