Importing HeightMaps in OpenTTD?
Moderator: OpenTTD Developers
I have used sv0creator to import a heightmap. I used a program called GEODAS to get a heightmap, and then converted to a bitmap (common BMP file) using printscreen key. Opened in MSPaint and fine-tuned with ACDsee and then imported via sv0creator. The Countour seems OK (as you may see below), but something is dissatisfying, because although the sea-line countour is fine, there is only a plateau behind the coast, and elevations don't change ver much. Well, in fact it must have been changing dramatically.
I am using WinXP(isnt it obvious at all?), and only sv0creator itself without ant patch because don't seem to understand where to apply them...
Is it because the red color in the heightmap? Should I use blue-green shades only?
Or is it the game limit since sharp (steep) mountains cannot be fully represented in TT?
PS: Dont understand terms pallette order, 4-bit bitmap (I assume windows bitmap I contribute is 16bit, I might have been wrong, probably, with a high probability, exactly, uh-whatever)
I am using WinXP(isnt it obvious at all?), and only sv0creator itself without ant patch because don't seem to understand where to apply them...
Is it because the red color in the heightmap? Should I use blue-green shades only?
Or is it the game limit since sharp (steep) mountains cannot be fully represented in TT?
PS: Dont understand terms pallette order, 4-bit bitmap (I assume windows bitmap I contribute is 16bit, I might have been wrong, probably, with a high probability, exactly, uh-whatever)
- Attachments
-
- this is a part of the terrain, which is unrealistic.
- terrain.PNG (84.06 KiB) Viewed 7240 times
-
- contour is fine, but...
- countour.PNG (34.13 KiB) Viewed 1335 times
-
- untitledTRneg.PNG
- grey heightmap
- (16.24 KiB) Downloaded 3826 times
______________
yasinko
______________
yasinko
______________
-
- Traffic Manager
- Posts: 175
- Joined: 19 Jan 2004 17:25
- Location: kotka or Savitaipale, Finland
- Contact:
yasinko wrote: PS: Dont understand terms pallette order, 4-bit bitmap (I assume windows bitmap I contribute is 16bit, I might have been wrong, probably, with a high probability, exactly, uh-whatever)
This is the main problem. you need to reduce the color depth to 16 colors before saving it. (first convert the height map to Greyscale and then save it as 16 colors PNG file.)
Also, if you want to make highest point of your height map as high as it is possible in OTTD map, you need to adjust color levels after you have converted the height map to greyscale.
OK, up to date. No functional changes.
Not sure how useful 6to7.diff will be, but I'll post it anyway.
Not sure how useful 6to7.diff will be, but I'll post it anyway.
- Attachments
-
- pngmap6to7.diff
- (3.11 KiB) Downloaded 221 times
-
- pngmap7.patch
- (11.01 KiB) Downloaded 237 times
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Here is a new version, now with a file selector dialog, so you can select what file to load. It is untested on Windows and OS2, so if it doesn't compile fix it yourself.
- Attachments
-
- pngmap8.patch
- (25.72 KiB) Downloaded 253 times
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
PNGmap9 is a minor codechange (see pngmap8to9.diff (next post)) and an update to r2963.
Since I have to double-post anyway, there's some duplicate data in these two posts. This post has the full source of PNGmap9 (rar and 7z), and pngmap9.patch.
Since I have to double-post anyway, there's some duplicate data in these two posts. This post has the full source of PNGmap9 (rar and 7z), and pngmap9.patch.
- Attachments
-
- pngmap9.patch
- (25.94 KiB) Downloaded 225 times
-
- source.7z
- (1.92 MiB) Downloaded 206 times
-
- source.rar
- (1.89 MiB) Downloaded 201 times
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
This post contains pngmap8to9.diff, and a win32 binary (zip)
As its revhack reflects, this binary is expected to be compatible with the current nightly (r2963).
As its revhack reflects, this binary is expected to be compatible with the current nightly (r2963).
- Attachments
-
- OTTD-r2963-PNGmap9.zip
- (662.18 KiB) Downloaded 343 times
-
- pngmap8to9.diff
- (674 Bytes) Downloaded 203 times
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Awesome patch Dalestan...
I want to create some maps that work with 0.4.0.1. However cygwin (only compiler I have) cant build with the PNG libraries.
Can you create & post a win32 binary of 0.4.0.1 + pngmap9.patch only?
Will scenarios created with this be compatible with all 0.4.0.1+ nightlies?
Thanks
RichK
I want to create some maps that work with 0.4.0.1. However cygwin (only compiler I have) cant build with the PNG libraries.
Can you create & post a win32 binary of 0.4.0.1 + pngmap9.patch only?
Will scenarios created with this be compatible with all 0.4.0.1+ nightlies?
Thanks
RichK
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Sorry for posting in a few-months old thread. However, I'm experiencing very irritating bugs.
I've made a 4-colour png ready to be imported to OTTD, so I'm importing it and I see all valleys became mountains and vice-versa.
So I've inverted all colours in the image, saved in 4 colour mode (so OTTD can read it) and imported. And what I saw? All valleys remained mountains and vice-versa. The land was a bit higher, however. Just don't look at the diffusion - I've turned it off now.
I've compiled Heightmap v9 on r2963 without errors and warnings.
Why is the result almost the same with different heightmaps?
Edit:
I'm using Adobe Photoshop 7.0
I've made a 4-colour png ready to be imported to OTTD, so I'm importing it and I see all valleys became mountains and vice-versa.
So I've inverted all colours in the image, saved in 4 colour mode (so OTTD can read it) and imported. And what I saw? All valleys remained mountains and vice-versa. The land was a bit higher, however. Just don't look at the diffusion - I've turned it off now.
I've compiled Heightmap v9 on r2963 without errors and warnings.
Why is the result almost the same with different heightmaps?
Edit:
I think my problem is the same. Can you tell me what software were you using to fix Purno's heightmap?The problem with ur Highmap is the palette order.
The colors are not in the order u have paint there, because of conversation i thing.
Reopen it and change the colors to one in the order u want to have on the map.
Foxy
I'm using Adobe Photoshop 7.0
- Attachments
-
- WHITE.png (30.02 KiB) Viewed 6337 times
-
- BLACK.png (30.18 KiB) Viewed 6336 times
MeusH - one thing I noticed. You say 4-colour PNG. Its actually 4-bit colour; ie. 16 colours. You can get a whole load more detail in your maps this way.
PS. I use PaintShopPro 7 to do just the conversion to the right bit-depth and sort out palette problems. One useful trick once you have it nearly correct, is to convert to greyscale, then jump back to 4-bit. The palette is then in 16 strict shades of grey - perfect for import.
PS. I use PaintShopPro 7 to do just the conversion to the right bit-depth and sort out palette problems. One useful trick once you have it nearly correct, is to convert to greyscale, then jump back to 4-bit. The palette is then in 16 strict shades of grey - perfect for import.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
I can post a patch that compiles, but it won't link; it appears that 0.4.0.1 expects zlib to contain stuff it doesn't. (compiling with MSVC .NET; compiling 3244 works.)richk67 wrote:Can you create & post a win32 binary of 0.4.0.1 + pngmap9.patch only?
Yes, if it can be made to link.richk67 wrote:Will scenarios created with this be compatible with all 0.4.0.1+ nightlies?
Here's the patch, if anyone wants to play with it. (0.4.0.1 is/was rev 2354, I believe. That's the revision I made this patch against, anyway.)
- Attachments
-
- pngmap0.4.0.1.patch
- (26.04 KiB) Downloaded 196 times
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Meush, your map was in 256 colours mode, and that heigh-map importer need it in 16 colours (as 15 levels of land and 1 as sea). So I converted it and here it is. I made a scenario and everything is what it was supposed to be. Just an important note: each level of land is created out of special colour from the scale, so you cannot expect a 1st level land to be created out of black (sea) sprayed by some grey - that makes just small islands. If you want to create a map, you need to use all those colours putting them at each other. Then, you can spray for example 8th level land colour with 2nd level land colour, but not very densely - that will make very nice and naturally looking mountains.
- Attachments
-
- your map in 16 colours
- map.jpg (75.87 KiB) Viewed 6128 times
Who is online
Users browsing this forum: No registered users and 27 guests