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

Part 3

This is part 3of 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 this time on transparency and build an interior for the cab to get away from the "X-ray" look.

We'll also build out our own bogies and wheels from scratch instead of using the Dash 9's.

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 to finishing-up our NEW LOCO!

Our last tutorial left off with us importing and driving around our first loco. However, when we look at it, we can notice some peculiar phenomenon. One of these is the "X-ray" windows on the cab. When you look through a cab window, you can see right through parts of the train onto the ground.

 

We see this effect because we have not built any polygons on the inside of our loco. Every polygon that we build, has only one side that is visible in MSTS. So, we'll need to build those inside facing polygons in our cab.

Start-up 3DSMAX and load in your myloco.max file. Click on the main body geometry to select it, then go to the Modify panel and click on the Polygon icon. Make sure that Ignore Backfacing is off.

In the Left viewport, drag-select a rubber-band box over the cab.

 

We just want the polygons associated with the cab, so we need to unselect those extra polygons - here's how: Hold down the ALT key on the keyboard, then drag-select a rubber-band box around the back of the loco.

 

Now, drag-select a rubber-band box around the front of the loco.

 

We should now have just the polygons for the cab selected.

 

 

Now, we want to make a copy of only these selected polygons. Here's a trick to do this - click on the Move icon at the top of the screen. Now hold down the SHIFT key on the keyboard and in the Left viewport, position the mouse pointer over the red selected polygons. Keep the mouse pointer still(you don't want the copy to move...) and click. A Clone Part of Mesh dialog box will pop-up. Click on Clone To Object: and in the text field to the right, type inside. Hit OK.

 

We now have an exact copy of the cab polygons. Let's just work with these - Click on the Display tab on the upper right side of the screen. Then under Hide, click on Hide Selected. We should now see the cab.

 

In the Left viewport, click on the cab geometry to select it. Then select the Modify tab in the upper right of the screen to open the Modify panel. Click on the Polygon icon and make sure that the Ignore Backfacing is off. In the Left viewport, drag-select a rubber-band box around the whole cab geometry to select all of the polygons in the cab.

We need to make these polygons face the inside of the cab. In the Modify panel, under Surface Properties, under Normals, click on the Flip button. The cab should look flipped inside-out now.

 

We still have some major holes in our cab. Let's fill them in by building new polygons. Click in the Perspective viewport to activate it. Also, rotate the Perspective view to look something like this.

 

Hit the W key on the keyboard to maximize the Perspective viewport. In the Modify panel, click on the Face icon (it's to the left of the Polygon icon). Make sure that Ignore Backfacing is on and under Edit Geometry, click on the Create button..

To help us out, let's also turn on 3D vertex snapping. Right-click on the 3D Snap Toggle icon at the bottom of the screen just under the Perspective window.

The Grid and Snap Settings dialog box will appear. Make sure that the only item checked is Vertex, then close that dialog box. Now, Left-click on the 3D Snap Toggle icon to activate it.

 

We're going to make a face by clicking at the corners of where we want the polygon to be created. It is very important to click on the corners in a certain order. We need to always create polygons in a counter-clock wise order if we want a polygon to be visible when it faces us.

You'll notice that when you move the mouse pointer over the corner, the mouse pointer will change to look like a Bold - white cross-hair. When the mouse pointer looks like this, then click. (You'll also notice a light blue cross hair - this will show you where exactly the corner vertex is - just move the mouse towards the light blue crosshair)

Follow the picture below.

 

If you created the face correctly, you should see a new triangle face.

 

Don't worry if the texture mapping isn't the same on your newly created face. Let's do this again for the remaining face. Follow the picture below.

 

If you did everything correctly, you should see this (again, don't worry if your texture mapping is different then the picture)

 

Let's do the other side. Rotate the Perspective viewport so it looks something like this.

 

Make sure that the Face icon is activated and the Create button is highlighted in the Modify panel and that the Select Object icon at the top of the screen is activated. Do the same thing that you did before to build the face and follow the picure below.

 

Again, let's build that second triangle face. Follow the picture below.

 

If you did everything correctly, you should see the picture below (texture mapping maybe different than on yours...)

 

Now, rotate and zoom the Perspective view to look something like this.

 

 

Just to make things easier, let's hide the everything except for the cab inside. Click on the Display tab and under Hide, click on the Hide Unselected button. Go ahead and click back on the Modify tab to open up the Modify panel. Click on the Face icon, make sure that Ignore Backfacing is still on, then under Edit Geometry, Click on the Create button.

Let's build these floor faces using the same steps as before. Make Sure that the Face icon is selected in the Modify panel and the Create button is still highlighted and that the Select Object icon at the top of the screen is also active. Create the new faces by following the pictures below.

 

Now we have a fully enclosed cab. Let's texture map it so it is visibly different from the outside. Download this .zip

Unzip it to your myloco directory. And open the Material Editor. If you are not at the root shader, hit the Go To Parent icon a couple of times until you are at the root of the shader.

Let's make a new shader for the inside of the cab. In the Material Editor, click on the Set Number button and set the number to 4.

Go ahead and click on the new fourth Sub-Material slot and name this material TransNorm2

Like before, let's add a texture map to this new material. Under Blinn Basic Parameters, click on the square empty button to the right of Diffuse:

The Material/Map Browser window will show-up. Double -click on Bitmap in the lister window and a file dialog will show-up. Find the file, myinside.tga in the myloco directory. Select it, then click on Open.

Again, in the Material Editor, under Bitmap Parameters, under Alpha Source, make sure that None(Opaque) is selected and that the the Premultiplied Alpha is not checked.

Also, click on the Show Map in Viewport icon so we can see the texture later on. Go ahead and close the Material Editor.

Now, in the Modify panel, click on the Create button to turn it off and make sure that Ignore Backfacing is off. Also, make sure that the Select Object icon at the top of the screen is activated. In the Left viewport, select all of the cab polygons except for the roof.

 

In the Modify panel, under Surface Properties, under Material:, next to ID: type in 4 and hit ENTER. The textures on the cab faces accept for the roof should change to this new material.

 

Now we need to edit the texture coodinates so that the textures will look right. Click on the Modifier List rollout and under UV Coordinate Modifiers, select the Unwrap UVW modifier. Click on Edit. Go ahead and move the UV coordinates around until it looks something like this.

 

Now close the Edit UVWs window, right-click in the modifiers lister window and choose Collapse. Hit Yes to the warning dialog.

Let's link our new cab inside with the rest of the loco. UnHide everything by clicking on the Display tab and click on the Unhide All button.

Click on the Select and Link icon at the top left of the screen. In the Left viewport, click over the cab and drag the mouse pointer over the main body of the loco and let go of the mouse button. This should link the insdie of the cab with the main body.

 

Save your work now.

Before we can export, we need to delete the BluePrint Box just like before. So, select the Blue print box and hit the DELETE key on the keyboard. Now go ahead and export the loco. Export it as myloco2000.3ds and save it in the myloco directory.

Quit out of 3DSMAX. A dialog box will pop-up asking, "Do you want to save your changes - hit NO. (Remember, we saved the file before when we still had the blueprint cube...)

Because we added a new texture to our loco, we need to add a new line to our convertmyloco.bat file. In windows, right-click on the convertmyloco.bat file and choose Edit. Add this line to the end :

makeace myinside.tga myinside.ace -trans

 

Save the .bat file and close Notepad. Go ahead and Double-click on the convertmyloco.bat file and convert your modified loco. Go ahead and start up MSTS and take a look.....no more X-ray vision anymore!

One more thing, before we move onto bogies, let's make one of the windows tinted. Start-up 3DSMAX and load the myloco.max file. Open the Material Editor - make sure that you are at the root level of the shader, if you are not, hit the Go To Parent icon a couple of times until you are.

Click on the TransNorm1 sub-material button. Rename this material to AlphNorm+

Get back to the root shader again. Now click on the TransNorm2 sub-material button and rename this material to AlphNorm-

Just like before, save your work. Now, select the Blue Print Cube and hit the DELETE key on the keyboard. Go ahead and export it as myloco2000.3ds and save it in the myloco directory.

Quit out of 3DSMAX. A dialog box will pop-up asking, "Do you want to save your changes - hit NO. (Remember, we saved the file before when we still had the blueprint cube...)

Before we can run the new loco with tinted windows, you need to download this updated texture file. Unzip it into your myloco directory and let it copy over the old myloco.tga

We also need to make some changes to the convertmyloco.bat file. Again, right-click on it in Windows and select Edit. Look at the two lines at the end. remove the -trans after each of the two lines. Save the convertmyloco.bat file and close Notepad.

Go ahead and double-click on convertmyloco.bat, then run MSTS and take a look at your new tinted windows!

 

 

On to Scratch Built Bogies

 
 
Copyright 2001 Cyrus Lum - this tutorial may not be posted with out explicit permission by Cyrus Lum