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

MSFS Change Animationspeed

Messages
33
Country
germany
Hi to all,

I am new in building aircraft, and not to good in blender, but I try to build an good, old gliderplane, the K7.
1625511347614.png


Iam now working on the Canopy-Animation.

1625511556428.png
1625511599699.png


I did the animation with the trigger of the spoilers, because I don know, how the Canopy-variable of msfs works ...
My problem now is the speed of the animation.
It is a little bit to fast, i like to make it slower.

I tried to change the speed with the <ANIM_LAG> kommand, but it wont work.....
What did I make wrong here?
Here is the xml-file:
1625511733324.png


Thanks a lot for your help
 
Last edited:
Messages
238
Country
unitedkingdom
Use <Lag> not <ANIM_LAG>, and put it inside the <Parameter> block, e.g. a working example from my plane:
Code:
    <PartInfo>
        <Name>lx_s100_vario_needle</Name>
        <AnimLength>100</AnimLength>
        <Animation>
          <Parameter>
              <Lag>30</Lag>
            <Code>(L:B21_LX_S100_CLIMB_NEEDLE, number)</Code>
          </Parameter>
        </Animation>
    </PartInfo>

You can wrap [ CODE] and [ /CODE] (omit the spaces) around your code and it'll display as mine here, so you don't need screenshots and other people can cut-and-paste your code.

You may find <Code> blocks better to use than <Sim>, as those are interchangeable but <Code> is more flexible, FYI your <Sim> block is equivalent to
Code:
<Code>(A:SPOILERS RIGHT POSITION, percent)</Code>
A <Code> block is designed to hold a script that calculates the animation number you want, and in your case that script is simply one line with the name of the variable.

Most code blocks are one-liners, but the full scripting language (ROFL) is documented here and here.

You may want the Total Energy calculation for your vario needle, if so, the <Code> is:
Code:
    <PartInfo>
        <Name>your vario needle animation name</Name>
        <AnimLength>100</AnimLength>
        <Animation>
          <Parameter>
              <Lag>30</Lag>
            <Code>
            (A:AIRSPEED TRUE, meters per second) d *
             19.62 /
            (A:PLANE ALTITUDE, meters) +
            0.25 * (G:Var2) 0.75 * +
            d (G:Var2) -
            (E:ABSOLUTE TIME, seconds)
            0.25 * (G:Var1) 0.75 * +
            d (G:Var1) -
            r (&gt;G:Var1)
            /
            r (&gt;G:Var2)
            0.07 * (L:B21_302_TE_MS, meters per second) 0.93 * + 6 min 6 neg max
            d
            (&gt;L:B21_302_TE_MS, meters per second)
            10 * 50 +
            </Code>
          </Parameter>
        </Animation>
    </PartInfo>
The <Code> block above calculates the smoothed TE climb rate in meters-per-second, and the last line then multiplies that by 10 and adds 50, so -5 m/s climb gives an animation value of 0, 0 m/s gives 50, and +5 m/s gives 100.
 
Messages
33
Country
germany
Hi B21-soaring,

thanks a lot for your answer, it works great.
With an parameter of <LAG>30</LAG> the anitmation got the right speed for my imagination.

Thank you very much. :)
 
Messages
238
Country
unitedkingdom
Here's an answer more specific to your canopy, using a local variable to control the canopy animation.

Note for a glider canopy there are usually TWO animations, one (or two..) for the lever the pilot uses to open the canopy and another for the canopy movement itself. The LEVER animation actually has the complete PartInfo section as below, and the CANOPY PartInfo is identical except it can omit the MouseRect. Of course the levers and canopy have different names.

Code:
  <PartInfo>
    <Name>CANOPY_open_close</Name>
    
    <MouseRect>
      <TooltipText>Open/Close Canopy</TooltipText>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 ==
        if{ (L:CANOPY_OPEN, percent) 0 != if{ 0 (&gt;L:CANOPY_OPEN, percent) } els{ 100 (&gt;L:CANOPY_OPEN, percent) } }
      </CallbackCode>
    </MouseRect>

    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:CANOPY_OPEN,percent)
        </Code>
        <Lag>30</Lag>
      </Parameter>
    </Animation>
  </PartInfo>

FSX has a canopy open/close event that can be mapped to a key or button, and a built-in SimVar (A:CANOPY OPEN, percent) that can be used to move the canopy - I'm not sure these exist in MSFS so the code above works without those and the canopy is toggled by clicking on the "CANOPY_open_close" object (this should be the lever really). You could search the MSFS Options/Controls to see if any 'canopy' control is in there.

Your test with the spoilers handle was exactly the right thing to do (although I would recommend using a <Code> block not a <Sim> block - it's a generally useful way of checking an animation before you start messing with a more complicated <Code> block, e.g. the vario needle can be tested with the spoiler handle before you swap out the code for my TE calculation.
 
Messages
33
Country
germany
Hi B21-soaring,

thank you so much for your answer.

Yes, I found that line under the "Aircraft Simulation Variables":
1625937917483.png


And this under "Status of Simulation Variables":

1625938272983.png


I also found this here:

1625938390320.png


and this here was under "Audio Simulation Variables":

1625938507086.png



This is, what I found about "CANOPY" in the SDK-Dokumantation of MSFS 2020, but I don't know, how to use all these information to great the Code for the xml-file.
My experiance is not that much, that's why I am so happy to got this forum :) and people,who knows how this works.🙃

Maybe we can find parameters with animation, mouse handling an sound ? .... That would be so nice.

Thanks again.
 
Messages
238
Country
unitedkingdom
My advice is get more familiar with model XML code before you worry about sounds. Mouse handling is in the example I gave above. The DG808S and the AS33 are MSFS gliders with a LOT of example code in the model XML and you'll find you've hardly started. The DG808S has some simple gauge needles driven by the model XML, but also some much more complex gauges in html/js which is another large complex system. The AS33 gauges are 100% html/js. You will find good simple examples of triggering WAV sounds in the DG808S BUT my recommendation is to spend more time getting at least a bit more familiar with the XML, e.g. try programming your gauge needles or switch animations or yawstring, or have your spoilers lever operate the wheelbrake at the last 25% of its travel...
 
Messages
3
Country
unitedkingdom
Hi GlideSimmer

I was advertising for partners for a project and B21 suggested I make contact with you, please see his post/response to my add. Love to K7, my first ever solo aircraft so have an affection for it. You are further advanced than I but I wonder if you would like to team up for mutual learning and development ideas. I have two very basic ( at the moment) motor gliders I am working on as per pics, was also considering the Stemme but I see GotFriends has just announed it. But I will also be starting a T49 Capstan. I am looking to build for MSFS and realise once has many hurdles to get over so may be easier with a partner. Also notice we are of similar age, myself being slightly older @ 57. Let me know if interested then.

The ASk21 & Ogar I have created from scratch. The SF-25 I purchased from CGTrader and have the autors blessing to use as I please.

Kind regards

Mike
 

Attachments

  • ASK21.png
    ASK21.png
    765.3 KB · Views: 60
  • Ogar.png
    Ogar.png
    669.9 KB · Views: 63
  • SF-25.png
    SF-25.png
    511.9 KB · Views: 51
Messages
33
Country
germany
Hello Mike,

thank you for your message.

It is nice to see, that you are working on projects that I would like to realize, too.
You like the K7 I am working on, because you had your first soloflight on it, and I decided to build it, because I had my first flight ever on this plane...
... and my first flight on a motorplane was on the SF-25. :)
I never had the courage nor the money to get my pilot's license in real, so I am happy with the new Microsoft Flight Simulator, because it is as realistic as possible.

So I wanted to build the SF-25 someday too, but if you like to start it, maybe in cooperation with me, it would be very nice ! :)
I am building my plane with Blender 3.0 and bring it into MSFS with the Blender2MSFS-Tool, and I think, you do it the same way.
As we are working with the same method and the same kind of planes, I guess we will have the same problems, too. :)

The K7 is my first MSFS - plane - project, and I am still learning during my work on it and of course from this forum here.
Many postings to my questions helped me, to animate things, build the instruments and animate the needles.

I don't want to earn money with my projects, I just enjoy building them and I am glad if there are some people who like them too.

It's sad that I have so little time and I can't stay tuned all the time, so the completion delayed. But it is not a term job. :)

Things I've learned so far is 3d-modelling in Blender 3.0, bring textures on it, do animations of rudders, levers, switches and needles for gauges.
And I can bring it all together to MSFS. I edit the aircraft a little bit in MSFS Aircraft Editor like weight and dimensions.

There is still much more to learn. At the moment I am searching for a solution for moving cables with the yoke and pedals.
Maybe you got some good ideas about this? Would be so nice.

So, I would be glad if you were still interested in sharing our projects and working together.

Kind regards

GlideSimmer67
 
Messages
33
Country
germany
Here are some Images from the K7 like it looks at the moment: ... I like it so much :)


1643060332614.png
1643060975212.png
1643060509348.png
1643060592276.png
1643060649163.png

1643060751427.png
1643060805923.png
1643061059741.png

1643060863131.png

1643061318341.png


Information: The texture on the body is my first one I've ever made, bad resolution, will be changed soon ...:rolleyes:
 
Messages
88
Looks very nice! Well done. I'm sure you are having fun building the plane exactly the way you like it.
 
Top