How To: Generate Superb Heightmaps :)

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by Moriarty »

You want to know how to find where cities should be? Apart from guessing I can't think of any particularly good ways because your map doesn't have georeferences on at this point.
mikeel
Engineer
Engineer
Posts: 69
Joined: 03 Jun 2002 09:55

Re: How To: Generate Superb Heightmaps :)

Post by mikeel »

wolkottept made an excellent patch to create scenarios.
It not only load heigth from external files, but also water and towns.
you can find it here:
http://www.tt-forums.net/viewtopic.php? ... 56&start=0
The latest windows build (if you need) is here:
http://www.tt-forums.net/download/file.php?id=96849
It is a quite old nightly (r13922), and don't have the freeform map edges patch, but works well.
skummel
Engineer
Engineer
Posts: 73
Joined: 18 May 2002 19:03
Location: Randers - Denmark

Re: How To: Generate Superb Heightmaps :)

Post by skummel »

Thanks for your tip on this topic and the patch. It had helped me in some way

EDIT
The script to make the nessaciry files is for linux and I never found out a way to make them in Microdem under windows
But still thanks for the tip
jsleitch
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2009 03:09

How to generate water reliably

Post by jsleitch »

I read this post and had to try this myself, but I noticed that it's hard to make the water look right. I found that MicroDEM has a setting to make surface water appear bright blue, it's in the menu where you change the color scheme to grayscale. In your image editor you can just make that blue shade black.
Attachments
Michigan.png
Heightmap of Michigan
(1.16 MiB) Downloaded 155 times
jsleitch
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2009 03:09

City placement

Post by jsleitch »

How I place cities:

1: Make a copy of your heightmap file
2: Get a Google map of the area with cities shown
3: Use an image editor to overlay the city map on the copy of the heightmap
4: Most image editors (MS Paint, anyway) will show the coordinates of your cursor; just place it over the city to get the coords
5: In TT, use the query tool to find the right location

Different image editors might have the coordinates going in different directions. MS Paint coords require that the heightmap be rotated clockwise, and that you swap the X and Y values.
pasisti
Engineer
Engineer
Posts: 26
Joined: 24 Jun 2007 17:06
Location: Finland

Re: How To: Generate Superb Heightmaps :)

Post by pasisti »

Hi all,

I made a scenario of Cuba some time ago (you can find in the Bananas content download) and I just got the idea to make a map of the whole central american area. The problem is that I don't have a heightmap of the area, and it is too large for me to download and crop from the raw srtm data (via google earth, for example). I marked the area in the picture I attached. As you can see, I'm more into the Atlantic side of the area (western Mexico mostly has small cities anyway). I'm also interested in adding the south coast of USA in the map. Imagine all the tourism! :)


Does anyone have a good, clear heightmap of the area? I'm planning to do at least a 512x1024 map, but could end up with a 2048x2048 map, so fuzzy landline (imagine scaling 256x256 to 2048x2048 :D ) is a big deal to sharpen in the editor.

All help is welcome,
pasisti
Attachments
Area of the map
Area of the map
central-america-caribbean.jpg (25.43 KiB) Viewed 9988 times
A map of Cuba for OpenTTD: viewtopic.php?f=60&t=37138
Sunday coast, a friendly map: viewtopic.php?f=60&t=52965
Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by Moriarty »

I do. I was planning on uploading to bananas some time soon, but my password is forgotton and I need to remember it first or get it reset (still waiting on that one).
Actually I have exactly that one. Two versions of, a wider one (2048*1024) and a square one (2048*2048).

If you want a differentish area just ask.
They're attached below, under the CC-BY 3.0 license (just attribute me basically ;-) )
Attachments
Central America 2048_2048.png
(969.35 KiB) Downloaded 141 times
Central America - Wide 2048_1024.png
(572.29 KiB) Downloaded 115 times
pasisti
Engineer
Engineer
Posts: 26
Joined: 24 Jun 2007 17:06
Location: Finland

Re: How To: Generate Superb Heightmaps :)

Post by pasisti »

Thank you very much! Altough I ended up staying awake for many hours after posting (it was night here, no matter what the posting time says) and finally ended up with a suitable dem file myself and after lots of work managed to make it into a heightmap. It was really annoying because microdem wouldn't take the file and I couldn't find a way to save the changes when exporting in OpenEV.

So after all I got a file by myself but thanks anyway for the help! Do you have a good database of the dem files/heightmaps/others or how did you come up with that so fast?
A map of Cuba for OpenTTD: viewtopic.php?f=60&t=37138
Sunday coast, a friendly map: viewtopic.php?f=60&t=52965
hyckor
Traffic Manager
Traffic Manager
Posts: 139
Joined: 13 Oct 2008 07:53

Re: How To: Generate Superb Heightmaps :)

Post by hyckor »

Is there some heightmap of the entire World?
Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by Moriarty »

pasisti: As noted, I had already created it and was about to upload it. It's on bananas now.
hyckor wrote:Is there some heightmap of the entire World?
See bananas (in-game downloads). I uploaded it about 5 mins ago along with 26 other heightmaps.
User avatar
Ronstar
Traffic Manager
Traffic Manager
Posts: 188
Joined: 29 Oct 2003 01:11
Location: Sheffield, UK

Re: How To: Generate Superb Heightmaps :)

Post by Ronstar »

Having gotten a bit fed up with a couple of pseudo-random maps I've been playing recently, I thought I'd delve into creating an accurate (ish) England map (with a much larger scale than the one that's knocking about already). I found Adriantr's excellent raw heightmap data earlier in this thread and via much tweaking with brightness / contrast / gamma I've produced a set of heightmaps for England and Wales, as well as the Isle of Man. If I ever get the time (I'm juggling three jobs AND moving home at the moment!), I'll start work on adding towns and industries to a couple of these (though definitely all of them).

The heightmaps I've produced are:
- England (well, as far north as Whitby, anyway!) and Wales
- East Anglia (including London)
- Isle of Man
- Isle of Wight
- The midlands (bounded by NW-Liverpool, SE-London)
- North Wales (including Merseyside)
- The Pennines (plus copious surrounding area)
- South Wales
- The south east
- The south west
- The Thames estuary
- Wales (with Birmingham just on the eastern edge)

For those who are interested in the technicalities of how I produced these maps:
1) Stretched the brightness and contrast of Adriantr's original raw heightmap so that the highest points became white without losing the low-lying lands.
2) Boosted the gamma upwards so that more detail was present in low-lying lands. This has led to a distortion of "true" heights, but makes the game map more interesting without pushing reality TOO far.
3) Created a 16 colour greyscale pallette and overlaid that onto the base image.
4) Sketched in the areas of Cornwall that were missing on the old heightmap (using good old Ordnance Survey - it was only a small couple of areas). Also invented a bit of France that was needed, didn't worry about accuracy at all.
5) Overlaid a semi-transparent layer (later removed) of certain tributaries and estuaries to hand-draw in well-known river land-marks.

To create the localised heightmaps I simply cropped and resized the new images back up to 2048x2048. By using a blurring filter and then re-applying the 16 colour pallette, the result is a smoother enlarged area of the original map and has eliminated what would otherwise have been a noticable 'pixelation' of land formations.

Attached is a sample sheet of the heightmaps produced as well as a zip file containing the PNGs. I've tested them all and they all seem to work pretty well IMO.

Ronnie
Attachments
GB_HM.png
GB_HM.png (55.22 KiB) Viewed 9663 times
GB_Heightmaps.zip
(1.53 MiB) Downloaded 512 times
Any TT, TTD or OTTD sprites I have ever posted to this forum or elsewhere may be used as-is or in edited form free of charge for any purpose without credit in perpetuity.
CB0T
Engineer
Engineer
Posts: 6
Joined: 27 Apr 2009 04:16

Re: How To: Generate Superb Heightmaps :)

Post by CB0T »

Ohh Thanks!
Elvis0045
Engineer
Engineer
Posts: 1
Joined: 09 May 2009 13:59

Re: How To: Generate Superb Heightmaps :)

Post by Elvis0045 »

I cant get the microdem program to work correct, when I try to load the .asc files into Microdem I only get a white little window where I cant to anything to... what am I doing wrong? or has this guide gone outdated?
ricmsil
Engineer
Engineer
Posts: 4
Joined: 28 May 2009 18:29

Re: How To: Generate Superb Heightmaps :)

Post by ricmsil »

Well, after several days I found a way to put cities in the map :mrgreen:
it takes a little work but is worth it.

1- open the DEM File
2- select "gps" in the DEM toolbar
3- select "waypoints"
4- select "keyboard add"
5- put latitude and longitude references of the city, that you can take from google earth for exemple
6- select "ok"
7- write the name of the city and "ok".

do this as many times as you need, for more cities.

8- select "WPTs" under Help button
9- choose the black square symbol and a size you like.
10- select "plot on maps"

the black square will be the location of the city, and in OpenTT will be a square of water


you can select "waypoints names on maps" in the waypoints, gps screen, if you need tu know the name of the cities in the map. But save the image first. use it only for reference.


PUTTING CITIES AUTOMATICALLY:

This site has the coordinates of most every city in the world in a .txt file

http://earth-info.nga.mil/gns/html/namefiles.htm

you can open the file with the microsoft access and convert it to a data base and then select the "read from file" in the waypoints, gps screen so you don't have to put the coordinates manually. ( microDem can read from .txt files too but the parameters must be right or it will cra

Get to work, now people.

In few days I will post the Portugal map with the most important cities...

with Açores and Madeira included

IN A 2048x2048 Map :shock: 8)

Tugas forever
Attachments
gps.jpg
PrintScreen of GPS Screen
(243.83 KiB) Downloaded 67 times
Last edited by ricmsil on 28 May 2009 21:04, edited 1 time in total.
ricmsil
Engineer
Engineer
Posts: 4
Joined: 28 May 2009 18:29

Re: How To: Generate Superb Heightmaps :)

Post by ricmsil »

this is how the cities will appear. but remember that when you save the file don't put the name of the cities, just put the black square.

The sea is Pink so that you coud see better the name of the cities.
Attachments
gps.jpg
example of DEM with city names
(218.42 KiB) Downloaded 61 times
ricmsil
Engineer
Engineer
Posts: 4
Joined: 28 May 2009 18:29

Re: How To: Generate Superb Heightmaps :)

Post by ricmsil »

I found a way to put rivers in the map too. just make a "path" in the "add" Menu, over the river you want in google earth.

then copy the coordinates to a .txt, and work them to be compatible with gps in microdem like we did with the cities.

after, in the gps screen of microdem choose read from file and select "connect waypoints on map" and "plot on maps.

I made the border of portugal with this system too. in Opentt the border of the country will be a line of water.

here's a 2048x2048 map you can download of portugal, açores and madeira.

soon I will put the cities.
Attachments
Grayscale Portugal e Arquipelagos.png
2048x2048 Map of Portugal with rivers and borders for Opentt Editor.
(668.54 KiB) Downloaded 76 times
ricmsil
Engineer
Engineer
Posts: 4
Joined: 28 May 2009 18:29

Re: How To: Generate Superb Heightmaps :)

Post by ricmsil »

here It Is like I promise

a 2048x2048 map of portugal and Islands, with cities, rivers and borders.
I also put industry as real as possible. most mines on north, forest in the center north, food and cattle in the south.

scenary ready to play on OpenTTD.

see if i forgot anything or if somethings not right.

hope you like it
Attachments
Portugal.scn
2048x2048 scenary map of portugal and Islands, with cities, rivers and borders.
(1.98 MiB) Downloaded 407 times
User avatar
nulio
Traffic Manager
Traffic Manager
Posts: 157
Joined: 23 Aug 2007 21:20
Location: Portugal

Re: How To: Generate Superb Heightmaps :)

Post by nulio »

Nice!

ricmsil we have to play some games :P

(uns tugas a jogar num mapa de Portugal e tal)
User avatar
vanadio
Engineer
Engineer
Posts: 95
Joined: 03 Jan 2009 17:01

Re: How To: Generate Superb Heightmaps :)

Post by vanadio »

Very good, i'm portuguese and a Portugal map will be very good :D

Força aí nisso!!! Tugas!!!

I already play the map, very very good congratulations.
My city, Abrantes, is there but if you can you can add Entroncamento and Torres Novas :D
Shinamori
Engineer
Engineer
Posts: 1
Joined: 12 Jun 2009 05:49

Re: How To: Generate Superb Heightmaps :)

Post by Shinamori »

Hi. I just have to say something. I tired the tutorial and all I ge tis blank maps with fileszie for 4.7kbs or so.
I have SRTM4.1 and GE, but nothing works.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Google Adsense [Bot] and 11 guests