Designing your own Campaign maps
Posted: Tue Aug 25, 2015 12:14 pm
Hi all,
I'll try to give a quick run down on how to prepare the campaign maps. I've been told that the following might frighten some people off. Don't let it. Its really not difficult or complicated. It's just that Photoshop can make 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.
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 - The areas simply coloured in black. No anti-aliasing. White gap separating them.
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 one 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.
(Sadly, as this is a new account, I can't post pictures)
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 linear 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 adds dithering to your solid colour. Noise.
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 : Paint out the noise. This is more awkward than it sounds since it'll be near impossible to see 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.
I'm sure that's clear as mud but most of it will be obvious when you open up the relevant files. If anyone comes up with a more practical solution to the noise issue I'd love to hear.
(I've copied this post to my own site since I'm not quite so new and can post pictures .. www(dot)colourandnoise(dot)com/blog )
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 no longer supported but is all we've got since Adobe don't support the format.
I'll try to give a quick run down on how to prepare the campaign maps. I've been told that the following might frighten some people off. Don't let it. Its really not difficult or complicated. It's just that Photoshop can make 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.
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 - The areas simply coloured in black. No anti-aliasing. White gap separating them.
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 one 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.
(Sadly, as this is a new account, I can't post pictures)
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 linear 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 adds dithering to your solid colour. Noise.
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 : Paint out the noise. This is more awkward than it sounds since it'll be near impossible to see 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.
I'm sure that's clear as mud but most of it will be obvious when you open up the relevant files. If anyone comes up with a more practical solution to the noise issue I'd love to hear.
(I've copied this post to my own site since I'm not quite so new and can post pictures .. www(dot)colourandnoise(dot)com/blog )
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 no longer supported but is all we've got since Adobe don't support the format.