Patch: Create realistic heightmap, water & town placement

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Create realistic heightmap, water & town placement

Post by Terkhen »

Wasila wrote:Erm, do I have to install TortoiseSVN or is there a command on msys? I've always used trunk...
http://wiki.openttd.org/Compiling_on_MinGW#Install_SVN
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

I've already installed SVN, but what is the actual command to choose and download a particular version?
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Create realistic heightmap, water & town placement

Post by Terkhen »

Once you have subversion installed and you have a checkout of current trunk, use this command in the trunk folder:

Code: Select all

svn update -r13922
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

Success! Anyone know where I can get the data for Great Britain (if possible with a little of mainland Europe in the corner). As I posted in the problems forum, creating the heightmap myself creates problems.
zytok
Engineer
Engineer
Posts: 15
Joined: 28 Nov 2008 15:47

Re: Patch: Create realistic heightmap, water & town placement

Post by zytok »

check Jon Scaife's UK scenario, he includes a kmz overlay file for use. Not sure if this is what you're after.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

I do realise that it's been a while, but I just noticed the attachment at the bottom of the original post xD, however I do not have Imagemagick. Is there a way of adding it to my MSYS installation without reinstalling it?
thepalm
Engineer
Engineer
Posts: 15
Joined: 25 Jun 2008 01:12

Re: Patch: Create realistic heightmap, water & town placement

Post by thepalm »

note: i am not a c++ expert but my guess is that the first problem is this
convert_swbd_asc2png.c:5:17: png.h: No such file or directory
probably need to install libpng and/or add it to the include path
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

That's what I'm asking - can I install these things without reinstalling MinGW?
thepalm
Engineer
Engineer
Posts: 15
Joined: 25 Jun 2008 01:12

Re: Patch: Create realistic heightmap, water & town placement

Post by thepalm »

That's what I'm asking - can I install these things without reinstalling MinGW?
To install libpng - see http://gnuwin32.sourceforge.net/packages/libpng.htm - this requires zlib, which you probably already have if you are compiling ottd normally

I got this to work a while ago, in VS, but i am not sure how to edit the various include/lib paths in mingw, probably better to ask on the minGW forum, a reinstall should not be necerrsary
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

I should have libpng, as I followed our wiki's instructions for installing MinGW. On the other hand, I'm trying to install ImageMagick but am having a lot of trouble finding the correct version to download. I am assuming it is MagickCore, but I can't see exactly where to download it.
embql
Engineer
Engineer
Posts: 16
Joined: 26 Nov 2009 03:06
Location: Denmark
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by embql »

so i managed to create myself a nice looking heightmap.
i got into the compiling and (i think) i compiled a working build, i could go into the game, and create a heightmap from your patch.
however, the last part of compiling the patch which enables placement of towns/etc. .... i'm totally lost.

I'm on a windows machine, and i'm a newb too. should i forget the rest, if i can't make it anyway :D?
It says in the readme i have to makefile through cygwin, yeah, i'm in cygwin, but what is the command?
Where do i find the file inside cygwin?

so many unanswered questions..
And if someone pities me, they have my accept to help me, a heightmap with everything (towns, whatdoiknow) around Denmark,
with Göteborg, Malmø, Flensburg and Rostock (tip of northern germany and the southwest tip of sweden)... would be awesome.

thanks for everything you can help with :D
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

embql wrote:I'm on a windows machine, and i'm a newb too. should i forget the rest, if i can't make it anyway :D?
It says in the readme i have to makefile through cygwin, yeah, i'm in cygwin, but what is the command?
Where do i find the file inside cygwin?
After you've applied the patch to the correct revision, you would type the following: ./configure && make (optionally you can use 'make bundle'). If the patch is not applied to the correct revision, the compiling process will not work.
embql
Engineer
Engineer
Posts: 16
Joined: 26 Nov 2009 03:06
Location: Denmark
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by embql »

and by patch you mean the actual ingame change, right? :) Not the shell-script i presume..

when i type it into cygwin, it answers: bash: /configure: No such file or directory.

do i have to place the shell files in a designated folder, or vice versa / the cygwin?
because i will have to make cygwin _find_ the file, right? (yes, the shell files are unpacked already)..
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

Have you cd'ed into the directory of the patched source?
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by Gremnon »

The command is './configure' not '/configure'
From your post, my guess is that was the mistake you made. Don't forget that all important '.'
embql
Engineer
Engineer
Posts: 16
Joined: 26 Nov 2009 03:06
Location: Denmark
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by embql »

petert wrote:Have you cd'ed into the directory of the patched source?
....... 'nooooo' :p
Gremnon wrote:The command is './configure' not '/configure'
From your post, my guess is that was the mistake you made. Don't forget that all important '.'
see, i didn't know that. thank you very much.
I tried to make my own png's with land/water (that actually went pretty fine)... the real file just seemed easy to reproduce, just change the var's inside the file... but openttd crashed when i tried to open it. damnit.
bogdans
Engineer
Engineer
Posts: 13
Joined: 21 Jan 2007 16:02
Location: USA/Romania/Wherever
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by bogdans »

Hi everyone,

I have used this patch before, and I am in complete awe of its power. I can't seem to get the script to work properly however. I've compiled my stuff, but the get_zip_files.sh script hangs on land generation. Here's what I get, starting with the first error in the script:

Code: Select all

montage: missing an image filename `tmp/grouped.png' @ montage.c/MontageImageCommand/1647.
convert: unable to open image `tmp/grouped.png': No such file or directory @ blob.c/OpenBlob/2439.
convert: unable to open file `tmp/grouped.png' @ png.c/ReadPNGImage/2854.
convert: missing an image filename `tmp/land.png' @ convert.c/ConvertImageCommand/2775.
convert: unable to open image `tmp/land.png': No such file or directory @ blob.c/OpenBlob/2439.
convert: unable to open file `tmp/land.png' @ png.c/ReadPNGImage/2854.
convert: missing an image filename `bay_area_land.png' @ convert.c/ConvertImageCommand/2775.
Land done
convert: unable to open image `tmp/land.png': No such file or directory @ blob.c/OpenBlob/2439.
convert: unable to open file `tmp/land.png' @ png.c/ReadPNGImage/2854.
convert: missing an image filename `tmp/land_scale.png' @ convert.c/ConvertImageCommand/2775.
convert: unable to open image `tmp/land_scale.png': No such file or directory @ blob.c/OpenBlob/2439.
convert: unable to open file `tmp/land_scale.png' @ png.c/ReadPNGImage/2854.
convert: missing an image filename `tmp/thumb.png' @ convert.c/ConvertImageCommand/2775.
composite: unable to open image `tmp/thumb.png': No such file or directory @ blob.c/OpenBlob/2439.
composite: unable to open file `tmp/thumb.png' @ png.c/ReadPNGImage/2854.
composite: missing an image filename `tmp/thumb.png' @ composite.c/CompositeImageCommand/1587.
convert: unable to open image `tmp/thumb.png': No such file or directory @ blob.c/OpenBlob/2439.
convert: unable to open file `tmp/thumb.png' @ png.c/ReadPNGImage/2854.
convert: missing an image filename `bay_area_thumb.png' @ convert.c/ConvertImageCommand/2775.
Any idea what might be wrong and how I could fix it? I am running Ubuntu Intrepid on an x64 box. I did install imagemagick, z-shell, and libpng-devel and still no luck. Thanks!
Aerond
Traffic Manager
Traffic Manager
Posts: 169
Joined: 18 Jan 2003 12:51
Location: Spain

Re: Patch: Create realistic heightmap, water & town placement

Post by Aerond »

I´m a little bit lost applying code and I can´t make this (or any), patch to work...

Can somebody help a little bt?? I´m dying to try it for a map of Tokyo area i´m creating.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

Aerond wrote:I´m a little bit lost applying code and I can´t make this (or any), patch to work...

Can somebody help a little bt?? I´m dying to try it for a map of Tokyo area i´m creating.
Try this binary I made, it's quite out of date though...
http://www.tt-forums.net/viewtopic.php?p=807942#p807942
Netshira
Engineer
Engineer
Posts: 1
Joined: 19 Jan 2005 20:39

Re: Patch: Create realistic heightmap, water & town placement

Post by Netshira »

Thank you for this patch.. it's really impressive.

Really dumb question.. has anyone tried to get this to work in the western hemisphere? I am trying to do Nebraska, USA and it doesn't seem to be handling a negative number for longitude. (maybe it's stupid user error.. I'm using the binary linked above as I'm not set up to build OpenTTD yet) (it's too bad you couldn't specify the lat/long for population of the cities as I already have a nice bumpmap I made for NE already but can't get the cities populated).
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests