Source for displacement maps (greyscale topography height maps)

tim12rob

Member
Sharing this in case it is useful - I've tried lots of ways to obtain greyscale maps (use them at work as well as for Trainz content). Not many easy, free and good sources around, so when I discovered this I was pretty pleased.

https://tangrams.github.io/heightmapper/

Content and detail varies around the globe, but in many places is very good. Just a few options, eg showing 'lines' - which turns out to coastlines, road centrelines etc, useful for locating aerial photo images from Google Earth for scaling purposes. A bit of quick layering up in an image editor, and you can set out some valuable starting information for a layout.

One tip - make a note of the maximum height etc shown on-screen when you export, for verifying against the topography when you bring it in....

Now I've got to figure out cloning a displacement map....

Cheers,
 
You can make one using the Displacement Map panel.

Use the Select Area tool to draw a box around whatever size area you want to use.
Then use the Get Displacement tool to grab the area inside the selected area.
A grayscale image appears in the preview box with a checkmark and and X to cancel.
Click the check to save your displacement map asset. Give it a name and description.

Then open it for Edit in CM and replace the image.

Large images give the best results, I was able to make displacement maps as big as 8K x 8K before it bogged down my computer.

You can also use this technique to grab displacement maps from existing routes.

William
 
Thanks William! Do you know if the image needs to be square? Or how to set the actual height range?

Forgive the questions, but the manuals are quite difficult to use on this stuff....
 
Last edited:
Thank you for this very useful website.

I think the images have to be resized down to 1024 x 1024, but I can't remember - I'm going to experiment with this.

To adjust the height range, use the slider on the right side of the interface. This adjusts the white balance, which of course sets the height.
 
Well they have to be size to the power of 2. For example, 256, 512, 1024, 2048, 4096 and so on. That is a rule for textures in Trainz for all textures. I never did a displacement map that wasn't square but as long as the sides obey the power of 2 rule it might work. For example 256 x 512

A grayscale value of 128 is level ground and won't change the ground level, above 129 to 255 raises the ground level and 1 to 127 lowers it. As John pointed out, the slider adjusts the magnitude of the adjustment or high 255 is and how low 1 is. When I was messing with it back in the TS10 days. They was a maximum limit of +300 meters to -300 meters but I'm not sure if that is still true. Unless you are trying to cover a very large area like 25 baseboards or more then this limit is practical as it is very easy to get cliffs that go straight up. The bigger the area you are covering the more realistic the results will be. I did 4 x4 baseboards areas as that was the largest my PC could handle.

William
 
Last edited:
I messed around with it a bit. It does work but will take a bit of learning if you aren't experienced with graphic programs.

Here is a screenshot of a 2 x2 baseboard route that I made from a displacement map of Durango, CO.

https://images.n3vgames.com/trainzp...2137/1000/Animas--River-Valley-at-Durango.jpg

The yellow compass is on the flat area where the town is located. You can see the Animas River channel just to the left of it.

Scale is the biggest problem I see if you try to use this as a replacement for TransDEM but for just background scenery I can see how this would be useful.

William

Here is the displacement map if anyone wants to try it.

https://1drv.ms/u/s!AkMIc8G3YArLgoJ4ARzmwhtXuvw3CA?e=zgE1SX
 
Last edited:
Thanks - after messing around unsuccessfully, the power 2 tip fixed it.

I had grabbed an output from the website above which turned out to be 6.2km square, or around 8-9 baseboards square. No go there then.

As Auran requested wishlist items for future versions in a recent email I submitted a desire for map import tools. I know the TransDEM tool is out there - but I'm on Mac and not going to install Windows on basecamp just for one utility. It does seem an obvious area to improve in TRS19 - my (real world) work involves lots of mapping content, and in the last few years a plethora of digital content has become easily available. It would be a shame if some of this, not to mention basic ability to import a map image and 'trace' it, was not brought into TRS - after all, content is what this game is all about, and if they can make content easier to produce they will leverage the work of many contributors quite effectively.....

Cheers, appreciate the tips!
 
Last edited:
I think any process that involves grey scale images to make terrain will not make everyone happy. Some will want to use it to create small chunks of terrain, others will try to use it for a start on a large route and will find it is not detailed enough and subject to the max height limitations that exist currently.

What I would like to see is improved terrain tools built into Trainz. Specifically the ability to modify terrain on a much larger scale within minimap. Also the ability to erode terrain (similar to the erosion feature in Sim City 4). Another tool to more easily create realistic streams and canyons. How about the ability to draw contour lines and then push a button and your terrain is generated. Another tool to allow users to shear off or smooth a side of a mountain.

I understand this may not be a priority for N3V. How about a standalone program with these capabilities called TrainZTerrain that N3V (or a 3rd party developer, such as Roland Zeigler aka geophil) can sell for $20USD or so?
 
Last edited:
I make available a number of pre-made displacement maps (build 3.6) available for download on the DLS if you want to try them. Here is the list of what is available:

<kuid2:439337:101537:1> SAP_Flat
<kuid2:439337:101538:1> SAP_Low_Hills1
<kuid2:439337:101539:1> SAP_Low_Hills2
<kuid2:439337:101540:1> SAP_Marsh_Land
<kuid2:439337:101533:1> SAP_Mountain1
<kuid2:439337:101536:1> SAP_River_Valley
<kuid2:439337:101534:1> SAP_Rolling1
<kuid2:439337:101535:1> SAP_Rolling2

For most of these use low threshold settings for best effect.

Bob
 
Back
Top