Making AI friendly aircraft for FS2002
BASIC ANIMATION
THIS PAGE IS STILL UNDER CONSTRUCTION!!!
Eventually, it will have more pictures
and the gmax file mentioned at the end will actually be there.
(This tutorial assumes
that you have at least a basic working knowledge of Gmax.)
You will need the gmax file
“737_gear_anim_01.gmax”
to do this tutorial.
In Gmax open the file: “
737_gear_anim_01.gmax”. You should now see the
four parts of the 737’s nose gear.
1) Parts Names:
To get a part to animate in
FS it has to be given a certain name as called for in the SDK, actually
it's just a prefix that has to be used in addition to whatever else you
want to call it. So as an example lets work with a nose gear that
consists of 4 separate parts; a strut, a set of tires (2 tires, but still
one part), a left nose gear door, and a right nose gear door.
The prefix for nose gear parts that
you want to animate is "c_gear "
So, I name the parts something like
this:
c_gear_strut
c_gear_door_rt
c_gear_door_lft
leave the wheels as "
nose_wheels" or something for now.
RENAMING PARTS.
Renaming parts is very simple. First, select
the part you want to rename. On the right side of the gmax window,
just underneath all of the tabs , there is a box that has the name of the
current part that is selected. If you don’t see this box, click on
the “modify” tab
and you should now see it. Highlight the current name, and type
in the new name that you wish to use
|
|
.
2)Pivot Points
As built, all of our parts probably have a pivot point
near the center of each object. This is not good for animating them.
The strut should pivot from the top, where we can assume that in real life
it is attached to the
fuselage in some manner. More than like likely your pivot point
is right in the center of the strut. It's easy to change however.
Select the strut, then click on the Hierarchy tab
. Click the very first button "Affect Pivot Only". You should
see a weird gizmo appear on your part, this is the pivot point. Using
the same tools you use to move or
rotate objects with, you can move the position of the pivot point.
So, just move it up to the top of the strut. Then deselect "Affect
Pivot Only". Now if you use the "select and rotate"
tool on the strut, it should rotate around the top of the strut,
not the center.
Do the same thing to both of the gear doors, moving the pivot point up
to the upper edge. Since the gear doors are at an angle, you can also
use the “select and rotate” tool to rotate the pivot points so that they
are aligned with the doors.
|
Pivot point
|
3)What about the wheels?
We need to link the wheels to the strut, so that where ever the strut
goes, the wheels will go too. So, select the wheels, the click on
the "select and link" button
. Now click the "select by name"
button. It will open up a box called "Select Parent", so, select
the strut(c_gear_strut), then click "link" down at the bottom.
Deselect the "select and link" button by selecting the "select object"
button (the arrow). Now use the "select and rotate"
tool on the strut, and you should see that the wheels now move with the
strut.
4)Animate
In Gmax, FS models start off with gear retracted.
Using the "select and rotate"
tool, rotate the strut and doors to their retracted positions.
(because of the angle of the gear doors, after you close them, you may want
to rotate them so they are squared up with each other again, don’t worry
that they overlap, no one will ever see this.)
Now, click the "animate"
button near the bottom. It should turn red. Move the frame slider
all the way to the right, to "100". Use the "select
and rotate" tool and rotate the strut to the extended position. Do
the same to each gear door. (again, the gear doors will have to be rotated
after you open them so that they are squared up) Click "animate" again to
turn it off. You have now set 2 keyframes for each item.
Now, you can slide the slider back and forth, or use the "play animation"
button (just to the right of the "animate" button), to see your animation
in action. Looks good except that the nose gear is crashing through
the gear doors. The strut is moving too soon and the doors are taking
far too long to open all the way.
To fix the doors, select each one, then select the last keyframe, (the
little blue (maybe green) rectangle on the timeline. Drag that keyframe
to the left to about 30. Do that to the other door as well.
(You do not need to turn "animate" on to do this. (If your doors
are at an angle you may have to adjust all 3 axis', in order to get them
to look right. The 737 nose doors needed this)
Now the doors finish opening at frame 30. The wheels may
still be breaking through the doors, so we need to move the 1st keyframe
for the strut forward to about frame 25. This way the strut does not
start to move until the doors are almost fully open.
If you want to add some variation, you can have each door start and/or
finish at slightly different times, (not everything is perfectly synchronized
in the real world)
When you animate the main gear do more or less the same procedure,
don't make the same mistake I did, and try to get some nice timing going
between the nose and main gears. Use the whole 100 frame area for each
gear set. Gear extension and retraction times are set in the aircraft's .cfg
file. So, in Gmax it'll look like all the gear sets are extending in perfect
unison, but in the .cfg file you can set the nose gear time to 4 secs, and
the main to 7 or 8 secs, and the nose gear will be fully out at the point
that the main gear is only 1/2 way down.
Compare your animation with “
737_gear_anim_finished.gmax
”, they should look about the same.
© 2002 David Rawlins