• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Reversing Animations

Messages
9
Country
us-hawaii
Hello all, looking for a little help to save my desk from further head-related damage.

I'm attempting to convert an older flyable model into an AI model (for personal use, of course - trying to get our museum's soon-to-be-flying Stinson OY-1 flying in my sim).

I have everything else fixed, except for the flaps. On this model, they animate from full downward deflection at keyframe 0, to full upward (i.e. angled up above the wing chord line, about 30 degrees) at keyframe 100. So not only are they swinging too far, but they're animating in the wrong direction.

They do not seem to respond to any changes in the "Scale" variable in the modeldef.xml, and reading through some older posts on here it seems that there are some animations that are one-way only and cannot be changed. However, given how quickly things develop with MCX and the modeling community, I was hoping that perhaps this has changed in the three or four years since those posts.

So, is there any (fairly simple) way I can get the animations to play in reverse - e.g. from frame 100 to frame 0? Or any simple way to flip the keyframes? If so, I can eliminate the upward deflection using a simple "Bias" variable.

Thanks for any help that's provided!
 

=rk=

Resource contributor
Messages
4,470
Country
us-washington
You could isolate and export the part and create a new animation sequence using FSDS and then join that new animated part to the original model.
 
Messages
244
Country
england
With things like this in the past I've added a new entry into the modeldef.xml to reverse the animation, then applied that with the animation manager in MCX.
It will still look backwards in MCX but should animate correctly in the sim.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I guess I would try to tweak the xanim file manually. You should be able to reverse them there. It can't be done in MCX at the moment.
 
Messages
9
Country
us-hawaii
With things like this in the past I've added a new entry into the modeldef.xml to reverse the animation, then applied that with the animation manager in MCX.
It will still look backwards in MCX but should animate correctly in the sim.

Yeah, that's what I was trying to do too - and did successfully for an aileron that was also not animated in the right direction. But as noted, this part ignores any changes to the "Scale" variable. Unless there's another way to reverse it in modeldef that I haven't found out about yet...?

I guess I would try to tweak the xanim file manually. You should be able to reverse them there. It can't be done in MCX at the moment.

Looks like I get to learn something new today! Thanks for giving me a direction to look in, hadn't gotten deep enough into this to know that was an option.
 
Messages
244
Country
england
Have you tried

<Scale>-1.0</Scale>

May need a <Bias> entry as well.
?

Have a look at the "lever_flap_reversed" part in the default modeldef.
 
Messages
9
Country
us-hawaii
Have you tried

<Scale>-1.0</Scale>

May need a <Bias> entry as well.
?

Have a look at the "lever_flap_reversed" part in the default modeldef.

Tried that, didn't have any luck. It honestly looked like it should have worked.

That said, in 15 minutes, I took Arno's suggestion, exported the model as an X, figured out what I was looking at, and fixed the flaps. I also fixed the aileron animation so that I didn't have to use a custom animation in modeldef, which seems like a good thing.

Thanks, everyone, for the suggestions and opening me up to a new tool in the toolbox.
 
Messages
152
Country
france
Could you explain what you did in order to fix that issue ? I have the exact same issue with the flaps when converting a FS9 AI aircraft for Prepar3d v4
I had in mind to export the model along with the animations to see what is wrong with the flaps but I am not familiar enough yet with this new MCX feature

thanks in advance
 
Messages
9
Country
us-hawaii
Export Object, change "Save as type" to "FSX object X file (*.X)", name as required. You should get two files, <filename>.x and <filename>.xanim. Open the .xanim file in the text editor of your choosing (I use Wordpad) and find the section you're animating (look for the animation type you previously assigned). You'll see the Anim tag, the AnimStream subtag, and then a number (usually five) Keyframe tags with time values of 0.0 to 100.0 (or 200.0 for some animations).

The simple way to reverse the animation is to cut-and-paste the lines to re-order them, now going largest to smallest. Then renumber them in the original order.

For example, on a 100-frame animation with five keyframe points - 0, 25, 50, 75, 100 - you'd cut-and-paste to order them 100, 75, 50, 25, 0. Then you'd change the time entries back to 0, 25, 50, 75, 100. Hope that's clear.

However, I may have run into a possible bug that I'll put in a separate thread.
 
Top