{Header}

Home    Tutorials

I created this tutorial to demonstrate how fast and easy it is to get a custom object into Trainz.  This is not, by any means a model of anything except a brick wall.  But, this will get you started (and hopefully hooked) on creating custom objects for Trainz.

Note: This tutorial has been updated for SP3/UTC on 03-07-2003, and contains a link to the working sample project here.

This tutorial is for gmax 1.0. I am writing a new version soon.

I have included all the files you will need.

This tutorial can be downloaded in it's entirety here, or get it at the Trainz Download Station.

Here is the texture you will need to complete this tutorial. Right click on it and save it as brick.jpg

Set your screen resolution to 1024x768, to see the entire screen.

Run the Trainz Asset Creation Studio, not gmax to get your gmax environment up.

First, let’s get set up. In gmax, the top tab panel is hidden by default. To display the tab panel, right click on the main toolbar and select Tab Panel from the pop-up menu. The tab panel is a row of tabbed toolbars directly below the menu bar at the top of the gmax window. The tabs offer quick access to many of the tools available in the command panel, as well as many of the items found in the menus.

I like the gmax menus on the right side of my screen, but you can change them:
Drag the panel by its title bar to the top, bottom, left, or right edge of the main window. The mouse cursor and the panel outline change shape at a docking location. Release the mouse.

The tab panel docks automatically when you drag it to a "dockable" location. Tab panels can dock at the top, bottom, left, or right of the viewports. They can also dock on either side of the command panels.

Right-click the tab panel's title bar, choose Dock, and then Top, Bottom, Left, or Right.

The scale and units do not matter, but if you want to, you can set the units to metric like this:

From the main menu, select Customize, then Preferences.

Then, under the System Unit Scale, set it to 1 Unit = 1.0 Meters


Then set up the Units to Meters, like this:


Then set up the grid and snap settings to 1.0 Meters, like this.

You can also set the system to Feet and Inches, if you are more comfortable.

Now for the meat and potatoes;

Click on the button called Box, on the object type tool bar.

Now click in the top window, and while holding the left mouse button down, draw a square in the top window. When you let go of the mouse button, you will be drawing the height of the box.

Now go back under where you picked the Box button, and you should see a heading called Parameters.

Directly under that are 3 text boxes, labeled Length, Width, and Height.

Clear each one, and type 10 into the Length, 20 into the Width, and 10 into the Height. 
This will resize your cube.

Down near the bottom right side, you will find the Zoom Extents All button.  Press it, and it will zoom in on your cube in all of the windows.

 

Now, a bit of background: The 2 most darkest lines that go up and down, and across is should be the center point of your model.  That’s what Trainz will use as the center point; so let’s get our model centered.

Choose the Select and Move button from the top toolbar, and at the bottom of the screen, in the middle, you will find 3 text boxes labeled X, Y, and Z.  These represent the current middle of your model, assuming you did not change the point of origin, and we did not.  So let’s clear out these 3 boxes, and enter 0 (zero) in each of them.

This will center our model at 0,0,0.  Trainz likes this.  This is good.

Almost done; now for the texture.  (You can export the box as-is, and it will show up in Trainz as a non place able white box.

Choose the gmax Material Editor, from the top panel (it’s the little red globe partially covered in paint) in the upper right hand corner.  This will open the gmax Material Editor window.

This may look different depending on what version of gmax you have. I am using 1.0

Choose the New button, on the gmax Material Editor window.  This will tell gmax that we want to create a new texture. 

Now choose the Diffuse Map button on the gmax Material Editor window.

This will open the Locate bitmap file window.  Now navigate to where you stored the brick.jpg texture, and pick the open button.  Almost done.

If your model is not selected, please select it by clicking the mouse anywhere on the cube.
Now we want to assign the texture to our model by clicking the apply button on the gmax Material Editor window.

Our cube should be brick colored now.  You can close the gmax Material Editor by clicking on the little X in it’s upper right hand corner.

You could do a little moving around of the texture by using UVW mapping, but this tutorial is for getting a block into Trainz as fast as possible.

Very Important: Click somewhere else in the window to un-select your cube.  This is to tell gmax to export the whole model.

Now we are done modeling.

Open the file menu, and choose Export…

This will open the Select File to Export window.  Navigate to the custom scenery folder, where you installed Trainz; ex: c:\Program Files\Auran\Trainz\Custom\Scenery

Create a new folder called brick_box

Don’t forget the underline between the two words.  Trainz will name your new object whatever this folder is called, omitting the underline character.

Now double click on the new folder to go inside it.  Your exported files must be inside this folder and it has to have the same name.


Type in brick_box.im into the filename spot, and press the Save button.  Gmax will now create your scenery files.

Two more steps and we can see our new model.

We need to copy the texture brick.jpg to the brick_box folder.  This can be done 2 ways:

  1. You can copy it there.
  2. You can let gmax do all the thinking, which is good habit to get into.

Number one, I assume you know.

Number two: From the Utilities tab, choose the Resource Collector button.

Now a bit farther down the same tool tab, under the Parameters heading, choose the Browse button.  This will bring up the Choose Output window. Just click Use Path.
Now a bit farther down the same tool tab, choose the Begin button, and press ok if you get a dialog box that says “No valid gmax File Path”.

Now minimize gmax, or close it. (Save your actual gmax file if you want to).

In Windows File Explorer, navigate to Program Files\Auran\Trainz\Custom\Scenery\brick_box, and create a new text file called Config.txt.

How? The quickest way is to right click in the folders open window and when the pop up menu appears, simply choose New Text Document. Then rename it to Config.txt. Now double click to open it.

 

In this file enter the information found below, using your serial/kuid number.
What?!! You don't have one? Then go to Planet Auran and register your copy of Trainz, and you can get one. Details here.

kuid <KUID:50435:28003>
kind scenery
region Test
type Trackside
light 1
kuid-table {
}
obsolete-table {
}
trainz-build 1.3
category-region-0 US
category-era-0 1990s
category-class BR
asset-filename brickbox
username Brick Box V2
thumbnail
author Gary Parkin
organisation --
contact-email garyp@snip.net
contact-website
license "EULA"

For more information on KUID numbers, config files, and Auran's naming conventions, please see my link on my tutorials page, or download the Complete UTC Content Creation Procedures at Auran.com.

Save the file, and go into Trainz.  Start a new map, and under Objects (F3), look under Test, and you should see your model spinning around.

Add it!  Cool eh?

Any questions, post them, or email me at the bottom of this page.

Good Luck, and happy modeling. If you have any problems, here is my completed project.

Lookout for more tutorials....

Version 1.2

I am keeping graphics to a minimum, so I have room on the site for important stuff.
          
Created with Macromedia Ultradev