www.jpct.net

Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: kiffa on July 25, 2012, 09:53:48 am

Title: Proplem with blending pose-animation and skin-animation.
Post by: kiffa on July 25, 2012, 09:53:48 am
My scene:
 1, Objcets: a rock + a dog
 2, Animations: rock-skin + dog-skin + dog-pose

I want to play all animations at the same time, my codes:

Code: [Select]
           //AnimatedGroup group
            group.animatePose(index, mAnimationIndex);             //dog-pose
            group.animateSkin(index, mAnimationIndex);              //dog-skin
            group.animateSkin(index, mAnimationIndex + 1);        //rock-skin
            group.applyAnimation();

When it run, just play rock-skin and dog-skin, dog-pose didn't be played. But if i changed my code like this(change order):


Code: [Select]
   group.animateSkin(index, mAnimationIndex);          //dog-skin
            group.animatePose(index, mAnimationIndex);         //dong-pose
            group.animateSkin(index, mAnimationIndex + 1);    //rock-skin
            group.applyAnimation();

Rock-skin 、dog-skin、dog-pose are all played.


And if:

 
Code: [Select]
   group.animateSkin(index, mAnimationIndex);          //dog-skin
            group.animateSkin(index, mAnimationIndex + 1);       //rock-skin
            group.animatePose(index, mAnimationIndex);           //dog-pose
            group.applyAnimation();

Dog-pose was played, and rock-skin seems to be played too, but rock-skin was rather different from what seen in maya.

Any advices?

Title: Re: Proplem with blending pose-animation and skin-animation.
Post by: raft on July 25, 2012, 08:09:41 pm
Using pose and skin animation at the same time is called animation blending. from the docs:

Quote
If you need animation blending, you should disable "auto apply animation", first perform pose animation(s) then perform skin animation and finally call applyAnimation().

read the docs ;)