• Advertisement
Sign in to follow this  

Easy Skeletal Animation Blending? (C++)

This topic is 3035 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I want to have a blending going on with my animations for when they play in a sequence in my game engine. What I have so far is a md5anim loader that can play animations and etc. So what I made is one file with all the actions/animations in one file. What I want to happen, since every 20 frames is a full cycle animation (Walking, Running, Idle) and 10 frames is a going in or out animation (Starting To Walk Or Stopping To Walk) I want to jump to frames efficiently that it doesn't just skip to idle, but it will continue playing the running until it hits the frame where the running stops or goes into idle. I'm basically trying to accomplish what Quake 2 did. Time Line 1 to 20 is the idle animation. 20 to 30 is the going into running cycle. 30 to 50 is the 20 frames cycle animation. 50 to 60 is the 10 frames going out of running into a idle pose. This is what I have so far:

int CurrentAnimation; //local class variable
int Animation; //Local function variable

if (Animation == CurrentAnimation)
    {
						//Arg 1 End FramePos, Arg 2 StartFramePos
						m_md5Loader.Animate(..., Animation * 20, Animation * 10 - 10);


	}else{
						m_md5Loader.Animate(..., CurrentAnimation * 20, CurrentAnimation + 19 );


			if(animInfo.curr_frame >= CurrentAnimation * 20)
				CurrentAnimation = Animation;
	}





Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement