3D
Studio Max Locomotive Tutorial
Chapter
4. Cab and windows
In
this tutorial you will learn how to create the raised cab steps of
a locomotive and texture them. The methods used to create the steps
can be
adapted to any Trainz
item.
3DStudio Max
will be referred to as 3ds.
|
To complete these tutorials with the dimensions listed herein you will
need the following setup
1. Open the "Units Setup.." dialog from the "Customize"
menu and select the "System Units Setup" button. In the "System
Units Scale", use the system unit scale of 1.0 units = 1m
2. In the "Units Setup set "Display Units Scale" to Metric
Meters.
The "Select and Move" tool will be referred to as the "Move" tool
The "Select and Rotate" tool will be referred to as the "Rotate" tool
|
| 1.
Create, rename and resize two boxes.
The
first thing you need
to do is create two boxes for the cab and the roof of the locomotive
and name them Cabin and Roof and resize them to the following dimensions.
| Parameter |
Box1(Cabin) |
Box2(Roof) |
| Length |
2.1 |
2.1 |
| Width |
3.0 |
3.0 |
| Height |
1.9 |
0.4 |
| Length
Segments |
1 |
1 |
| Width
Segments |
1 |
1 |
| Height
Segments |
1 |
1 |
|
2.
Relocate the boxes
Once you have created
the boxes we need to move them into location. Select the cabin and
type in the following co-ordinates.
| |
X
|
Y
|
Z
|
| Cabin |
0.0 |
-3.9 |
1.65 |
| Roof |
0.0 |
-3.9 |
3.55 |
|

Figure
1 Results after resizing and moving boxes
|
3.
Beveling the edge of the cab
Select
the Roof and convert it to editable mesh. Then
click
on the
"Edge" select icon and select the right upper edge and
chamfer the edge 0.05m. Do the same for the left upper edge and you
should end up with a result similar to figure 2. |

Figure
2 Edge to be chamfered
|
Once you have both edges chamfered we need to move the edges into
location. There are two methods you can use to move the outer edges into
location.
The first is to use object snap and drag the edges into location but
you will still need to type in the co-ordinates for the upper edges and
the
second is to type in the co-ordinates for all four edges. Select each
edge in turn and type
in the following co-ordinates
Edge |
X |
Y |
Z |
Outer left |
1.5 |
-3.9 |
3.55 |
Upper left |
0.8 |
-3.9 |
3.95 |
Outer Right |
-1.5 |
-3.9 |
3.55 |
Upper Right |
-0.8 |
-3.9 |
3.95 |
|

Figure
3 Selecting outer edge with osnap

Figure
4 Moving into position

Figure
5 End results after moving the edges
|
If you notice in figure 5 that the front face of the roof has a darker
shade towards the base. This is because the polygons are now squashed
up into a smaller space. To fix this we need to weld the vertices together.
Change to the "Vertice" sub-object and select an outer corner
and in the
"Weld" section of the "Edit Geometry" click on the "Selected" button.
This will weld the two vertices that are located at the corner into one
and will rearrange and remove some polygons.
|

Figure 6 Results
after welding vertices

Figure 7 Weld
section
|
4.
Polygon removal
As
there are unseen polygons on the Roof
we need to remove them. Use the "Arc Rotate" to
move the viewport so that you can see the
underside
of the Roof and use the "Polygon" sub-object
to select the bottom polygon and delete it. Do not remove any polygons
from the Cabin yet.
|

Figure 8 Polygons
selected for deletion
|
5.
Cabin windows and interior
Now
we need to cut some holes in the Cabin for the windows. To do this
we need to create some boxes to use with the Boolean tool. Create the following
boxes
| Parameter |
Interior
|
Left
and right front windows
|
Left and right rear windows |
Front and rear left windows |
Front and rear right windows |
Front center left window |
Front center right window |
| Length |
2.0
|
0.5
|
0.5 |
2.8 |
2.8 |
0.6 |
0.6 |
| Width |
2.9
|
3.5
|
3.5 |
0.5 |
0.5 |
0.8 |
0.8 |
| Height |
1.8
|
0.8
|
0.8 |
0.7 |
0.7 |
0.4 |
0.4 |
| Length
Segments |
1
|
1
|
1 |
1 |
1 |
1 |
1 |
| Width
Segments |
1
|
1
|
1 |
1 |
1 |
1 |
1 |
| Height
Segments |
1
|
1
|
1 |
1 |
1 |
1 |
1 |
Now move them to the following locations
| |
X
|
Y
|
Z
|
| Interior |
0.0 |
-3.9
|
1.7 |
| Left
and right front windows |
0.0 |
-4.205 |
2.65
|
| Left
and right rear windows |
0.0 |
-3.65 |
2.65 |
| Front
and rear left windows |
1.15 |
-4.0 |
2.75 |
| Front
and rear right windows |
-1.15 |
-4.0 |
2.75 |
| Front
center left window |
0.45 |
-5.0 |
3.05 |
| Front
center right window |
-0.45 |
-5.0 |
3.05 |
After you have resized and moved them select the roof and hide it. Now
select the Cabin and go to the "Compound Objects" in the "Geometry" sub
tab under the "Create" tab. Click on "Boolean" and
then "Pick Operand
B" and select the Interior box. Now
convert the cabin to editable mesh and repeat the procedure for all the
six window
boxes.
After you have finished the boolean's convert to editable mesh and remove
the top and bottom polygons.
|

Figure
9 Result after resizing and moving boxes

Figure
10 Result after Boolean's
|
6. Interior
Now
that we have created a cabin with an interior and windows we need
to texture the interior with two different textures. There are two
ways we can do this. Firstly we can select the interior polygons
and detach
them
from
the exterior
or we can add an "Edit Mesh" to the stack. For my locomotives
I prefer to detach the interior from the exterior mesh. To do this
select the Cabin and then select the "Polygon" sub-object
and select all the interior polygons as shown in figure 11 you will
need to scroll around the view port with the "Arc Rotate" tool and
then select "Detach" from
the "Edit Geometry" rollout. In the message box that appears type
in the name Interior and make sure the "Detach as Element" and "Detach
as Clone" are unchecked and click on OK.
|

Figure 11 Interior
polygons selected

Figure 12 Ignore
backfacing option
|
7.
Texturing
Open
up the material editor and add the Main_01 texture to the Cabin. Create a
new texture in slot 3 using the Interior_01.tga texture and apply it to the
Interior.
Now we
can start the mapping of the textures to the cabin. Firstly unhide the Main
Body so that we can
align the Cabin textures with it then select the Cabin and add an "Unwrap
UVW" modifier to the stack. Click on the "Select Face" sub-object and then
select the rear wall of the Cabin. Click on "Planar Map" and then "Edit"
to open the "Edit UVW's" window. Click on "Select Face" again to deselect
it and then click on the "Filter Selected Faces" button to hide
the other maps or move them out of the way.
|

Figure 13 Rear
wall of the Cabin selected for editing
|
Align the rear cab wall with the textures on the Main Body as shown in
figure 14. Continue with this procedure until the entire cabin is textures
similar to figure 14 and 15
|

Figure 14 Finished
Cabin wall textures
.
Figure 15 Texture
mapping location
|
As you can see in figure 15 we still have all the window surrounds
to deal with. As most window surrounds are the same color we can move
them
all to one small portion of the Main_01 texture. Select all of the window
surrounds and move them to the small white box that is second form the
left at the bottom of the Main_01
texture Do not put them on the same box that we used for the underside
of the Main Base.
|

Figure 16 Window
texture maps in location
|
7.
Kickboards
Now
that the cabin and window surrounds are textured correctly we can finish
off the Kickboards that were left untextured in chapter 3. Unhide the four
Kickboards and add the Main_01 texture to each Kickboard. Select the front
right Kickboard and add an "Unwrap UVW" to the stack. Click on the "Select
Face" sub-object and then select the entire Kickboard. Change
the "Sub Object Params" to "X" and then click "Planar Map".
Align the textures as shown in figure 18 and 19. You may need to flip the
texture map horizontally
to get in the correct orientation. To do this go to "Tools" in the "Edit
UVW's" window and select "Flip Horizontally"
|

Figure 17 Sub
Object Params settings

Figure 18 Mapping
in location

Figure 19 Correctly
aligned with Cabin textures
|
| As
the inside of the Kickboard is difficult to see and partially hidden
by both the steps and the front hood there is no need to separate each
face and texture it separately.
8.
Roof
Now
that everything else has been mapped correctly we can now add a texture
to the Roof and remap it to the correct location. Open the "Material
Editor" and add the Main_01 texture to the Roof. Select the Roof
and add an "Unwrap UVW" to the stack and click on the "Select Face"
sub-object and select the top of the Roof and click on "Planer Map".
Click on "Edit" to bring up the "Edit UVS's" window
and rearrange the map until it matches the lines on the Main Body's
roof and on
one side of the Cabin preferably a side whereby the text does not
appear to be stretched at all. The aligned textures are shown in
figure 20 and 21. You will notice that it will not align with both
sides of the Cabin. This
is because
when
we textured
the
Cabin
we did not have anything to align the textures with in that direction.
Once you have the roof texture aligned with one side of the Cabin
and the Main Body's roof we can then select the front of the roof
and align it with the top.
|

Figure 20 Textures
aligned with Main Body

Figure 21 Textures
aligned with right side of the cabin

Figure 22 Front
view showing front of roof aligned with roof top
and
unaligned with front of Cabin
|
Now all we have to do with the Roof is align the rear face
of the Roof with the rear wall of the Cabin. You may have to hide the
Main Body to see the line. Now that we have the Roof of the locomotive
completely textured we need to go back over the Cabin and align the sides
and front with the roof textures.
9.
Cab floor
Now
that we have textured the cabin and as we look through the windows
we can see that the floor of the Interior cannot be seen and instead
the steps can be seen. To fix this problem we need to detach the
floor from the interior and move it up. To make it easier with the
textures when we detach the floor instead of specifying that we want
a new object we will "Detach to Element". That way we can move the
floor up while it is still a part of the Interior. Move it to a height
of 1.65m.
10.
Windows
To
add the appearance of windows we need to create a plane for each
window. To start with click on the "Create" tab and then the "Geometry"
sub-tab and select "Plane". Change the segment setting
to 1 and create three planes with the following dimensions.
| Parameter |
Plane1
|
Plane2 |
Plane2
|
| Length |
0.5
|
0.7 |
0.4
|
| Width |
0.8
|
0.5 |
0.8
|
| Length Segments |
1
|
1 |
1
|
| Width Segments |
1
|
1 |
1
|
Once you have created the three planes we need to rotate them in the
correct direction. Click on the "Select and Rotate" tool and rotate
Plane1 -90 degrees in the "Y" co-ordinate. Rotate Plane2 and Plane3
90degrees in the "X" co-ordinate.
|

Figure 23 Rotate
tool

Figure 24 Rotate
co-ordinate boxes located at the bottom of the screen
|
11.
Window textures
Before
duplicating the three planes for the other windows we need to create a new
material and apply it to the three planes. Open the "Material Editor" and
create a new texture with the Opacity.tga in the "Diffuse Color" of
the fourth
globe. Then click on the "Go to Parent" button to return to the material
list and add the Opacity.bmp to the "Opacity" map. Now apply the texture
to the three planes.
|

Figure 25 Return
to parent button

Figure 26 Maps
set up in material editor
|
12.
Relocating and adding windows
To
create more windows for the left side we need to duplicate Plane1. We can
do this in a number of ways however the easiest method is to select the Plane1
and while holding down the shift key move the plane. In the message box
that appears select the "Copy" option and change the number of copies to 2. Now
we can move the two extra windows into location. Make sure the "Snap Toggle"
is on and select one of the new planes with the "Endpoint" selection box.
Move the plane into location on one of the right side windows. Repeat the
procedure for the other window. Now we need to change the rotation on the
original plane to 90 degrees in the"Y" co-ordinate and move it into location
on one of the left windows. Once in place hold down the "Shift" key again
and create another copy of the plane and move it into location in the other
left side window. Repeat the procedure for the front windows. Once completed
we now need to create the rear windows. Select an outside front window and
using the shift key again create a copy. Rotate the copy to -90 in the "X"
co-ordinate and move it into location at one of the rear window openings.
Create a copy of the rear window and move it into location in the opposite
side. Most windows do not sit flush with the wall so you can move them in
a small amount if you like.
You have now successfully created the Cabin with an interior and textured
the cab and the kick plates for the locomotive.
Chapter
5 |