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

Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

miham wrote:
Luxor wrote:another question that appears, is it possible to get this maps on the standard 0.4.8 version, only have worked in the nightly and the miniIn, but i wanna get the standard version cause is more popular in the multiplayer world :)
AFAIK that is not possible, at least, directly.
One way which might work: use the nightly to generate the map, and save the generated OpenTTD map, then try to load it in the 0.4.8, but I don't think it'll work because of the savegame version bump.
no that will not work as newer savegames store more data. You can load old savegame versions, but not "from the future" (seen at the time when the game was compiled). You need to load a savegame/map with the same savegame version as it was made with or newer
User avatar
bruce89
Engineer
Engineer
Posts: 76
Joined: 06 Dec 2005 17:28
Location: Glasgow, Scotland
Contact:

Post by bruce89 »

MGSteve wrote:Yup, all except the Image conversion software I used were free!
Of course you could use The GIMP instead, which is free (both meanings of the word).
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

Yup, the GIMP works nicely, and if you don't mind commandline tools, so does ImageMagick.

http://www.imagemagick.org/script/index.php

It can all be done for free :).
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
fr_tycoon
Engineer
Engineer
Posts: 2
Joined: 11 Sep 2006 16:28
Location: France

MicroDem

Post by fr_tycoon »

Hello !

First of all, I'd like to thank MGSteve for this tutorial, which is really helpful ! Everything went great, until I tried to download MicroDem. It seems like this link you gave is broken, or the site may be down. Could you tell me if I could find MicroDem somewhere else (although, I've googled it, and didn't manage to find a version above 5.0.3, which didn't use ASC files) ? Or even another software I could use instead of MicroDem.

Thanks in advance for any help !

I've discovered this website a few days ago, and I'm really glad about it :)

Fred
QtanJ
Engineer
Engineer
Posts: 21
Joined: 27 Jun 2006 11:52
Location: Europe, Norway

Post by QtanJ »

I just found FWTools, this works in at least windows and linux, but I don't know how I can do this work instructed in the tutorial with it. I've tested to load dem files, and it seems like it works.

*edit It is openev you need from this package.

*edit 2 I'm currently having a problem with opening the gtiff image which was the first image type i found which was supported with this self compiled version of fwtools(including openev)
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

Cool - I made my first map based off of a real location - in this case, Long Island, NY. (1024x512)

(removed, I created an improved one)
Last edited by CobraA1 on 20 Sep 2006 03:26, edited 1 time in total.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
User avatar
Reuben
Engineer
Engineer
Posts: 8
Joined: 05 Jul 2006 01:41
Location: New Zealand
Contact:

Post by Reuben »

I'm afraid i have a problem with this, i use a mac, and so can't run the programme shown to get topographic pics. I've searched a fair while and haven't found a similar app yet.. so i was wondering who would be keen to get New Zealand's north island done (perhaps a 1024x2048 for the entire island or 1024x512 for around Auckland and surrounding towns+cities)
Attachments
North Island
North Island
northisland.jpg (92.21 KiB) Viewed 3027 times
Greater Auckland, and then some
Greater Auckland, and then some
auckland.jpg (105.83 KiB) Viewed 3178 times
-Reuben
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

I've created an improved long island map, the coastline should be more realistic now.

A few things I've discovered while experimenting:

-When selecting the "Gray scale" option in MicroDem, also click on "zRange" and set it to "Topography only" - this will create a map with a larger range of possible values.

-Correct me if I'm wrong, but I think OpenTTD has 16 levels of terrain. This means that all of your oceans/lakes should be 0-15, and all of your land should be 16-255 on your image.

-Personally, when I don't need to stitch any images together, I set zoom to 1, set the greyscale, and export the image directly to the GIMP. The GIMP can handle large images very well, so I don't bother with doing all that thinning & merging stuff in MicroDem when I don't need to.
Attachments
Long_Island.png
Long_Island.png (170.05 KiB) Viewed 3285 times
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

I'm afraid i have a problem with this, i use a mac, and so can't run the programme shown to get topographic pics. I've searched a fair while and haven't found a similar app yet.. so i was wondering who would be keen to get New Zealand's north island done (perhaps a 1024x2048 for the entire island or 1024x512 for around Auckland and surrounding towns+cities)
Another chance for me to test my techniques for creating great and realistic coastlines in the GIMP! Soon to become a script - it takes a very, very long time to do it manually, ouch. Even thinned, DEM maps are HUGE and force the GIMP to swap to the harddrive constantly.

BUT - it is done! Both maps, and in the sizes you requested!

Beware - they are both large maps, especially the one of the northern island.

EDIT: Reuben informed me he wanted more cities covered in the Auckland map. It is now 1024x1024 in size.
Attachments
NEW ZEALAND NORTH ISLAND.PNG
(425.86 KiB) Downloaded 1112 times
NEW ZEALAND AUCKLAND.PNG
(214.11 KiB) Downloaded 874 times
Last edited by CobraA1 on 20 Sep 2006 14:18, edited 1 time in total.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
User avatar
Reuben
Engineer
Engineer
Posts: 8
Joined: 05 Jul 2006 01:41
Location: New Zealand
Contact:

Post by Reuben »

Oh this is just superb, I'm very thankful! And hey, i've just got to make these into scenarios now, with real cities and all (Farming and forests will most definetelly be the industries of choice, as in real life :D)

edit:
Hmm, i've looked through this thread, and linked threads, and so far it appears that i need windows again to get these maps into OTTD..[snip]

edit again :roll: : Well, i just downloaded the os X nightly, and ta-da, there it is.. the heightmap options! silly me :oops:
-Reuben
User avatar
omri.kipi
Engineer
Engineer
Posts: 13
Joined: 29 Sep 2006 23:25
Location: Israel
Contact:

nice guid :)

Post by omri.kipi »

did all of that, got a nice hight map.
what now ?
how do i make the PNG to a TTD map ? :roll:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Use a nightly or the MiniIN, and load it in from the Land-gen toolbar in the Scenario editor.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
AndiK
Engineer
Engineer
Posts: 53
Joined: 07 Dec 2004 18:34
Location: Grafing bei München (Munich)
Contact:

Post by AndiK »

I've played around a bit with the DEMs you can get via Google Earth. I found out some stuff that might be useful for other people who want to create nice height maps:
  • An area of about 200 x 200 km for a 2048² map fits very well into TTDs landscape measure. In a hilly or mountaineous area, you will get both steep hills and nice valleys. If you cover a larger area, the valleys will get too narrow to build anything in them. A smaller area stretches all hills and mountains so much that they are no obstacle any more. -> Boring.
  • A vertical height spread (meaning: Difference in height between highest and lowest point on the map) of about 1000m seems best for TTDs landscape measures.
  • You can get nice coast lines if you rework the height maps in your graphic program a bit. I only have german photoshop, so I have to supply a few pictures for everyone's understanding:
    1. In MICRODEM, use "Map Area Range" as z-scale for elevation and save the map.
    2. Open the graphics program of your choice and load the TIFF.
    3. If your map does not contain any ocean, skip to step 6.
    4. Take the "Magic Eraser" and set it to the following:
      Image
    5. Click anywhere on your ocean, this removing ALL pixels with the color value 0/0/0. Your map should then look as follows:
      Image

      The chequered area is transparent.
    6. Choose this command:
      Image
    7. Set it to the following:
      Image

      This is what you just did: You removed all of the sea from your map, thus removing all completely black pixels. So, everything else that is still visible, MUST be land. As someone else has already found out: TTD has 16 height steps. Thus, Pixels are considered "height level 1", when their value is between 16 and 32. When you told MICRODEM to use the whole spectrum of z-values, it assigned very low values to the coast area, which then makes OTTD put ocean there. With this "Tonwertkorrektur", Photoshop "compresses" the height values so that the lowest value on land is 16. If you hadn't removed all of the ocean, the ocean would now have a height of 16 and everything else would be above it. Not quite what we wanted, though.
    8. Now we need to "refill" the ocean. To do this, create a new layer and fill it with black. Then pull the new layer "below" the old one. The result should look like this:
      Image
    9. The rest is like in the original tutorial: Cut out a rectangle with a good aspect ratio (Photoshop has a tool for this), resize it, save it and fire it up in OTTD.
    10. Congratulations, you've now created a perfect* height map.
* It's perfect because I wrote this little tutorial AND I TELL YOU IT'S PERFECT AND DON'T YOU DARE TO DISAGREE!!!!1111oneoneoneeleven ;-)

Suggestions, comments and criticism are always appreciated. :-)
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

Hmm, it seems that SRTM2 is down :(. Any other sources of data that could be used?

AndiK: That's nice, but I'm sure it would be much appreciated if those screenshots came from an English version of Photoshop. No offense, but I somehow doubt most of us have a "Tonwertkorrektur." I think it translates to tone or color correction or something like that. In the GIMP, which I use, it's called "levels." Don't know what it's called in Photoshop, though.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
Tegeltje
Engineer
Engineer
Posts: 1
Joined: 29 Oct 2006 19:15

Post by Tegeltje »

Just in case others run into this problem:

I've followed the tutorial, and was trying to save the image as a GEOTIFF file. For some reason though, MicroDEM gives me a vague error that it can't write to my harddisk. The exact error is: "Error write file (Disk full?)". I have over 50 GB of free space, so I highly doubt that's the problem.

Anyway, after poking around MicroDEM a bit, I noticed the option "Save image" when you right-click on the heightmap This will allow you to save the image in a variety of formats, including PNG. That worked fine for me, and my map looks decent in OTTD.
CobraA1
Route Supervisor
Route Supervisor
Posts: 480
Joined: 07 Nov 2003 17:52
Location: USA

Post by CobraA1 »

NOTE: They updated their database.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
User avatar
Chrill
Moderator
Moderator
Posts: 15978
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Post by Chrill »

How do I remove these black lines in the map??

EDIT: Nevermind, I found it out myself :)
Attachments
my_attempt.PNG
my_attempt.PNG (189.44 KiB) Viewed 17037 times
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
User avatar
Chrill
Moderator
Moderator
Posts: 15978
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Post by Chrill »

This is my finished product!
Attachments
Orust_OTTD.PNG
Orust_OTTD.PNG (266.96 KiB) Viewed 3162 times
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
AndiK
Engineer
Engineer
Posts: 53
Joined: 07 Dec 2004 18:34
Location: Grafing bei München (Munich)
Contact:

Post by AndiK »

Cobra: I am aware of this language problem. Unfortunately, I don't have Photoshop in english. Thus I posted the Screenshots (Which seem not to work, at the moment..? Must check this.), hoping that the english "color correction" (or whatever) is at the same place as the german "Tonwertkorrektur".
User avatar
Chrill
Moderator
Moderator
Posts: 15978
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Post by Chrill »

I am requesting! Someone who could edit a file I send to them, so that it fits correct into OTTD! :D I don't have a program to make the picture right size
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Amazon [Bot] and 13 guests