Hello @Mugen87
Now I use the ColladaLoader2
to load my model and play the animations but I get errors and display problems :
ColladaLoader
my model displaying well.can not bind to bones as node does not have a skeleton PropertyBinding {path: ".skeleton.bones[Hips].position", ...
ColladaLoader2.js:2276 THREE.ColladaLoader: Missing data for bone: Hips.
The model come from mixamo : https://www.mixamo.com/ , which gives quality models.
Considering this code :
loader.load(source, function(collada)
{
const obj = collada.scene;
const animations = collada.animations;
obj.traverse(function(child)
{
child.castShadow = true;
child.receiveShadow = true;
if ( child instanceof THREE.SkinnedMesh )
{
this.skeleton = new THREE.SkeletonHelper(child);
this.skeleton.material.linewidth = 3;
this.skeleton.visible = this.skeletonIsShowed;
this.environment.scene.add(this.skeleton);
}
}.bind(this));
this.mixer = new THREE.AnimationMixer(obj);
this.clip = animations[0];
this.mixer.clipAction(this.clip).play();
}.bind(this));
Thanks for reading.
Is it possible that you share the model? I need to debug this in order to see what's going wrong...
Thanks for the file! I will look into it...
I'll investigate the animation problem within a separate PR.
I'm not sure if the animation data of this object are valid. As far as i can see, the file only contains two keyframes per bone. Besides, the time values are very strange (0.000000 and 0.033333). So the total length of the parsed animation clip is 0.033333 seconds. Well, it's no problem to change the duration for playback but still these data seems strange to me. Currently i was not able to playback the animation (ColladaLoader
didn't work either).
BTW: I've imported the model in sketchfab and no animations were parsed at all, too.
@SebastienFPRousseau Can you please verify if the animation data of your model are correct?
It's weird... I suspected something like that. I will try another model. Thanks for the texture correction, waiting for the release. Animations mustn't be valid.
Most helpful comment
I'm not sure if the animation data of this object are valid. As far as i can see, the file only contains two keyframes per bone. Besides, the time values are very strange (0.000000 and 0.033333). So the total length of the parsed animation clip is 0.033333 seconds. Well, it's no problem to change the duration for playback but still these data seems strange to me. Currently i was not able to playback the animation (
ColladaLoader
didn't work either).BTW: I've imported the model in sketchfab and no animations were parsed at all, too.
@SebastienFPRousseau Can you please verify if the animation data of your model are correct?