Gmax
Locomotive Interior Tutorial
Chapter
2. Console and lever mount
In this
tutorial you will learn how to create the interior furnishings for
a locomotive interior.
NOTE; Due to the complexity of an interior, items will
not be highly detailed and some items will not be created.
|
|
1. Create and relocate a
chamfered box
From
the "Create", "Geometry" menu and using the "Box" tool
create an object with the following dimensions
| Parameter |
ChamferBox1 (Console) |
| Length |
1.5 |
| Width |
0.2 |
| Height |
1.0 |
| Length Segments |
2 |
| Width Segments |
1 |
| Height Segments |
1 |
Using the methods in this tutorial chamfer the edges of the box and
then move the ChamferBox1 to the following location
| |
X
|
Y
|
Z
|
| ChamferBox1 |
-0.3
|
-0.28
|
-0.38
|
Rotate the ChamferBox1 to -40 degrees on the "Z" axis. Right
click on the ChamferBox1 and convert it to an "Editable Mesh".
Switch to "Top
View" and making sure that you have the "Ignore Backfacing" checkbox
unselected, select the top set of vertices of the ChamferBox1 as shown
in figure 2.
Move
the
vertices
to
X = -0.139,
Y
= 0.243, Z =
0.12.
Now
with
the same vertices selected rotate them 20 degrees on the "Z" axis.
Now select the center right vertices and move them to X = -0.203 Y =
-0.3
Z = 0.12. |

Figure 1 Chamfer
box in location

Figure 2 Vertices
selected ready for moving

Figure 3 Vertices
after move

Figure 4 Vertices
after rotating

Figure 5 Second
set of vertices

Figure 6 Final
result
|
Now that we have the general shape completed select and remove all the
polygons from the bottom of the Console.
|
| 2. Texturing the console
Now
that we have the mesh in the correct location and in the correct
shape we can add the textures to the console. In Trainz the interiors
do not cast shadows so we have to add the impression of shadows to
the texture. Getting the shadows and lighting just right is the most
time consuming aspect of creating an interior for Trainz. For this
tutorial I will not be going into advanced
lighting and shading effects such as bump mapping or specular highlights
(these will be covered in their own tutorial in the future) but a similar
result can be achieved using textures. The problem with casting shadows
using
the
textures
is you
have to
decide
which
direction
you want the shadows to be cast. Most people including myself use the
front windows as the light source. This is fine but is not ideal as
the locomotive is not always facing into the sun so when you are driving
away from
the sun the light source will still appear to originate from the front
window. I apply gradients to different faces depending on the direction
of the light in relation to the surface.For the console the light emanates
from in front but also above so the textures need to be applied to
reflect this lighting. In figure 7 you will notice the different shading
between the rear panel and the front panel. Although it is hard to
see in the image there is also a gradient applied to both of these
surfaces. As the light emanates from in front and above the console
the darkest surface is the front most face.
|

Figure 7 Result
with polygons removed
|
A similar technique can be applied to the walls of the cab. Some creators
apply shadows of the interior objects and window shapes to the various
walls and while this looks fine it is not entirely realistic because
as detailed above the light does not in reality always emanate from the
one
source or direction.
|
|
3. Adding a lever mount
Now that
we have the console created and textured we need to add a mount for
the lever. Create the following cylinder
| Parameter |
Cylinder01(LeverMount)
|
Radius
|
0.15
|
Height
|
0.007
|
Height Segments
|
1
|
Cap Segments
|
1
|
Sides
|
18
|
Locate the cylinder in the following location
| Co-ordinates |
Cylinder01(LeverMount)
|
| X |
-1.5
|
| Y |
-0.4
|
| Z |
0.0
|
Once you have the cylinder created and in location we need to add a
"Slice" modifier to the stack and cut the cylinder to the right
of the center. From the modifier list, select the "Slice" modifier
and an orange wireframe should appear in the scene. Expand the "Slice" modifier
and select "Slice Plane" the wireframe should now be yellow.
This is
the cut
plane
anything
on either side of the plane will be cut or sliced off from the remainder
of the object however it will still be one object. To achieve the desired
result we need to rotate the slice plane 90 degrees in the "Y" co-ordinates.
One thing to remember when rotating a slice plane and that is the rotation
co-ordinates always reset to zero after each rotation. So if you rotate
the plane 90 degrees you cannot undo the rotation by typing 0 into the
co-ordinates.
|

Figure 8 Cylinder
created and in location

Figure 9 Adding
the slice modifier

Figure 10 Slice
plane selected

Figure 11 Slice
plane shown in viewport

Figure 12 Slice
plane rotated ninety degrees
|
Once you have rotated the plane, in the "Slice Parameters" section
of the "Slice" modifier select "Remove Top" and half
of the cylinder should disappear. Now we need to move the slice plane
to the right. Type -1.6 into the "X" co-ordinates to move the
plane into the
desired location. Once you have move the slice plane, convert the mesh
to "Editable Mesh" to remove the "Slice" modifier
from the stack. If you do not convert it to "Editable Mesh" you
will have problems at a later
stage when trying to move vertexes, edges or polygons.
|

Figure
13 Slice parameters

Figure
14 Slice plane rotated and mesh top removed

Figure
15 End result
|
Now we need to mirror the cylinder segment to create the top mount.
Select the Cylinder01 and then select "Mirror Selected Objects" from
the toolbar. Mirror the LeverMount 0.039m
in the "Z" axis. Make
sure you have "Copy" selected.
|

Figure 16 Mirror
settings
|
Once you have the second segment created select the first segment
and attach the second object to it. Then move it to the following
location.
| |
X
|
Y
|
Z
|
| LeverMount |
-0.5
|
-0.52
|
0.3
|
Once you have moved the LeverMount to the above co-ordinates we need
to align the object to the console. To do this we need to use the "Align"
tool. Select the LeverMount and then click on the "Align" button
on the main toolbar. After selecting the "Align" tool the cursor
should change
to resemble the image on the "Align" tools button. Move the
cursor over the Console and the cursor should change again. Left mouse
click and
the "Align Selection" dialog box should appear. Select the "X
Axis" in
the "Align Orientation [Local]:" settings and click on "OK".
The LeverMount should now be in alignment with the face of the Console
as shown in
figure 19.
|

Figure
17 Align tool icon

Figure
18 Align settings

Figure
19 End result
|
|
4. Texturing the lever mount
Now that
we have the LeverMount correctly aligned with the console we can add
the textures to the LeverMount. For simplicity I have used the same
texture as the console, however this is not suitable in situations
where there are labels etc applied to the LeverMount. Open the "Material
Editor" and apply the Console.tga texture to the LeverMount. and
then add an "Unwrap UVW" modifier to the stack. Map the textures
to something similar to figure 20. Remember to keep in mind the direction
of lighting for the texturing. |
|

Figure
20 Mapping location |
| |
Chapter 3
|