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

problem with animation

Messages
27
Country
germany
Hello i have a problem with my animations
i have a animation

<Component ID="HANDLING">

<UseTemplate Name="ASOBO_HANDLING_Aileron_Template">
<ANIM_NAME_LEFT>l_aileron_percent_key</ANIM_NAME_LEFT>
<ANIM_NAME_RIGHT>r_aileron_percent_key</ANIM_NAME_RIGHT>
</UseTemplate>

and on top from the xml is
<Behaviors>
<!-- Includes ###################################### -->
<Include ModelBehaviorFile="Asobo\Common.xml"/>
<Include ModelBehaviorFile="Asobo\Exterior.xml"/>
<Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>
<Include ModelBehaviorFile="Asobo\AircraftTypes\Gliders.xml"/>

i get no error messages when i build the project with fspackagetool
all animation in blender has the right name from the xml
I think my project cant find the modelbehaviorfiles
How did i manage this that they will work ?
 
It is easy enough to convey the entirety of the XML document you refer to, you can present it as a formatted HTML representation, or you can Zip compress the actual document and attach it. Doing either prevents language translation issues, that compound misunderstandings because we are using a "markup language." Therefore, when you type
and on top from the xml is
It's really hard for me to tell if you are telling us the Behaviors section is in the wrong place in the XML, or if it's on another XML document on top of the animation XML document. I don't see any closing tags at all "</Behaviors>" which isn't to say you aren't using them, but there's no clear confirmation and a missing closing tag works exactly as if the information after the opening tag, "<Behaviors>" does not exist at all.

There are a great deal of variables that must be aligned for an animation to play properly in sim. A few of those variables are applied within the 3d software and I cannot speak to the specifics of terms or procedures in that software. Within my 3d software, the animation must be composed with a fairly rigid scheme of keyframes, either individually placed, or keyed as a skinned mesh, the animations have to have a specific naming convention, the animations must be recorded into the Babylon Animation Groups. Additionally, some animations, behavior group ones I believe, must be exported with "Containers and Xref Merged" in a PreExport Process.

Once free of the 3d software, an animation is not yet ready to play. It must be identified in the model XML file and it must be linked to it's trigger, which itself must be properly identified. If all this is said and done, the animation will play.

Now, there are a lot of sections in the XML and generally, it does not matter what order they are in, because the software has to read the entire document before it can act on any of the sections, or arguments. Within the document itself are this series of "arguments," marked by opening and closing tags. An argument is basically a statement, or a definition. The line indents are not required at all, developers add those to simplify interpreting the code and because of this, there is usually a clear pattern for where to place the opening and closing tags.

Below is the model XML from the default Cabri G2. You can see it is very legible. If you placed your animation argument into a document of this form and then showed us the complete version, it would be very easy to tell about proper syntax, placement and definition.
___________________________________________________________________________________________

XML:
<?xml version="1.0" encoding="utf-8" ?>

<ModelInfo>

    <LODS>

        <LOD minSize="150"         ModelFile="Cabri_G2_LOD00.gltf"/>

        <LOD minSize="90"         ModelFile="Cabri_G2_LOD01.gltf"/>

        <LOD minSize="70"         ModelFile="Cabri_G2_LOD02.gltf"/>

        <LOD minSize="30"         ModelFile="Cabri_G2_LOD03.gltf"/>

        <LOD minSize="10"         ModelFile="Cabri_G2_LOD04.gltf"/>

        <LOD minSize="5"         ModelFile="Cabri_G2_LOD05.gltf"/>

    </LODS>

    <Behaviors>

        <Include ModelBehaviorFile="Asobo\Exterior.xml"/>

        <Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>

        <Include ModelBehaviorFile="Asobo\AircraftTypes\Rotorcrafts.xml"/>

     

     

        <Component ID="ROTORS">

            <Component ID="Main_Rotor">

                <Parameters Type="Default">

                    <ID>1</ID>

                    <ROTOR_ID>1</ROTOR_ID>

                    <MIN_RPM_FOR_BLUR>350</MIN_RPM_FOR_BLUR>

                    <MIN_RPM_FOR_BLUR2>500</MIN_RPM_FOR_BLUR2>

                </Parameters>

                <Loop>

                    <Setup>

                        <Param>STATEID</Param>

                        <From>1</From>

                        <Inc>1</Inc>

                        <To>1</To>

                        <To>1</To>

                    </Setup>

                    <Do>

                        <Parameters Type="Override">

                            <Switch Param="STATEID">

                                <Case Value="1">

                                    <STATE>STILL</STATE>

                                </Case>

                                <Case Value="2">

                                    <STATE>SLOW</STATE>

                                </Case>

                                <Case Value="3">

                                    <STATE>BLURRED</STATE>

                                </Case>

                            </Switch>

                        </Parameters>

                        <Loop>

                            <Setup>

                                <Param>BLADEID</Param>

                                <From>1</From>

                                <Inc>1</Inc>

                                <To>3</To>

                            </Setup>

                            <Do>

                                <Condition Check="STATEID" Match="1">

                                    <True>

                                        <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                                            <NODE_ID>Livery_Decal_Main_Blade_0#BLADEID#_Still</NODE_ID>

                                        </UseTemplate>

                                    </True>

                                </Condition>

                                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                                    <ID>0#BLADEID#</ID>

                                </UseTemplate>

                            </Do>

                        </Loop>

                    </Do>

                </Loop>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <NODE_ID>PROP1_BLURRED</NODE_ID>

                    <STATE>BLURRED</STATE>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <NODE_ID>PROP1_SIDE_BLUR</NODE_ID>

                    <STATE>BLURRED</STATE>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <NODE_ID>CENTER_PROP1_SLOW</NODE_ID>

                    <STATE>SLOW</STATE>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <NODE_ID>Livery_Decal_Main_Blade</NODE_ID>

                    <STATE>STILL</STATE>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Rotation_Template">

                    <ANIM_NAME>prop_1</ANIM_NAME>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Swashplate_Template">

                    <ANIM_NAME>Switch_Swashplate</ANIM_NAME>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Disk_Coning_Template">

                    <ANIM_NAME>Coning</ANIM_NAME>

                </UseTemplate>

            </Component>

            <Component ID="Tail_Rotor">

                <Parameters Type="Default">

                    <ID>2</ID>

                    <ROTOR_ID>2</ROTOR_ID>

                    <MIN_RPM_FOR_BLUR>2500</MIN_RPM_FOR_BLUR>

                    <MIN_RPM_FOR_BLUR2>4000</MIN_RPM_FOR_BLUR2>

                </Parameters>

                <Loop>

                    <Setup>

                        <Param>BLADEID</Param>

                        <From>1</From>

                        <Inc>1</Inc>

                        <To>7</To>

                    </Setup>

                    <Do>

                        <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                            <NODE_ID>STEERING_SCREW_BLADE_0#BLADEID#</NODE_ID>  

                        </UseTemplate>

                    </Do>

                </Loop>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Rotation_Template">

                    <ANIM_NAME>tail_prop</ANIM_NAME>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <NODE_ID>STEERING_SCREW_STILL</NODE_ID>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <STATE>SLOW</STATE>

                    <NODE_ID>STEERING_SCREW_SLOW</NODE_ID>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Rotor_Blade_Visibility_Base_Template">

                    <STATE>BLURRED</STATE>

                    <NODE_ID>STEERING_SCREW_BLURRED</NODE_ID>

                </UseTemplate>

                <UseTemplate Name="ASOBO_ROTORCRAFT_Tail_Prop_Pitch_Template">

                    <ANIM_NAME>Tail_Prop_Blades</ANIM_NAME>

                </UseTemplate>

            </Component>

        </Component>

        <Component ID="Yaw_String">

            <UseTemplate Name="ASOBO_ROTORCRAFT_Yaw_String">

            </UseTemplate>

        </Component>

    </Behaviors>

</ModelInfo>
 
this is my .xml




<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>
<LODS>
<!-- Highest LOD -->
<!-- minimum display size in % (should be bounding sphere vertical screen size, sphere will often be slightly larger than you expect) -->
<!-- default minSize is 0 -->
<!-- <LOD minSize="150" ModelFile="ask_13.gltf"/> -->
<LOD minSize="5" ModelFile="ask_13.gltf">

</LODS>
<NodeAnimation type="WingFlex">
<Node>Bone.001.L_wing</Node> <!-- the left wing bone closest to the center -->
<Node>Bone.001.L_wing</Node> <!-- in between -->
<Node>Bone.001.L_wing</Node> <!-- in between -->
<Node>Bone.001.L_wing</Node> <!-- the left wing bone furthest from the center -->

<Node>Bone.001.R_wing</Node> <!-- the right wing bone closest to the center -->
<Node>Bone.002.R_wing</Node> <!-- in between -->
<Node>Bone.003.R_wing</Node> <!-- in between -->
<Node>Bone.004.R_wing</Node> <!-- the right wing bone furthest from the center -->

<Node></Node> <!-- the left wing engine pivot node closest to the center -->
<Node></Node> <!-- the left wing engine pivot node furthest from the center -->

<Node></Node> <!-- the right wing engine pivot node closest to the center -->
<Node></Node> <!-- the right wing engine pivot node furthest from the center -->
</NodeAnimation>

<Behaviors>
<!-- Includes ###################################### -->
<Include ModelBehaviorFile="Asobo\Common.xml"/>
<Include ModelBehaviorFile="Asobo\Exterior.xml"/>
<Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>
<Include ModelBehaviorFile="Asobo\AircraftTypes\Gliders.xml"/>
<!-- ###################################### -->




<Component ID="HANDLING">

<UseTemplate Name="ASOBO_HANDLING_Aileron_Template">
<ANIM_NAME_LEFT>l_aileron_percent_key</ANIM_NAME_LEFT>
<ANIM_NAME_RIGHT>r_aileron_percent_key</ANIM_NAME_RIGHT>
</UseTemplate>

<!-- Spoilers -->
<Component ID="HANDLING_Spoilers">
<UseTemplate Name="ASOBO_HANDLING_Spoilers_Template">
<ANIM_NAME_LEFT>l_spoiler_key</ANIM_NAME_LEFT>
<ANIM_NAME_RIGHT>r_spoiler_key</ANIM_NAME_RIGHT>
<!-- ANIM_EVENTS -->
<ANIM_EVENT_EFFECT_NAME>CAM_SPOILERS</ANIM_EVENT_EFFECT_NAME>
<NORMALIZED_TIME>0.5</NORMALIZED_TIME>
<DIRECTION>Both</DIRECTION>
</UseTemplate>
</Component>


<!-- Rudder -->
<UseTemplate Name="ASOBO_HANDLING_Rudder_Template">
<ANIM_NAME>rudder_percent_key</ANIM_NAME>
</UseTemplate>

<!-- Elevator -->
<UseTemplate Name="ASOBO_HANDLING_Elevator_Template">
<ANIM_NAME>elevator_percent_key</ANIM_NAME>
</UseTemplate>

</Component>

</Component>
</Behaviors>
</ModelInfo>
 
before i change my xml,
i had this animation name for Elevator and it worked in game but with the new animation name ( elevator_percent_key ) nothing works now i changed all animation names from _PCT to percent_key

<Component ID="HANDLING">
<UseTemplate Name="ASOBO_HANDLING_Elevator_Template">
<ANIM_NAME>Elevator_PCT</ANIM_NAME>
</UseTemplate>
 
It appears that you have one too many component close tags, "</Component>" also I'd try just a standard elevator command to see if it works, because it's simpler:

XML:
    <PartInfo>
        <Name>elevator_percent_key</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>ELEVATOR DEFLECTION PCT</Variable>
                    <Units>percent</Units>
                    <Bias>50</Bias>
                </Sim>
            </Parameter>
        </Animation>
    </PartInfo>
 
the elevater was a example
the fspackagebuilder shows me when there is an error but its still ok
I think my project is not linked with these xml´s because i have no animations in msfs with my .xml
Common.xml
Exterior.xml
Generic\FX.xml
Gliders.xml


my old xml works fine with these animation data
most animation worked ingame, but i had trouble with wingflex and the ailerons and i changed the animations what i had seen on youtube (from madolo simulations MSFS sailplane wingflex)
with my old xml ( i post in green ) elevator, rudder and airbrakes worked but wingflex and ailerons not .

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>
<LODS>
<!-- Highest LOD -->
<!-- minimum display size in % (should be bounding sphere vertical screen size, sphere will often be slightly larger than you expect) -->
<!-- default minSize is 0 -->
<LOD minSize="5" ModelFile="ask_13.gltf"/>
</LODS>
<Behaviors>
<Include ModelBehaviorFile="Asobo\Exterior.xml"/>
<!--Primary Flight Controls -->
<Component ID="HANDLING">
<UseTemplate Name="ASOBO_HANDLING_Elevator_Template">
<ANIM_NAME>Elevator_PCT</ANIM_NAME>
</UseTemplate>
<UseTemplate Name="ASOBO_HANDLING_Aileron_Template">
<ANIM_NAME_LEFT>Aileron_L_PCT</ANIM_NAME_LEFT>
<ANIM_NAME_RIGHT>Aileron_R_PCT</ANIM_NAME_RIGHT>
</UseTemplate>
<UseTemplate Name="ASOBO_HANDLING_Rudder_Template">
<ANIM_NAME>Rudder_PCT</ANIM_NAME>
</UseTemplate>
<UseTemplate Name="ASOBO_HANDLING_Spoilers_Template">
<ANIM_NAME_LEFT>Spoiler_L_PCT</ANIM_NAME_LEFT>
<ANIM_NAME_RIGHT>Spoiler_R_PCT</ANIM_NAME_RIGHT>
</UseTemplate>
</Component>
</Behaviors>
</ModelInfo>
 
I'm sorry but I'm just getting into templates, except from a gauges perspective and I am finding inconsistent results, either due to all the required variables, or addlebrainededness. It seems like something will work on one test run, then I'll change it and something completely different will stop working, or even that things work one time but not another. It implies relations, or variables that are not well known.
I can suggest that components of our models can be run through the build process to be tested in place of complete versions. For example, you could separate your wings and just run test cycles on the flex animation with an abbreviated model XML that was specific to that animation, since you already know the other animations work with a different XML. Also, wing flex is derived from skinned mesh, which I begive has specific animation conditions that you might need to establish.

I wish there was a better tutorial on templates, the SDK provides a lot of examples, it explains all the features, makes an implication how Reverse Polish Notation applies and leaves the rest up to us.
 
yeah i hope we get more tutorials but i dont know why my animations with _key are not working hope i mangage it to work
 
Back
Top