Constructing A Steam Loco Using Train Sim Modeler
Part 6

by Richard Osborne


Breath a sigh of relief - TSM is far the simplest of the 3d programs when it comes to texturing. It has a price - some texturing features which the other programs can manage are impossible in TSM.

It's worth finding & following threads in the forums - some go into far greater detail than I will here. I want to get you up & running with a loco which you built & textured.

As with the loco itself its worth finding as much reference as possible. Locos varied enormously during their working lives - if you can find a photo of a particular loco at a particular time so much the better. If you're making a Bulleid Light Pacific with a Geisl ejector it makes sense to number it 34064. Mind you we're in Fantasy Land - you can have Thomas the Tank Engine on the Main Line if you wish - just anticipate a full email box if you make a blatant error.

To business: we need textures for our locos. We MUST have textures which are 64*64, 128*128, 256*256 or 512*512 pixels. TSM & MSTS only accept texture files with these size values. It's rumoured that TSM accepts 1024*1024 - it hasn't for me! You'll find that 512*512 is perfectly satisfactory for our needs. By definition one 1024*1024 file is the size of four 512*512 files. We'll use two sheets, probably with another 256*256 sheet for the wheels. Be prepared to shuffle & change them; we want to get as much on our sheets as possible. One of my dislikes is to download a model & then find MSTS has to heave a large file with just an axlebox on it! Such models don't stay on my computer long.

Again I'll make the point - this is just one way of texturing - dozens of other people have dozens of other ways.

Before we start: I'll be using Paint Shop Pro for the artwork. Any decent paint program will do the job perfectly well, it has to be able to handle .bmp & .tga formats with the ability to handle alpha channels for the transparencies. There are plenty of freeware programs, at sites like, which are perfect. I have a facility called "ClipMate" which is an extended clipboard, I can keep dozens of images ready for use. I can't handle any computer without such a program - makes it about a million times better. This was shareware & was the best $20 I've spent on my computer. It's possible there's a freeware version somewhere. Please find one & be familiar with it asap. I have to assume an extended clipboard is in use.

A screenshot, on ClipMate, of Clipmate.

I hope you've looked at the texture files which come with MSTS - in the 'samples' subdirectory. The first thing you notice is that they bear no resemblance to any loco on your computer - you recognize bits - a smokebox, a cabside etc. The placements appear to be all over the shop. This is a 512*512 file. I've never seen rivets through a boiler band - but that's another topic entirely!

This is a .jpg image, .jpg doesn't handle alpha channels - you have the original .tga file. You'll see the boiler, firebox underneath, only one cabside; how do they use it for the other side?

Notice the splasher - TSM can't turn part of the image through 90 Degrees.

For the starting point for our B4 we'll use the .bmp files we used for the loco model. You have another source - TSM itself; a screen shot can be very useful especially if your source .bmp file isn't very good. Use 'Alt' + 'Print Screen' for a screen grab at any time.

We're using a decent .bmp so we'll have to chop it up & fit it to our 512*512 screen. It's perfectly possible to stretch & compress the image, bringing them back to ratio in TSM. I prefer, if at all possible, to keep things to the true ratio, especially if any lining or lettering is involved.

Some sketching & imagination will be good. I know our longest part will be the frame sides & valances. It needs to be from the rab roof to the sandpipe in depth. If we cut the drawing & resize to 512 wide we should start to make progress.

The frame, if the drawing maintains the ratio, is 512 * 238. We must add 274 to the depth.

Using the rectangular selection tool - move the part above the footplate upwards out of the way. Pick the area below the footplate as far as the base of the steps - press 'Ctrl' + 'c' to copy to clipboard - then 'Ctrl' + 'e' to 'Paste as New Selection'. Position it above the original drawing.

Notice I've introduced, in the same way, parts from the front view. Be prepared to do quite a lot of jiggling & juggling. The two cab fronts will be front & rear view. It'll look a bit odd until I've reworked & coloured them. The file has been saved as B4_1.tga.

I'll go back to our simple B4 & start the texturing, normally I'd texture as I go - better than looking at a boring grey loco!

Notice I've joined the tank sides to the cab - the texture will fit at one sitting. Make the cab side current, this is cab_st; the right side. Press 'F4', a screen appears.

We need to browse & find our texture file for the 'Right' assign. Ignore the others for the time being.

A screen showing the file appears - press 'OK' & the file itself appears bigger on another screen. You'll find that you can select any rectangle within the square screen. The actual coordinates appear on the right. Roughly select the area of the cab then adjust more precisely with the nudge buttons. Fix the 'Crop' first - then 'Size'.

The first bit of texture on our B4.

Make the other cab side current & repeat the process as far as selecting the area of the texture file THEN if you look below the coordinate readout you'll see two tick boxes - Invert X & Invert Y. This is the left side so we want to 'Invert X'.

Not surprisingly the lettering is backwards. We're not going to use direct lettering - we'll use a transparent panel. If you use direct lettering you'll need a left & right image - more files or less quality! If you look at the coach textures in the MSTS samples directory you'll see that the lettering is far bigger than you'd expect. We'll use the same technique.

Do the same thing for the the cab front & rear - 4 faces. If you remember we made them alphanorm+ & alphanorm-.

We'll take the bull by the horns & tackle the thorny subject of transparency.



Not as scary as it's made out BUT again it's important to establish a sequence. If you're going to use PSP go into some of the User Group websites. There are all manner of tutorials & how-to sheets available.

Let's get the more difficult bit done first. We'll put opaque windows into the cab front & rear. We haven't made any sort of cutout for the windows, transparency will do it for us. Again it'll be worth exploring some of the sample files to get a better idea of what's happening.

Let's first add an alpha layer to our .tga file. In PSP, go to 'Masks'; 'New' - expand & press 'Show All'. At the moment there's nothing to show - this is preparing the way. Press 'OK' then reopen the menu. You'll notice three things - everything on the dropdown is now black & the file has an asterisk which indicates that it's not saved.

Press 'Edit' & ''View Mask', the latter means that you draw in a very visible pink. Go into 'File', 'Preferences', 'General Program Preferencies', 'Transparency' & change the grid size to 'Tiny'. It's slightly slower when blocking in but far easier to see - we're going to be working in single pixels in a moment.

You'll also see that the colour palette has been replaced by a palette with greys only. Which grey you use is a matter of experimentation - for starters try the dark side of the mid-tone. Choose your brush from the toolbar. Set the tool size to 1. A graphic tablet is a great help here but not necessary. We want to zoom in on the cab windows & block in the areas we want as windows.

Carry on until all four windows are done - you can always come back to change the value or add some texture.

We'd better save the file. I'll describe this in detail.

You can't just save by pressing the 'Save' icon. The alpha ( for alpha read transparent & vise versa ) channel will disappear into the ether - I know!!

Go into the 'Masks' menu on the toolbar. At the bottom of the drop-down is 'Save to Alpha Channel'. Press, a small screen appears with 'Save to Alpha' on top.

Press 'OK', a smaller screen is shown probably naming the layer "selection #0". Change it if you wish. In PSP you can have multiple layers - we'll only want one. I'd recommend deleting the last after each save - I'll show you how. It's not documented but you could lose the layer you want & reload an earlier layer - time wasted.

Now that you've saved to Alpha channel press the 'Save' icon; a screen will appear telling you it'll merge - only one alpha channel will be saved. Press 'Yes'. Come out of PSP; I'll have to show you how to reload.

Before we draw the next transparency we'll have to go into TSM & alter a few parts. Make 'main' current, 'polygon' mode & split off the two sides. F2, rename the part "frames", parent "main" & change the material to 'Transnorm'. This is the material which gives us completely transparency; there are no degrees of opacity - it's either transparent or not! Into 'point' mode & bring the bottom down to the level of the sandpipes & the horn thingies - I've forgotten the proper name. We know that MSTS doesn't see both sides of a polygon, we can see that part of the frames will be visible from the other side. Copy the "frames" part, paste & scale in 'x' by the tiniest amount, rename to "framein", parent "main" & flip the polygons so that they face inwards.

Back into PSP, reload the image file. Into 'Masks' & 'Load from Alpha Channel', a preview will appear, press 'OK'. Try not to have different files with alpha channels open at the same time, it's possible to load the wrong alpha channel - Yes, I have the T shirt.

For the completely transparent part of the frames we want to block in where it will be transparent. Choose solid black from the palette, zoom in close & block in, zoom out often to check progress. You can get a better idea zoomed out - it's easier to block in zoomed in close.

When you need to save:

This is a bit tricky to explain. Into the 'Masks' menu & 'Save to Alpha Channel' again. The same small screen appears with another name, probably 'Selection #1', Press 'OK'. Now you'll see on the left a list with something like Selection #0 & New Channel. press on New Channel, the smaller screen appears with 'Selection #1', Press 'OK'. NOW to avoid using the wrong channel we'll delete the first. 'Masks', 'Save to Alpha Channel'. You'll find on the list both Selection #0 & Selection #1; Press Selection #0 - the 'Delete' button should turn live. The highlighted layer will show in the preview window, it'll be obvious which is which. You want to delete the layer with just the windows, the other will have the frames and the windows. Delete then CANCEL, if you press 'OK' again a New Channel window will appear. Please experiment with this sequence before you've done too much work. Your screen should have looked like this - although this is 'Load From Alpha'.

Apply the texture to the frames - both parts - in exactly the same way as for the cab sides. You won't be able to see the transparency in TSM - you have to wait until it's in MSTS.

The Dreaded Makeace:

Re-export the model to MSTS. You have the option on the screen of exporting & compressing the texture files. Like some other features of TSM it seems to depend more on whether there's a high tide in Wigan. Sometimes it works - sometimes it doesn't. All TSM does is to write a batch file for a tool called "makeace" which is in the trainsim/utilities directory. We can make life easier for ourselves if we use the "MakeAceWin.exe" that comes with the first MSTS patch. If it's not there already put a shortcut onto the Windows desktop screen. Go into the program; it first looks for your files in "My Downloads". This merely tells you it's a Microsoft product. Find the input & output files. If you're adding a file rather than overwriting one you'll have to fill in the output file name; use the same name as the input file with an .ace suffix. Tick the 'Use ZLib Compression' box.

You've now exported your texture file with the transparency information - time for another look in MSTS.

The End.


Copyright Notice

Please read my copyright notice (click here)