Jump to content
Sign in to follow this  
Mladja-ArmASerbia

Help with reload animation

Recommended Posts

Hello.

I am currently making some reload animation, but animation for some reason "skip" some frames.

For example, after using magazine from puouches left hand go directly to the end of animation, instead on magazine position. Right hand dont move from handguard, but it need to move the bolt.

 		file="\saf_wep_m21\data\anim\M21ABS_Reload_Stand.rtm";
			looped=0;
			speed=0.38;
			mask="handsWeapon";
			headBobStrength=0.200000;
			headBobMode=2;
		rightHandIKBeg = true;
		rightHandIKEnd = true;
		rightHandIKCurve[] = {0,1, 0.023622,0, 0.338583,0, 0.480315,1, 0.771654,1};
		leftHandIKBeg = true;
		leftHandIKEnd = true;
			leftHandIKCurve[]={0,1, 0.023622,0, 0.338583,0, 0.480315,1, 0.582677,1};

I think the problem is in Right and Left Hand IKCurve, I tried with some custom values, but still dont know what they present.

So, if anyone can explain this.

Thanks.

Share this post


Link to post
Share on other sites

I think the problem is in Right and Left Hand IKCurve, I tried with some custom values, but still dont know what they present.

You do this via IK Curves for given hands. rightHandIKCurve[] = {0}; will cause right hand not to lie down on weapon. You dont want that so you'd better leave it at {1}. As for left hand, you should, in most cases, at least try to smoothen the transition between handAnim driver and gesture. You do this by setting points for curve like this:

leftHandIKCurve[] = {0,1,0.05,0,0.95,0,1,1}; // first number in pair is animation rate marker, second number is target IK value

This means, IK will be active at 0% of animation (beginning), then will smoothly go inactive at 5% of animation played, will remain inactive until 95% of animation is played and smoothly become active again at 100% animation. This way you get rid of "rough edges" of animations.

From this thread

All the numbers in the array are in pairs. The second value in each pair is a bool (either a 0 or a 1) saying whether IK is turned off or on when the animation reaches the time set in the first value of the pair. When handanim IK is off (between the 0 values), the reload animation should pose the hands how they are in your reload animation, and when the handanim IK is on, the hands will be posed like they are in your handanim .rtm rather than how they are in your reload anim.

Since keyframes in reload anims are generally numbered 0.0000 to 1.0000 you can probably treat the first value in a pair as being the frame where you want the IK from your handanim .rtm to start to be turned off or on.

So it's kind of this format:

leftHandIKCurve[] =
{
	Frame #1, 1, 		/* handanim IK starts turning off here */
	Frame #2, 0, 		/* handanim IK is now off */
	Frame #3, 0, 		/* handanim IK starts turning back on here */
	Frame #4, 1 		/* handanim IK is now on again */
};

IIRC the bool values have to be in the order 1, 0, 0, 1 and so on

Share this post


Link to post
Share on other sites

Thanks.

I understand whole thing now.

I suppose that is something like "advanced" system, more smooth animation, or somethimg like that, since if put

		rightHandIKBeg = false;
		rightHandIKEnd = false;
		rightHandIKCurve[] = {};
		leftHandIKBeg = false;
		leftHandIKEnd = false;
			leftHandIKCurve[]={};

that the animation will work.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×