Animating Nose Wheel Steering in AI Planes
Animating Nose Wheel Steering in AI Planes
Hi.
Can somebody point me to the right direction in animating the nose wheel steering?, I tried animating the part as the FSDS book 4 says, animating in full 360 degrees at 200 frames, but seems that this is not for AI planes, I´m using FSDS and I just need the steps on how to do it, I can animate propellers, flaps, tires, gear, but the nose wheel is giving me a headache.
Thanks in advance for your time and help
Tony
Can somebody point me to the right direction in animating the nose wheel steering?, I tried animating the part as the FSDS book 4 says, animating in full 360 degrees at 200 frames, but seems that this is not for AI planes, I´m using FSDS and I just need the steps on how to do it, I can animate propellers, flaps, tires, gear, but the nose wheel is giving me a headache.
Thanks in advance for your time and help
Tony
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
It's doable Tony, but tricky and not very precise.
You need a small cube animated like this:
KF:0=far left
KF:100= straight ahead
KF:200=far right
The xml code is this:
<part>
<name>anim_nose_gear_steering</name>
<animation>
<parameter>
<code>
(A:ATTITUDE INDICATOR BANK DEGREES, degrees) -0.1 < (A:VELOCITY BODY Z, knots) 8 < *
if{ 100 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) -0.1 < (A:VELOCITY BODY Z, knots) 40 < *
if{ 125 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) 0.1 > (A:VELOCITY BODY Z, knots) 8 < *
if{ 200 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) 0.1 > (A:VELOCITY BODY Z, knots) 40 < *
if{ 175 }
els{ 150 }
}
}
}
</code>
<lag>20</lag>
</parameter>
</animation>
</part>
The nose leg itself will need it's own name (c_gear) so link this to the cube. The fun starts trying to keep the gear leg straight as it retracts.
You will also need to experiment with the number of degrees in the animation left and right. You can also fine tune to an extent with the lag value. I used it on the Poseidon/Wedgetails and on the 767 derivatives, but haven't used it since. It's not worth the aggravation in my view, particularly on smaller aircraft.
John
You need a small cube animated like this:
KF:0=far left
KF:100= straight ahead
KF:200=far right
The xml code is this:
<part>
<name>anim_nose_gear_steering</name>
<animation>
<parameter>
<code>
(A:ATTITUDE INDICATOR BANK DEGREES, degrees) -0.1 < (A:VELOCITY BODY Z, knots) 8 < *
if{ 100 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) -0.1 < (A:VELOCITY BODY Z, knots) 40 < *
if{ 125 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) 0.1 > (A:VELOCITY BODY Z, knots) 8 < *
if{ 200 }
els{ (A:ATTITUDE INDICATOR BANK DEGREES, degrees) 0.1 > (A:VELOCITY BODY Z, knots) 40 < *
if{ 175 }
els{ 150 }
}
}
}
</code>
<lag>20</lag>
</parameter>
</animation>
</part>
The nose leg itself will need it's own name (c_gear) so link this to the cube. The fun starts trying to keep the gear leg straight as it retracts.
You will also need to experiment with the number of degrees in the animation left and right. You can also fine tune to an extent with the lag value. I used it on the Poseidon/Wedgetails and on the 767 derivatives, but haven't used it since. It's not worth the aggravation in my view, particularly on smaller aircraft.
John
Re: Animating Nose Wheel Steering in AI Planes
Also seems to not be worth the effort for the small stuff like a fighter. It's barely noticeable on a little aircraft. Much more noticeable on something larger.
-Mike G.
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Re: Animating Nose Wheel Steering in AI Planes
John:
First thanks for your quick response, I will try to explain my problem in my poor English.
My big problem is how to do it in FSDS, I can do the part to work, but only from center to one side, not in both ways, so if the animation goes from center to right, so when the plane turns to the right in FSX, the part turn right.
I need to know where to start the animation; part at the center of the z axis (0 Deg), or 30 deg. right or left and set a keyframe or what, then the next step, rotate to left right, how many deg.
I tried to start the animation at center, at far left, and far right, rotate to the left, rotate to the right, but I get the same result, from center to one side.
Tony
First thanks for your quick response, I will try to explain my problem in my poor English.
My big problem is how to do it in FSDS, I can do the part to work, but only from center to one side, not in both ways, so if the animation goes from center to right, so when the plane turns to the right in FSX, the part turn right.
I need to know where to start the animation; part at the center of the z axis (0 Deg), or 30 deg. right or left and set a keyframe or what, then the next step, rotate to left right, how many deg.
I tried to start the animation at center, at far left, and far right, rotate to the left, rotate to the right, but I get the same result, from center to one side.
Tony
Re: Animating Nose Wheel Steering in AI Planes
Mike:
Thanks for the advise, but I'm not doing just small planes, I have converted some big birds from AIA, AIM, and others for my personal use, and I would like to have that animation in those models.
Tony
Thanks for the advise, but I'm not doing just small planes, I have converted some big birds from AIA, AIM, and others for my personal use, and I would like to have that animation in those models.
Tony
Re: Animating Nose Wheel Steering in AI Planes
Good to hear!
As far as the animation in FSDS, for my KC/C-135 models, I started the animation at key frame 100 because that is the down and locked ending key frame for the nose gear.
From there I made the rotation 25 degrees to the left at KF100, centered at KF140 and KF160, then 25 degrees to the right at KF200.
Here's the code that made it all work:
<part>
<name>anim_nose_wheel</name>
<animation>
<Parameter>
<code>
(A:LIGHT BEACON,bool) (A:RADIO HEIGHT,feet) 100 < &&
if{ (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 + }
els{ 140 }
</code>
<lag>75</lag>
</Parameter>
</animation>
</part>
Full disclosure here: I have very little idea how this code does what it does, Kevin wrote it and only he can explain it fully but instead of using the attitude indicator as a trigger to move the nosewheel left and right, it looks at the RPM of the left main and right main gear and triggers the animation based off of what those are doing.
IOW if the left main RPM is less than the right main RPM, the airplane is turning left and the left wheel displacement is triggered.
It's still black magic to me but we know this is a working code. I think that coding will even work in FSX but again Kevin will have to verify that.
As far as the animation in FSDS, for my KC/C-135 models, I started the animation at key frame 100 because that is the down and locked ending key frame for the nose gear.
From there I made the rotation 25 degrees to the left at KF100, centered at KF140 and KF160, then 25 degrees to the right at KF200.
Here's the code that made it all work:
<part>
<name>anim_nose_wheel</name>
<animation>
<Parameter>
<code>
(A:LIGHT BEACON,bool) (A:RADIO HEIGHT,feet) 100 < &&
if{ (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 + }
els{ 140 }
</code>
<lag>75</lag>
</Parameter>
</animation>
</part>
Full disclosure here: I have very little idea how this code does what it does, Kevin wrote it and only he can explain it fully but instead of using the attitude indicator as a trigger to move the nosewheel left and right, it looks at the RPM of the left main and right main gear and triggers the animation based off of what those are doing.
IOW if the left main RPM is less than the right main RPM, the airplane is turning left and the left wheel displacement is triggered.
It's still black magic to me but we know this is a working code. I think that coding will even work in FSX but again Kevin will have to verify that.
-Mike G.
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
Mike's suggestion for allocating KF:0 to 100 for the nose leg raise/lower is a good one and it's one I've used before to try and keep the leg straight when moving.
I've never managed to use the code I posted successfully in FSX unfortunately. Mikes code could work however if it's sandwiched in the FSX top and tail format and has the animation line and GUID in the top (Model info) section of the xml file.
John
I've never managed to use the code I posted successfully in FSX unfortunately. Mikes code could work however if it's sandwiched in the FSX top and tail format and has the animation line and GUID in the top (Model info) section of the xml file.
John
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
Mike, I've just been trying your code on the FS9 B-47 nose wheel. It certainly could be more stable, but I'm getting a position flick at KF:100 (25* left). Could you just tell me what position the nose wheel is at KF:0 and KF:99 in your set up please? Is it straight ahead or 25* left?
If I can get this to work properly in FS9, I'll test the code in FSX and post the code block in that format for Tony.
John
If I can get this to work properly in FS9, I'll test the code in FSX and post the code block in that format for Tony.
John
Re: Animating Nose Wheel Steering in AI Planes
Full credit for that code goes to Kevin, I know very little about how it works.
The animated part (parent polygon that the rest are child parts of) is at 0 degrees rotation at both KF0 and KF99.
Not sure if that helps.
The animated part (parent polygon that the rest are child parts of) is at 0 degrees rotation at both KF0 and KF99.
Not sure if that helps.
-Mike G.
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
That's what I thought Mike and that's what I was testing. The aircraft spawns OK with the nose wheel facing forward, but on departure from the spot it gives a 25* flick to the right and back again. The right turn off the parking line is nice and smooth as is the return to straighten up. A left turn of 25* is smooth, but flicks back instantaneously to straighten up.
I don't know if the problem is the transition between KF:99 (0*) and KF:100 (-25*). If Kevin could stop by and explain the code and the key frame settings (0-200) that will probably help. I'm not sure if wheel diameter has any bearing on the code.
John
I don't know if the problem is the transition between KF:99 (0*) and KF:100 (-25*). If Kevin could stop by and explain the code and the key frame settings (0-200) that will probably help. I'm not sure if wheel diameter has any bearing on the code.
John
Re: Animating Nose Wheel Steering in AI Planes
Mike, John:
Thanks for your help, but I think that my problem is not related to how I do it in FSDS, I tried every thing you posted, used different animation codes, different positions of the gear, and always is the same, from center to one side, I found a FSDS source file with animated nose wheel, in FSDS works fine, but as soon as I compile the model, the problem begins.
Tony
Thanks for your help, but I think that my problem is not related to how I do it in FSDS, I tried every thing you posted, used different animation codes, different positions of the gear, and always is the same, from center to one side, I found a FSDS source file with animated nose wheel, in FSDS works fine, but as soon as I compile the model, the problem begins.
Tony
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
Tony, is the entry in your FSX modeldef.xml file in FSX format, with the additional line at the top and a unique GUID? The scripts above are in FS9 format. I was hoping to post the FSX script for you once I'd tested it, but I want to get the animation 100% right in FS9 first.
It maybe that it just doesn't work in FSX. That's not unusual. I've never yet made nose wheel steering work in FSX, however untidy it is.
John
It maybe that it just doesn't work in FSX. That's not unusual. I've never yet made nose wheel steering work in FSX, however untidy it is.
John
Re: Animating Nose Wheel Steering in AI Planes
Despite all the plaudits, if I remember correctly the code came from fsdeveloper?
Yup it did....
http://www.fsdeveloper.com/forum/thread ... ai.153490/
Yup it did....
http://www.fsdeveloper.com/forum/thread ... ai.153490/
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
That was a really useful read Kevin and I'm getting much better results now.
I can confirm that the code works for FS9:
<part>
<name>ai_nose_wheel</name>
<animation>
<Parameter>
<Code> (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 +
</Code>
<lag>30</lag>
</Parameter>
</animation>
</part>
KF:0= straight ahead
KF:100 =25* left
KF:140= straight ahead
KF:160= straight ahead
KF:200 25* right
For the very large wheels on the B-47, I found a deflection of only +- 25* was sufficient and a lag value of 30 smoothed things out.
The code also works very well in FSX so long as FSX format is used:
<Animation name="ai_nose_wheel" guid="3abc2ea7-2e71-43bb-b248-0eab72ddbbca" length="200" type="Sim" typeParam2="ai_nose_wheel" typeParam="AutoPlay" />
<PartInfo>
<Name>ai_nose_wheel</Name>
<AnimLength>200</AnimLength>
<Animation>
<Parameter>
<Code> (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 + </Code>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
Remember to change the GUID in the top section entry and add the animation tag to the ai_nose_wheel part.
I found I was chasing my tail in earlier efforts. In the Gmax window, the animation between KF:0 and KM:100 would cause the nose leg to retract at a side-ways angle in addition to the usual retraction. This cause the nose wheel to stick out of the side of the fuselage when retracted. I tried several key frames to pull it back, but in the sim that just made things worse. In the end I realised that although the anomaly was showing in Gmax, FS9 and FSX just ignored it and the gear retracted straight up into the bay without any sideways deviation.
Long time coming for me, but I'm glad it worked for both FS9 and FSX in the end.
John
I can confirm that the code works for FS9:
<part>
<name>ai_nose_wheel</name>
<animation>
<Parameter>
<Code> (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 +
</Code>
<lag>30</lag>
</Parameter>
</animation>
</part>
KF:0= straight ahead
KF:100 =25* left
KF:140= straight ahead
KF:160= straight ahead
KF:200 25* right
For the very large wheels on the B-47, I found a deflection of only +- 25* was sufficient and a lag value of 30 smoothed things out.
The code also works very well in FSX so long as FSX format is used:
<Animation name="ai_nose_wheel" guid="3abc2ea7-2e71-43bb-b248-0eab72ddbbca" length="200" type="Sim" typeParam2="ai_nose_wheel" typeParam="AutoPlay" />
<PartInfo>
<Name>ai_nose_wheel</Name>
<AnimLength>200</AnimLength>
<Animation>
<Parameter>
<Code> (A:LEFT WHEEL RPM, rpm) (A:RIGHT WHEEL RPM, rpm) - 2 * (A:VELOCITY BODY Z, knots) 5 / / 150 + </Code>
<Lag>30</Lag>
</Parameter>
</Animation>
</PartInfo>
Remember to change the GUID in the top section entry and add the animation tag to the ai_nose_wheel part.
I found I was chasing my tail in earlier efforts. In the Gmax window, the animation between KF:0 and KM:100 would cause the nose leg to retract at a side-ways angle in addition to the usual retraction. This cause the nose wheel to stick out of the side of the fuselage when retracted. I tried several key frames to pull it back, but in the sim that just made things worse. In the end I realised that although the anomaly was showing in Gmax, FS9 and FSX just ignored it and the gear retracted straight up into the bay without any sideways deviation.
Long time coming for me, but I'm glad it worked for both FS9 and FSX in the end.
John
Re: Animating Nose Wheel Steering in AI Planes
John:
Thanks, and yes i I have the right code, and I also have the entry on the top of the xml in fsx format with the unique guid, but still no luck, I tried to do the animation in big planes and also in GA planes but I got the same problem, from center to one side
Tony
Thanks, and yes i I have the right code, and I also have the entry on the top of the xml in fsx format with the unique guid, but still no luck, I tried to do the animation in big planes and also in GA planes but I got the same problem, from center to one side
Tony
- John Young
- MAIW Developer
- Posts: 4235
- Joined: 12 Jul 2008, 15:15
Re: Animating Nose Wheel Steering in AI Planes
Tony, have you applied the animation tag for the part? It won't work without it. The full KF range also needs to be specified, ie 0-200, not 100-200.
When you say "centre to one side" is that in the FSDS animation or in FSX? It's the thing that fooled me in Gmax. I was trying to correct something that the sim was ignoring anyway.
If the problem is in FSX could you possibly post a screen shot of the wheel so we can see what's happening please?
John
When you say "centre to one side" is that in the FSDS animation or in FSX? It's the thing that fooled me in Gmax. I was trying to correct something that the sim was ignoring anyway.
If the problem is in FSX could you possibly post a screen shot of the wheel so we can see what's happening please?
John
Re: Animating Nose Wheel Steering in AI Planes
John:
Yes it has the animation tag, yes i begin with KF 0 and set the KF, then 100, 140, 160, 200.
Center to one side in FSX, i took a break on the nose wheel to clear my mind, as soon i finish the models I'm working with i will go back to the nose wheel, and then post a screen shot.
Thanks
Tony
Yes it has the animation tag, yes i begin with KF 0 and set the KF, then 100, 140, 160, 200.
Center to one side in FSX, i took a break on the nose wheel to clear my mind, as soon i finish the models I'm working with i will go back to the nose wheel, and then post a screen shot.
Thanks
Tony
Re: Animating Nose Wheel Steering in AI Planes
Can't tell you how many times that taking a break and coming back to something later on did the trick. You'll get it sorted out. Curious to see what you're working on!
-Mike G.
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Recovering flight sim addict, constant lurker.
Check out my real life RV-8 build here: RV-8 Builder Log
Re: Animating Nose Wheel Steering in AI Planes
Mike:
That's why I took a break, it really works.
About your curiosity, you and all the members of MAIW will like what the team are doing.
That's why I took a break, it really works.
About your curiosity, you and all the members of MAIW will like what the team are doing.