Simple Locotrainz

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Simple Loco Tutorial

This tutorial tries to cover the gmax basics you need, but it is very helpfull if you have done at least the first gmax tutorial. Go to Help|Tutorials and do the Getting Started tutorial. If you don't have tutorials, you can download them from the gmax download site http://www.discreet.com/products/gmax/gmaxconsumer/index.html. Another good getting-started tutorial is Jean Meli's AVI tutorial numer 7, Use of Gmax Gamepack to make an export of objects in the simulator Trainz, which you can find at http://www.passion3d.com/Gmax_avi.html. Make sure you also download the texture file, texture.bmp. That tutorial is accompanied by a written one, which you can download at the same site. Yet another good tutorial is at http://www.windowlight.co.nz/ontarget/gmaxt02.html. First I will list some "gmax basics." You can read through them to get some familiarity with them. Then later in the tutorial, when I say something esoteric like "use Window Selection" you can go back to this section and look it up.

Gmax Basics
Where is What in Gmax Gmax has the usual top menu bar with File, Edit and so on. Some useful items are: File contains Export which lets you export your model to Trainz. Edit contains Edit Named Selections which we use to name the textured faces. Customize contains Units Setup, where you set the units to Metric:meters. Main Toolbar Just underneath the main menu bar you find a number of toolbrs, accessible via tabs named Main Toolbar, Objects and so on. Here are some often used tools on the Main Toolbar:

Command Panel Either on the left or the right of the screen you will find the Command Panel. Its top looks as follows:

The top row of Icons are the main panels inside the Command Panel. Currently the Create panel is selected, so the bottom row of icons shows the various Create options. 3D Objects (officially

called Geometry) is where you can create Boxes and so on, in 2D objects (officially called Shapes) you can create lines, rectangles, arcs and such. In Helpers you can create Points like the Attachment Points we need later. If you select the Modify panel, you will see:

In the Name box you can change the name of an object, although you can also do that in a similar box right when you create the object. The Modifier List contains all the modifiers. We will be using Unwrap UVW, which also appears in the handy often-used-modifier buttons right below the list pull-down. Underneath that is the Modifier Stack, where you can see a list of all modifiers you applied to an object. We will use that to do Select Face when texturing. Underneath the stack is the Parameters section. Its content depends on what is selected. For a box you will see:

Here you can change the length, width and height, although you can also do that right when you create the object. For a sphere you can change the radius. Viewport Manipulation At the bottom right of the screen you will find the following:

Zoom lets you zoom in and out by dragging with the left mouse button. Zoom Extents zooms the active viewport such that all objects are visible. Zoom Extents All does the same for all viewports. Region Zoom lets you draw a marquis around the area to which you want to zoom.

Pan lets you drag the contents of the viewport left, right, up and down. Rotate lets you rotate the Perspective viewport (it is not very useful for the other viewports). There are three varieties, Yellow, White and Grey. Go to Help|User Reference|Index, type arc and double-click the arc rotate entry for an explanation of the differences. When rotating, always put the cursor inside the big yellow circle, otherwise you will turn the whole world topsy turvy.

Some Gmax Tips Move, Rotate, Scale Click the apropriate tool so that it is highlighted, click the object you want to move, rotate or scale, move the cursor over one of the highlighted axes and drag with the left mouse button:

If you want to abort the move etc, click the right mouse button while you are still holding the left button down. Move, Rotate, Scale by Exact Values When you activate one of the tools, you will see In these you the following text boxes at the bottom of the screen can type the exact values for the move etc. for each of the axes. The X, Y and Z are world coordinates, not viewport coordinates, so they may not corrrespond to the highlighted X, Y and Z arrows that are displayed with the object in the viewports. You can also right-click the tool icon. This will bring up a box in which you can enter either absolute values under absolute:world (e.g. X=1 moves the object to X=1 in world coordinates), or offsets under offset:screen (e.g. X=1 moves the object 1 meter in the positive X direction):

Copy an Object You can copy an object by holding the Shift key down while you Move, Rotate or Scale. This will also pop up a box where you can give the new object a name, and type in exact values for the Move, Rotate or Scale. Select by Name You can select an object by name with the Select List. The "h" key also brings up this list. This can be handy for difficult to select objects like attachment points. A selected object turns white. Marquis Select You can also select one or more objects by dragging a marquis around them. The Pick, Move, Rotate and Scale tools all can make a marquis by dragging around objects:

Crossing and Window Selection In the bottom of the screen you will see an icon that either looks like this (Crossing Selection) or like this (Window Selection). You can toggle between the two by clicking the icon. In case of Crossing Selection, all objects that are fully or partially inside the marquis will be selected. In case of Window Selection, only objects fully inside the marquis are selected. Grab and Move Panels Some panels are so large that you do not see the whole thing at once. If you put the cursor on an unused area, that means an area without a button or

textbox or other item, a "grab hand" will appear. You can then drag the panel up or down with the left mouse button

Create an Object First click in the viewport in which you want to create the object. Then click the button, for example the Box button, in the Create panel. In the viewport drag with the left mouse button to create the object. A box is created in two steps. The first ClickDrag-Release creates the bottom of the box, then a Drag-Click creates the third dimension. Maximizing a Viewport To maximize the active viewport, press W. Press W again to go back to the deafult layout with four viewports. Switching Viewports While in a viewport you can switch to another with the following keys: L Left R Right F Front K Back T Top B Bottom P Perspective All Viewports are Emtpy after Coming Back from Trainz If this happens, press the W key twice. Snapping Snapping means that you can only draw from and to specific locations on the screen, like grid points, end points and vertices. At the bottom of the screen you will find You can activate and deactivate them by left-clicking. You can the snap toggles: set their properties (i.e. what you snap to) by right-clicking. The left one lets you snap to points and lines, the right one lets you rotate in angles of fixed size. For details, See Help|User Reference|Index, type Snaps and look at the entries Snap Options and

Snaps, 2D Snap, 2.5D Snap, 3D Snap.

The Loco
Create the Trainz Custom Folder Go to the download station and download KUID 44902:16. You can do that by typing 44902:16 in the search text box, clicking the KUID radio button, and clicking Search. It is a Swiss loco with the name KCRC ktt. Now goto the folder World\Dispatcher\downloads. There you will find a folder called kuid 44902 16. Note: If you already hade this loco, the download station will say "nothing to download," and the folder kuid 44902 16 will already be in World\Dispatcher\downloads. Another note: if for some reason you cannot find this loco on the download site, you can use another, as long as it is not just a reskin. That means when you install it, it should have a xxx_body and a xxx_shadow directory. The xxx in that case will not be re465, but you can probably figure out the instructions using the name of what is there instead. Now copy the folder kuid 44902 16 into the folder World\Custom\trains\, and rename it

simpleLoco. In this folder, rename the three sub-folders so that their names now start with simpleLoco (simpleLoco_art and so on) instead of with re465. In simpleLoco_art rename the two .texture files to simpleLoco_art_512.texture and simpleLoco_art_icon.texture. Do not rename the .tga files. In simpleLoco_body rename re465_body.pm to simpleLoco_body.pm. In simpleLoco_shadow rename re465_shadow.pm to simpleLoco_shadow.pm. If at any point you cannot do these renames because the files are read-only, right-click them, go to properties and uncheck read-only. Finally, edit the file config.txt in the simpleLoco folder. First, change the KUID to one of yours. In my case I changed it to <KUID:54936:7>. 54936 is my UID, you should use yours, you can find it in your Profile in Planet Auran. Change the name field from KCRC ktt to Simple Loco, and do the same with the user-name field. Change asset-filename to simpleLoco. Change the engine to 1 and the bogey to 0. You can change the description as well.There are quite a few lines that we don't need as well. Here is what my config.txt looks like: kind traincar kuid <kuid:KUID:54936:7> category-class AC engine 1 name AAA Simple Loco mass 84000 company SBB bogey 0 interior <kuid:-1:101168> enginespec <kuid:35837:51002> enginesound <kuid:-1:42003002> hornsound <kuid:-1:42003101> description "A Simple Loco" asset-filename simpleLoco username AAA Simple Loco Create your Working Folder In an appropriate place (other than the Trains custom folder you just made), create another folder called simpleLoco. Put the files texture1.tga, texture2.tga, texture3.tga and black.tga here. This is also where you will save your gmax files. Start Gmax Start gmax using the Trainz Asset Creation Studio icon that was created when you installed the game pack. In Customize|Units Setup set the units to metric:meters. You may also want to dock the command panel on the right. Either right-click next to the tool icons, and choose dock-right, or drag the panel to the middle, then right-click in the tilte bar and chose dock-right. If you don't like the colors, go to Customize|Customize User Interface, an under Colors pick Use Standard WIndows Colors from the Scheme pull-down. Create the Main Body

In the Top vieport, create a box of Length 12, Width 2, Height 3. Name this box mainBody. Save you file as simpleLoco_body.gmax. In this tutorial I will not tell you when to save, but the idea is save early and save often! Note: In the Top viewport the front of the loco points down. In the left viewport, the front is to the right. In the perspective viewport the front faces you, unless you rotate. Center the Main Body Click the box to make sure it is selected, then click the move tool (four perpendicular arrows), so that it is highlighted. Then right-click the move tool, and set X and Y to 0 under Absolute World. Set Z to 1. Close the coordinates box. The model has to be centered around 0,0,0. Setting Z to 1 gives us some room for the bogies. Texture the Main Body Note: This was written for gmax 1.1. It is also a bit short! If you ave trouble applying the texture, there are very good tutorial on the Learning Centre by GaryP called Brick Box Tutorial and Multi Textured Box Tutorial. They have a very good step-by-step explanation. At the time of writing, Gary's website is here: http://www.bluefinmicro.com/~garyp/trainz/. Try that if you cannot find the tutorials on the Learning Centre. Make sure the mainBody box is selected. Open the Material Editor (red ball), click New. Name the material Main Body Material. Under Diffuse factors, click the Assign Texture button (file folder with a checker board sticking out of it). Navigate to texture1.tga you downloaded with the tutorial, and click Open. Click Apply under the material name text box. Close the Material Editor. The texture map is now associated with the box, but that is not enough. Apply UVW Maps Every face of the box should have a planar UVW map. That way Trainz will know "which way is up" and how to apply the texture we just picked. In the modification panel (sort of a bent pipe in the Command Panel), open the Modifier List, and under UV Coordinate Modifiers, click Unwrap UVW. You can also simply click the Unwrap UVW button in the set of buttons underneath the modifier list. For an explanation of what this does, goto Help|User Reference|Index and type unwrap. Double-click unwrap UVW, then double-click Unwrap UVW Modifier. Expand Unwrap UVW in the modifier stack by clicking the + next to it, and select Select Face so that it is highlighted. In the perspective Viewport, click on the front of the box, it will be highlighted with a yellow outline. If necessary, pull up the Parameters roll-out so that the Planar Map button is visible. Click Planar Map. Now go to Edit|Named Selections. You will see an entry PlanarMap0. Click on it so that it appears in the small lower textbox, and in that box rename it Front. Click OK. Repeat this cycle (make sure Select Face is still highlighted, click one of the sides of the box, click Planar Map, rename the map) for the left side, the right side, the back and the top of the box. We don't need to bother with the bottom, because it will not be visible. Name the sides as shown by the italics. Pick the Appropriate Parts of the Texture Map The texture map texture1.tga contains a number of "sub-maps" to texture the box. We want the front to be textured with the part that says FRONT, and so on. First select it in the Named Selections pull-down. If you have named the sides appropriately, this should be easy. Click the Edit button in the Parameters roll-out (you may have to pull it down), this brings up the texture map in the Edit UVWs window. Make the edit window a bit smaller if it occludes the Perspective viewport. Make sure that Filter Selected Faces (the little triangle at the bottom of the window, next to the ID's pull-down) is on; it should look highlighted and depressed. If you don't see the Edit button, or the named selections pull-down is empty, make sure that you are in the modifier panel, and that Select Face is highlighted in the modifier stack. Remember that you can move panels up and down with the little "grab hand."

The whole idea is now to move the selection square, the thing with the red little squares at the corners, so that is just covers the desired part of the map. Initially the selection square covers the whole map, so you have to make it smaller. Click the Scale tool in the edit window (not the one in the main gmax window), grab one of the red squares and make the selection square smaller. Note that for this to work, all four of the little red squares have to be selected. If they are not, just click and drag a selection marquis outside the selection square, so you select the whole thing. Now use the various sizing and moving tools to fit the selection rectangle over the yellow Front square:

For example, to move the top line of the square up or down, you can pick the up-and-down arrows from the top-left toolset (the one that initially shows the four perpendicular arrows), draw a selection marquis around the two top little squares, grab one square and drag it up or down. A faster way of doing this is to select the move tool, which is the default, select the two top handles, and move them up or down while holding the Shift key down; this constrains the direction of the move to one direction. There are zoom tools in the lower right of the map window so you can have a close-up look. Move the selection such that the front is textured only with the yellow Front square. You should see the changes in the Perspective view port as you make them, unless you have Shade Selected Faces active (in which case a selected face turns red). When the front is done, select Right from the named selections pull-down, and texture it with the green RIGHT rectangle. You don't need to close the Edit UVWs box to change the selected face. Do the equivalent for the other faces. Now have a look at the model by rotating in the Perspective view port. You will see that the Front, the Right and the Back are OK, but the Top and the Left need some work. In the texture map, the left, top and right are laid out as if we had "unwrapped" the box from a top view. This is handy for reskinning, as the left and the right border on the top in the same way as they do in the real world. But as a result, the left texture is upside down. Edit it with the rotate tool in the Edit UVWs window, rotating it 180 degrees. Make sure all four handles are selected! The Top has to be rotated 90 degrees clock wise, and it has to be sized so that the long sides become short and vice versa. First make the long side shorter, then rotate, then size to fit. On the bottom of the Edit UVWs screen there are zoom tools, use these to zoom out if the selection square falls partly outside the screen.

Add the Attachment Points You now need to add four magical points, the so called Attachment Points. These points are: a.limfront, indicating the front of the loco a.limback, the back of the loco a.bog0, where the front bogey attaches a.bog1, where the rear bogey attaches See the Trainz Custom Component Creation Guide, pg 2, for more details. First we will make a.limfront. Go to the Create panel, then to Helpers (the tape measure). Click in the top viewport to activate it. Then click point in the helpers panel. Click anywhere in the top viewport to create the point. Name it a.limfront. Left click the move tool, then right-click it to bring up the coordinates screen. The point should go to the front and middle of the loco, at a height of 0.89. So enter the coordinates (under Absolute World): X0 Y -6 Z 0.89 Next add a.limback, same coordinates except Y=6. Using a Shift Move to copy the point in the Y direction is a good way of doing this. Next we add a.bog0. We will ofsset the bogeys two meters from the ends, so the coordinates are: X0 Y -4 Z 0.4 The Z=0.4 corresponds to the height of the bogey, I found it by trial and error. Add a.bog 1 with the same coordinates, except Y=4.

Exporting the Model It is time to export and see what our loco looks like so far! Select your pick tool (single arrow) and click somewhere outside the model to make sure nothing is selected. If something is selected, only that something will be exported! If you have something selected that is unexportable by itself, such as a.bog1, you will get a message that there is nothing to export. Do File|Export. Browse to the simpleLoco folder you created in the Trainz Custom folder. Go to simpleLoco_body. Click on simpleLoco_body.pm and click Save. Answer Yes to the questions. When exporting you alway have to specify the file type, in this case .pm. Because you clicked an existing file, this is automatic. You have now exported the body, but not the texture files. To do that, go to the Utilities panel (the hammer), and click Resource Collector. Click Browse under the output path, and brows to the simpleLoco_body folder to which you exported the model; in all likelyhood the browse window opens there. Click Use Path, then click Begin. Done! Start Trainz, Driver, put Simple Loco in your favorite layout (the art and icon are still the F7).

Here is our effort being admired by several crowds:

If, in Trainz, the scene looks strange, for example you are a long way from the loco, you probably forgot to unselect everything. Things look strange when there is no a.limfront and a.limback. If the mainBody was selected, these would not have been exported, only the box would have been. Raising the Main Body When in Driver, you can see that the body is sitting really close to the bogeys. It could benefit from an extra 0.1 meters. Go back to gmax. Because you were in trains, you may have lost the contents of the viewports. If so, press the W key twice. Select the main body, click the Move toool, then right-click it, and enter 1.1 in the Z field under Absolute:World. Close the Type-In box. Adding the Lower Body In the Top viewport draw a box. Give it the size Length=13, Width=3 Height=0.75. Move it to X=0, Y=0, Z=1.1. It now surrounds the bottom of mainBody. Name this new box lowerBody. Open the Material Editor, create a new material called Lower Body material, and put texture2.tga in the diffuse map. Apply to lowerBody. Put an Unwrap UVW on lowerBody, put planar maps on Front, Left, Back, Right and Top, named appropriately. You can call the faces just Front etc., there will be no confusion with the faces from mainBody. The faces are only visible in the Named Selections list when the Unwrap UVW to which they belong is selected. Put the light grey material on Top, put the large rectangle of yellowish material on the other faces. We are fudging a little here, normally you would make separate sub-maps, with the correct aspect ratio, for each face. Our loco is a bit longer now, so we have to move a.limfront and a.limback to Y=-6.5 and Y=6.5 respectively. If you have trouble selecting the points, use the h key. Export to Trainz to see how this version looks. Remeber to click outside the loco to unselect everything. Because we have added a texture file, you also need to do the Resource Collector again. You also have to remove the .cache section from config.txt befaore starting Trainz, just as we did when setting up the custom folder. You have to do this because the positions of a.limfront and a.limback changed, so Trainz has to regenerate the corresponding values for frontlength and backlength in config.txt. If you don't change the positions of a.limfront, a.limback, a.bog0 or a.bog1, you do not have to remove the .cache section. You may notice that the top texture of the lower body looks stretched. It is suffering from the same effect as the top texture of mainBody before we rotated it. So in gmax select the lower

body, go to Modify, expand Unwrap UVW, click Select Face. From the named selections dropdown, select Top, then click Edit. Make the selection rectangle shorter, rotate it 90 degrees, fit it to the grey material.

Adding the Cab Go to the Front viewport. You may want to maximize it with the W key. Click Zoom Extents if necessary. Go to the Create panel, 2D objects. Create a square of dimensions Length 3.25, Width 3. With the rectangle selected, right-click it and do Convert To->Editable Spline. Among other things, this breaks the rectangle up into pieces, so that we can delete the top line. Go to the Modification panel. In the modifier stack expand Editable Spline by clicking on the + next to it. Click on Segment so that it is highlighted. Now click on the top-line of the rectangle, it turns red. Press Delete, and you now have a rectangle that is open at the top:

We will now add an arc to represent the curved roof of the cab. Enable 3d Snap. Right-click the icon and enable Vertex and Endpoint, disable Grid Points. Go to the Create panel and click Arc. Make sure that End-End-Middle is selected under Creation Method. Move your cursor over the top end of the left side of the open ractangle. You will see a greenish rectangle appear around it, to indicate a snap. Now drag with the left mouse button down to the line end at the top right side. Another snap rectangle appears, let go of the mouse button. Move the mouse up and down a bit to set the radius of the arc. When it looks OK, left-click. The result should look as follows:

Disable snap. Make a copy of the arc (Shift Move). Put it out of the way, it will be used later when we make the overhanging roof of the cab. We now have to weld the roof arc to the ends of the rectangle. First we Attach it. Enable your Pick tool and click on the open rectangle to select it. Go to the Modify panel and click Attach so

that it is high-lighted. Move your cursor over the arc. The cursor changes to a + with some circles to indicate it has found something to attach. Click, and the whole combination turns white. In the modify panel, unclick the Attach button to stop attaching. Now we can do the actual welding. Go to the modify panel, and under Editable Spline highlight Vertex (in the jargon this is called "going to sub-object vertex"). You will probably have to pull up the panel underneath the modifier stack, until the Weld button is visible. When you have done this, draw a selection marquis around the place where the arc joins the rectangle on the left (make sure your pick tool is active):

When you have done that, click Weld. Repeat for the other joining points. We will now change the 2D outline into a 3D object. You should still be in the modification panel. Click on Vertex so that it no longer highlighted. Editable Spline should now be highlighted. Change the name in the top text box to Cab (it is probably rectangle01). Click in the viewport and Press W so that you see all four viewports again. Now click Extrude. Under Amount type in 2.5. Make sure that Segments is set to 1. Both Cap Start and Cap End should be selected. You should now have a cab floating next to the body. If you did not get a front or back on the cab, the welding may not have worked. If so, re-weld. Using the four viewports, move the cab to an appropriate position near the back of the body. Tip: if you right-click in a viewport, that viewport will become active without changing what is selected. If you left-click, you will loose your selection. Here is what it should look like:

To texture the cab, put the Lower Body Material on it. Put planar maps on Front, Back, Left and Right. Use the lower yellow maps with the windows. The large windows go on front and back, the smaller ones on the sides. Because of the non-rectangular shape this is a bit more difficult than before for the front and the back. Use your three scale tools (two spots right from the Move tool, click and hold on the icon to roll out the three modes), and your move tool. For me it ended looking as follows:

As you can tell, I did not get my aspect ratio quite right for the sub-map! To add excitement, you may have to rotate the back map. You can also drag sets of points, or individual points, around with the Move tool by first selecting them with a marquis. So you can move the curved part independent form the bottom two points if necessary, and vice versa. Remember the Zoom tools at the bottom of the Edit UVWs window in case the selection is not completely visible.

The sides you may have to rotate. Here is what mine looked like in the end:

By moving the top up and down, you influence the size and position of the windows. Try to get them all at about the same heigth and size. The Roof Go to your Front viewport and find the copy of the arc you put to the side. Move it right over the arc of the cab. Go to the Modify panel and decrease the From a little and increase the To a little until it sticks out a little on both sides, as follows:

Activate the Move tool and select this new arc (click on one of the sticking-out parts), and Shiftmove up a little to make a copy. Go to the Modify panel and increase the radius a little, say by two clicks on the up-arrow. Also change the From and To so that the ends are next to the ends of the first arc. You may have to type in values if the arrows are too coarse. Here is the end result:

Activate the 3D snap and connect the arcs with lines. To draw a line, click on its start point, then on its end point, then right-click to stop drawing:

Disable Snap. Now weld the whole thing together. First select the lower arc. Right-click and convert to editable spline. The Modify panel pops up automatically. Click the Attach button, it high-lights. Click the other arc and the two connecting lines. Unclick Attach. Now weld the four connecting points, as we did when welding the cab roof to the rectangle. Now extrude it, set the amount to 2.9. The roof just needs to be moved over the cab. Rename it Roof. Apply the Lower Body Material to it. Put an Unwrap UVW on it and edit the map so that it covers the dark grey texture. You don't need to put Planar Maps on the indivudual faces, we'll just cover the whole thing, so you can do Edit immediately after you put on the Unwrap UVW. The Exhaust For an exhaust well create a cylinder in the Top viewport, radius 0.1, height 0.4, Height Segments 1, Cap Segments 1, Sides 10. Call it Exhaust. Using all 4 viewports, move it to an appropriate place (see picture of final result below). In the Material Editor make a new material Detail Material, put texture3.tga in the diffuse map, apply to Exhaust. Add Unwrap UVW, edit so that the map covers the dark grey part. Remember the Zoom tools at the bottom of the Edit UVWs window in case the selection is not completely visible. Exhausts produce smoke, which is achieved by putting an Attachment Point a.exhaust0 just on top of the Exhaust. In the top viewport, create a point (Create panel, Helpers) and call it a.exhaust0. If we had more than one exhaust we would make more Attachment Points called a.exhaust1 and so on. Move it right on top of the exhaust. Unselect everything and export. You have to do the Resource Collector again, because we added a new texture. Then have a look at our smoking loco (you have to start it moving for the smoke to show).

The Couplers For a very simple coupler, make a box in the top viewport, Lenght 0.3, Width and Height 0.1. Then make a sphere, Radius 0.2, segments 8. Move the two together so that the whole contraption looks as follows:

Now select the sphere, right-click and Convert To->Editable Mesh. The Modify panel pops up, click Attach and click the box. Unclick Attach Change the name to Coupler. Apply the Detail Material to it, put on an Unwrap UVW, Edit and put the map over the brown part. Move the coupler to an appropriate place. The height should be right where the a.limfront/back is. In the following shot from the left viewpoirt, the a.limfront is represented by the green lines:

Make a copy, rotate 180 degrees (use your Angle Snap), and put on the other side. As a final step, move a.limfront and a.limback so that they are in the middle of the coupler spheres. Use the h key to select them if necessary. Using Window Selection instead of Crossing Selection also helps. If you export to Trainz, don't forget to remove the .cache section in config.txt. Done! We have a loco. Except for two things. The Shadow Map First, the loco still casts the shadow of an F7 because we have not changed the shadow map. In gmax do a File|Save As and save as simpleLoco_shadow.gmax. This will give you a separate copy of the model, so we don't destroy the original. Select the whole loco by drawing a marquis around it. Open the material editor and make a new material called Shadow Material. Put black.tga in the diffuse map. Apply to the loco. Export to Custom\Trains\simpleLoco\simpleLoco_shadow\simpleLoco_shadow.pm. Do the resource collector (not really necessary because black.tga is already in the simpleLoco_shadow directory). Done!

The Cab The other thing is the cab interior: what you see when you go to Internal View. If you try to go to Internal View with the model as it is, you are likely to crash Trainz! That is because the config.txt

file says there is a cab (interior 101202, which is the KUID of the BNO F7 with which we started), but there is nowhere in the model to put it. What we need is, you may have guessed it, yet another Attachment Point: a.cabfront. Make it, and place it at the front of the cabin, at Z=1.1 and X=0. My Y ended up around 2.7. This will make the F7 cab available for our simpleLoco. OK, so the cab looks better than the whole model. How to make a cab is a subject for a different tutorial, though. Some Final Things Trainz expects models that consist only of ready-to-go polygons. If you produce a more complicated model in gmax, that may not always be what you get. There are two things you may have to do: Collapse the modifier stack Convert the whole model to Editable Mesh If an object does not show up right in Trainz, select it in gmax, go to the Modify panel and rightclick in the Modifier Stack. Select Collapse All. Now all modifications are collapsed into polygons. You may also have to convert the whole model into an editable mesh. Simple select everything, right-click, and Convert To->Editable Mesh. Both these actions make editing more difficult, so only do it once you are happy with the object you are collapsing/converting.

You might also like