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

User avatar
Samli
Engineer
Engineer
Posts: 26
Joined: 27 Apr 2010 14:03
Location: Székesfehérvár ,Hungary

Re: How To: Generate Superb Heightmaps :)

Post by Samli »

great:D
Image
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

I don't suppose there are any heightmaps made for the extra-large map patch AND the extra height levels patch?
Total Alpine Replacement Set: Industry, Town, Objects
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: How To: Generate Superb Heightmaps :)

Post by Terkhen »

Heightmaps can have any size, and they have 256 levels of grey to represent height. Therefore, big heightmaps scaled to [0-255] should work in both vanilla OpenTTD and with the patches you mentioned. Vanilla OpenTTD will just scale the heightmap to the values it can use (both in size and height).
Sabre_Justice
Traffic Manager
Traffic Manager
Posts: 142
Joined: 08 Jul 2011 12:10

Re: How To: Generate Superb Heightmaps :)

Post by Sabre_Justice »

If there's people in this thread willing to create heightmaps for those who can't run the software or figure it out, would anyone mind making a heightmap of South Australia? (yes, that's an actual Australian state called South Australia. We have creatively named states) I figure it's not worth downloading all that software and trying to figure it all out when I only really plan on making that one scenario and probably messing with it endlessly

EDIT: Never mind, I'll just be slightly less lazy and find an existing heightmap from this very forum to modify.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

Terkhen wrote:Heightmaps can have any size, and they have 256 levels of grey to represent height. Therefore, big heightmaps scaled to [0-255] should work in both vanilla OpenTTD and with the patches you mentioned. Vanilla OpenTTD will just scale the heightmap to the values it can use (both in size and height).
Thanks, Terkhen.

I don't suppose anyone fancies making me a quick heightmap? :P
Total Alpine Replacement Set: Industry, Town, Objects
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: How To: Generate Superb Heightmaps :)

Post by Terkhen »

You might want to check the tutorials in this very thread and give them a try.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

Terkhen wrote:You might want to check the tutorials in this very thread and give them a try.
Mainly, this..
First page tutorial wrote:Ok, firstly you'll need a reasonably beefy PC to do this, as the data crunching is quite intense.
Unfortunately, my netbook, which is in dire need of reloading, struggles! Poor little thing.
Total Alpine Replacement Set: Industry, Town, Objects
gab_3020
Engineer
Engineer
Posts: 8
Joined: 30 Sep 2010 03:07

Re: How To: Generate Superb Heightmaps :)

Post by gab_3020 »

Ok I've tried this for over 6 months here and there and still cannot make the overlay work properly.

Could anyone make me a heightmap of the following area?

Ottawa, Canada

I'm trying to make it as zoomed in as possible

Thanks
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: How To: Generate Superb Heightmaps :)

Post by romazoon »

i m in good mood today... so here it is !
ottawa heightmap 1024.png

i haven t tried it ingame... so if the part where Ottawa is standing is flooded in OTTD, simply increase the light with an image editor and save the modification then retry the map in OTTD

note: i also have wider ones (2048x2048 and 4096x4096) wich i believe would be more accurate if you intend your map to be as big as 2048 or 4096. (the only thing is that i will have to upload it to an other place cause it s too big for the forum)

EDIT : THIS IS NOT OTTAWA heightmap... it s parts of the Alps
Last edited by romazoon on 12 Aug 2011 23:44, edited 1 time in total.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

romazoon wrote:i m in good mood today... so here it is !
ottawa heightmap 1024.png

i haven t tried it ingame... so if the part where Ottawa is standing is flooded in OTTD, simply increase the light with an image editor and save the modification then retry the map in OTTD

note: i also have wider ones (2048x2048 and 4096x4096) wich i believe would be more accurate if you intend your map to be as big as 2048 or 4096. (the only thing is that i will have to upload it to an other place cause it s too big for the forum)
This could just be me seeing things, but looks awfully like a heightmap of Switzerland.
Total Alpine Replacement Set: Industry, Town, Objects
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: How To: Generate Superb Heightmaps :)

Post by romazoon »

huh ! it s seems that you are right... i don t know how it did happen as i was downloading the Ottawa datas for doing it.... but i do have a swiss heightmap so it maybe just me... i m gonna check further...

EDIT : thanks for spotting my mistake... i guess i was just doing things too fast and opened the wrong folder...

anyway here is a correct heightmap of Ottawa :
ottawa 1024.png
Last edited by romazoon on 12 Aug 2011 23:43, edited 1 time in total.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

Not just me then! :lol:
Total Alpine Replacement Set: Industry, Town, Objects
gab_3020
Engineer
Engineer
Posts: 8
Joined: 30 Sep 2010 03:07

Re: How To: Generate Superb Heightmaps :)

Post by gab_3020 »

Thanks!

A Million Thanks!!

This is great!
User avatar
doktorhonig
Tycoon
Tycoon
Posts: 1100
Joined: 22 Aug 2006 11:03
Location: Austria
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by doktorhonig »

Since handling those arcascii-files is a bit tedious, I wrote a little tool to make it easier: arcasciishop :D

Basically it converts arc arscii files to png. You can set the minimum gray value to preserve the coastline - 16 is pretty much optimal, but in case you try it with more heightlevels you might have to lower that setting. The minimum and maximum meters will then correspond to the minimum gray value and 255. The ocean is black. Additionally, to compensate for large differences in height, you can specify a gamma value. That helps if you have a lower and a higher mountain range - otherwise the lower one would disappear or the higher one would be capped.

Up to now it's fairly fast, but there's still a lot of room for improvements, e.g. better performance, resizing, copying images together etc. but I don't want it to become too complicated.
It's written using c++/Qt, which unfortunately makes it a bit large for distribution (at least on Windows). Is anyone interested in testing it? I think I could open a project on sourceforge or something (I have to clean up the source for that, though :lol: )
Attachments
arcasciishop.png
(318.57 KiB) Not downloaded yet
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: How To: Generate Superb Heightmaps :)

Post by SwissFan91 »

I have a little request for someone.

I am trying to use the UK-South West heightmap that can be found in-game via the content downloader. Now, I want the map to be LARGE - around 4000x4000 or whatever the variant is in the extra-large map packs. When I load the present heightmap, it is obviously very inaccurate as the heightmap is made for 2048x2048. Is there a way to improve this accuracy? The coastlines, for example, are about 3 tiles high atm, and it misses most of the height detail.

Many thanks for any help.
Attachments
Great_Britain_The_Southwest-1.tar
(190 KiB) Downloaded 198 times
Total Alpine Replacement Set: Industry, Town, Objects
User avatar
Flowdy87
Engineer
Engineer
Posts: 10
Joined: 12 Feb 2012 20:26
Location: England

Re: How To: Generate Superb Heightmaps :)

Post by Flowdy87 »

[quote]Now, on the pic, you'll notice the two green buttons for S_22_09 and S_23_09 - these are the two DEMs we'll need.

Click on the Green buttons and you'll see a page pop up, scroll to the start of the links and you'll want to download either of the first two links (Either from the US or UK Servers, it doesn't matter), its the data file in ARCASCII format.[/quote]

This is the first time i'm trying to make a heightmap, when it comes to download the data, the link never works and nothing will download and i have done everything the tutorial says and everything works up until that point..Is this anything else i can do or is it a lost cause? [/b]
Image

Image
kipperedfish
Engineer
Engineer
Posts: 11
Joined: 14 Aug 2009 20:22

Re: How To: Generate Superb Heightmaps :)

Post by kipperedfish »

Argh

I just can't get it to work.... I followed all the instructions, did everything I was told and it looks like poop... can someone PLEASE make me a heightmap or scenario of bedfordshire, uk. I just can't get it to work.
I feel like a pig shat in my head!!!
User avatar
kamnet
Moderator
Moderator
Posts: 7492
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by kamnet »

doktorhonig wrote:Since handling those arcascii-files is a bit tedious, I wrote a little tool to make it easier: arcasciishop :D

Basically it converts arc arscii files to png. You can set the minimum gray value to preserve the coastline - 16 is pretty much optimal, but in case you try it with more heightlevels you might have to lower that setting. The minimum and maximum meters will then correspond to the minimum gray value and 255. The ocean is black. Additionally, to compensate for large differences in height, you can specify a gamma value. That helps if you have a lower and a higher mountain range - otherwise the lower one would disappear or the higher one would be capped.

Up to now it's fairly fast, but there's still a lot of room for improvements, e.g. better performance, resizing, copying images together etc. but I don't want it to become too complicated.
It's written using c++/Qt, which unfortunately makes it a bit large for distribution (at least on Windows). Is anyone interested in testing it? I think I could open a project on sourceforge or something (I have to clean up the source for that, though :lol: )
Sorry I didn't see this before now, but WOW, what a great idea! When I get back to heightmap making, I'd love to try this out! i've had a heck of a time trying to get decent looking maps made of the Ohio Valley region (midwest USA), particularly in part because you have the ohio river which starts at a higher elevation and winds down to the low elevations where it meets the Mississippi. Through my best efforts I usually either end up with what lookslike a bunch of hills or I have half a map that looks like a swamp.
User avatar
doktorhonig
Tycoon
Tycoon
Posts: 1100
Joined: 22 Aug 2006 11:03
Location: Austria
Contact:

Re: How To: Generate Superb Heightmaps :)

Post by doktorhonig »

That would be great!

Update:

I've uploaded a version of that tool compiled with VS Express. I have another one compiled with mingw, and its faster due to multicore optimizations, but I have to figure out all the license stuff before redistributing that thing. It's fast enough on my machine though.
Attachments
arcasciishop.7z
(3.22 MiB) Downloaded 153 times
matt.d
Engineer
Engineer
Posts: 1
Joined: 22 Mar 2012 12:24

Re: How To: Generate Superb Heightmaps :)

Post by matt.d »

Hi, I may have done something wrong but when i installed the overlay it registered as being SRTM4.1 and therefore I don't have any green dot to use for first step, if anyone could help that would be brilliant thanks
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 6 guests