Hi all,

Since the Slitherine forum won’t allow a noob like me to post spammy pictures I’ve copied the post here ..

 

I’ll try to give a quick run down on how to prepare the campaign maps. It’s not difficult or complicated but Photoshop makes it a pain in the backside. Maybe its easier with Gimp or some other tool because it’s Photoshops colour profiling that makes things awkward. I had long discussions with Adobe people about it but, while they were very helpful, their response was .. that’s the way it’s meant to work.

So if you’ve done any texturing work you’ll understand the principal of using texture channels for things other than colour. ie. RGB can be used for things other than Red, Green and Blue. They can represent the glossiness, height, opacity, normals etc.. Well the campaign maps work the same way. There are three bitmaps that make up each map. The first two are basic colour maps that you see on screen, each coloured to represent one side of the conflict. I won’t discuss these here as you can approach that however you like.

The three bitmaps.

It’s the third, the CampaignDisplayMap, which uses its channels to define the different areas on the map, that needs some explanation. Again most of the process of creating it is down to you and your choice of software.

The RGBA channels are used for

R – Used to define the areas. Solid black and white. No anti Aliasing.
G -Contains the selection outlines. So when you mouse over an area and you see the pink outlined edging, That’s defined here. You can create this while you’re making your main map images.
B – Not used.
A – The greyscale values here (0-255) are used to give each area a number. This allows the game to know one area from another so you’d fill the first area with 0 the next with 1 then 2 and so on in some kind of order. These numbers are referenced in the .dat file but I’ll leave that to Richard to explain. (no anti aliasing.)

The R, G and A channel. I've increased the contrast in the A so its more obvious

If you’re signed up for Photoshop then I need to outline the dificulties with the Alpha since this is the most crucial element you won’t figure from just looking at the files.

Problem : When assigning greyscale values, Photoshop doesn’t support 0-255 .. you can only input percentages .. 0-100.
Solution : Use the RGB values instead. eg. (1,1,1) (130,130,130) (5,5,5). Create the image in a regular RGB document and then copy/paste it into the A channel of the final map.

Problem : Copying RGB values into a greyscale channel forces Photoshop to use a colour conversion profile. Unless you’re using some kind of linear profile (which is very unlikely) then these conversion profiles do not match 1:1 on a straight line. ie 128,128,128 RGB does NOT map to 50% grey. It will depend on the colour profile you’re using. The result is that Photoshop won’t give you a 128 value of grey (its often 1 or 2 points out) and adds dithering to your solid colour. Noise.

An example of the kind of noise Photoshop will introduce with incorrect colour profiling.

Solution (Partial) : In your Colour Profile, if RGB is set to sRGB .. ensure your Gray profile is set to sGray. RGB and Gray have to use the same profile. By default they don’t.

Problem : This works for the lower end, the blacks. Its probably ok for the first 30 values which should be enough but you’ll still get noise in the higher values – the white space.
Solution 1: Paint out the noise. This is more awkward than it sounds since it’ll be near impossible to tell a 254 pixel surrounded by 255 pixels and automated noise reduction tools make it worse.

So the trick is to use a levels layer adjustment to compress the colour range to something you can see. Then paint 255 over the noise. This can also be used to paint any of the black areas that have noise but you’ll have to set the sampling/inkdropper tool to sample the correct value from the underlying layer. Tell it to ignore the affect of adjustment layers from its drop down. The chances are you’ll miss some but as soon as you get it into the game it’ll stand out like a sore thumb . . black or pink noise looking really bad.

Solution 2: Use a flood fill of 255 with a low tolerance threshold. This should fill in over the 254 pixels since they’re close to 255 but should ignore the dark grey blocks. The one aspect of this I don’t like is that it can be difficult to tell if something has screwed up. If the tolerence is set correctly then this is very unlikely and you can also do this for the grey blocks. Watch out for small areas where the flood fill cannot reach.

I’m sure that’s clear as mud but most of it will be obvious when you open up the relevant files.

Pat

EDIT: Just wanted to add that there’s another file .. Icon.dds .. that is used when selecting a campaign .. you’ll need Nvidias texture tools for Photoshop to be able to save out and load the .dds. Naturally it’s old, buggy and Nvidia, despite it being the only tool available to support their own graphics cards and file format, no longer support it (!!). It also doesn’t work in Photoshop CC. You need CS5 or 6. Unfortunately Adobe also refuse to support .dds. It would appear that, yet again, many free programs do a better job than the stupidly expensive professional.

Nvidia Texture Tools