FSXA smooth jet spool up/down

#1
Kind people, I come to you all after one whole week of staring at my screen and getting migranes and a lot of frustration. As the topic suggests, I want to simply simulate a smooth spool up/down of my jet engine.
I have searched the net and tried various permutations and combinations of code found therein but to no avail. I am approaching this in a somewhat different manner than has been tried before, in that all I want to achieve is to get a simple spool up/down animation from MAX into the sim as is, I want it to fire the animation at 5% N1 and achieve the rest through visibility conditions. Try as I might, I have not been able to achieve this and my tiny, tiny, old brain cannot seem to comprehend what I am doing wrong.
I have tried using the default N1_slow tag, I have tried using the default ambient tag (this got close but as the ambient animation fires as soon as the sim starts, the parts never seem to line up) I have tried the following code sets as found in various different topics on the net

Code:
<PartInfo>
      <Name>prop0_startup</Name>             
        <AnimLength>600</AnimLength>
         <Animation>
         <Parameter>
          <Code>
            (L:PROP0_STARTUP, bool)
          if{
            (A:GENERAL ENG STARTER:1, bool) 1 ==
            (A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 40 &lt;           
            (A:PROP MAX RPM PERCENT:1, percent) 6 &lt;
            and and
             }             
           1 (&gt;L:PROP0_STARTUP, bool) 600 * 
           </Code>
        <Lag>50</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Left Prop Start</TooltipText>
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
           1 (&gt;A:GENERAL ENG STARTER:1, bool)
           1 (A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 40 &lt;             
           1 (A:PROP MAX RPM PERCENT:1, percent) 6 &lt;                         
      </CallbackCode>
    </MouseRect>
 </PartInfo>


<PartInfo>
        <Name>prop0_startup_vis</Name>
        <AnimLength>600</AnimLength>
        <Visibility>
            <Parameter>
            <Code>                 
                  (A:GENERAL ENG STARTER:1, bool)  1 ==                   
              (A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 40 &lt; &amp;&amp;
              (A:PROP MAX RPM PERCENT:1, percent) 6.25 &lt; &amp;&amp;
              if{ 1 } els{ 0 }
                  </Code>
            </Parameter>
        </Visibility>
    </PartInfo>
obviously changed to suit a jet
and this

Code:
<PartInfo>
    <Name>propeller_axle_anim</Name>
    <AnimLength>100</AnimLength>
    <Animation>
        <Parameter>
              <Code>
            (A:IS USER SIM,bool)
            if{
           (A:GENERAL ENG RPM:1,degrees per second) 0.1592 * (L:Prop_Offset,number) + 100 %
            }
            els{
           (A:GENERAL ENG RPM:1,degrees per second) 0.1592 *
            }
            </Code>
        </Parameter>
    </Animation>
</PartInfo>


  <PartInfo>
    <Name>TJN1_0_slow</Name>
    <Copy>prop_anim</Copy>
    <AnimLength>360</AnimLength>
    <Animation>
      <Parameter>
        <Code>
           (A:GENERAL ENG RPM:1,degrees per second) (E:ABSOLUTE TIME, second) * 0 % 0.0 /
        </Code>
      </Parameter>
    </Animation>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 5.00 &gt;
          if{
          (A:ENG N1 RPM:1, percent) 30.0 &lt; if{ 1 } els{ 0 }
          } els{ 0 }
        </Code>

and this

[CODE]  <PartInfo>
    <Name>TJN1_0_slow</Name>
    <AnimLength>360</AnimLength>
    <Animation>
      <Parameter>
        <Code>
           (A:ENG N1 RPM:1, percent) 5.00 &gt;
            (A:ENG N1 RPM PERCENT:1, percent) 5.00 &gt; if{ 1 } els{ 0 }
                    } els{ 0 }
        </Code>
      </Parameter>
    </Animation>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 5.00 &gt; if{ 1 } els{ 0 }
          if{
          (A:ENG N1 RPM:1, percent) 34.0 &lt; if{ 1 } els{ 0 }
          } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
</Parameter>
</Visibility>
</PartInfo>[/CODE]
amongst others but nothing
All I want to do is get my animation (which is at 360 keyframes and sped up every turn) into the sim as is. Could one of you kind souls please help me in the right direction. Much obliged for any help forthcoming.
Kind regards,
TJ
 

Heretic

Resource contributor
#2
Before trying any overly complex animations, I'd edit table 1505 in the jet's .air file to get rid of the ignition "peak" and stretch out the spool curve from X_0=0, Y_0=10 to something like X_9=10, Y_9=120.

After that, you can still try to mask any premature N1 movement with animation tricks.
 
#4
Hi Heretic, I'm back home now with a bit of time to do some .air file editing. After playing around with aircraftairfile manager and AirEd a bit, I think that I do not have sufficient knowledge to be messing around here. Firstly, there seems to be no mention of an ignition peak. Secondly where do I look for the values X_0=0 etc. Forgive my ignorance but I have not been here before. Kind regards,
TJ
 

Heretic

Resource contributor
#6
Hi Heretic, I'm back home now with a bit of time to do some .air file editing. After playing around with aircraftairfile manager and AirEd a bit, I think that I do not have sufficient knowledge to be messing around here. Firstly, there seems to be no mention of an ignition peak. Secondly where do I look for the values X_0=0 etc. Forgive my ignorance but I have not been here before. Kind regards,
TJ
Here's the content of table 1505 as used by a Learjet:
Code:
0.0001   10
1.8   55
2.265741   60
2.841619   65
3.746415   70
4.823221   75
5.75   80
7   90
8   100
10   120
X values: First column. Y values: Second column. X_0, Y_0: First line. X_9, Y_9: Last line.
Just like every X-Y diagram out there.

There are some threads about table 1505 in the flight dynamics forum.
 
#7
Ok, Bjoern, After an evening of reading, swearing and growing more grey hairs, I have tweaked table 1505 to where it ought to be, I think, but my problem is that I have an animation from KF1 to KF1000 simulating a slow to fast spool up but in the sim, that animation is played in its entirety in about 3 seconds flat. What I want to do now is to slow it down so that it plays in about 20 seconds or so. I am really not going with exact numbers here, just a "looks about right" will suffice. The code I am using right now is as follows
Code:
   <Animation name="spooltest_0" guid="374A1AB7-85CC-4610-80E1-DCEA579A4CA4" length="1000" type="Sim" typeParam2="spooltest_0" typeParam="AutoPlay" />
  <PartInfo>
    <Name>spooltest_0</Name>
   <AnimLength>1000</AnimLength>
   <Animation>
         <Parameter>
                <Code>
             (A:Sim On Ground, bool) 1 ==  (A:ENG N1 RPM:1, percent) 1 &gt;= and (A:ENG N1 RPM:1, percent) 6 &lt;= and (L:spool0 state, number) 0 != || if{ (L:spool0 state, number) 7.0 + 3000 % d (&gt;L:spool0 state, number) }
                </Code>
         </Parameter>
  </Animation>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 1.00 &gt;
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
Do you think I can achieve this?
Many thanks,
TJ
 

Heretic

Resource contributor
#8
A simple counter isn't going to help much since it's influenced by the sim's update rate (the framerate for 3D models). So if an animation lasts, say, 20 seconds at 30 FPS, it will last 10 seconds at 60 FPS unless the counter can adapt to the framerate. Which isn't possible.

What would work better is playing with the visbility conditions of the default N1_still/slow/blurred parameters and the respective models. So when the starter is active or the engine is starting up, you display only the "still" model and when ignition has occurred and the N1 stage is above a certain percentage, you switch to the slow or blurred model.
Combined with the slow engine startup from table 1505, you should get something robust and adequately accurate.
 
#9
A simple counter isn't going to help much since it's influenced by the sim's update rate (the framerate for 3D models). So if an animation lasts, say, 20 seconds at 30 FPS, it will last 10 seconds at 60 FPS unless the counter can adapt to the framerate. Which isn't possible.

What would work better is playing with the visbility conditions of the default N1_still/slow/blurred parameters and the respective models. So when the starter is active or the engine is starting up, you display only the "still" model and when ignition has occurred and the N1 stage is above a certain percentage, you switch to the slow or blurred model.
Combined with the slow engine startup from table 1505, you should get something robust and adequately accurate.
I’ve tried this off and on for years but still haven’t gotten a satisfactory result. I can get table 1505 to give a nice slow startup without an ignition surge, but the animation itself never seems to represent N1 percentage in a linear fashion. Basically, I hit the starter, and the “still” fan object goes from stationary to a constant speed until the “blurred” object becomes visible and takes over (which also spins at a constant speed regardless of N1, but those changes are barely noticeable in real life anyway.)

It’s just always baffled me because the intention of the default fan animations seems to be controlling rotation speed in degrees per second as a function of N1. But in my experience, even most payware jets have this same unrealistic spin-up.
 
#11
I’ve tried this off and on for years but still haven’t gotten a satisfactory result. I can get table 1505 to give a nice slow startup without an ignition surge, but the animation itself never seems to represent N1 percentage in a linear fashion. Basically, I hit the starter, and the “still” fan object goes from stationary to a constant speed until the “blurred” object becomes visible and takes over (which also spins at a constant speed regardless of N1, but those changes are barely noticeable in real life anyway.)

It’s just always baffled me because the intention of the default fan animations seems to be controlling rotation speed in degrees per second as a function of N1. But in my experience, even most payware jets have this same unrealistic spin-up.
Spot on Ozzman, though PMDG seem to have nailed it so it must be possible. Just how remains a mystery. G'day from a fellow aussie. Love your work BTW.
 

Heretic

Resource contributor
#15
Feel free to post an outline of what you did in here. It might be good enough to inspire others.

The engine should be a PW 1500G, not a CFM LEAP though. ;)
 
#17
Ok ladies and gents,
Here comes a rundown of how I achieved the smooth spool-up sequence from the video.
Just be aware of something though, this whole sequence works only for the spool-up
sequence and not the spool-down. This is something I will work on sometime in the future.
Also beware that this animation was achieved using multiple cloned objects with
multiple visibility conditions so if anyone gets lost along the way, I wont blame you.

(I will provide the xml code for animation and visibility tags at the end)

To begin with take your fan blade object and make 3 copies. Name them as follows:

Blade_still
Blade_stage1
Blade_stage2
Blade_blur

Take your spinner object and make 4 copies. Name them as follows:

cone_still
cone_slow
cone_stage2
cone_stage3
cone_vfast


STAGE1
attach N1_still visibility conditions to both blade_still and cone_still objects

STAGE2
next attach your blade_stage1 object to your cone_slow object.
Now the fun begins:
My scene has 1000 keyframes so now you need to animate the cone_slow object to incrementally
increase its rpm (I started with 90degree rotations 50 frames apart slowly increasing them to
90degree rotations 5 frames apart. This was painfull)
now tag this animation cone object with the tag spoolup_l_0_1 (0-1000 frames) and the visibility
condition spoolup_l_0_1

STAGE3
now attach your blade_stage2 object to your cone_stage2 object.
Animate the cone_stage2 object object to incrementally increase rpm as in stage 1, only this time
start the 90degree rotations from 5 frames apart to end up at 2frame apart (more pain coming)
tag the animation cone object with the spoolup_l_0_2 animation (0-1000 frames) and visibility tags

STAGE4
now animate your cone_stage3 object to produce 1 360 degree rotation over 100 frames (0-100frames)
and tag it with the spoolup_l_0_3 animation and visibility tags

STAGE5
Now animate the cone_vfast object to complete 1 entire rotation over 360 frames (0-360 frames)
and tag it with the default N1_slow animation tag and the TJAMBIENTLEFT5 visibility tag

STAGE6
This stage is optional. Take your blade_blur object, give it a semi transparent material and animate
it to complete 1 complete rotation over 100 frames in a counter-direction to the one your blades are
spinning in. Tag it with the tjAmbient tag for animation and the bladespoolAMBIENT0 tag for visibility

and we are hopefully done.

code to add to your modeldef file is as follows:
Code:
    <Animation name="spoolup_l_0_1" guid="E3227A5A-8ED3-4a23-ADC5-AB7F00138449" length="1000" type="Sim" typeParam2="spoolup_l_0_1" typeParam="AutoPlay" />
   <PartInfo>
    <Name>spoolup_l_0_1</Name>
    <AnimLength>1000</AnimLength>
    <Animation>
        <Parameter>
            <Code>
                (A:ENG N1 RPM:1, percent) 1 &gt; 1000 *
            </Code>
            <Lag>60</Lag>
        </Parameter>
    </Animation>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 1.0 &gt;
          if{
          (A:ENG N1 RPM:1, percent) 7.3 &lt; if{ 1 } els{ 0 }
          } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
   </PartInfo>


    <Animation name="spoolup_l_0_2" guid="06F8EB99-FBEA-4043-A2A1-7C62B5C128CA" length="1000" type="Sim" typeParam2="spoolup_l_0_2" typeParam="AutoPlay" />
   <PartInfo>
    <Name>spoolup_l_0_2</Name>
    <AnimLength>1000</AnimLength>
    <Animation>
        <Parameter>
            <Code>
                (A:ENG N1 RPM:1, percent) 7.3 &gt; 1000 *
            </Code>
            <Lag>60</Lag>
        </Parameter>
    </Animation>
    <Visibility>
      <Parameter>
        <Code>
                (A:ENG N1 RPM:1, percent) 7.3 &gt; 1000 *
                     if{
                     (A:ENG N1 RPM:1, percent) 33.7 &lt; if{ 1 } els{ 0 }
                      } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
   </PartInfo>


    <Animation name="spoolup_l_0_3" guid="0209C9AA-138A-4ba1-8801-CBB14434E618" length="1000" type="Sim" typeParam2="spoolup_l_0_3" typeParam="AutoPlay" />
  <PartInfo>
    <Name>spoolup_l_0_3</Name>
    <Copy>prop_anim</Copy>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
           (A:GENERAL ENG RPM:1,degrees per second) (E:ABSOLUTE TIME, second) * 360 % 3.6 /
        </Code>
      </Parameter>
    </Animation>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 27.0 &gt;
          if{
          (A:ENG N1 RPM:1, percent) 50.0 &lt; if{ 1 } els{ 0 }
          } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>


   <PartInfo>
    <Name>TJAMBIENTLEFT5</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 30.0 &gt;
        </Code>
      </Parameter>
    </Visibility>
   </PartInfo>

    <Animation name="tjAmbient" guid="596A9720-3ED7-4175-B992-5D27B09CD001" length="100"  type="Standard" typeParam="AutoPlay,Random" />


   <PartInfo>
    <Name>bladespoolAMBIENT0</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:ENG N1 RPM:1, percent) 30.0 &gt;
        </Code>
      </Parameter>
    </Visibility>
   </PartInfo>

Please forgive me for the haphazardness of this process, My brain was so muddled by the end of it all that I really wanted to give up.
The above method can definitely be improved upon and streamlined so please only regard it as a guide.

Kind regards, TJ

(now off to feed the little one and go to bed exhausted)
 
#18
Ok gents, I'm back. Being a bit of a perfectionist (cough-who isn't) I am still not happy with my end results and have continued with different angles of experimentation. I am now using xml code found in the gauge itself in the modeldef file to control the animation. See below...
XML:
    <Animation name="spin test 1_5" guid="801831E1-ADF8-4171-8DB5-FAC4638EF52F" length="100" type="Sim" typeparam2="spin test 1_5" typeparam="AutoPlay" />
<PartInfo>
   <Name>spin test 1_5</Name>
   <AnimLength>100</AnimLength>
   <Animation>
         <Parameter>
                <Code>
                    (A:Turb eng1 N1, percent) 100 min 2.06 * s0 1 &gt; if{ l0 } els{ 2 }
                </Code>
         </Parameter>
  </Animation>
</PartInfo>
the end result is that the spinner moves like a rpm needle with increase/decrease in N1 which looking at the code is exactly what I am asking it to do. However, what I really want to do is increase the RPM as a function of N1 percent. Does anybody have any suggestions on how I could achieve this?
Many thanks in advance to all who have helped so far.
 
Top