• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Simgiov

Corporal
15 Badges
Feb 22, 2011
30
4
  • Cities in Motion
  • Cities in Motion 2
  • Europa Universalis IV
  • Crusader Kings II
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Prison Architect
  • Imperator: Rome Sign Up
So, from the modding wiki we know "Heightmaps are required to be of dimensions 1081px x 1081px, recommended to be in grayscale 16-bit .raw or .png formats."
But a very important information is missing: how many meters is a pixel?
I'm trying to create real world maps with GIS software, keeping them in 1:1 scale is very important, so that info is really needed!
 
5x5 square is the playable area, but there is still an area outside of that...
cLpXAPJ.png
 
5x5 square is the playable area, but there is still an area outside of that...
cLpXAPJ.png

Hmmm...
It looks like there are 2 tiles between the edge and the playable area.
In that case 18 000/1081=16.65
1px=16.65m
4v2rkx.jpg


Obviously this picture is not 100% accurate, but it would make a lot of sense if the whole map (including the edge) is equally divided to tiles.
 
So, from the modding wiki we know "Heightmaps are required to be of dimensions 1081px x 1081px, recommended to be in grayscale 16-bit .raw or .png formats."
But a very important information is missing: how many meters is a pixel?
I'm trying to create real world maps with GIS software, keeping them in 1:1 scale is very important, so that info is really needed!

Heightmap resolution:

Let’s say we set up a terrain with the dimensions of 1000 x 120 x 1000m.

So on our terrain each pixel of the heightmap will represent:

257px heightmap resolution: 1px = 3.9m x 3.9m
513px heightmap resolution: 1px = 1.95m x 1.95m
1025px heightmap resolution: 1px = 0.98m x 0.98m

Common resolutions for a heightmap in Unity are 257px / 513px or even 1025px.

I sent a pm the devs to get clarification on what Heightmap resolution the editor was using:

Original post: http://forum.paradoxplaza.com/forum/showthread.php?822199-Cities-Skylines-%96-Dev-Diary-6-Map-Editor&p=18842571&viewfull=1#post18842571

The answer: Confirmed 9x9 with 1081x1081px ... with the following which had NO answers to most of my questions

The terrain system is not the one from Unity (the default terrain script) but a custom one our programmer has done for Cities: Skylines, even though it seems similar on the surface level. The height resolution is based on the 16-bit greyscale image (you can use 8-bit but the resolution isn't accurate enough to produce nice enough detail and/or smoothness).

What comes to the terrain textures and their modifications: the textures are linked to the themes and a multitude of other variables such as the color, intensity, height and angle of sunlight and many, many more. Now, I am not a programmer so I can't really officially and with enough know-how say how much of this is moddable and/or how skilled the modder needs to be to access and change these things, especially since altering one could have a drastic impact on how the others look and how the theme as a whole looks.


My guess is that it's a pretty low resolution, guess it will have to be trial and error ;(

cheers ;)
 
Last edited:
So 18/1081 = 16.65m per pixel on greyscale map if my maths is right?

and if game squares are 8mx8m like i read then 1 greyscale px = 4 ingame.
 
Last edited:
Where can you even find heightmaps? all I get when I search is maps for specific games like Open TTD, fancy programs I don't understand and the USGS website with some complicated downloadable DEM zip files
 
Where can you even find heightmaps? all I get when I search is maps for specific games like Open TTD, fancy programs I don't understand and the USGS website with some complicated downloadable DEM zip files

Governments usually have a division (don't know what it is called) that makes maps. For an example this site has high quality height maps of the whole Finland! If you don't see the heightmap click "karttatasot" on the left, then "korkeus" and check the "vinovalovarjoste 10m DEM" box. Now this is not really good since hills casts shadows. Other countries should have similar services.

This NASA website has heightmaps of the whole world! But the problem is that the pictures are too low resolution
 
Last edited:
Where can you even find heightmaps? all I get when I search is maps for specific games like Open TTD, fancy programs I don't understand and the USGS website with some complicated downloadable DEM zip files

LOL ... check this out: http://www.terrainmap.com/rm39.html

free apps to process the data can be found at the bottom of the page ... will give you a headache the first time around, but after that it's a breeze ;)
 
You can also make your own in world machine and (i think) Terragen.
World machine has a free version where you can export in 513x513 grayscale. I'm just using that and up-scaling outside the programme. Hope it turns out ok.
 
Last edited:
Hello guys.

I want to create a map of my hometown.
I found only one map that I think can be good to import it to the game and creat a map from it.
But I have a bad feeling that this is not very good. Where can I get some decent maps of some regions ? Or of some cities ?
Kosice.jpg
 
Last edited:
To me it's strange if 1081 x 1081 is the exact and only resolution supported by the map editor. A very odd number producing an inexact scale... 18,000 m/1081 = 16.65124884366327... metres per pixel as others have noted. Edit: Misunderstanding corrected in a subsequent post!

It's not a problem just strange why that particular resolution was chosen. Why not exactly 16 metres, or 10 metres per pixel?

I'm not sure if people are aware but the USGS has released 1 arc second (approximately 30 m at the equator) DEM data for much of the globe. The US has higher resolution data (they have up to 1/9" the lucky bastards!) and other countries probably also but this is good free source for many other areas.

Super high resolution DEMs (< 1" resolution) can be problematic in some ways, particularly in urban areas. This is because the raw DEM data is influenced by surface structures and trees causing unnecessary roughness that you probably don't want expressed in a height map for CSL. For instance for a thick stand of closed canopy trees the DEM is sensing the top of the canopy rather than the surface and this increases surface roughness and discontinuities in the height map. Very built-up areas such as city CBDs are particularly affected. Some people go to great lengths to try to remove these influences from DEMs for certain environmental applications because they want to model the slope and aspect of the surface as accurately as possible without undue influence by surface features (such as modelling fire spread). These effects are reduced (though not completely absent) in courser DEMs.

Given that the 1" data is about 30 m but the map editor supports 16.67 m, valid interpolation or "super sampling" is recommended during projection. I've done some testing and gotten some pretty nice results using the 1" SRTM source. For the case of higher resolution data, 1/9" (3 m) DEM is a bit of overkill because it's only going to be down-sampled to 16..667 m anyway, but 1/3" (10 m) could be a good option (I plan to look at this soon).

If anyone wants me to do an area send me the 1" .bil grids (zipped as downloaded) that cover your area of interest from http://earthexplorer.usgs.gov/ and the central coordinate of your area of interest and I'll send you the converted PNG in 16-bit resolution and the correct scale (16.67 m/pixel in X and Y). I won't trim the image file to exactly 18 x 18 km because you can do that in any image editor to focus the image exactly where you want to build. When selecting your area of interest in the viewer make sure the red rectangle around your location covers at least 25 x 25 km so that the required grids will be listed.
 
Last edited:
Where can you even find heightmaps? all I get when I search is maps for specific games like Open TTD, fancy programs I don't understand and the USGS website with some complicated downloadable DEM zip files

Earth Explorer is indeed a pain in the arse but not too difficult. You need to register to download the files but registration is free and easy. I like the SRTM data but there are other higher resolution sources, particularly for the US.

At Earth Explorer set up an area of interest by zooming into where you want or entering lat/lon coordinates. Select Elevation Data/SRTM/1" SRTM Global product and download map tiles either in .bil, GeoTIFF or I think ASCII grids. .bil format has much smaller files (much more efficiently packed) but you typically need GIS software to work with it. I prefer it because of the small file sizes.

QGIS is a free GIS package, as is GRASS which can let you view and edit the maps, while Arc Explorer (or Reader) lets you view data but not edit them. There are loads of other DEM viewers but I recommend getting something like QGIS for free and learning how to project data (and why) because this may be necessary for the CSL Map Editor.

Be aware that editing spatial data can be a can of worms and not really recommended if you don't know what you're doing. There are typically good, better, best and just plain wrong ways to go about things depending on what you're trying to do and why. I'm a stickler for accuracy so I always choose the most accurate (typically most computationally demanding) method! :p Not knowing what you're doing or having much experience might give you acceptable or even good results if you're lucky but at worst it could be completely wrong. Transforming and analysing spatial data can be extremely technical and it's a career for a lot of people. You also need to understand things like file formats; how to write the files that satisfy your target application and its requirements.
 
Last edited:
Here's my example height map for the map editor. First a colour shaded relief map and then the height map in 16-bit greyscale PNG. Note that colours are stretched over the entire image. I'm not sure if this matter but the relief is approximately 805 metres (0 - 805m). I have a 10 metre resolution map at 3,600 x 3,600 resolution but it was too big to upload to Imgur and is probably overdoing the quality of the source anyway.

Note you'll obviously have to connect the river through the starting tile in the map editor!

PS. The relief is taken from Lower Hutt in New Zealand.

6NlzhjJ.jpg


Sorry, I think Imgur has down-sampled the bit depth. Let me get back to you!

PPS: Not even photo-stream lets me upload 16-bit images!
 
Last edited:
To me it's strange if 1081 x 1081 is the exact and only resolution supported by the map editor. A very odd number producing an inexact scale... 18,000 m/1081 = 16.65124884366327... metres per pixel as others have noted.

But it's a nice neat division by map tiles (120px per map tile), with one extra pixel to kind of hide the seam.
 
This is from the skylineswiki.com
"The game attempts to convert RGB and RGBA images to grayscale whenever possible. It and also supports 8-bit images. However, the precision of 8-bit images is so low that they will create noticeable steps in slopes instead of looking smooth, which is why 16-bit images are preferred instead."

Does that mean that i can either use a black and white heightmap, or a colored like the one Simon posted?