How I Created Australia From GTOPO30 DEM Data

Discuss maps, trains and other modding topics
Post Reply
User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

How I Created Australia From GTOPO30 DEM Data

Post by Dr Frag » Mon Feb 05, 2007 2:55 am

Well, let's see. I'm not at home with all my stuff but I'll give it my best shot. Please note I'm no expert here this is just what I have done so far. I hope Mike Kennelly doesn't mind me referencing his tutorials here. :) Also I can elaborate on this if needed and/or add it to the Wiki. Let me know.

1. The purpose here is to create the TGA file that is used to generate the game map. I think you can bypass the first couple of steps if you are only going to do a small area by using 3DEM.

2. I downloaded the entire globe of GTOPO30 data but you can go here and pick the tiles you want. The data is packaged in tile sets and to do Australia I stitched the two tiles together with GTOPOStitcher. If you download the whole world take a look at the cds.gif file to find out what CD your tiles are in and what filename(s) to extract. Mine were on cd4 and files E100S10 & E140S10 (I just found this piece of software. Looks interesting but I don't know how useful it would be)

3. Then I loaded the stitched file into Wilbur and did a File-->Save As, choosing PNG surface & 8-bit, to get the grayscale image used for the elevation map. Then, optionally, do a File-->Save As, choosing PNG texture, to get the colored texture map if you like. You can do A LOT in Wilbur but I have not played around with it much.

4. Run Railroads!, load the Terrain Editor and Create a new map at the size you are interested in, give it a name and then save it to generate the base file set. Quit Railroads!

5. Now the fun part. Launch your favorite graphics editing package and load the map_<mapname>.tga file and the one or two files created in Wilbur. You might want to look at Mike Kennelly's excellent tutorials to learn about the TGA format while you're doing this. You'll have to crop and/or resize the grayscale image (the PNG surface file) so it will fit in the top most position of the TGA file. You should leave a lot of space around your area of interest because the game does not let you travel to the edge of the map. Check Mike's Tutorial for the posible resolutions. Next you will probably want to use the Levels Adjustment (Photoshop) or equivalent to get the grays spread out nicely. Again, Mike's Tutorial might help you out here for the meaning of the gray levels. Basically black will be under water and white will be the tip of mountains. Edit: You might want to add a little Gausian Blur to smooth out the changes in gray levels to minimize stair stepping. Once you're happy with the Height Map select the whole image and copy it into the TGA image moving it into the top position.

6. You can do the same thing with the Terrain Map (the PNG texture file) if you're so inclined and move it into the second position of the TGA file.

7. Now you can save the TGA file back out to the map folder, launch Railroads! to check out your creation in the Terrain Editor and add all the goodies that will make it a great Scenario.

DF
Last edited by Dr Frag on Tue Feb 27, 2007 12:34 am, edited 4 times in total.

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Mon Feb 05, 2007 5:00 am

Hi,
A very Good explanation and directions. :wink:

But i'm having so much difficulties with setting the levels of the grayscale correct. :( ( i believe that i did everything correct except the grayscale)

It would be nice if we could find the exact or good values (sttings) for this in photoshop or paint shop..
Once those are correct it can be used for each map or not?

PS: is it possible that also the higher mointains are black => results in sea,
so we have to change them also into white.

Thanx already for your guide...

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Mon Feb 05, 2007 5:17 am

Yeah, I plan to investigate the gray levels a little more to see at what level 'sea level' actually is. I wonder if there is a scale factor in the XML files that might make mountains higher or lower cuz that could add a little confusion to things.

Are talking about banding? It can happen because DEM data is two byte sixteen bit data and most graphic programs want eight bit data. Otherwise I don't understand your question.
You want something like this:
Image

Not this:
Image

DF

User avatar
Kenster
Posts: 67
Joined: Sun Nov 12, 2006 4:15 am
Location: Shelton, Connecticut, USA

Post by Kenster » Mon Feb 05, 2007 2:30 pm

Hi Dr Frag,

Thanks for the credit, but it's Mike's (kennelly) tut you are talking about.
He is doing a great job on it too.

Thanks also for your info/guide on applying grayscale.

Ken

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Mon Feb 05, 2007 4:59 pm

D'oH
Teach me to pay attention eh? :oops:
Thanx for letting me know and my apologies to Mr. Kennelly for the error.
Will rectify that immediately. If not sooner.

DF
And You're Welcome, My Pleasure

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Mon Feb 05, 2007 6:19 pm

As an example,
(making use of map(ref) and dem and wilbur etc...)

I'm getting this as a result:

It's a photo from 'les Alpes', Italy

(While posting this message and pictures,
i thought: Well ya trying to draw mountains like this wil not work so easily is i hoped, if not, a stupid idea of my)

But it's good for having set the borders of land and sea.

ps: Also, if you want you can make use of textures to place cities correct, by indication a point on the tga files... on putting the cities in the editor map to get the coordinates afterwards)
Attachments
from DEM italy gray.jpg
from DEM italy gray.jpg (64.45 KiB) Viewed 9294 times
les alpes.jpg
les alpes.jpg (138.56 KiB) Viewed 9295 times

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Mon Feb 05, 2007 6:54 pm

OK...
I was right, i was stupid... :oops:
but then again... :idea:

This way of creating mountains is pretty good, i think

What i did:
- Take just a small (very small piece of the 'alpes')
- Did some blur
- with brightness the mountains will get higher
- with more contrast the difference between flat and mountain will get bigger.
(- Levels on grayscale will even do better)

See the result (nice result for me)
A piece of this map can later be used as a small part in the bigger map an used as if it was the 'alpes' in global...

(this way can still be easier or better then just using the terain editor from time to time)

:arrow:
Attachments
SMRailroads!0025.jpg
SMRailroads!0025.jpg (156.03 KiB) Viewed 9286 times
Untitled 1.jpg
Untitled 1.jpg (37.1 KiB) Viewed 9287 times

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Mon Feb 05, 2007 8:47 pm

I'm just roughly following this as it tends to give me a headache. What is needed is a way to raise the water level, or bring the rest of it down in one piece before handing it over the the Terrain Editer.

Did that make any sense?
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Tue Feb 06, 2007 2:08 am

That would basically just be lowering the brightness. The darker your grayscale image is the closer to water level it comes.

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Wed Feb 07, 2007 5:28 pm

Here's an example for sea level... (snoopy)

By looking at a lumber mill i did get those result in height:
ps: look also at the border around: difference with default hight of map-editor

1st: Original (486m)
2nd: -30% brightness (373m) (=- 113 m)
3th: -50% brightness (296m) (= - 190 m)
4th: +30 % brightness (593m) (= +107 m)

Those differences can maybe be related to wich photo-tool you're using.
The ratio is not linear, i guess, but it seems that +30% or -30% results in about 110m as a difference
+60% => 216 = +- 220m
=>
:arrow: RATIO: -+10% = -+ 37.5 m
:arrow: default height map in editor = 205-210m (-54,5%)

I was using the industries to check what would happen to them.
Some of them will jump to another position, others will rest at sea level...

Hopes this will help you all.... :wink:
Attachments
Brightness + 30%
Brightness + 30%
SMRailroads - Sea level - 00017.jpg (68.41 KiB) Viewed 9211 times
Brightness -50%
Brightness -50%
SMRailroads - Sea level - 00016.jpg (57.4 KiB) Viewed 9212 times
Brightness -30%
Brightness -30%
SMRailroads - Sea level - 00015.jpg (70.19 KiB) Viewed 9214 times
Normal: Start map
Normal: Start map
SMRailroads - Sea level - 00002.jpg (55.53 KiB) Viewed 9215 times

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Wed Feb 07, 2007 6:27 pm

I have started writing in the Wiki under Creating Custom Maps about modifying the .tga file. Let me see if I understand your process here so I can add info if needed.

1. You started in the Terrain Editor and created a new map.
2. Open the .tga file in a graphics program and adjusted brightness by some amount.
3. Open the map in Terrain Editor to see the result of the brightness change.
4. And in doing this you noticed the game moving industries.

Very clever. Hadn't thought about the repercussions of changing the height map AFTER things have been placed on the map.
Gigabyte GA-EX58-UD3R mobo - Core i7 920
G.SKILL 3x1GB PC3 10666
MSI 8800GT Graphics Card
WD 150GB Raptor System Drive
WinXP Pro SP2 (LANfest Old Gamer Prize)

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Wed Feb 07, 2007 10:18 pm

yes,
they could jump from the hill, of the hill but not always.

I can't get the industries loaded in the map editor,
can you... it's only the map itself without any industries showed... very annoying, is there a way to load industries together with the map?

what i did:
- created the map in map editor and placed industries,
- save the map & industries & decorations & cities
- loaded the map in a photo tool (photofiltre)
- adjust the brightness, (just for the height-part of the tga file)
- save this as the tga file
- open up the scenario of this map (via single player)
- ps: sometimes i needed to recreate the dds file via map editor (mostly not needed?)

see an example where industries jumped: (it's like this one on the left is pushed away by the water, also the village houses are pushed away, it can also happen that an industrie falls from a hill)
Still most of the don't move
Attachments
some industriss will jump or get pushed away after altering brightness... most of them don't move!
some industriss will jump or get pushed away after altering brightness... most of them don't move!
SMRailroads - Sea level - 00007.jpg (54.47 KiB) Viewed 9186 times

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Wed Feb 07, 2007 11:06 pm

I'm not really into creating Scenarios but mainly just the maps.

You might want to check out this thread if that's what you're referring to.

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Thu Feb 08, 2007 2:11 pm

:arrow: See another example of height control on the spain map

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Thu Feb 08, 2007 7:58 pm

Dr Frag wrote:Very clever. Hadn't thought about the repercussions of changing the height map AFTER things have been placed on the map.
When I first started working on my Wisconsin map that if you place a city then lower the terrain at the same spot, that the city stays at the same height and grows basements to reach the new ground level. Going up buries it. You only have to click on the wrench to correct it.
I searched the internet for city elevations and brought them all to those numbers then worked the landscape to match. I lost all my landscaping in a system freeze(my doings, not the Editer, BUT, save, save,save, then save again :!: :!: :!: ), but our man Big Papa has done the landscaping for me, so I have to get to work on the rest of the Scenario.
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply