Question about animation blending

Posted By: 3run

Question about animation blending - 05/24/16 16:15

Hi!

I have an issue.. I'm playing around with animations (trying to get good looking animated camera, by attaching camera to a bone of animated model). I can blend one animation into another, that's not the issue here. Problem is, that I blend one animation into the another one, and then ANM_ADD another cycling animation, but added animation doesn't get blended, so it looks really edgy...

Here is what I'm trying to do:
Quote:
-player goes into the crawling, we blend into the 'go_crawl' animation

-player is crawling, but not walking.. we blend into the latest frame from 'go_crawl' animation and then we add stand animation to it (to make camera wiggle)

-player walks while crawling? we blend into the latest frame from 'go_craw' (here and in previous point, I do this to keep camera low, so it looks like player is crawling) and then add to it 'walk' animation, to make camera blob

-player wants to stand up, blend into the 'go_stand' animation.


This is pretty simple, but I can't get this one to work.. Any ideas? If I had separate animation for crawl_idle and crawl_walk, this won't be a problem but I don't have such animations..


Best regards.
Posted By: Superku

Re: Question about animation blending - 05/24/16 16:27

Are you using bones or vertex animation?
Posted By: 3run

Re: Question about animation blending - 05/24/16 16:28

Sorry, I forgot to mention. I'm using bones.

EDIT: Added a little video to show the problem, notice when player goes into crawling, there is that jerking movement, that's caused by 'added' standing animation, same when player starts walking while crawling...

Camera animation
Posted By: alibaba

Re: Question about animation blending - 05/24/16 21:26

Are you using "pose"?
That might solve your problem.
Posted By: 3run

Re: Question about animation blending - 05/24/16 22:06

Nope, I never worked with 'poses'. Can you give me a hint?

Thank you. Best regards!
Posted By: alibaba

Re: Question about animation blending - 05/24/16 22:31

something like:
Code:
Pseudocode:
...
ent_animate(stand);
my.pose=2;
ent_animate(crouch);

my.pose=3;
ent_animate(crouch);
ent_animate(walk,ANM_ADD);

if(my.skill1>0)
ent_blendpose(1,2,my.skill1);

my.skill1=100*key_w;
smooth(my.skill1,0.99);



The example in the manual should hint you to the right way.
© 2024 lite-C Forums