PDA

View Full Version : Colour when creating Maps (PNG-8)


deadman_uk
16 Jul 2007, 22:44
I have made a handful of maps in Photoshop and they work fine. Now the new patch is out, I have so much more freedom sincemaps can be much larger in dimension. I have no problem understanding how to save maps and how to get them to work in Worms but what I don't fully understand is colour...

I have made a map but when saving it as a PNG-8 64 colour, many colours are missing. I know why because only 64 colours are being displayed but how do I save Worms map with the least amount of colour loss/degradation?

I find the adaptive setting works best for this map but can Worms support maps with greater than 64 colours? If not, why?

Thanks

SilPho
16 Jul 2007, 22:52
It can support maps with palette sizes of up to 113 colours (as long as one colour is black). The reason for this is because the game uses a fixed gaming palette, and many of those are reserved for game sprites such as the worms, the water and the weapons.

Posterising images can help to prevent dithering, but depending on the image other methods may be more effective. I don't use photoshop but see if you can change the methods that it uses for colour reduction, some might look better than others.

deadman_uk
16 Jul 2007, 22:57
It can support maps with palette sizes of up to 113 colours (as long as one colour is black). The reason for this is because the game uses a fixed gaming palette, and many of those are reserved for game sprites such as the worms, the water and the weapons.

Posterising images can help to prevent dithering, but depending on the image other methods may be more effective. I don't use photoshop but see if you can change the methods that it uses for colour reduction, some might look better than others.

Well I don't have a map with only one type of black, that would be a very basic map, I use different shades of black.

So is 64 colour the maximum amount of colours I can use in Worms if I have multiple shades of black?

What's dithering?

SilPho
16 Jul 2007, 23:04
Dithering is what happens when a smooth gradient is reduced to a lower number of colours. I assumed that was the problem you were having.

What I should have said was that the game will support maps of 113 colours as long as one of them is the pure 0,0,0 black where worms can walk around. Other shades of black are fine.

The catch with using larger amounts of colours is that it can have an effect on the background colours, with 113 colours the game has to compensate elsewhere. There is more information about all of this here: http://www.nanacide.com/wahelp/playersguide-map.php

CyberShadow
17 Jul 2007, 00:01
Use the following steps to create a WA-compatible map in Adobe Photoshop:


draw or open your map
select File -> Save for Web (or Save for Web & Devices in CS3)
In the options in the right, set the following options:

Set Optimized file format to PNG-8
uncheck Transparency (if it was checked)
Set Maximum number of colors in Color Table to 113 or below (see http://worms2d.info/Colour_map for details on side effects of using colour ranges)
play with the Color reduction algorithm and Dither algorithm options until your map looks nice, increase/decrease the number of colours accordingly
if there is no black in the colour palette (e.g. Mole Shopper maps), you'll have to add it manually (set Colour reduction algorithm to Custom, choose the black colour using the controls to the left, and click the Add color ("Adds eyedropper color to palette") button

click Save, enter a file name.

KRD
17 Jul 2007, 00:26
4½. Put the map in your SavedLevels folder [and not the Import folder] and select it in the frontend through the terrain editor by right clicking a randomly generated map and browsing through the drop-down list.

lol I know that

Seen too many people that didn't know that not to post it, heh. Just in case someone like them finds this thread someday, ye know.

deadman_uk
18 Jul 2007, 13:11
4½. Put the map in your SavedLevels folder [and not the Import folder] and select it in the frontend through the terrain editor by right clicking a randomly generated map and browsing through the drop-down list.

lol I know that

Thanks for the comments all. I have learnt that some maps look better with selective setting and some with adaptive. I have also learnt to untick transparency (but I don't know what effect this has anyway)

Will a later patch enable us to use a greater range of colours?

TheTrouble
18 Jul 2007, 13:53
Photoshop have very good selection of colors. From 256 to 96 I see no difference on few maps I converted, and no dithering in game.

BigBilly
18 Jul 2007, 14:04
hmm. i have the same problem with one of my big maps.
I try the way cybershadow told later :-o

Thank ya for posting this thread :)

Gnork
18 Jul 2007, 16:40
Well, yes, when you are using several images, it's quite normal that not all colors will fit in the small 113 color table. Try to save the map with some layers disabled, preferably those of images that do not have a very big part in the map. That way, more colors are preserved for the main images. Then, after you saved it, open the 113 color png, and add the remaining images. Those images will have to adapt to the saved color table now, without screwing up the rest of the map.

You will see those images will probably get dithered, because exact color matches are not present. Fiddling around with this a bit and saving different sets of layers to test can help for a good final result. Generally, try to use pictures which have already very similar colours before you even begin inserting them in a map.

For saving, Perceptual mostly gives very nice results with or without dither. If Perceptual doesn't work out, adaptive is probably the way to go. Notice as you add dither and move the slider for the percentage, that some colors get added or deleted. More dither means nicer colors, but to many dither makes a map very pixeled. Usually 22% dither is a good start, though you might need to raise it to 30, 45 or even 70% to get a better color match from the original psd.

The idea of adding colors yourself to the table is very tricky. Other colors will be removed so the part of the map you wanted to make better by adding colors will look good indeed, but different parts on the map will get worse.

CyberShadow
18 Jul 2007, 18:33
Gnork: you don't have to do that - Photoshop has a feature that allows you to specify which parts of the image should it consider more important during colour reduction, so some parts would look better than the others.

Gnork
19 Jul 2007, 00:48
Gnork: you don't have to do that - Photoshop has a feature that allows you to specify which parts of the image should it consider more important during colour reduction, so some parts would look better than the others.

cool, another of the zillion features I didn't yet know off, so how might one do that?

CyberShadow
19 Jul 2007, 02:32
I'm not sure in which version this was introduced - I'm using CS3. Anyway, there's a little button near the Color reduction algorithm setting, which brings up this dialog (http://thecybershadow.net/dump/0d4cea7fc1725cdac17f0aec2bb20098/0000048E.png). Consider this example: original (http://thecybershadow.net/dump/937d33c306cc31896892ae5706adeb3d/0000048D.png), without a priority mask (http://thecybershadow.net/dump/48808702e77d58d90ab989e875ab8cbf/0000048B.png), with a priority mask for the flower (http://thecybershadow.net/dump/b8eb2103d9317a92615626171101b2fd/0000048C.png). (picture source (http://emiliewood.com/index.php?cat=5))

SithlordDK
19 Jul 2007, 10:59
Use the following steps to create a WA-compatible map in Adobe Photoshop:


draw or open your map
select File -> Save for Web (or Save for Web & Devices in CS3)
In the options in the right, set the following options:

Set Optimized file format to PNG-8
uncheck Transparency (if it was checked)
Set Maximum number of colors in Color Table to 113 or below (see http://worms2d.info/Colour_map for details on side effects of using colour ranges)
play with the Color reduction algorithm and Dither algorithm options until your map looks nice, increase/decrease the number of colours accordingly
if there is no black in the colour palette (e.g. Mole Shopper maps), you'll have to add it manually (set Colour reduction algorithm to Custom, choose the black colour using the controls to the left, and click the Add color ("Adds eyedropper color to palette") button

click Save, enter a file name.


Could somebody post a tut for gimp ;)

Gnork
19 Jul 2007, 11:40
I'm not sure in which version this was introduced - I'm using CS3. Anyway, there's a little button near the Color reduction algorithm setting, which brings up this dialog (http://thecybershadow.net/dump/0d4cea7fc1725cdac17f0aec2bb20098/0000048E.png)

/me shoots himself through the head, I've seen that in ps7 but somehow its never satisfying. Maybe I should upgrade to cs3? :p