• 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.

Landing gear retraction animation

Messages
7
Country
ca-ontario
3ds Max. Wonder what is needed. Do I need 1 frame with gear out and one in and then a 20-30 frame animation?
What is needed in model xml to animate the gear. I tried many different scripts. No luck
Thanks
 
Which platform? MSFS or FSX?

Animations for gear have used 200 keyframes, with 0 -100 being retracted - extended and 100-200 strut compression.
 
The model I'm currently working on is using the same animation schema for gear extension/retraction/strut compression as indicated in my previous message. The only difference is using the model behaviors template(s) instead of the old FSX XML schema.
 
The model I'm currently working on is using the same animation schema for gear extension/retraction/strut compression as indicated in my previous message. The only difference is using the model behaviors template(s) instead of the old FSX XML schema.
If there a good doc/tutorial/info on ASOBO templets?
 
If there a good doc/tutorial/info on ASOBO templets?
hahahahahahahahahahahahaha.... nope. Asobo XML templates are a VERY complex part of their MSFS implementation and are completely undocumented both in terms of content and how they work.

The routine is to look at some Asobo aircraft that has the type of animation you're interested in, and browse the model/<aircraft>.xml file (e.g. with Notepad). There will be an entry in the Behaviours section for the undercarriage/gear and you copy that. The remaining complexity is you have to use the same model animation/node names as Asobo for the top-level templates to work but those are not documented. It is possible to find these by an unbelievably tortuous process of carefully unpicking dozens of files walking down through the sub-templates the top-level template is expanded into. It's possible you could guess the animation/node names from the model/<aircraft>.gltf file. Maybe there are other methods of finding those identifiers I don't know.

Frankly for the vast bulk of animations (switches, controls, control surfaces, levers, gauges, propellers, doors, canopy, gear) IMHO the Asobo templates are a poorly designed thick layer of undocumented complexity that obscures important information and adds nothing to the development process. Some people like 'em so maybe you will too. I moved to just using plain un-templated XML blocks (which is what the templates translate into) and haven't looked back since. For 60 animations on my AS33 glider I think only a couple of them use templates. TBH most of the templates simply move something between A and B so why they typically need 2000 lines of XML to do that is a question Asobo should think carefully about.

Maybe if you find an example of a template you think you might use, you might have a look for the relevant model identifiers, and if that's unsuccessful paste the template code up here and someone smarter than me might be able tell you the model naming conventions for that particular template.
 
hahahahahahahahahahahahaha.... nope. Asobo XML templates are a VERY complex part of their MSFS implementation and are completely undocumented both in terms of content and how they work.

The routine is to look at some Asobo aircraft that has the type of animation you're interested in, and browse the model/<aircraft>.xml file (e.g. with Notepad). There will be an entry in the Behaviours section for the undercarriage/gear and you copy that. The remaining complexity is you have to use the same model animation/node names as Asobo for the top-level templates to work but those are not documented. It is possible to find these by an unbelievably tortuous process of carefully unpicking dozens of files walking down through the sub-templates the top-level template is expanded into. It's possible you could guess the animation/node names from the model/<aircraft>.gltf file. Maybe there are other methods of finding those identifiers I don't know.

Frankly for the vast bulk of animations (switches, controls, control surfaces, levers, gauges, propellers, doors, canopy, gear) IMHO the Asobo templates are a poorly designed thick layer of undocumented complexity that obscures important information and adds nothing to the development process. Some people like 'em so maybe you will too. I moved to just using plain un-templated XML blocks (which is what the templates translate into) and haven't looked back since. For 60 animations on my AS33 glider I think only a couple of them use templates. TBH most of the templates simply move something between A and B so why they typically need 2000 lines of XML to do that is a question Asobo should think carefully about.

Maybe if you find an example of a template you think you might use, you might have a look for the relevant model identifiers, and if that's unsuccessful paste the template code up here and someone smarter than me might be able tell you the model naming conventions for that particular template.
Somehow, deep inside me, I knew it. But needed to be sure I am not wasting time figuring out functions. I guess what I was doing before was right. This is a total cluster ~!@#$. Starting from a SDK that can't make a right directory structure. Thanks for a clarification.
 
I agree with B21 that the Asobo templates can be a bit difficult to figure out. What has worked for me is to use the easy templates when you can and if you have a particular animation that is non-standard or doesn't want to work correctly, move down to a more low level template.

For the gear, I feel that these templates are pretty good and can be used in the simple form. As N4gix posted, 200 frames is the right number of frames for retractable gear. But I found that if you have non-retractable gear, it only uses 0-100 frames for the compression animation. The way you can see this is in dev mode, use the model behaviors debugger to show which frames are being called at any given time.

The gear template can take the name of the animation, so you don't have to search through the code to find this one out. This is actually all it takes to animate the main gear:

XML:
            <UseTemplate Name="ASOBO_GEAR_Left_Template">
                <ID>1</ID>
                <ANIM_NAME>l_gear</ANIM_NAME>
            </UseTemplate>
            <UseTemplate Name="ASOBO_GEAR_Right_Template">
                <ID>2</ID>
                <ANIM_NAME>r_gear</ANIM_NAME>
            </UseTemplate>
 
Thanks sal1800, I think you show exactly the process, i.e. the best way to explain any 'animation by template' is by example. To complete the template/raw comparison, here's the overall file structure showing the templates and raw XML code at its simplest (for a basic 0..100 extension, not compression).
Code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>
    <LODS>
             ...LOD entries
    </LODS>

    <Behaviors>
              ... Asobo <Include> entries
              ... your UseTemplate entries
    </Behaviours>

Then you can have your 'raw' Animation and PartInfo entries e.g. the gear entry for my AS33 single main wheel
Code:
    <Animation name="wheel_action" guid="4a21e6cb-52fc-4715-8432-978e0a838b46" type="Sim" typeParam="AutoPlay" typeParam2="wheel_action" length="100"/>
    <PartInfo>
        <Name>wheel_action</Name>
        <AnimLength>100</AnimLength>
        <Animation>
          <Parameter>
            <Code>(A:GEAR TOTAL PCT EXTENDED, percent)</Code>
          </Parameter>
        </Animation>
    </PartInfo>
and the model XML file ends with
Code:
</ModelInfo>

The basic trade off is if the Asobo template fits your use case, and you have a working example of its use, then the template should be a snap-in for your model. The 'raw XML' actually works for ANY animation so if you have the knowledge of how to control an animation using the <Code> section (it's often a single variable) then you can get anything working quickly and improve it from there. In my actual gear case the animation is very slightly more complicated than a fixed 0..100 and (with centuries of FSX XML code experience) I can tweak that <Code> section to get exactly what I want.
 
Huge thanks to all. I was able to animate gears with
Code:
<Component ID="GEARS">
                <UseTemplate Name="ASOBO_GEAR_Center_Template">
                    <ANIM_NAME>c_gear</ANIM_NAME>
                </UseTemplate>
                <UseTemplate Name="ASOBO_GEAR_Left_Template">
                    <ANIM_NAME>l_gear</ANIM_NAME>
                </UseTemplate>
                <UseTemplate Name="ASOBO_GEAR_Right_Template">
                    <ANIM_NAME>r_gear</ANIM_NAME>
                </UseTemplate>
</Component>
Frames 0-100 retracted. Frames 100-200 down animation. But I am running into a problem with a hangar animation. Debugger shows that hangar wants to use 118-120 frames for fully extended gear. Should I move gear down animation to 121-200? And have frame 100 with a static fully retracted gears.? But the problem is those 3 frames will be visible in animation.
 
Last edited:
It is going to frames 118-120 due to compression.

Frame 100 is your fully extended gear without weight on top of it, like it's hanging in the air. 200 is fully compressed gear.

If your plane has no suspension on gears, you should change dumping/stiffness to make it rigid.
 
Perhaps it is a silly question, but why would a hangar even need a gear animation? :scratchch
 
I understand its about an aircraft inside an hangar? I think the only difference from apron start is inactive cockpit and possibly empty fuel tanks, so compression is less than you see on apron where default is 50% fuel load.
 
Back
Top