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

FSXA Odd 3D Drum Behavior...

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I thought I'd seen everything, but this has got me puzzled for sure and certain.

I have four drums animated for my baro pressure display which work as designed for inHG display. The are animated in Max from frame 0 to frame 10, and the drums rotate as expected, "snapping" from digit to digit...

...until I switch to millibar (hectopascal) display...

...at which point the silly drums rotate smoothly between digits, which frankly shocks the hell out of me?

Someone please explain to me how the drum can display a position between frames? As you can see from the image below, the millibar display is not lined up on the numbers, but some are showing partial rotation between frame 0 and frame 1, despite all drums using linear rotation controllers.

Just for completeness of information, here are the animation scripts:
Code:
  <PartInfo>
    <Name>KA300_baro_hundths</Name>
    <AnimLength>10</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:Altimeter1_inHg_MB,bool) !
          if{ (A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 0.1 % 0.01 / near }
          els{ (A:KOHLSMAN SETTING MB, mbars) abs 10 % }
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>

  <PartInfo>
    <Name>KA300_baro_tenths</Name>
    <AnimLength>10</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:Altimeter1_inHg_MB,bool) !
          if{ (A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 1 % 0.1 / flr }
          els{ (A:KOHLSMAN SETTING MB, mbars) abs 100 % 10 / }
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>

  <PartInfo>
    <Name>KA300_baro_1</Name>
    <AnimLength>10</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:Altimeter1_inHg_MB,bool) !
          if{ (A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 10 % 1 / flr }
          els{ (A:KOHLSMAN SETTING MB, mbars) abs 1000 % 100 / }
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>

  <PartInfo>
    <Name>KA300_baro_10</Name>
    <AnimLength>10</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:Altimeter1_inHg_MB,bool) !
          if{ (A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 100 % 10 / flr }
          els{ (A:KOHLSMAN SETTING MB, mbars) abs 10000 % 1000 / }
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>
KA300_Altimeter_01.jpg
 
Last edited:
Wouldn't this:
Code:
(A:KOHLSMAN SETTING MB, mbars) abs 100 % 10 /
with an input of 1013 yield 1.3? Have you tried it with another "flr" at the end?
 
Wouldn't this:
Code:
(A:KOHLSMAN SETTING MB, mbars) abs 100 % 10 /
with an input of 1013 yield 1.3? Have you tried it with another "flr" at the end?
Yes, and it makes no difference whatever...

EDIT: Now it makes a liar out of me and laughing out loud...

It never fails. I ask for help and then the first thing suggested - which I had already tried - suddenly decides to work. :censored:

Thanks for the assist, sir! :wave:

Of course, that still doesn't explain how one can display frame 1.3 instead of frame 1...
 
Last edited:
Hi Bill

It's best not to think of the keyframes as actual frames but rather as simple datum points. The drum is rotated at x angle at keyframe 1 and at y angle at keyframe 2. If you ask FSX to draw something at keyframe 1.3 it simply interpolates the angle based on x angle and y angle and their keyframes. In this case FSX takes the difference between x and y and multiplies by 0.3 and then adds the result to x angle to get the required angle.

The keyframes really just become a non linearity table which FSX uses to calculate an animated parts position or rotation. Whether you use 10 or 1000 keyframes it makes no difference to the end result.

FSX does this all the time. It's why we can have nice really smooth animations in our 3D gauges. Even a simple angle change of 1 degree (lets say you used 360 keyframes to animate a wheel) can be quite noticeable given the right conditions.
 
Thanks. In retrospect that makes absolute sense. Since I nearly always deal with integers, I'd never really noticed this before.
 
Back
Top