Jump to content

discussion on heightmap sources and technical data


viridis
 Share

Recommended Posts

Hi, everyone,

I have been working for some weeks on mapmaking using the heightmap import from the atlas. I have found it great but found some problems I would want to be discussed here in the forum. Then (maybe) we will have a guide or tutorial with all the precious technical information about heightmap import involving all the process. Please correct me or comment as you wish, so I can edit the post and include more information.

  • I followed the guide in the wiki, but found myself stuck some errors (my fault, but miss more technical information) before I learnt  (thanks to vladislavbelov), the bit depth and format that the Atlas require for this import. However, still have questions about that:
  1. Which bit depth should I pick? 16-bit gray, 24-bit RGB (8-bit per channel)? In the guide in the wiki I can only read a generic "greyscale"
  2. Which formats are supported? BMP, PNG, JPEG, TIFF, RAW... not information about that neither, BMP appears to work, but the way bits are stored vary between these, may the results also vary? I would like to have more information or advice here aswell.
  • Regarding the data sources I found good advise, but I would like to write a comprehensive guide on this also. The sources I found are:
  1. NASA blue marble: really great source, here you find loads of data. Specially interesting for 0ad the elevation, bathymetry and satellite images actual "colors" (to know where to apply a green or brown texture). Best of all, the images fit perfectly one onto the other cause all represent the same area and size. The disadvantage? Well... resolution might be enough for some maps, but if you want to make a big map from an small area (the island of Malta, for example), you may encounter the limits of this source. Moreover, I've noticed, the elevation is not proportional (yet should be enough for doing maps), cause Himalaya gets 255 (8-bit maximum) value, whereas greenland about 230, and Southamerica reaches 255 also.
  2. imagico.de: awesome, a search tool for various data sources. Sadly most sources only have data from America, while the civilizations present in 0ad are from Europe/Asia/Africa. Yet you get very very good resolution indeed, but only for elevation, bathymetry is missing. What can you do? Well, I have found no better solution but getting this greater resolution images for the most important in gameplay elevation (Earth part), and combine them with the coarse NASA blue marble bathymetry data. I have even written a macro in a scientific imaging analysis tool (ImageJ) for this purpose, given some coordinates and pertinent images, however, I have not been capable of doing a proper and beautiful heightmap import, tend to mess everything during my struggle.:( Perhaps, if I had more info about the required formats for the Atlas I could fix it. One thing really cool about the data I selected in this search tool (J. de Ferranti) is that images are in 16-bit, so data in Z-axis (height) can have a lot more resolution and (not sure about this, but tested on Sicily's mount Etna) it stores actual elevation in meters. In the case of mount Etna I measured values around 3200-3300 m which is really close to its true altitude. What about that? Well, if you know your image is 1 degree x 1 degree (width x height), the Earth's radius and that elevation values are real, you can work out a 100% REALISTIC MAP! when it comes to  elevations. Cool, uh?:victory: Yet, I still struggle with the formats and Atlas import as I stated above.
  3. Global Data Explorer (powered by GeoBrain): thanks to niektb, for this source. He made a video tutorial about getting data from there and so on. Have'nt tried yet (needs login, and my laziness... well... :blush:), but seems easy to navigate and download, but guess no bathymetry is found. What about its resolution, bit-depth, etc?
  4. ... there might be more data sources out there, any collaboration is welcome!

Well... what do you think? Suggestions? Can we push a bit further the heightmap import?

Link to comment
Share on other sites

Just for completeness, there are also some random map scripts introduced by _kali in Alpha 20 and Alpha 21 that use heightmaps.

Spoiler

amazon.js
bahrain.js
howe_sound.js
marmara.js
mediterranean.js
ngorongoro.js
pompeii.js
ratumacos.js
red_sea.js

_kali used custom tools to create the maps. It should be better documented. (We still need to reproduce the process, so that we can convert these maps to a round shape.)

27 minutes ago, viridis said:

Which bit depth should I pick? 16-bit gray, 24-bit RGB (8-bit per channel)? In the guide in the wiki I can only read a generic "greyscale"

Never used it, nor read the code. But I assume the highest quality wins.

28 minutes ago, viridis said:

Which formats are supported? BMP, PNG, JPEG, TIFF, RAW... not information about that neither, BMP appears to work, but the way bits are stored vary between these, may the results also vary? I would like to have more information or advice here aswell.

The atlas menu entry stating that JPEG files can be loaded is a leftover from the time it was supported, see 17870 / #2828.

The texture decoding was introduced here:

https://trac.wildfiregames.com/changeset/12308/ps/trunk/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp

There weren't too many changes

https://code.wildfiregames.com/source/0ad/browse/ps/trunk/source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp?view=blame

I don't expect the results to vary (other than loss of quality when compressing the image again). Maybe Vladislav knows more.

Link to comment
Share on other sites

Also there's a guide in the forum by @Palaxin (In case you haven't seen it's linked in the wiki guide):

EDIT:

For random maps there are also functions to manipulate heightmaps like erosion of by decay, sun and wind (e.g. rectangularSmoothHeightmap) and simple water driven erosion (splashErodeMap).

It is absolutely possible to also make them brushes in Atlas but currently they are not shared.

Backward erosion for reconstruction of historic topography is not possible just with the surface data though (entropy increased, information diffused).

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...