• Welcome to SC4 Devotion Forum Archives.

Mapmaking experimentations - What do you think about that ?

Started by Izidor44, October 12, 2011, 06:50:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Izidor44

Hello Gentlemen,

Still trying mapmaking experimentations, I would like to share the last prototypes with you. You will probably have some advices en suggestions to make about !

The main problem was to respect correct terrain elevations and to clearly see what is the "impact" of the terrain scale value in SC4T, while importing greyscale maps.

So, I started with a small test : a small region in SC4T, where the elevation is imported from a simple color gradient image (starting from 0 to 255 greyscale value)



After creating this region, I then measured the lowest and highest elevation, and noted where was the shoreline. I did this action with every terrain scale value elevation, from 100 to 5000.

The results were :

[tabular type=4][row] [head]Setting[/head] [head]Min[/head] [head]Shore[/head] [head]Max[/head] [/row][row] [data]100[/data] [data]2,00[/data] [data]187 px[/data] [data]347,24[/data] [/row][row] [data]250[/data] [data]2,00[/data] [data]129 px[/data] [data]496,08[/data] [/row][row] [data]500[/data] [data]2,00[/data] [data]86 px[/data] [data]744,12[/data] [/row][row] [data]Default[/data] [data]2,00[/data] [data]85 px[/data] [data]759[/data] [/row][row] [data]1000[/data] [data]2,00[/data] [data]53 px[/data] [data]1240,21[/data] [/row][row] [data]1500[/data] [data]2,00[/data] [data]37 px[/data] [data]1736,26[/data] [/row][row] [data]2000[/data] [data]2,00[/data] [data]29 px[/data] [data]2232,35[/data] [/row][row] [data]Import.dat[/data] [data]2,00[/data] [data]25 px[/data] [data]2475,15[/data] [/row][row] [data]2500[/data] [data]2,00[/data] [data]23 px[/data] [data]2728,43[/data] [/row][row] [data]3000[/data] [data]2,00[/data] [data]20 px[/data] [data]3224,51[/data] [/row][row] [data]3500[/data] [data]2,00[/data] [data]18 px[/data] [data]3720,59[/data] [/row][row] [data]4000[/data] [data]2,00[/data] [data]16 px[/data] [data]4216,68[/data] [/row][row] [data]4500[/data] [data]2,00[/data] [data]14 px[/data] [data]4712,76[/data] [/row][row] [data]5000[/data] [data]2,00[/data] [data]13 px[/data] [data]5208,81[/data] [/row][/tabular]

Setting : the terrain scale value set before importing
Min : the lowest elevation on map, corresponding to the blackest line of pixel (Grey value 0, left border)
Max: the highest elevation on map, corresponding to the whitest line of pixel (Grey value 255, right border)
Shore : the location on map of the shoreline, "187 px" means that the shoreline is on the 187th pixel row of the map, starting from the left side


The next step was to calculate, for each grey value (from 0 to 255), which elevation in meters is corresponding.

I extrapolated this calculation :

Elevation = (max. elevation in meters / 256) x grey value + 2

So, for example, with the default setting, grey value 84 means :

(759/256) x 84 + 2 = 251 meters above see floor... ...which means lowest land

I did a whole spreadsheet in Excel, when you can see the elevation in meter for each greyscale value, in each importing scale.


So, let's start a real experimentation with realistic map. I selected the DEM datas for the region of the Ruma's National Park in Kenya :

http://maps.google.fr/maps?hl=fr&ll=-0.553428,34.289703&spn=0.752523,1.319733&t=p&z=10&vpsrc=6

I then opened the DEM map in Microdem and selected a 56 x 56 km area where the lowest elevation is 1 130 meters (water level of the lake) and the highest is 2 269 meters.
Delta is : 2 269 - 1 130 = 1 139 meters

Let's open GIMP now !



At this stage, blue y value means "sea" , 0 grey value means "lowest land" and 255 grey value means "highest land".

My maximum elevation will be 1 139 meters above see level, which means 1 390 meters above see floor.

With a 1.500 meter setting, 205 greyscale value is corresponding to 1 392 meters above sea floor. Shoreline will be at 37 greyscale value.

After isolating the blue areas, I modified the color settings of the ground terrain in order to have all values ranging from 37 to 205.

Then, I simply edited the sea zone with a crude "decrescendo" of greyscale value (from 35 to 0).



Imported in SC4T and equalized a few time :



I tested some spots on the map, with Microdem and Google Earth opened, in order to compare with SC4T values. It did pretty well.

So, what do you think about this ?

whatevermind

This is awesome!  First time I think I've seen anyone work out the math behind this for SC4.  Makes it much easier and faster to set up the grayscales for creating accurate regions.

On a side note, where do you get your DEM data?  I've been looking for a good replacement source for data outside the US since they reworked the Seamless server to only cover parts of N. America.

dobdriver

That's very cool Izi especially for 8bits, so cool I decided to have a crack, now I left out a few tiny islands and didn't worry about rivers or creeks, and the two small islands I didn't split. It is also 14 tiles square but has a extra 42 pixels/side added that accounts for the 1024 pixels/km. The max elevation is 1131m above sealevel. Also because I use a different colour palette in terraformer it takes a few metres of elevation to get out of the green.





I think you should upload that somehere.

One thing I have just discovered is city borders cost 80KB for the equivalent quality image. Ouch!

cogeo

Some comments:

The elevation calculation is controlled by the ImageImportScaleFactor property (default 3.0) in the "Terrain Properties" exemplar. The formula is:

Elevation = ImageImportScaleFactor x GrayValue

Sea level is by default set to 250.

The above pose a number of limitations:
- The maximum elevation a gray-scale image can represent (using the default settings) is 3.0 x 255 = 765 meters, or 515 meters above sea level.
- A gray-scale image can only represent values that are multiples of 3.0m, often resulting in a "steps" effect.
- You can play with the settings (basically with ImageImportScaleFactor), to represent higher elevations, but this causes two other problems, first is exacerbates the steps effect and second the land/water threshold is affected too, eg a value of 83 with ImageImportScaleFactor set to 3.0 would be water, but with ImageImportScaleFactor set to a higher value it will be land.

Check my West Macedonia maps on the STEX/LEX, the set includes a number of plugins for importing the maps correctly, which make use of the above features.

dobdriver


Yes the in-built plugins in terraformer are very accurate (to within +/- 0.01m or 1cm) when loading a pure white(0%) greyscale map.

You're right Cogeo about the stepping effect, a 4000m map looks god awful in 8bits. The first 8bit maps I made only stretched to 1000m and the only solution is to go to 16bit greyscales, for which basically photoshop or photoshop elements is required. The gimp one day might support 16bits and they have been working on it for sometime now. Who knows?

Terraformer's only downfall in that department is that it flat tops everything over 6000m (mapper can produce up to the full 6553.6m), although that is not such a problem as SC4 itself has its' own difficulties at these elevations with textures tearing and dragging oneself up and down mountains does give one a feeling of mountaineering.

Izidor44

Hi mappers,

Thanks first for posting here !

@ whatevermind : here is the goldmine http://www.usgs.gov/
@ dobdriver : any chance to share your SC4T color settings with us ?  ::)

Effectivelly, in my opinion, the 5 first elevation settings are affordable (100, 250, 500, standard, 1000) in map making with my poor ol' 8 bit technology.

Beyond this, maps looks like "stairs" and completelly unrealistic. It means that it ranges mapmaking possibilities to area under elevation of 1000-1200 meters above sea level. It leaves a large choice of possbilities anyway. But it could be frustrating when you try to map a flat coastal area with a big volcano, for example.

Dob, I'm particularly jealous when looking my SC4T map and yours. Have you seen how smooth are your plateaus, in the bottom right quarter of the picture ? It perfectly illustrates the 8 bit limits and possibilties  :'(

Cheers,

PS : I really miss city borders on maps. For me, I like where, in an upload, there's a global isometric view of the region (made with Region Census, for example), and a more "real map" picture showing the cutting, no ?

Izi