Tutorial 3: Make a Basic Locomotive from Scratch or Nearly...

 

This is the third tutorial in our on-going series to teach you how to build a locomotive for MSTS from scratch. This will be the last of the beginners tutorials before we start the intermediate tutorials.

We'll concentrate on building our own simple locomotive, texture mapping it, adding transparent surfaces, hooking up hierarchical bogies and wheels, and making a working directory for your creation, including editing all the neccessary support files, that will allow you to run your loco and add it to a consist.

The locomotive we will build is a simple design and has some resemblance to a GP9. Please realize that this is only a beginner's tutorial, so the engine that you will build isn't nessessarily prototypical. We'll build prototypical locomotives in the intermediate tutorials later.

Now on with our NEW LOCO!

What we need to do is create a new directory for our new loco. Find your Microsoft TrainSimulator directory. Now go into the TRAINS directory. Now go into the TRAINSET directory. Create a new folder called myloco.

We need to grab some files from our old mydash directory and copy them to this new myloco directory. From the mydash directory, copy Conv3ds.exe , Makeace.exe , Txt2uni.exe and convertmydash.bat to the myloco directory.

In the myloco directory, rename the convertmydash.bat to convertmyloco.bat.

Go ahead and start 3DSMAX4. We are going to set-up a new project by using some of the parts from mydashsource.max. Open mydashsource.max into MAX.

We are now going to create a blueprint reference box. We'll use this as a guide to build our loco from. Let's create a box. Goto the Create panel, make sure that the Geometry Icon is selected (it's the icon on the left hand side of the panel that looks like a sphere). Under Object Type, click on Box and under Creation Method, click on Cube. Also under Parameters, click on Generate Mapping Coordinates.
Now click and drag a box at the center of the Dash9 in the Top viewport. Drag the box out until it is just big enough to fit over the Dash9.

In the Create Panel under Name and Color, double-click in the text field and type in blueprint and hit ENTER. We want to modify some of the faces of this cube, so go and click on the Modify tab. Right click in the modify window and select, CONVERT TO EDITABLE MESH.

 

To complete our blueprint reference cube, we need to texture it with some drawings. Download this .zip file that contains these texture maps. top_trainartisan.gif, left_trainartisan gif,and front_trainartisan.gif.

Unzip the file and put them into your myloco directory Open the Material Editor and choose a blank grey shader ball on the top row to the far right. In the Material Editor, click on the STANDARD button next to the text field showing the name of the shader.

 

The MATERIAL/MAP BROWSER window will pop-up. Double-click on MULTI/SUB-OBJECT.

 

A pop-up dialog box will show - choose DISCARD OLD MATERIAL? and click on OK. In the MATERIAL EDITOR, click on the button labeled SET NUMBER, type in 3 and hit OK. Now, let's add the blueprint textures to our cube like in tutorial #2. Click on the first button just under Sub-Material button.

Let's name this sub-material. Click in the material name text field and type in left and hit ENTER. Under Blinn Basic Parameters, look on the left hand side for Diffuse: Click on the square button to the right.
The Material/Map Browser window pops-up. Double click on Bitmap.
A File Selector box will pop-up. In the File Selector, go to your myloco directory and select the left_trainartisan.gif and click on Open. We want to make this texture map visible in the 3DSMAX viewports like in Tutorial #2. Click on the Show Map in Viewport icon - (it looks like a blue and white checkered cube).

 

To get out of the texture map parameters and back into the main shader, click on the Go to Parent icon in the Material Editor - it looks like a black arrow pointing up.

We are now in Material slot number one. Hit the Go To Parent icon one more time to get us to the main shader.

Now we need to get the texture for the top - we'll basically follow the same steps as before except we'll load the top_trainartisan.gif. Click on the second Material Button under Sub-Material. Click in the material name text field and type in top and hit ENTER. Under Blinn Basic Parameters, look on the left hand side for Diffuse: Click on the square button to the right. The Material/Map Browser window pops-up. Double click on Bitmap. A File Selector box will pop-up. In the File Selector, go to your myloco directory and select the top_trainartisan.gif and click on Open. Click on the Show Map in Viewport icon. To get out of the texture map parameters and back into the main shader, click on the Go to Parent icon in the Material Editor. We are now in Material slot number two. Hit the Go To Parent icon one more time to get us to the main shader.

And finally, we'll get the front texture map - again following the same steps except loading the front_trainartisan.gif. Click on the third Material Button under Sub-Material. Click in the material name text field and type in front and hit ENTER. Under Blinn Basic Parameters, look on the left hand side for Diffuse: Click on the square button to the right. The Material/Map Browser window pops-up. Double click on Bitmap. A File Selector box will pop-up. In the File Selector, go to your myloco directory and select the front_trainartisan.gif and click on Open. Click on the Show Map in Viewport icon. To get out of the texture map parameters and back into the main shader, click on the Go to Parent icon in the Material Editor. We are now in Material slot number three. Hit the Go To Parent icon one more time to get us to the main shader.

 

Now we are ready to apply our new shader and assign the sub materials to individual sides of the blueprint cube. To do this, click on the Assign Materials icon.

Since the cube is so big, we probably can't see it all, so hit the Zoom Extents All Icon (See tutorial #1 if you don't know where it is.)

What we want to do now is assign the right sub-material slot number to the right faces on the Blueprint cube. - it's the same procedure from tutorial#2 when we textured that modification.

First, in the Modify Panel, click on the Polygon icon. Also, make sure that the Select Object icon at the top-left of the screen is activated - looks like a big arrow.

Next, in the Top viewport, click and drag a small rubber band box inside the blueprint cube. You'll notice that both the top and bottom faces are now selected and are red.

Now slide down the Modify panel and look under the Surface Properties section. Under Material, in the text box next to ID: type in 2. - this assigns sub-material slot 2 to the top and bottom faces. Now in the Left or Right viewport, click and drag a small rubber band box inside the blueprint cube.

You'll notice that both the left and right faces are now selected and are red. In the Modify panel and, under the Surface Properties section. Under Material, in the text box next to ID: type in 1.

Now in the Front viewport, click and drag a small rubber band box inside the blueprint cube. You'll notice that both the front and back faces are now selected and are red. In the Modify panel and, under the Surface Properties section. Under Material, in the text box next to ID: type in 3.

One last step, and our BluePrint cube is complete. In any viewport, click and drag a rubber-band selection box around the whole cube to select all of the faces. In the Modify panel, under Surface Properties, click on the Button labeled Flip. The Cube will look like it turned inside-out. And we can, now see the Dash9.

In the Modify panel, slide up until you can see the Polygon icon and click on it to unhighlight it.

Now we need to align and scale the Blueprint cube. Let's position the BluePrint cube at 0,0,0.

First, click on the Blueprint cube to select it. Click on the Move icon to activate it, then right-click on the Move icon. The Transform Type-In dialog box pops-up. Under Absolute World, type the number 0.0 for X: Y: and Z: and hit ENTER after each entry. Then close that dialog box.

Next, we need to scale the Blueprint cube.

Click to activate the Scale icon. Make sure that it's set to Select and Uniform Scale (If it isn't, click on the icon and drag down - highlight the first icon - it looks like a white square inside of a grey square).

In the Top viewport, move the mouse over the Blueprint cube until the mouse pointer turns into the scale icon.

Click and drag the mouse to scale the cube. Scale the cube so that the left and right black lines of the drawing just barely dissappear under the Dash9. You'll notice that the Dash9 now pokes outside the cube alittle in the front and back. That's OK.

Now your Blueprint cube is aligned and ready to work with!

 

Go ahead and choose Save As from the File on the menu bar. Save the file as myloco.max and save it in your myloco directory.

We don't need all of the Dash9 now. Let's keep the bogies and wheels though.

Let's try another method of selecting objects. Hit the H key. A Select Objects dialog box should pop-up with a list of objects in the current scene. Select Freight and hit the Select button.

 

Now hit the DELETE key on the keyboard. You should only see the Blueprint cube, two bogies, and six pairs of wheels.

 

 

Go to page 7