gmax tutorial - a simple diesel loco, part six
TRANSCRIPT
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
1/26
Gmax Tutorial - A Simple Diesel Loco, Part six
3. Simple Construction - A Diesel Loco - Part six
ersion 1.1 - 23.Juli 2002
Pivot points
To let all the parts of the loco appear at their right places and let them animate correctly, we have to adjust some
pivot points first.
The pivot points of the wheelsets and the coupling rod are on their right places. They must not be moved in any
case.
To give the pivot points their right position, we select the Hierarchy toolbox and activate the button Affect
Pivot Only. With the Move tool and the Transform Type-In dialog, we move all pivot points to zero (all three
coordinates: X, Y and Z), except the pivot points of the wheelsets and the coupling rod. Then we deselect Affec
Pivot Only.
Caution!
Should one ore more of the wheels' or coupling rods' pivot points been moved to zero accidently, this can be
undone by clicking Center to Object.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (1 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
2/26
Gmax Tutorial - A Simple Diesel Loco, Part six
The Hierarchy of objects
The MSTS to work properly, must receive the model objects with the correct hierarchy setting and proper part
names. On the highest Hierarchy level, the socalled root level, only one object (node) named Main is allowed,otherwise MSTS will crash when loading the object. All other objects, which are called nodes in the terms of the
MSTS hierarchy, are to be linked to the Main object.
We select the coupling rod first, activate the Select and Link symbol and press the H key. The Select Parent
dialog, which is similar to the select dialog, opens. We select the Wheels2 object and click the Link button.
Then, we select all other parts of the loco, except Main, and link them to the Main object the same way.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (2 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
3/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Now, we press the Select symbol and then the H key. When we activate the Display Subtree checkbox, the
Hierarchy should be shown like this:
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (3 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
4/26
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
5/26
Gmax Tutorial - A Simple Diesel Loco, Part six
another frame count, this value would be due to be changed. This is possible but could seriously affect the
behaviour of the loco.
Wheels first...
In the Left viewport, we select the Animation button. The viewports frame turns red. The first animation step(frame 0) is unaltered. We pull the slider on the bottom of the viewport from the position 0/8 to the position 1/8,
which means step 1 from 8 (Remember? this is the second frame as we are counting from zero to 8). Then, we
select all three wheelsets with CTRL click.
After activating the grid snap tool and the Rotate symbol, we slowly draw the mouse downwards from the cente
of the wheelset wheels2. All three wheelsets should rotate now. We draw until the Z value reads 45 degrees.
Caution!
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (5 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
6/26
Gmax Tutorial - A Simple Diesel Loco, Part six
The coupling rot is linked to the center wheelset, and therefore it will follow the rotation. That's allright. We wil
correct it later.
Then, we draw the animation slider to the 2/8 position and rotate the wheels another 45 degrees.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (6 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
7/26
Gmax Tutorial - A Simple Diesel Loco, Part six
We repeat this step with all the slider positions...
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (7 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
8/26
Gmax Tutorial - A Simple Diesel Loco, Part six
...until we reach to the starting position again.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (8 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
9/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Now, we draw the animation slider back to the 1/8 position and select the coupling rod. It will be rotated by -45
degree at each of the steps. So the rod leaves its horizontal attitude.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (9 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
10/26
Gmax Tutorial - A Simple Diesel Loco, Part six
When finished, we deactivate the animation button. With the animation slider, we can watch the whole animatio
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (10 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
11/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Preparing the export to MSTS
For our loco, we use the files of MSTS' GP38 diesel loco. To do this, we create a new folder named gtd1 in the
C:\Program files\Microsoft Games\ Train Simulator\TRAINS\TRAINSET\ folder. From the TRAINSET
\GP38 folder we copy the SOUND and CABVIEW folder and the files gp38.eng and gp38.sd to our new gtd1
folder. Make shure not to move the files accidentally.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (11 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
12/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Now, we rename the file gp38.eng into gtd1.eng and the file gp38.sd into gtd1.sd. With a unicode editor
(Notepad in W2k or otherwise WordPad) we open the file gtd1.sd and change the entries in the third and sevent
row as follows:
shape ( gtd1.s
ESD_Bounding_Box ( -1.5 0.3 -5.5 1.5 4.8 5.5 )
The shape entry gives the name of the shape file. This is the file containing the 3D-data. We know this file by
its .s extension. The ESD_Bounding_Box entry descibes a square araund the loco with contains among others th
collision detection data. The values from left to right are:
-1.5 left side 0.3 lowest part. This value has to be above the rail level.
-5.5 rear end, useful to tweak the distance towards other wagons.
1.5 right side
4.8 height
5.5 front
Then we save the file.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (12 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
13/26
Gmax Tutorial - A Simple Diesel Loco, Part six
In the physics file gtd1.eng, we change the following entries as shown:
WagonShape ( gtd1.s )
Engine ( gtd1
Wagon ( gtd1 )
Name ("gtd1")
Description (
"gtd1 - Diesellok from Volker M. Bollig's GmaxTutorial"
)
The lines are spread all over the file. Be careful. Die Zeilen sind in der gtd1.eng-Datei weit verstreut.
Caution!
The brackets have to be set as shown above. Then we save the file and copy the gtd1.ace file into the C:\Program
files\Microsoft Games\ Train Simulator\TRAINS\TRAINSET\gtd1 folder
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (13 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
14/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Making the loco visible.
To make the loco visible, MSTS has to know which polygones are to be loaded into the graphics memory. At
greater distances, not all polygones of a loco can be seen at all. Therefore it ist not necessary to load and
calculate them. That would lead to the MSTS' HD loading hangup for a few seconds in the worst case. We load
big parts in the distance of 1000 meter and the other parts step by step when the loco gets nearer:
main, body and chassis at 1000m
roof at 500m
wheels at 200m
coupling rods and bumpers at 50m
This is done with the Level of Distance manager Trainsim 1 LOD Tool which can be found in the Train-
Simulator menu:
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (14 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
15/26
Gmax Tutorial - A Simple Diesel Loco, Part six
First, we select the whole loco and click the Plus sign in the LOD tool. In the LOD-Distance field, we type the
value 50.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (15 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
16/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Then we repeat these steps with the values 200, 500 and 1000. The LOD tool's status bar should read Level 4
from 4.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (16 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
17/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Now, we have to show MSTS which planes (faces and polygones) are to be loaded at which distance level. In
most cases, the loco will be loaded while outside of our visible range. Then, getting nearer, more and more
polygones are to be loaded and displayed. Driving away from us, more and more polygones have to be hidden.
This is out point of view for the LOD manager.
Though we take the case of the nearest approximation first. That is 50 meters. In this case all polygones are to becalculated and displayed. Therefore, we need not change the 50 meter LOD settings.
We select the 200 meter level with the arrows
Here we hide all polygones not to be visible in a distance of more than 200 meters. In our case, these are the
polygones of the coupling rods and the bumpers. One by one, we select the objects and delete the polygones in
Polygone selection mode.
Caution!
In no case delete any object! Delete polygones only!
In the next image, we don't see the bumpers and coupling rod anymore. But in the Hierarchy field, we can still
see the cylinder (bumper) and coupling rod objects.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (17 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
18/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Switching back to the 50 meter level, we can still see the bumpers and rod.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (18 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
19/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Now, we select the 500 meter LOD level and with the same method, we hide not only the rod and bumpers but
the wheels in addition. That means, the wheels will be visible when they are nearer than 500 meter.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (19 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
20/26
Gmax Tutorial - A Simple Diesel Loco, Part six
At the 1000 meter level, we hide the roof and the bumper support polygones also.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (20 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
21/26
Gmax Tutorial - A Simple Diesel Loco, Part six
In the status row we can see, how much polygones are drawn at which level. At 1000 meter, 68 polys are drawn
...at 500 meters, they are 160 polygones...
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (21 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
22/26
Gmax Tutorial - A Simple Diesel Loco, Part six
...at 200 meter the polygones numbers 592...
...and at 50 meter all 1640 polygones are displayed.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (22 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
23/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Putting together all non animated objects.
To increase the framerate of MSTS, we can put together all non animated objects. They are still independent
objects but they build a matrix in the shape file which can be loaded and animated more quickly by MSTS.
To do this, we select in any LOD-level the objects Chassis, Body Roof and the bumpers one by one and check
the Collapse Node checkbox in theSelected Node field.
With File - Export to .S we export the model into our C:\Program files\Microsoft Games\Train Simulator
\TRAINS\TRAINSET\gtd1 folder and name it gtd1.s
Don't forget to save the work.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (23 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
24/26
Gmax Tutorial - A Simple Diesel Loco, Part six
The maiden voyage
To have a ride on our newly built loco, we must create a consist which can be downloaded here. We copy the
consist file gtd1_solo.con to the C:\Program files\Microsoft Games\Train Simulator\TRAINS\CONSISTS
folder.
In MSTS, we select the gtd1 loco and have a ride.
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (24 of 26)15.03.2012 15:34:35
http://www.vmbollig.de/msts/tut_en/construction_6/gtd1_solo.conhttp://www.vmbollig.de/msts/tut_en/construction_6/gtd1_solo.con
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
25/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Congratulation!
Our first loco is running!
Uuuups....
...we forgot the lights. ;-)
But that shouldn't be a problem at all.
The Capter 3, A Simple Diesel Loco is finished. More chapters containing smoothing, transparencies, animated
doors and other things are planned for late august 2002.
Questions concerning this tutorial or MSTS object or loco building can be posted to the trainsim.com or
uktrainsim forums or sent to me
ttp://www.vmbollig.de/msts/tut_en/construction_6/construction_6.html (25 of 26)15.03.2012 15:34:35
-
8/17/2019 Gmax Tutorial - A Simple Diesel Loco, Part Six
26/26
Gmax Tutorial - A Simple Diesel Loco, Part six
Have fun
ck to table of content
http://www.vmbollig.de/msts/tut_en/index.htmlhttp://www.vmbollig.de/msts/tut_en/index.html