1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Possible Bug with X Model Animation?

Discussion in 'ModelConverterX' started by TeamNutmeg, 12 Sep 2017.

  1. TeamNutmeg

    TeamNutmeg

    Joined:
    3 Oct 2010
    Messages:
    9
    Country:
    us-hawaii
    I'm testing a model I'm converting with MCX, and I'm having issues with several of the animations assigned to the standard "<animation>_percent_key" animations.

    As an example, we'll use the elevators. When I move the stick halfway in one direction (toward frame 100), the elevator is already at full deflection. Further movement of the stick has no further effect on the animation. When I move the stick halfway in the other direction (toward frame 0), I also am at full deflection for that direction, but this time further input resets the animation to neutral.

    This shouldn't be a controller issue, because I see the same behavior when using the keyboard.

    I suspect it's an issue with the export to X, because when I look at the xanim file to troubleshoot, I see that all the "Anim" tags have a length of 200 - regardless of what the "AnimStream" tag length has, and regardless of what's in the modeldef.xml file.

    To continue the same example, according the both the modeldef and MCX, elevator_percent_key should be a 100-frame animation, but the "Anim" tag for that entry in the xanim shows 'length="200.000"'.

    If it's a bug and it's being compiled as a 200-frame animation with only 100 frames, it would fit the behavior I'm seeing. At 50% positive deflection (which would be frame 150 in a 200-frame animation), it reaches frame 100 and runs out of frames to animate the remaining 50%. At 50% negative deflection, it hits frame 0, and resets as the 200-frame core animation tries to push the 100-frame animstream into negative frames.

    So is this a bug, or is another issue causing my problems and I'm not experienced enough with this to tell?
     
    Last edited: 12 Sep 2017
  2. =rk=

    =rk=

    Joined:
    28 Nov 2009
    Messages:
    1,477
    Country:
    us-washington
    You would have to be able to locate each key frame and place them in proper order to accommodate the shorter animation length, Using the example of a 4 key frame animation, those would be predictably located at frames 0, 50, 150 and 200. They would have to be placed at frames 0, 33, 66 and 100 with an "extra" frame between 66 and 100 that probably wouldn't matter since it is not a looped animation. Or you could just run it to 99 with an extra frame at that extension to get the full 100.
     
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,621
    Country:
    netherlands
    Hi,

    Most likely the problem here is that the import of old FS2004 aircraft is not fully finished. So I guess the animation might be stored slightly different there and the import is not fully working. Or do you see the animation differently in MCX than you see it in FSX?
     
  4. TeamNutmeg

    TeamNutmeg

    Joined:
    3 Oct 2010
    Messages:
    9
    Country:
    us-hawaii
    I do, but that's partly because of how the sim handles the animations - setting the controls to neutral, for example.

    I'm doing some more investigating, comparing the output of various FSX-native models, and I think this may be more of an issue of my not fully understanding how the system works.

    If I'm (now) understanding this correctly, the "length" in the Anim tag is the time it takes the animation to run, and the "length" in the AnimStream tag is a reference just for that part. So if the Anim length=200 and the AnimStream length=100, then it's supposed to play one frame of the animation for each two "sim frames," yes?
     
  5. TeamNutmeg

    TeamNutmeg

    Joined:
    3 Oct 2010
    Messages:
    9
    Country:
    us-hawaii
    OK, so I figured out how to fix it. It seems that, regardless of what's in the SDK, the modeldef, or the xanim file, the parts (at least for this model) demand a length of 200 in the AnimStream tag. So that requires changing each part's entry, both for length and for Keyframe times. It also requires custom animations in the modeldef file to change to 200-length time and to correct the bias.

    Total pain in the tuchas, but at least it's working. I think I'm starting to understand why you don't see moving control surfaces on a lot of AI models.
     
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,621
    Country:
    netherlands
    I still hope to do a more automatic conversion in the future, seems I would need to do something with the animation length as well then. Thanks for sharing.
     

Share This Page