SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: DJSun1981 on December 04, 2010, 11:59:35 PM

Title: Grayscale - Image
Post by: DJSun1981 on December 04, 2010, 11:59:35 PM
I want to make a grayscale - Image for the SC4 Mapper, but i dont know the hight and the colors.

Ok, I know: 000000 = black = deep water and ffffff = white = the highest mountain.

And for normal regions, I would like to know the other letters and the hight in the game.

Is there everywhere such a list available and pictures, wich i can make a grayscale for simcity 4 easy?

Thank you for your help!
regards DJSun
Title: Re: Grayscale - Image
Post by: Lowkee33 on December 05, 2010, 07:14:23 AM
Perhaps this picture can help? Link (http://www.dylanfisher.com/blog_images/hex_grayscale_001.gif)

Not my area of expertise, but it looks like as long as the RGB values are the same then the color is gray.

However, I do know that this will make for a low resolution image.  Newer grayscale maps are often done as 16 bit (?) pngs, and are often all black as far as the eye can see.

There is also SC4Terraformer out there, and you can map in a 3d environment.
Title: Re: Grayscale - Image
Post by: DJSun1981 on December 05, 2010, 09:01:50 AM
@Lowkee33
This RGB helps me a little bit, i could made a grascale - image with water and slow land.

I know about the SC4T, but its easier for me to make a map with a paint - program, i can imagine it easier with a map, wich i made by myself.

Now, i have another problem: How can I make big maps without the SC4T. Ok, I can make big maps for the region, but all things, wich I made with the SC4Mapper move away, when I open the region in sc4, when i change the config.

How can I change the maps for the region without the SC4Mapper and keep the map, wich i made with the grayscale and SC4M.

The SC4Mapper just create little maps.

For example:
I made this picture with grayscale (gimp) and SC4M:
http://img543.imageshack.us/img543/2855/ozeanien.jpg
Title: Re: Grayscale - Image
Post by: cogeo on December 05, 2010, 09:15:24 AM
The term "grayscale image" may refer either to a real 8-bit grayscale image (palette-based or indexed) or to an RGB one with all three colour components set to be the same (ie red=green=blue), and these are different formats. Both formats can be imported by the game and SC4TF/SC4M, however as all these programs treat the latter as a grayscale one, the extra two bytes per pixel are a waste of space.

So by importing a region by using an image, you have only one-byte-wide values to represent elevations. The elevation is determined by multiplying the grayscale value by the value of the ImageImportScaleFactor property in the "Terrain Properties" exemplar, which is by default set to 3. So a grayscale value of 0xA0 (=160) would give an elevation of 160 x 3 = 480m. The SeaLevel property is set to 250, so this elevation corresponds to 480-250 = 230m above sea level.

It is quite clear that using grayscale images to make maps poses two major limitations:
- A grayscale image can only represent elevations that are multiples of 3.0 eg 270m, and then the next possible elevation is 273m. So all intermediate values are rounded to the closest multiple of 3.0, and this causes the "steps" effect.
- The maximum value that can be represented by a byte is 255 (0xFF). This poses a limit for the max elevation, which is 255 x 3.0 = 765m, ie 515m above sea level. This is a quite low elevation for a mountainous map. You can install a mod that changes the ImageImportScaleFactor property, also known as a "Height Mod". This will increase the max possible elevation (by increasing ImageImportScaleFactor), but also has an unwanted effect, which is to exacerbate the "steps" effect.

As Lowkee said, consider using SC4Terraformer instead (or 16-bit PNGs, if you can edit them). These use two-byte-wide values to represent elevations. The accuracy is 0.1m, ie these data directly represent elevations, in 1/10-nths of a meter. So a value of 0x0B80 (=2944) corresponds to an elevation of 2944/10 = 294.4m, or 44.4m above sea level.
Title: Re: Grayscale - Image
Post by: wouanagaine on December 05, 2010, 01:51:28 PM
I couldn't have explained it better :)


Title: Re: Grayscale - Image
Post by: DJSun1981 on December 25, 2010, 10:00:26 PM
Quote from: cogeo on December 05, 2010, 09:15:24 AM
The term "grayscale image" may refer either to a real 8-bit grayscale image (palette-based or indexed) or to an RGB one with all three colour components set to be the same (ie red=green=blue), and these are different formats. Both formats can be imported by the game and SC4TF/SC4M, however as all these programs treat the latter as a grayscale one, the extra two bytes per pixel are a waste of space.

So by importing a region by using an image, you have only one-byte-wide values to represent elevations. The elevation is determined by multiplying the grayscale value by the value of the ImageImportScaleFactor property in the "Terrain Properties" exemplar, which is by default set to 3. So a grayscale value of 0xA0 (=160) would give an elevation of 160 x 3 = 480m. The SeaLevel property is set to 250, so this elevation corresponds to 480-250 = 230m above sea level.

It is quite clear that using grayscale images to make maps poses two major limitations:
- A grayscale image can only represent elevations that are multiples of 3.0 eg 270m, and then the next possible elevation is 273m. So all intermediate values are rounded to the closest multiple of 3.0, and this causes the "steps" effect.
- The maximum value that can be represented by a byte is 255 (0xFF). This poses a limit for the max elevation, which is 255 x 3.0 = 765m, ie 515m above sea level. This is a quite low elevation for a mountainous map. You can install a mod that changes the ImageImportScaleFactor property, also known as a "Height Mod". This will increase the max possible elevation (by increasing ImageImportScaleFactor), but also has an unwanted effect, which is to exacerbate the "steps" effect.

As Lowkee said, consider using SC4Terraformer instead (or 16-bit PNGs, if you can edit them). These use two-byte-wide values to represent elevations. The accuracy is 0.1m, ie these data directly represent elevations, in 1/10-nths of a meter. So a value of 0x0B80 (=2944) corresponds to an elevation of 2944/10 = 294.4m, or 44.4m above sea level.

Thanks for the explanation. With one sentence: I should use the SC4 Terraformer.