Importing a track diagram as a track laying guide

I am a member of Maricopa Live Steamers train club in Phx, Az. (a 1/8th scale train club) Id like to duplicate our park in Trainz12. I would like to use the map I made as a guide to lay track using layers (view map at - http://www.maricopalivesteamers.com/system_map.html ). I made the map in Photoshop and can change it to any file type needed.

Is this possible? If so, how do I go about it? The help files are extremely vague.


I have "Railroad Simulator Powered by Trainz12" and have completed the latest build update.
 
I'll want to do it in 1:1. I just may need more than 9 grids (basemaps) Theres 140 acres of land to cover and 18 miles of track (times 8 = 144 Mi of 1:1 track) This may be more than Im capable of. Scaling the map seems virtually impossible - 1km squares blown up 8 times then broken up into 1024x1024 squares boggles the mind. It would be alot simpler if I could import my JPG and zoom to the scale I want and start laying track. Oh well, I guess theres not a big enough need for this idea to get programed in.
 
I would love to help out on this project ... If you get free Skype we can talk on how to do it ... it is an excellent Instant messenger service ... with view screens ... and also with a microphone, and a webcam we could chat 1 on 1
 
Switchbuilder1949,

Yes, it is doable, by means of multiple techniques. Two methods I've used successfully are 1) to create Trainz baseboard sized blender objects to use as either a track diagram; or 2) as a basis for creating a 1:1 baseboard model to use in molding the Trainz baseboard. [NB: the track diagram is two dimensional; the Trainzbaseboard model is 3 dimensional].

ns
 
I am puzzling over a similar issue as I have just got into expanding miniature railways into the full size equivalent. (This one currently on my radar: http://www.swissvapeur.ch/en/ ). Basemaps are okay but my preference is to have the actual layout painted on the tiles Transdem style. I did have a brief discussion with the Transdem author about the best way of importing a square image as is on to a suitable number of baseboards, retaining the geometrical proportions and no terrain import, but never reached a suitable conclusion. Because Transdem exports to real world co-ordinate projection, this is likely to induce some distortion although I would suggest this could be minimised by setting the latitude at or near the equator.

I hope to be able to trial the 0 deg latitude system today, will need to convert the dimensions of my image into percentage of degrees to try and scale the drawing properly - in the case of the route I'm interested in comes out at around 2500 x 1500 metres.

The same principle also applies to importing model railway track plans, of course.
 
How about using Transdem to import a Google earth image ?

Just a thought, as I have no idea if this can be done - maybe this is what Vern means.
 
The GE image will not be scaled up.

For those thinking of using the equator method with Transdem, this information may be of use:
Degrees, Minutes and Seconds to Distance A degree of longitude at the equator is 111.2 kilometers. A minute is 1853 meters. A second is 30.9 meters. For other latitudes multiply by cos(lat). Distances for degrees, minutes and seconds in latitude are very similar and differ very slightly with latitude. (Before satellites, observing those differences was a principal method for determining the exact shape of the earth.)
So for the route I mentioned I have the height = 2250m and the width is 1932 m. That equates to 0 deg to 0 deg 1' 2.5" East and 0 deg to 0 deg 1' 13" North. Obviously the DEM will need to be imported along with the map then flattened, maybe leaving terrain in the background unless I go model style.

Edit: I had to move the longitude slightly further along in order to get sufficient DEM data - working on 11/12 degrees east, just need to factor the calculations accordingly.
 
Last edited:
Update to above, Transdem not being co-operative and not allowing me to input the correct co-ordinates near the equator. Back to square one it seems.
 
I don't quite understand the problem. Why are you fiddling with lat and long?

We have a raster image with a track diagram and we want to transfer this diagram to some sort of real scale. This implies a few basic mathematical operations, namely scaling.

TransDEM can do most of this job for us if we take into account that TransDEM works with UTM coordinates and UTM coordinates do not make much sense with zero, near zero or negative values. We solve that by defining an arbitrary offset. Let's define this offset by setting the easting to 500,000 and the northing to 5,500,000. We also define a UTM zone, another arbitrary value, like 32 North.

This will position our fictitious track diagram route into Central Europe, with an origin on the 9th meridian, 5500 km north of the equator. (Each UTM zone is 6 degrees wide and the center of each UTM zone has an easting value of 500,000 meters. The northing, 5,500,000, tells us the distance from the equator.) We could use a different offset, of course. We only have to avoid values close to zero and always stay positive.

Our track diagram has to be georeferenced in TransDEM, that's the way how TransDEM performs scaling. Assume that the width of the diagram, from the lower left corner to the lower right corner, is 5km, and that its height, from the lower right corner to the upper right corner, is 4km.

In TransDEM we can use standard 3+1 point georeferencing.

First point in the lower left corner receives our arbitrary UTM coordinates of the origin for our route: 500000; 5500000
The lower right corner is origin plus the width of the diagram: 505000; 5500000
The upper right corner is origin plus width plus height: 505000; 5504000
(The upper left corner would be: 500000; 5504000)

When exporting to Trainz we also need some terrain data. With a mouse click we can simply create a flat DEM for this purpose.
 
Can I come at this from the left field, as it were? I have had occassion to map large plans/graphics to other scales using grids (a very old artist technique). I've seen your layout (beautiful form - does it follow contours?) and suggest you first of all create a white/grey graphic of the layout in PS, with the minimum contrast between the two tones. Now lay a square grid scaled as desired onto the graphic. Now segment the graphic into the individual grids (suitable tagged Cartesian). Bring each segment into Trainz as a height map; one per board. Merge boards. You should now have a reasonably accurate reproduction of the layout.

A lot of work, I admit, but given the size and disposition of the layout that has to be expected. It would be one hell of a route!
 
Thanks Roland. Between my posting and your reply I arrived at a similar solution, using UK OS grid referencing. Set the SW corner at 114000N and 520000E, extrapolated the SE and NE values from the measurements on the plan, applied relatively flat UK DEM and - presto! I now have Steam Park ready to work on in Surveyor with minimal distortion.
 
The track diagram referred to in the opening post already shows scale, a ruler with ticks in feet for the diagram itself and the 1:8 indication for the model to prototype scale. In this case, one has to calculate the local coordinates of the NE corner (total width, total height) and can use 2 point diagonal geo-referencing in TransDEM which makes it even quicker.
 
Thank you very much for your suggestions and input. I made the map by zooming in as close as possible in Google Earth, captured it and pasted a mosaic of the park into PhotoShop. This image is 17280x8500 pixels and 278mb in size. (that took 2 months) I drew colored lines over the track and saved in a separate layer. The map ended up as a 12564x6600 37mb .PSD file. To scale it up 8 times would require more than 9 basemaps. I located the basemaps in Trainz and they are buried 7 levels deep with additional files (C:\Program Files\N3V Games\Railroad Simulator\UserData\original\hash-30\kuid2 119912 60007 2). So unless there are more basemaps I can DL and install other than the 9 I have, this isn't possible.
 
Actually, there is a way to have an unlimited number of basemaps: create terrain objects in Blender.

The maximum size of a Blender object is 20 km square, which amounts to about a Trainz route of 26 baseboards on a side. [Note: Actually, a 20 km square would accommodate more than 2y baseboards on a side, but for practical reasons, I've found it expedient to start with an even number of baseboards on a side, hence 26.] Now this is a little on the large side, and a bit unwieldy to work with, but if you want more than one Blender terrain object, you just create a second one by means of the simple expedient of giving the second terrain object a different name than the first one.

The general procedure I would use is to overlay your map with a grid to subdivide it into sets of baseboards of a practical size. Place each subdivided section on to the appropriate number of baseboards, and either create Trainz "surveyor only" objects to use as a 2D tracklaying guide, or create a 3D mockup of your endeavor. A sample of a 3D mockup I did for another project is to be found in this folder . The two images named containing "terrain_object_ in the name are views of a baseboard sized mockup, of which I've included the blender file. This is a mockup for a single baseboard, but it can just as well be used as a larger endeavor, as illustrated by the image named "Plan 3a".

ns
 
Last edited:
... I made the map by zooming in as close as possible in Google Earth, captured it and pasted a mosaic of the park into PhotoShop. This image is 17280x8500 pixels and 278mb in size. (that took 2 months) I drew colored lines over the track and saved in a separate layer. ...

Don't make it more complicated than necessary. Google Earth is not needed here and not helpful at all.

You already stated the essential thing: Your task is to reuse the track diagram raster image and to blow it up to real scale, to use it as a kind of background texture in Trainz. Using Basemaps as texture carrier objects appears as a typical and straightforward approach. (Even if you use TransDEM for a more automated method you would still end up with TransDEM's counterpart of Basemaps, called UTM tiles there.)

Have a look at the short original Basemaps tutorial: http://www.g0akh.f2s.com/Trainz/Basemap_tutorial.html. Forget about the limit to 9 Basemaps at the moment. We'll solve that later.
Are you confident that you understood the process illustrated in the tutorial? If so, did you identify the main difference between their map and your track diagram? Their map, the British Ordnance Survey topo map shows a 1000m grid, your track diagram does not - yet.

To follow the tutorial you will need those grid lines. Once you have them you then just do what they do.

Now, how do you get those lines? You can draw those lines in any image editor of your liking but first you will have to calculate the distance between 1000m lines in pixels.

Let's take the small track diagram image your linked to in your first post. I hope you have a larger one for your Trainz project. We start with the ruler. The ruler will tell us the size of the track diagram raster image in feet. It's more guesswork than reading but I think the length of the ruler says 500 ft. In pixels I measured 91.

The overall size of the image in pixels is 913 x 478. The ruler is 91 pixels wide and stands for 500ft. How wide in ft is the image? Apply the "Rule of Three": Image width [ft] = 913 px * 500 ft / 91 px. Yields 5016 ft. Image height in ft is 2626, applying the same factor 500/91.

We need the width and height in meters - multiply by 0.3048 - and in real scale - multiply by 8 (because the model scale is 1/8).

Your track diagram in meters has a width of 12231 meters and a height of 6404 meters.

How many pixels per 1000m? Interval = 1000 * 913/12231 = 74.6. Draw a grid line every 75 pixels. That's it.

With TransDEM you wouldn't have to draw the grid lines yourself. You would add that arbitrary coordinate offset, as explained in the reply to Vern yesterday and see the 1000m grid lines as drawn by TransDEM:




As you can see, there will be more than 9 tiles/basemaps. The creator of the original basemaps sees them as temporary objects. Start with the first 9. Do your work in Surveyor for each basemap. Then relocate it to the next position and replace its texture. The other option is to copy the Basemap set several times and assign a new KUID and a new name to each copied basemap.

You will also notice that you will need more white space for the raster image at the right and upper edges to get full 1 sq km tiles there. You can do that in your image editor. You should do that before beginning the pixel measurement.

Final remark: If using TransDEM, it will take about 5-15 minutes from the screenshot above to the point where you can open the route in Surveyor, with all baseboards created and all "basemaps" in place.
 
Last edited:
Impressive GeoPhil. You've done 3/4 of the work already. Thank you. The original sized map is located at - http://www.maricopalivesteamers.com/system_map_large.html. (and can be downloaded - 6.4 mb) I have that in the original .PSD format. I would use a copy of that file to section off and import into basemaps. the pixels are 12564x6600. How would that convert to 720m squares in pixels?

Next question is how would I create unlimited basemaps? I haven't a clue as to how to create KUIDs and their various files and sub directories.

Thank you all again for your interest and concern. If I can make it all happen I 'will' be making the route and uploading it for everyone. 5 subdivisions with various interchanges makes for unlimited runs thru the park.

Ive installed the Basemap kit and located the files on my HD, but I cant locate them in surveyor. I would assume they would be located in "Paint" but they aren't there.
 
Last edited:
Impressive GeoPhil. You've done 3/4 of the work already. Thank you. The original sized map is located at - http://www.maricopalivesteamers.com/system_map_large.html. (and can be downloaded - 6.4 mb) I have that in the original .PSD format. I would use a copy of that file to section off and import into basemaps. the pixels are 12564x6600. How would that convert to 720m squares in pixels?
The original Basemaps are 1000 x 1000 m, not 720 m as Trainz baseboards, for the simple reason that topographic maps usually carry a 1000m grid. I think the Basemap objects have snap mode activated. They will always jump to the intersection of 10m baseboard grid lines. It's not that difficult to position them.

Now, with your larger map we could simply apply the "Rule of Three" again:
Large_1000m_interval_in_pixels = Small_1000m_interval_in_pixels * Large_image_width_in_pixels / Small_image_width_in_pixels => 75 * 2434 / 913 => 199
As there was a bit of rounding involved we should better start from scratch. On the larger image the length of the ruler is 240 px and still equals 500 (model) feet. From there and with the formulas from this morning your grid line interval for 1000m becomes 197 px. 199 or 197 px, it doesn't really matter.

Next question is how would I create unlimited basemaps? I haven't a clue as to how to create KUIDs and their various files and sub directories.
Then don't copy them. Just work with the 9 ones, repaint and reposition each one, once finished with it at its current position in Surveyor. That's what the Basemap author suggests.

Ive installed the Basemap kit and located the files on my HD, but I cant locate them in surveyor. I would assume they would be located in "Paint" but they aren't there.
Open Content Manager, locate the cdp file on your hard disk, using Windows Explorer, and drag it onto the Content Manager main window.
 
Back
Top