Gmax Locomotive Tutorial

Chapter 1. Main Base

In this tutorial you will learn how to create the main base of a locomotive and texture it. The methods used to create the main base can be adapted to any Trainz item.

 

To complete these tutorials with the dimensions listed herein you will need the following setup
1. Open the "Preference Settings" from the "Customize" menu. Under the "General" tab set the system unit scale to 1.0 units = 1m
2 Open the "Units Setup.." form the "Customize" menu and set the units setup 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. Main base.

There are two methods we can use to create the main base. One is to create a number of boxes and use the boolean tool and the other is to create a spline and use the extrude tool.

Whichever method you use I also suggest you try out the second method to gain experience as both methods will be used later on in the tutorial.

 

2a. Boolean method.

 

1. Create a box.

The first thing you need to do is create a box for the base of the locomotive. At this point the size of the box does not matter.

 

Figure 1 Box tool

 

Figure 2 Box

 

2. Resize and rename the box

Once you have created the box we need to resize it. You will need to select the box and then switch to the "Modify" panel.

 

Figure 3 Modify menu with the box selected

 

For the box you will need to enter the following dimensions

 

Parameter Box1(Main Base)
Length 15.0
Width 3.0
Height 0.15
Length Segments 1
Width Segments 1
Height Segments 1

In figure 3 where it says Box01 rename this to MainBase. It is a good practice to always rename any object that you create as it makes it much easier to find the object you are looking for.

 

Figure 4 Results after resizing

 

 

3. Converting to mesh

The next step is to convert the body to an editable mesh object we do this by selecting the object and right clicking which then opens a context menu as shown in figure 5. Select the "Convert to Editable Mesh" entry. This is required to complete part of the tutorial.

 

Figure 5 Converting to Editable Mesh

 

4. Relocating

Select the main base (Box1) and then select the "Move" tool from the main tool button menu and type the following dimensions into the co-ordinate boxes. These boxes are located at the bottom of the 3d Studio Max window. You can also right click the "Move" tool and type them in the "Absolute World" section of the "Transform Type-in" window.

 
X
Y
Z
Box1
0.0
0.0
1.5

 

Figure 6 Move tool

 

Figure 7 Co-ordinate boxes

 

5. Cutting out the corners

To remove the corner of the main base for the steps we need to use a second box and the boolean tool The first thing we need to do is create four small boxes the size of the area we want removed.

Parameter Box1, Box2, Box3 and Box4
Length 0.7
Width 0.6
Height 0.15
Length Segments 1
Width Segments 1
Height Segments 1

Then we need to move the boxes into position.To make it easier to select and position the box we need to turn on the object snap, this will apply for both methods. To do this you need to click on the icon shown in figure 8. Use the settings shown in figure 9.

 

Figure 8 Object Snap Icon

 

Figure 9 Object Snap Settings

 

Once you have the object snap setup when you move the cursor over the corner of the small box the a small yellow selection box should now appear as shown in figure 10. Make sure you have the move tool selected and when you have the selection box on the correct corner left click and drag the small box towards the corner of the main base as shown in figure11. When you are close to the corner of the main base the small box should snap into position. If it is sticking out the side of the main base then you did not have the correct corner selected.

 

Figure 10 Selection box

 

Figure 11 Small box in new location

 

Do the same for the other boxes on the other corners. Once you have all boxes in location then we can add a boolean to the mesh. Select the MainBase and go back to the "Create" tab and "Geometry" sub-tab and from the drop down box select the "Compound Objects" and then click on the "Boolean" button and the available settings will be displayed as shown in figure 13. Change the settings to match those shown in figure 13.

 

Figure 12 Compound Objects entry

 

Figure 13 Boolean

 

Once you have the settings correct click on the "Pick Operand B" button and then move the cursor over one of the small boxes. The cursor should change shape. When it does click on the box and the corner of the main base should disappear as well as the small box. Before you do the same with the other boxes on the other corners you will need to convert the main base from a boolean to an editable mesh again.

 

Figure 14 Result after Boolean

 

2b. Spline and extrude

The easiest way to use the spline provided you know the co-ordinates that you want the spline points at is to use the keyboard entry. Select the "Line" button from the "Create" tab and the "Shapes" sub tab as shown in figure 15. Expand the keyboard entry menu as shown in figure 16 and enter the following co-ordinates into the X, Y and Z, boxes. Make sure you click the add point button after you enter each set of co-ordinates.

 
X
Y
Z

Point1

0.9
-7.5

1.5

Point2
0.9
-6.8
1.5
Point3
1.5
-6.8
1.5
Point4
1.5
6.8
1.5
Point5
0.9
6.8
1.5
Point6
0.9
7.5
1.5
Point7
-0.9
7.5
1.5
Point8
-0.9
6.8
1.5
Point9
-1.5
6.8
1.5
Point10
-1.5
-6.8
1.5
Point11
-0.9
-6.8
1.5
Point12
-0.9
-7.5
1.5
ClosePoint
0.9
-7.5

1.5

 

Figure 15 Line tool

 

Figure 16 Line keyboard entry

 

When you enter the last set of co-ordinates 3ds will ask if you want to close the spline. Click on "Yes". This welds the last two points together so that we have a continuous spline. If this was not done then when we extrude the spline the top and bottom faces would not be created.

Now that we have the spline created we can extrude the spline. Select the spline and go to the "Modify" tab. From the "Modifier List" dropdown box select the "Extrude" entry. If you have the two ends joined then the top of the main base should have been created. If it didn't then you will need to go back to the "Line" "Vertex" entry select the vertexes and weld them together.

Once you have the result in figure 18 type in 0.15 into the "Amount" box and make sure the "Segment" is set to 1 as shown in figure 19. You should now have the results shown in figure 20.

 

Figure 17 Extrude modifier

 

Figure 18 Capped spline

 

Figure 19 Extrude modifier settings

 

Figure 20 Final result

 

Once you have the required result you can then convert the extruded spline to "Editable Mesh"

Using the spline and extrude method usually gives a better result with less polygons than the boolean. To achieve the same polygons count with the boolean you would need to move and weld some vertices together.

 

7. Applying Textures

We can now apply the textures to the MainBase. To do this we need to open the "Material Editor". Select the Material editor icon and the "Material Editor" will appear. Select "New" and then in the "New Material" dialog box select the "Standard" entry. Expand the "Maps" menu. Find the entry "Diffuse Color" click on the corresponding "None" item. A new window will open called the "gmax Material Navigator".. You will see a list of items with a green parallelogram icon  Double click the "Bitmap" entry. This will open a "Select Bitmap Image File" dialog box. You will need to find and select the "Main_01.tga" file. (You may need to change the file type to view tga files).

 

Figure 21 Material Editor Icon

 

Figure 22 Material Editor with no textures

 

Figure 23 Material Editor showing Material #1

 

Figure 24 Material Editor showing the globe

 

Figure 25 gmax Material Navigator with the Main_01.tga texture loaded

 

Figure 26 Blue and white cube

 

When you have completed the texture loading select the globe at the top of the material editor as shown in figure 24 and drag it to the main body. In order for the textures to show up in the window select the blue and white cube in the "Material Editor". If you have more than one texture in the scene you can use the "gmax Material Navigator" to switch between them.

 

Now select the "New" button and repeat the above process except this time add the "CheckerPlate.tga" texture to the "Diffuse Color" slot. Now that we have applied a texture to the entire main base we need to change it so that the Mian_01 texture is only shown on the side and base of the main base and the CheckerPlate texture to the main base's top surface. To do this we need to add an "Edit Mesh" modifier to the stack.

 

Figure 27 Applying an Edit Mesh Modifier

 

We now have to select the individual faces that we want the CheckerPlate texture applied to. The easiest way to do this is to expand the "Edit Mesh" modifier and then select Polygon. Select the main base then change the "Edit Mesh" to polygon and select the top face of the main base. You should have the result shown in figure 28. With the polys selected  open the "Material Editor" and drag the CheckerPlate.tga globe onto the selected area. Make sure you drop the texture onto the selected area only. Deselect the polys and you should have a result similar to figure 29.

 

Figure 28 Poly's selected for texturing

 

Figure 29 Result after applying the CheckerPlate texture

 

At this stage the textures don't look very impressive. This is because the texture has not been mapped correctly yet.

 

7. Adding an "Unwrap UVW" modifier

Now that we have applied the texture to the Main Base we need to map the texture to the correct location. To do this we need to add an "Unwrap UVW" modifier to both the Main Base. To add the modifier you need to select an object and then go to the modify list in the modify menu. You may have to scroll down to find the "Unwrap UVW" modifier

 

Figure 30 Applying the Unwrap UVW modifier

 

After you have applied the modifier expand the "Unwrap UVW" in the "Modifier List" and select the "Select Face" entry. Then select the top of the Main Base and change the "SUb-object Params" to "Z" and click on "Planer Map" this will separate the top map from the rest of the maps. Then click on "Edit" in the "Parameters" section of the "Unwrap UVW". A new window will appear called the "Edit UVW"

 

Figure 31 Select face

 

Figure 32 Face selected ready for mapping.

 

Now that we have a face selected and the "Edit UVW" window open you will see the screen in Figure 33. If the texture in the background is wrong then you will need to change the map. To do this select the correct map from the drop down box on the top tool button bar. Now we need to move the selected map to one side temporarily and then select the rest of the map by dragging a selection window over it and then move it to one side using the "Move" tool as shown in figure 37. Once you have done this place a selection window over the separated top map and move it back to the center of the screen. This will allow the mapping to be modified without the other maps getting in the way. You can also click on the "Filter Selected Faces" button to hide the unselected maps but I prefer to have all maps visible so that I don't apply a map to a texture area that is already used.

 

Figure 33 Texture maps with the top selected

 

Figure 34 Moving maps

 

Figure 35 Filter selected faces tool

 

Figure 36 Adjust and view results

 

Figure 37 Mapping manipulation tools

 

Once you have the top's mapping selected and positioned in the center of the screen. Deselect the "Select Face" sub-object under "Unwrap Uvew" and the red hilighted face should change tothe texture. Now using one of the tools shown in figure 37 which are from left to right "Move", "Rotate" and "Scale". By clicking and holding the bottom right corner of the scale tool we can change the type of scale that we want. In this case we need the "Scale Vertical" and later the "Scale Horizontal". Once you have the desired mapping manipulation tool selected then place the cursor over the mapping and depending on the type of tool selected the cursor will change shape. As you move the mapping the texture should change on the top of the main base. If you cannot see the texture on the Main Base properly click on the "Zoom" or "Arc Rotate" buttons on the bottom right of the screen and change the view so that you can see the textures. Once you have a result similar to figure 36 you can close down the window.

Now we need to map the sides and the base to the Main_01 texture. To do this select the Unwrap UVW modifier again and select the "Select Face" option. Then holding down the control key select one side and one end of the mesh as shown in figure 38. Do not select the entire sides and ends as the other half will be mapped to a different location on the texture.Once you have the required faces selected click on the "Planar Map" button and then click on the "Edit" button.This will bring up the "Edit UVW's" window again. Move the map into location as shown in figure 39

 

Figure 38 Faces selected

 

Figure 39 Mapping in location NOTE Mapping outline color changed for clarity

 

Figure 37 Final underside mapping NOTE Mapping outline color changed for clarity

 

Do the same for the other side and end but place the textures on the next white strip.

As the base does not get seen much it can be mapped to a very small portion of the texture. Use the "Arc Rotate" button to move the view so you can see the underside of the Main Base. Make sure the "Unwrap UVW" and the "Select Face" is still selected and select the base of the Main Base. Click on the "Planar Map" button again and click on the "Edit" button. Move the mapping to the small white square on the texture and close the "Edit UVW's" window down.

 

You have now successfully created and textured the Main Base for the locomotive.

Chapter 2

 

 

Trainz and Trainz Railroad Simulator are trademarks of Auran

Best viewed at 1024 x 768 or higher

Pages best viewed with Cooper and Cooper Black font installed.

Copyright © 2007 P. Campbell. All rights reserved. Revised: June 13, 2007