3D
Studio Max Pantograph Animation Tutorial
In
this tutorial you will learn how to animate a pantograph
for a locomotive.
3DStudio Max
will be referred to as 3ds.
|
|
1. Add
and resize shapes
You need to create six
boxes and resize them as follows
Parameter
|
Box1 (BaseFrame01)
|
Box2 (FrameUpper01)
|
Box3 (ArmLeftLower01} |
Box4 (ArmLeftUpper01) |
Box5 (ArmRightLower01) |
Box6 (ArmRightUpper01) |
Length
|
1.0 |
1.0 |
5.0
|
5.0
|
5.0
|
5.0
|
Width
|
0.5 |
0.5 |
0.2 |
0.2 |
0.2 |
0.2 |
Height
|
0.2
|
0.2 |
0.2 |
0.2 |
0.2 |
0.2 |
Length Segs
|
1 |
1 |
1 |
1 |
1 |
1 |
Width Segs
|
1 |
1 |
1 |
1 |
1 |
1 |
Height Segs
|
1 |
1 |
1 |
1 |
1 |
1 |
|
Now that you have created and resized the objects I recommend that
you rename them to the name shown in the brackets above. HINT. I always
rename any object I create as this makes it much easier to find in the
various lists of objects.
|
2.
Rotating
Rotate
the arms individually to the following angles
| |
X |
Y |
Z |
| ArmLeftLower01 |
-5.0 |
0.0 |
0.0 |
| ArmLeftUpper01 |
5.0 |
0.0 |
0.0 |
| ArmRighttLower01 |
5.0 |
0.0 |
0.0 |
| ArmRightUpper01 |
-5.0 |
0.0 |
0.0 |
.
|
3. Relocating
Now
we can position the cylinders and boxes. Select the move tool from
the main tool button menu. Type in the following co-ordinates for
each object:
| Co-ordinates |
Box1 (BaseFrame01)
|
Box2 (FrameUpper01)
|
Box3 (ArmLeftLower01}
|
Box4 (ArmLeftUpper01)
|
Box5 (ArmRightLower01)
|
Box6 (ArmRightUpper01)
|
X |
0.0 |
0.0 |
0.0 |
0.0 |
0.0 |
0.0 |
Y |
0.0 |
0.0 |
|
-2.973 |
2.99 |
2.973 |
Z |
0.0 |
|
0.219 |
0.854 |
0.219 |
0.854 |
Now that we have everything in location we should have a result similar
to figure 1
|

Figure 1 Results
after resizing, rotating and moving
|
|
4. Dummy
objects
The next item we need
to add is a bone or dummy item. To add a dummy item in 3ds you need
to go to the "Create" tab and then to the "Helpers" tab
|

Figure
2 Dummy menu item
|
|
In
this case you will need to create eight dummy items. It is recommended
to create the dummies in the top view. Once you have created the dummy
items you will need to rename them. For animation to work in Trainz
the dummies must begin with b.r. If you do not name them
correctly then Trainz will not recognize them.
For
this example I will name them as follows.
| b.r.main |
| b.r.frameupper |
| b.r.leftpivot01 |
| b.r.leftpivot02 |
| b.r.leftpivot03 |
| b.r.rightpivot01 |
| b.r.rightpivot02 |
| b.r.rightpivot03 |
5.
Dummy placement
Once you
have renamed the dummies you will then need to move the dummies to
the correct location. The b.r.main should be moved as close as possible
to 0x and 0y. The Z axis I usually keep the dummy about 200mm or 8" above
0. The location is not that important and in this case I have moved
the dummy 500mm above 0.
The
location of the other bones is however critical as it is what controls
the animation.
Item
|
X
|
Y
|
Z
|
| b.r.main |
0.0 |
0.0 |
0.5 |
| b.r.frameupper |
0.0 |
0.0 |
1.171 |
| b.r.leftpivot01 |
0.0 |
-0.5 |
0.1 |
| b.r.leftpivot02 |
0.0 |
-5.464 |
0.636 |
| b.r.leftpivot03 |
0.0 |
-0.5 |
1.171 |
| b.r.rightpivot01 |
0.0 |
0.5 |
0.1 |
| b.r.rightpivot02 |
0.0 |
5.464 |
0.636 |
| b.r.rightpivot03 |
0.0 |
0.5 |
1.171 |
|
6. Linking
Once
the dummies are in location we can then start linking the items together.
To link them together first select the link button and then select
the item
|

Figure
3 Link tool
|
|
To
make it easier to see if a link has been made I usually change the
view setting to "wireframe" which can be done by right clicking on
the text in the top left corner of the workspace.
You
need to create the following directory structure which can be shown
by pressing H. At this stage we don't want to link the Piston01, Rod01
and b.r.piston objects to anything
|

Figure
4 Directory structure
|
You may need to
check the box "Display Subtree" to show the structure. If you do
not copy the above directory structure exactly then the animation
will not work properly.
|
7.
IK Solver
Before
we can add the animation we need to add an "IK Solver" to
each arm set. To do this we need to select the b.r.leftpivot03 and then go
to the "Animation" menu
then "IK Solvers" and then select "IK Limb Solver" from the list. A line
will appear linked from the b.r.leftpivot03 to the cursor. Drag this link
to the b.r.leftpivot01 and click on it. Do the same for the b.r.rightpivot03
except link it to the b.r.rightpivot01. You should now have a result similar
to figure 6
|

Figure
5 IK Solvers

Figure
6 End result |
|
8. Time rate
Once
you have this directory structure and added the "IK Solver" we then
need to set up the time rate for the animation. To do this we need
to click
on
the
following
icon located in the bottom right hand corner.
|

Figure
7 Time setup button
|
Once you have the
following window open we need to change the Animation start and end
time.
|

Figure
8 Time configuration window
|
The
easiest way to do this is to select the "Re-scale Time" button which
will open the window shown in figure 9
|

Figure
9 Re-scale time window
|
|
Where it says frame count, change
the value here to 30 frames. Some people use a different number here
but I find 30 gives a good smooth animation. Once you have changed
the frame count click OK and the animation start time should be the
same at 0 but the end time should now be 29. Also make sure the "Use
TrackBar" checkbox is selected.
8. Animation
Now
we are ready to start the actual animation of the arms. Firstly select
the b.r.frameupper dummy. Then select the move tool.
|

Figure
10 Move tool

Figure
11 Animation keys
|
In 3ds you will
then need to select the "Auto Key" button (See figure 11).
Before you move anything you need to use the button with the key
on it with the tool tip "Set Keys" (Figure 11).
|

Figure
12 Zero key
|
This
will set a base key or zero key as shown in Figure 12 which is the
starting point of the animation. We now need to move the animation
to key 29. Select the bar between the arrow keys and drag the bar to
key 29. Make sure you have the move tool selected
as shown
in figure
10.
Once
you have moved to frame 29 select the text in the Z: co-ordinate
box and type in 7.171 and then press enter. If you have every thing
linked correctly
and the correct dummy selected then everything except the b.r.main
and the BaseFrame01 should have moved up.
|

Figure
13 Move co-ordinate boxes
|
| 9.
Testing
When you
have created a key for the two frames you can test out your animation
by clicking on the "Play
Animation" button. Everything should now work correctly. If it does not
then check the link setup and also that you placed the IK Limb Solver from
b.r.leftpivot03 to b.r.leftpivot01 and not the other way around.
|
|
10.
Exporting
Once
you have the animation complete then we need to export the fan to the
Trainz format. Deselect everything and select "Export" from the file menu.
Type in a name with the .im extension. Then select the "Trainz format
[*.IM,*.KIN,*.PM]" entry from the file type drop box and click "Save".
Then select "Export" again and this time type in a name and use the .kin
extension. When the "Export Animation" dialog box appears click on the
"OK" button.
11. Config entries
Now
that you have exported the file into the Trainz formats you will need
to set up a directory structure and create a config file for the pantograph.
| kuid <KUID2:86105:57001:0> |
This is the Kuid Number for the asset. The 57000 is
the recomended range for a pantograph |
| kind pantograph |
This tells Trainz that it is a Pantograph and not a loco or scenery
object etc |
obsolete-table {
0 <KUID:86105:57000>
}
|
If you have an old version you want to obsolete place the Kuid
number between the brackets |
| asset-filename Tutorial_panto |
This tells Trainz the name of the assets folders and filename. |
| username Tutorail Pantograph |
The name of the pantograph |
| description " Animated Pantograph" |
A short description of the pantograph that will be displayed on
the download station |
| trainz-build 2.0 |
Version of Trainz the pantograph is for. |
| category-class zp |
Class of the object. In this case it is a pantograph so the class
is zp |
| category-region-0 US |
Area the pantograph was used in. You can have more than one if
required |
| category-era-0 2000s |
Year periods that the pantograph was used in. |
Was
this tutorial helpful? Not enough or too much detail? Points not explained
properly? Suggest any improvements? Please let me know what you think here.
Download
this tutorial here as
a PDF document. |