• Welcome to SC4 Devotion Forum Archives.

Need help making a new map

Started by cogeo, July 22, 2009, 10:00:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cogeo

Hi all,

I need a little help for making a map I'm working on for some (long) time now. I was about to scrap it, but finally I decided to finish and release it.

To see the region I'm making open Google Earth and go to 41°N 25°07'E. The area has a lot of lowlands and water, with some "indeterminate" terrain too. For such a terrain, esp if the DEM data aren't of good enough quality (90m), using a program like SC4F wouldn't be the best choice, I think. So I made a special program for this, to extract the data as needed. Click on the thumbnail below to see its output:



The image is extracted in 1:1 scale (1 DEM point equals one pixel - no interpolation or scaling). The problem is to determine precisely what's land and what's water. So some DEM heights of special interest have been coloured with special colour values (so as to make generating masks easier). The meaning of colours is:
- Blue: "No Data" (DEM value = -32768)
- Green: Height = 0m
- Yellow: Height = -1m
- Red: Negative heights (less than -1m)
- All other values are grayscale.

So, the problems I'm facing are quite obvious, I think:
- The "no data" points are almost all "water", but some bits are missing
- The green ones (0m) can be either land, or water (see the lagoons?)
- The yellow and red ones (negative) are basically water but can also be (erroneously, i think) land too!

Sincerely, I can't consider some "automated" way to do this, and some manual work is necessary. And this has to be done before interpolation/scaling (otherwise it would mess the thing up). Is there some technique to get around these easily?

I would also consider using DEM data of better quality (these are from cgiar.org), but can't find them! Any suggestions?

I'm also going to make some custom import mods (though the scale/height change will be the default 3.0m per height unit) so that the whole region renders with the desired terrain mod colours from the start (this requires making combined height/errosion/terrain mods). I'm considering three mods, the default SC4 colours, Columbus and Meadowshire. Any suggestion or wish here?

Looking forward to your replies.




PS: Mods, this is the NHP Team place, but as I couldn't find a more appropriate board I posted it here. Feel free to move the thread to a more appropriate board if you find so.

cogeo

I did it, finally. Had to fix some "wrong" pixels manually. Also had to define the "coastline" more clearly. The map is real-scale (1 city tile = 4.096 km).



The height scale for import isn't 3.0m per grayscale unit, as I had said. There is a peak at 866m above ground, so the 3.0 x 255 range doesn't suffice for the 866 (+250) height needed in the map. So this requires an (custom) import plugin with a higher ImageImportScaleFactor value.

Question: How can I get sandy beaches? The "land" and "water" tiles differ only by one grayscale unit. For getting sandy beaches, the coastline tiles must not be perfectly flat I guess, but 8-bit images can't represent such small elevation changes. Is there some way to achieve this my modifying some values in the Terrain Properties exemplar? Or maybe in SC4F?

Ennedi

If you will open Terrain Properties exemplar, you will find two properties (near the end of the list):

- MaxBeachWidth (an unit is 1 tile, default value = 3 tiles). You can give much higher value here and manage your beach size by changing the terrain height. If you will make MaxBeachWidth = 255, you will see the sand in any place in your city (not only near the water) if the terrain height will be less than (see below)

- MaxBeachAltitude (1 unit = 1 meter, default value is 1,5 m if I remember it right). It is much better to make it - let's say - 5 or 10 meters.

Some time ago I made nice dunes. I achieved it by changing MaxBeachAltitude to 100 m, but I limited MaxBeachWidth to 30 tiles. This way I was able to make sandy hills along the beach, but the sandy area was limited to 30 tiles. You can find it in my MD (go to the first page and find the "dune" theme in the Table of contents).

I think NHP thread is a good place for your question  :)

Adam
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

cogeo

Thanks for the help Adam!

I set the he MaxBeachAltitude to 5.0m and it worked!

The SC default for MaxBeachAltitude is 4.0m. With the default setting for ImageImportScaleFactor of 3.0m, a grayscale value of 83 results in a 3.0 x 83 = 249m altitude ie under the sea level of (250m) so it is considered "water". A value of 84 results in 3.0 x 84 = 252m altitude, which is above sea level, but below the 4.0m threshold, so it's considered "beach".

But for this map the ImageImportScaleFactor was set to 4.385m (to accomodate all needed elevation range), and the minimum above sea level altitude is 4.385 x 58 = 254.33m, ie sligtly above the 4.0m threshold. Setting the threshold to 5.0m makes it work.

Another "problem" is the lack of "rock" (cliff) textures. This is due to the map being 90m (and the interpolation applied). There are no grades steep enough to make the rock textures appear. I tried setting the MaxNormalYForCliff to 0.75 (default value 0.50) but this didn't work. Rock textures will only appear if the player makes some terraforming (resulting in steeper grades). But I'm not going to provide some "fix" for this (eg setting MaxNormalYForCliff to an extreme value), as this would cause the rock textures to appear where they shouldn't.

Now I'm going to make the combined Height/Terrain mods for importing the map correctly; the textures of the desired terrain mods will be appearing from the start, so players won't have to open and save each city tile, to render the region. The terrain mods I'm considering making plugins for are the SC4 default, Columbus and Meadowshire. Any requests here?

Also I'm going to include a smaller map (4x4 or 4x5 city tiles), as this map is actually a bit large (6x7), and opening/exiting a city takes some time (this might be frustrating to some players).

I'll be posting pics soon.

Ennedi

That's a really good idea, cogeo! :thumbsup: I will wait for your pictures.

As for maps made from DEM data, they are usually "softened" because of interpolation. If I would make such map, I would render it, then look at some photos of the real terrain and make a bit of hand terraforming to create relistic looking rocky walls where they should be. As I remember, some our friends from NHP made the same with coastlines and rivers. But of course it is a question of personal taste.
If you will leave the MaxNormalYforCliff at 0,77, players will not need to install the DJEM (Diagonal Jagged Edges Mod), because at this value the cliff appears if we will raise the terrain more than 13,4 m. We need height difference not less than 14 m to make a road tunnel (highway, avenue and rail tunnels are lower), and players usually create sunken highways or viaducts 14 or 15 m high (raised network tiles are 14 or 15 m high). If they need to use diagonal walls to finish their sunken highways or viaducts, they need to use DJEM to have these walls looking correctly (without "jagged edges").
Brian (Cycledogg) also wants to use MaxNormalYforCliff = 0,77 in his future terrain mods.

As for requests - maybe Italia Terrain Mod would be good too?  :)

Adam
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

cogeo

#5
Wow, i saw your reply just before starting the renders!

So you suggest setting MaxNormalYForCliff to 0.77. Well, that's easy  :). Quick ?, the MaxNormalYForCliff value is a 4-byte float, and therefore precision is 6-7 significant decimal digits. Setting the value to 0.77 in the Reader results in a figure of 0.76999998 in the properties list. Any problem with this?

Is there anything else I need to change?

As for the DEM data, this map indeed required a very different procedure to make, incl much manual work (see the first post). Not only the data are 90m, they aren't of good enough quality either. Too many zero or negative height values, which don't correspond to "water" or "land" in a persistent manner. So this required much manual work, basically defining the coastline.

And it isn't really much work to make a plugin for the Italia terrain mod, so I'm going to make it too.  :)

Ennedi

Quote from: cogeo on July 24, 2009, 05:12:47 AM
So you suggest setting MaxNormalYForCliff to 0.77. Well, that's easy  :). Quick ?, the MaxNormalYForCliff value is a 4-byte float, and therefore precision is 6-7 significant decimal digits. Setting the value to 0.77 in the Reader results in a figure of 0.76999998 in the properties list. Any problem with this?
(...)

No problem at all!  :thumbsup:
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

cogeo

Another question, the readme in the Columbus mod mentions various CP_ColumbusPlayTerrainParameters... plugins, incl. one named CP_ColumbusPlayTerrainParameters.dat (standard terrain parameters), but the installer may only install the CP_ColumbusPlayTerrainParametersForUseWithCPT_No7TreeController*.dat versions (snowcapped or not) ie only the ones for use with the CPT No7 tree controller.

Has support for the standard terrain parameters been dropped? Or othewise, where can I find CP_ColumbusPlayTerrainParameters.dat ?

Ennedi

Quote from: cogeo on July 24, 2009, 07:17:25 AM
Another question, the readme in the Columbus mod mentions various CP_ColumbusPlayTerrainParameters... plugins, incl. one named CP_ColumbusPlayTerrainParameters.dat (standard terrain parameters), but the installer may only install the CP_ColumbusPlayTerrainParametersForUseWithCPT_No7TreeController*.dat versions (snowcapped or not) ie only the ones for use with the CPT No7 tree controller.

Has support for the standard terrain parameters been dropped? Or othewise, where can I find CP_ColumbusPlayTerrainParameters.dat ?

I downloaded Columbus Terrain Mod from Simcity Kurier a few months ago when I made the DJEM - I wanted to complete all used terrain mods. This version contains an installer and it doesn't contain standard terrain parameters - exactly as you said. Columbus Terrain mod isn't available at ST and I think Simcity Kurier is the only place it is available now.

As I understand, you are going to modify terrain parameters, so maybe it isn't so important to look for old standard version.
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

cogeo

#9
OK here are the preview images.





The first row contains the large (6x7) maps, and the second row the small (4x4) ones. From left to right, SC4 default textures, Columbus, Italia and Meadowshire.

With the MaxNormalYForCliff set to 0.77, there are some rock patches being displayed.

The upload will contain the plugins for all the above 4 mods, as well as instructions for making a custom combined Height/Terrain plugin; this is actually quite simple and straightforward.

Now I have to pack it and write the documentation.

Ennedi

Great maps, very playable! :thumbsup:
Many possibilities both for port and touristic area  :)

Adam
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

cogeo

They are uploaded now!

Many thanks Adam!  :thumbsup:

dragonshardz

cogeo, do you think you could make a custom import mod for the Olympic terrain mod by Cycledogg?

cogeo

Hi again,

I'm considering making a set of new maps. These are going to be quite different though, the terrain has mountain lakes (at high elevations). This poses different requirements, both in mapmaking and modding. Till now I have only made maps using not SC4 Mapper, but instead small custom-made programs, performing the needed calculations. The output was a grayscale image file (for importing the map), later being processed using an image processing program for adding the water bodies (as the DEM files I have found contain no bathymetric data, I make progressively deepening water bodies).

Some questions:
- As the actual water level is much higher than the sea level, the usual procedures won't work (this would create extremely steep shores). The basic idea is to decrease all elevation values by the actual height of the lake surface. I would like to ask: can SC4 Mapper reduce all elevation values by a certain amount?
- Using a (8-bit) grayscale image for importing a map has one severe limitation, which is that the 0..255 range can't represent high altitudes (3.0 x 255 = 765m, and the sea level is at 250m, ie max height is 515m). This requires making custom import plugins (with a larger ImageImportScaleFactor) but this isn't problem-free either: it causes ugly-looking "steps", as a result of the effectively lower "height resolution". So, if SC4 Mapper can't reduce the elevation values by itself, I'm considering exporting the height values in a 16-bit imagefile (instead of a 8-bit BMP), which will then be imported by SC4 Mapper. My question is where can I find the specs (documents or links) of the image-files format that SC4 Mapper can import? I can generate .BMPs, PNGS or TIFFs (not geotiffs, just conventinal 16-bit TIFFs). It would be great if SC4 could import 16-bit files, but AFAIK it can't, so I will have to go through SC4M/SC4TF.
- Has anybody released maps with mountain lakes? Terrain mods might be a bit hard to adjust correctly, as at such high elevations there should "normally" be applied the high-elevation textures. This may sound "obvious", but actually isn't! As the elevations are artificially reduced, they will display the lower-elevations textures instead. However this may be actually preferable, it just may not be very nice having the mountain textures just next to the lakes' shores. But then how make them looking really like mountain lakes, and not lakes at low elevations (with some mountains around)? Don't know! Maybe a compromise between appearence and realism must be sought, only I don't know how really.
- What happens with 90m data? Except of the "rounding" problem, there is another "problem" too: as height values are calculated using an interpolation algorithm (and this is the case with both my program and SC4M) there is an awful effect (mostly apparent at steeper grades): areas about 5x5 to 6x6 tiles large, with the same grade, giving an impression of big tiles. I have considered to somehow "solve" this by adding some small random offsets to the elevation values, making it a little more "jagged". But in a 8-bit image (and with a large ImageImportScaleFactor) the effect won't be nice. Can SC4M do this? If not it would be a nice addition.
- And something else: if you want the map to be to scale, doesn't the resolution depend on the latitude too? A map that is said to be "90m" should actually be 90m only near the equator. To my calculations, at say 41°N those "90m" geotiffs are actually about... 70m! (and this gets even smaller as you move closer to the poles). My last map was made with this assumption. Does SC4M do this automatically? Or maybe I'm wrong?

I would greatly appreciate your help.

cogeo

Hi again,

I have completed two of the 4 maps I'm planning to make. Here are some preview images.




The first map is 4x4 large and the second one 6x5.

I have not used the SC4 Mapper, as they reqyure special processing. Eg the lowest elevation is actually quite high (eg 623m for the one map and 841m for the other) - I just decreased all elevation values by the above amounts. Thus the ImageImportScaleFactor values didn't need to be increased a lot, just to 3.3 and 3.92 respectively (as opposed to the default 3.0), which is very acceptable.

The maps have relatively little flat terrain, ie they are quite challenging to play, but offer good landscaping possibilities.

I'll make the two other maps in the next few days.

cogeo

#15
Hi again,

I have completed the other two maps of the pack. Here are some pics:



Now I have to finish the readme and package them.

As the textures are quite well applied, it seems that no height/temperature adjustment will be needed.

I have a question: is there some way to perform an initial smoothing (during rendering)? Can I use the erosion feature? It was said to cause land to be lost to water, but I'm not sure if this really stands. Any other ideas?


Scarton

These maps look good!  :thumbsup: Great job!

cogeo

@citycapitalizer: Thanks!




The map pack is now complete and available for download.




I'll have to decide what's comes next now.

Maybe another "Greece pack", but with towns or cities this time. I would like to make it 16-bit. However it would be best to write a small program for exporting the DEM data, to automate the process somehow.

As SC4 can't import 16-bit directly, I'll have to go through SC4TF/SC4M. What kind of images can these programs import? I mean 16-bit is a value in the 0..65535 range. Is this in meters (or in any other subdivision, or )? And then how is this affected by the scale factor?