• Welcome to SC4 Devotion Forum Archives.

SC4Mapper 2013 Version Support thread Version 5!

Started by wouanagaine, January 13, 2013, 11:19:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andisart

Thanks for your quick reply, wouanagaine.

I think I wasnt very clear, so let me try to rephrase it:

I'm creating a region for Skyrim. I have a grayscale that I used to render the region ingame, but need to make manual adjustments (god mode) to the geography all over the region to make it accurately looking. To make this process easier I would like to start off with only large city tiles on the map. Later on though, I need to have a different city tile layout (as described earlier).

This is where SC4M comes in: I would like to use it to change the layout of the city tiles after I altered the terrain, but I am not sure if I can save over the existing file without a problem or if I have to save as a new region. And if I have to save as a new region, will SC4M generate an exact copy of the geography, including all the finetuning I made I made in godmode? (I wouldnt want any tweaking or changing happening in the process).

Thanks again.
AndisArt


wouanagaine

ok; things are clearer

The best way to do what you want is to save as a new region ( even if save as the same region will work ) but at least you get a backup copy  (provided you have load from the SC4 region you  tweaked in god mode)


New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

andisart


wouanagaine

V5b has been uploaded to the LEX
It fixes some minor bugs and one major bug that upon overwriting a region folder prevented you to cancel the action

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

Piohchioh

#64
Need help with this. I installed the mod, but whenever I try to load a region, a pop up window appears quickly and then disappears (no idea what it says because it happens too fast) but the map doesn't load. The main window of the program remains perfectly gray. No message that the map is loading or anything. When you click on the Load Region button, the pop up window shows me the contents of my Regions folder. So, I don't seem to have a problem with that. It's after I choose a folder when the problem starts. I'm trying to load the NHP Matinenda.sc4m and Lucerne.sc4m maps to no avail. I've tried running the program in admin mode and XP compatibility mode but still no cigar. I appreciate your help.

BTW, I'm on Win7 64 bit.

wouanagaine

couple of stuff:
-What OS are you using ?
-Which version do you have ( it is stated in title window ) ?
-Can you run a console windows and run the SC4Mapper_debug.exe version and paste the output of the program when it failed to load ?


New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

Piohchioh

Quote from: wouanagaine on February 27, 2013, 10:35:52 AM
couple of stuff:
-What OS are you using ?
-Which version do you have ( it is stated in title window ) ?
-Can you run a console windows and run the SC4Mapper_debug.exe version and paste the output of the program when it failed to load ?

- Win7 64 bit
- 2013.5b
- see below:

Piohchioh

#67
Just an update. I seem to be able to load Maxis maps and an older custom map (just jpg and config.bmp) with no problems. It's the sc4m files that I'm having problems with. It's quite possible I'm doing something stupid here but can't figure it out. I've never used this mod before.

Piohchioh

Ok, I just figured this out. I was being stupid. I didn't realize I was supposed to push the Create Region button instead of the Load Region button. It seems to work. Thanks!

wouanagaine


New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

Alex@

Hi.

Using 2013.5b and having some issues.

First of all, I don't understand the usage of 16 bit grayscale. No software seems to support this format. Why not just using 24bit?

If I export a map as 16 bit grayscale, the line between water and land is around grayscale color 5. When I import my own created maps as grayscale image, the water line seems to be around color 84, which means the image has to be a lot brighter than when using 16-bit grayscale.

The next issue I'm having is that import of RGB files doesn't work at all. It doesn't do anything, even with very small maps. It just says "Loading RGB" - "Please wait while loading the region". The debugger says nothing but "AttributeError: tile with both png and bmp files.

Besides that, it's a great software.

I'm using Win7 64bit.

wouanagaine

Quote from: Alex@ on March 07, 2013, 06:51:41 AM
Hi.
Hi Alex

Quote
Using 2013.5b and having some issues.
Let's try to fix them :)

Quote
First of all, I don't understand the usage of 16 bit grayscale. No software seems to support this format. Why not just using 24bit?
16 bits means 16s bit of grayscale ie 65536 values, with 0 beeing black and 65535 beeing white
I have the feeling that you are talking about 24bit as 8bit Red 8bit Green 8bit Blue which is not at all the same format
16bits greyscale is supported in photoshop and gimp AFAIK

Quote
If I export a map as 16 bit grayscale, the line between water and land is around grayscale color 5. When I import my own created maps as grayscale image, the water line seems to be around color 84, which means the image has to be a lot brighter than when using 16-bit grayscale.
see my above reply, in 16 bits grayscale the image is much less bright than in 8bit but also much more precise than 8bit gray. and if you load the export 16bit png in a software that doesn't handle it correcly it will convert to 8bit and show the exact behavior you're describing


Quote
The next issue I'm having is that import of RGB files doesn't work at all. It doesn't do anything, even with very small maps. It just says "Loading RGB" - "Please wait while loading the region". The debugger says nothing but "AttributeError: tile with both png and bmp files.
Can you upload the file you're trying to import as RGB so I can have a look ?
Can you also try to load the doc/Amarco.png as RGB ? it should load correctly


Quote
Besides that, it's a great software.

I'm using Win7 64bit.
Thanks

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

Alex@

Quote from: wouanagaine on March 07, 2013, 12:36:40 PM
16 bits means 16s bit of grayscale ie 65536 values, with 0 beeing black and 65535 beeing white
I have the feeling that you are talking about 24bit as 8bit Red 8bit Green 8bit Blue which is not at all the same format
16bits greyscale is supported in photoshop and gimp AFAIK
I'm aware of that but none of my photo editors supports 16-bit grayscale png and bmp. A search on the internet reveals that hardly any program supports this, meaning it's probably not an official part of the png and bmp definitions.
My main editor is Corel Photopaint.

Quote from: wouanagaine on March 07, 2013, 12:36:40 PM
Can you upload the file you're trying to import as RGB so I can have a look ?
Can you also try to load the doc/Amarco.png as RGB ? it should load correctly
It's really any bmp file, including the ones you can export with your software. But I can't make a "clean" bmp 16bit grayscale, if that is the format that is expected.

About all this conversion: if it is such a problem for people to find an image software editor that can save the rigth format - and you apparently can resize them in the software - one solution could be that you converted the file with the software. So that people can upload 8-bit or 24 bit grayscale images in the .png or .bmp format.

wouanagaine

For png :
I don't think there is a 24bit per channel format , it is either 8bit or 16bit per channel
the 16bit format used in SC4Mapper/SC4TF is a one channel forrmat. It was selected to give the maximum precision at the time I created SC4TF ( circa 2007 ) and that by that time photoshop already supported it

As for RGB I really don't understand why you can't import the one exported from SC4Mapper :(
Quote from: Alex@ on March 07, 2013, 01:53:38 PM
It's really any bmp file, including the ones you can export with your software. But I can't make a "clean" bmp 16bit grayscale, if that is the format that is expected.
Your last sentence makes me think you don't understand the difference between RGB, png, 16bit, and bmp ( or due to not be american/english born I might not understand you correctly )

RGB in SC4Mapper means any image that is in a 8bit per channel, 3 channel format ( ie 24 bits ), that means png, bmp, jpg ie almost any picture you can find nowadays, but to be able to use it the R G and B values are restricted to some values of the whole scope. I think I put the algo at the end of the readme ( and the amarco.png in the doc folder follow that scheme )

Quote
About all this conversion: if it is such a problem for people to find an image software editor that can save the rigth format - and you apparently can resize them in the software - one solution could be that you converted the file with the software. So that people can upload 8-bit or 24 bit grayscale images in the .png or .bmp format.
using 8bit greyscale was what was done before SC4TF/SC4Mapper area, people uploaded 8bit grayscale jpg on the STEX and it lacks precision ( only 256 different values for one pixel means only 256 different height value in your map )
then people mixed things and uploaded 24bits jpg that looks gray because R=G=B in the file and SC4 can't load that . but SC4TF and SC4Mapper can handle them using the 'greyscale image'; it convert 24bit image to 8bit gray but still leads to 256 values ie poor maps

then as SC4 used "float" to represent the heights, I created SC4M format to handle 16bit ( 65536 values, means 65536 different heights in your maps ) and as 16bit greyscale png format was already there  I handled it also

as for uploading maps, to upload with best quality with best size it is either SC4M or 16bit greyscale. then RGB
I doubt anyone is interesting in 8 bits grayscale nowadays ( unfortunatly MAC user are stuck to 8bit but as soon as someone make SC4Mapper availeble on MAC it will be a thing of the past )

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

dobdriver



G'Day Alex and Wouanagaine,,

A good alternative to photoshop to deal with 16bit pngs is this:

Photoline

It is a 64bit proggy and almost similar tools to photoshop, it is not free but far cheaper than photoshop, it is shareware.

There are very few programs that support 16bit png files and all but the one above are hellishly expensive. eg photoshop is $1000 US.


Alex as Wouanagaine has pointed out 16bit png format uses 65535 distinct shades to represent an image in a single channel. Each shade equals 100mm of height difference in SC4. As you have already noted sea level in a 16bit image is about 3.5%. It allows mapping to a real height of 6303.5m asl in 0.1m steps.

Your greyscale images being 8bit, sea level is about 33% and use 256 shades to represent an image. Each shade is equal to 3000mm or 3m of height in SC4. It only allows mapping to a real height of 518m asl in 3m steps.

If you are making grey images with with values as you mentioned eg sea level = 84, the image is still a colour image but you should use "Grayscale" to import it into mapper.

Colour images use 3 channels and are often called 24bit, this is not really the same measurement as 16bit greys. (It panders to the human love of everything bigger must be better). It is in reality an 8bit image made up with the three channels R, G and B and hence 24bits.

The use of the RGB importer in mapper is for a specific colouring of  a .bmp (not jpg, not png or any other format) image developed by Wouanagaine and Moganite and is used in conjunction with global mapper. It uses very specific colour values in the image to map it to the equivalent grey image.


This is how an RGB image looks.

Cheers
dobs



wouanagaine

Thanks for the clarification Dobs

Showing pics is more than a thousand words :)

Alex I hope it makes it clearer to you

Quote
The use of the RGB importer in mapper is for a specific colouring of  a .bmp (not jpg, not png or any other format) image developed by Wouanagaine and Moganite and is used in conjunction with global mapper. It uses very specific colour values in the image to map it to the equivalent grey image.
In fact you can use any picture format that is lossless, bmp is, png can be and jpg is not.
I think that making the amarco RGB as png leads to the confusion





New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

dobdriver



Oh cool. I never realised png could be used for RGB as I always used bmp.

I never tried out any of your sample images Wouan ;<), just beat my head against a rock until I got it all going  :D :D :D


Cheers
dobs

Alex@

I use Corel Photopaint which comes from Corel Draw package that is one of the most used image editors for MAC when it comes to professional work.

Thing is, it doesn't support 16bit grayscale for png and bmp files, as those are not part of the official definitions for those two file types.
I can however choose 16bit grayscale for other formats, such as tiff, cpt (Corel format) and psd (Adobe). I can also choose 48bit RGB, which should probably give me 16bit grays as well. Again, I can't export this to the proper fileformats.

If and when i export a map from SC4mapper, I get a very dark 16bit grayscale image. Waterline is around 5-10 of 256 gray colors. This leave little space for water and a lot of space for heights. But when I use grayscale 8bit, sea level is gray 83-84, which only leaves 2/3 left for heights (85-255).
What I don't understand is why the images aren't the same colors. No matter if I have a 8-bit or 16-bit grayscale, 0 should be the deepest waterlevel and 255 or 16536 should be the highest (which is 5000m as I know).
Now, that would give some rough maps with 8-bit grayscale as you only have 249 variations to do this. But the way it's made now, you also can't make grayscale maps that are more that aprox. 1000m heigh.
But the way it's done now, I only have color 84-255 (171 levels) to make that 1 km, where I could have had 10-255 available (245 levels). this is what I don't understand.

However to me it doesn't matter much. I'm making a map over Denmark where I can cut out bits to make 1:2 maps and as our highest point in Denmark is 173m above sealevel, it's not a big issue. I know I can change the highest level in the importer, but that just makes it even more confusing. My biggest problem is really that my screenshots are a bit to rough, which gives square coastal lines.

Swordmaster

As far as I know, 16 bit grayscale is native to PNG (source).


Cheers
Willy

wouanagaine

#79
waterlevel is in fact 250m above absolute 0 in sC4, that is why you have a 83/84 grey value in 8bit.
The way SC4Mapper use 8bit grayscale is the same as SC4, so it is more Maxis that defined it than me :)
Like you I really don't undestand why Maxis 'waste' 83 level of gray of underwater when you can only see 20/30m deep

And yes as Willy said, 16bit grayscale are part of PNG standard

Quote
If and when i export a map from SC4mapper, I get a very dark 16bit grayscale image. Waterline is around 5-10 of 256 gray colors.
You should never use 16bit as 8bit, I hope you understand the massive amount of information you loose when doing so

In SC4Mapper, internally I make use of 16bit, this means I have 65536 values to use. At the time of making SC4TF I took the decision that 6000m will be the highest thing to be possible, which leads to having a factor of 0.1 between 16bit and 'real height in meter', so 1 delta in 16bnt means 10cm.  (I waste 5536 values, but that is not problematic )
so as water is at 250m in SC4, that means the gray level in 16bit is 2500 which is like you found around 4% of the 16bit range, which in 8bit will go to value 9 or 10, which is far away of the standard 83/84 value

2500/65536 = 0.03814
0.03814 * 256 = 9.7

For 8 bit, in sC4 or SC4Mapper you can define what delta factor will be applied on importing ( the sC4Mapper import dialog have a range ofav  predefined values that matches old SC4 Terrain/Import mode ). It tells SC4 or SC4Mapper what 1 delta in grey means in meters, the standard is 3, which means 1 delta = 3 meters, hence why you find a grey level of 83 for waterlevel  (83*3 = 249 ) and you can have a map not highest than 255*3 = 765

So to sum up, 8bit = you're usually stuck with a 3m height precision, and up to 765m, while using 16bit, you have a 10cm precision and can build up to 6000m
That is why in SC4 when you 'import a 8bit region' it runs a lot of erosion simulation so that it 'smooth' the terrain and you don't really see the 3m precision
(my NoErosionMod on STEX was made to remove the erosion simulator on import http://community.simtropolis.com/files/file/15347-noerosionimporting/ )

In other words, I can't make an 8bit export option, because that means,
either I need find the highest point in the map, divide by 256 and export which usually means a different factor than in SC4
or I use the 3m factor, and eveyrthing above 765m will be clamped to 765m

Both options are useles IMO, so I didn't bother coding such an export ( and at that time, everybody was already creating 8bit maps, no need to export as such )

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4