Sign in to follow this  
Matheus Vallim

Animation keyframes issue - "door_0" or similar

Recommended Posts

Hello,

I have been facing an unpleasant issue, which I cannot get rid of it for a long.

Usually, door animation starts at keyframe 0 and finish at 100. Ok, but in my model I need to have a keyframe at 80, because the end of animation is slower than the overall.

 

This is the code in *.xanim:

 

<?xml version="1.0" encoding="ISO-8859-1" ?>
<AnimLib version="9.1">
  <Anim name="door_0" guid="9B5ED86C-B114-4924-B5C9-163A99042F2F" length="100.000000"
        type="Sim" typeParam="AutoPlay" typeParam2="door_0">
    <AnimStream name="Position" id="2" partName="Door_passenger_1" length="100.000000">
      <Keyframe time="0.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
      <Keyframe time="80.000000" type="Vector" data="0.000000;-0.548503;-0.000000;0.0"/>
      <Keyframe time="100.000000" type="Vector" data="0.000000;-0.584065;0.000001;0.0"/>
    </AnimStream>
  </Anim>

 

Very easy to understand: when the animation starts, the position is at 0;0;0. At keyframe 80, Y position is -0.548503. For the last keyframe, poition is -0.584065. But this does not happen correctly in FS, as you can see below:

giphy.gif

Close to the end of animation, the canopy goes forward and return to the 100 keyframe position. This is an aircraft made for FS9. Even tested in FSX, this animation is OK. Now, I am recompiling it for FSX and facing this error.

Another test:

I changed door_0 by lever_prop_pitch, just to see what happens. The result was not good. Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<AnimLib version="9.1">
  <Anim name="lever_prop_pitch" guid="9B5ED86C-B114-4924-B5C9-163A99042F2F" length="100.000000"
        type="Sim" typeParam="AutoPlay" typeParam2="lever_prop_pitch">
    <AnimStream name="Position" id="2" partName="Door_passenger_1" length="100.000000">
      <Keyframe time="0.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
      <Keyframe time="80.000000" type="Vector" data="0.000000;-0.548503;-0.000000;0.0"/>
      <Keyframe time="100.000000" type="Vector" data="0.000000;-0.584065;0.000001;0.0"/>
    </AnimStream>
  </Anim>

giphy.gif

(pressing CTRL + F3... canopy goes backward and, then, afterward, this can not happen according to my code)

Could somebody please help me?

 

Thanks,

Matheus

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Somebody with more knowledge may step in here, this is just an idea.
Try re-animating with keyframe points at 0, 79, 80, 81, 99 & 100.

 

Share this post


Link to post
Share on other sites

From the same topic at FS Developer, adding more keys was the answer to the problem.

Share this post


Link to post
Share on other sites
32 minutes ago, n4gix said:

From the same topic at FS Developer, adding more keys was the answer to the problem.

Ahh I see,:blink: the hunch was somewhat correct.

Share this post


Link to post
Share on other sites

Yes Roman. In order for FSX/P3D to properly interpolate keyframed animations, it needs enough keys to be set, otherwise unpredictable behavior can and probably will occur... :blink:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this