Not logged inOpenClonk Forum
Up Topic General / Help and Questions / Map.bmp doesn't work anymore
- - By Andriel Date 2012-10-27 11:14
I created a new scenario and edited the Map.bmp in GIMP. It always worked fine but yesterday I edited it again and now the map is not taken as a map by the scenario anymore, there is just earth and sky. If I copy any other map into my scenario, this map works. So I thought maybe GIMP screw up my file. I looked at the properties and saw that my map was 24bit while the ones from the original scenarios were 8bit. I tried to save my map as 8bit with Windows 7 default bmp editor, and the map worked again. However, the conversion changed the colours of my map and so all the materials were wrong.
I downloaded Pixelformer, a bmp editor and saved my map as 8bit, none of the colours changed. But the map just does not work again at all. What am I doing wrong?
PS:
When I start the scenario, in the console there is no "Map.bmp invalid" or something like that. OC appears to just don't find the file.
Reply
Parent - - By Newton [de] Date 2012-10-27 14:22
It sounds to me that you have no idea how the Map.bmps actually work. Granted, the documentation is not exactly elaborated on that matter. Since you know German:
This is a bit outdated, but may help you otherwise - http://www.cc.striver.net/texts.php?action=sh&id=7
Parent - - By Ringwaul [ca] Date 2012-10-27 19:07

>It sounds to me that you have no idea how the Map.bmps actually work.


This is pretty much true of me, too.

I had a lot of trouble getting my Map.bmp files to work properly. I have successfully done it multiple times in GIMP, but I have to keep .xcf files of each, otherwise they get 'corrupted' and have the same result as Andriel is having.

I've always wanted an "Export Landscape" button in the editor so you can easily design maps in the engine, without having to save scenario/pick out landscape.bmp/delete scenario.
Reply
Parent - By Andriel Date 2012-10-27 19:35
My fix is the following: I opened the corrupt map with pixelmaker and copied everything to clipboard. Then I created a new blank map with the same dimensions in eclipse, opened it with pixelmaker and just pasted my map over it. Now it works again.
Reply
Parent - - By Newton [de] Date 2012-10-28 00:01
the documentation is pretty shallow on that, as I said. Basically, the Map.bmp is a bitmap with a 256 color palette. Each index in the palette stands for a material-texture combination as it is defined in the TexMap.txt.

From the texmap:
# Static Map Material/Texture Table
# Index +128 for underground materials
10=Tunnel-tunnel
11=Tunnel-tunnel
12=Tunnel-brickback
13=BrickSoft-brick1
...


So everything painted with index 13 from the color palette will be bricks with the texture brick1. Everything painted with index 141 (13+128) will be the same but if blasted free there will be tunnel behind it.
Parent - By PeterW [gb] Date 2012-10-28 12:54
You can find out which palette index a color is by opening the "color map" window in Gimp. The "color index" mentioned there is exactly what the engine will look for in the TexMap.txt. To reiterate - the color itself doesn't matter at all, the index is what decides what the engine will put into the landscape.

If you want to "fix" a map that has gotten its palette screwed up (or is 24-bit or whatnot), convert it to 8-bit, then use "rearrange color-map" to move the color you want to stand for some material to the right index. Don't forget to add 128 if you want it to be digged up to be Tunnel, as Newton explained.
Up Topic General / Help and Questions / Map.bmp doesn't work anymore

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill