|
Palette management |
|
This is something that is usually overlooked but is of capital importance, as it can save us some unpleasant surprises in the less desired moments. Screenshots generated by emulators usually have a 16 or 24 bit color depth, and we'll need to reduce them to 8 bits (256 colors) so Mugen can read them. Each graphics edition software reduces color depth in its unique way, and on top of that the colors which appear in a reduced image will vary from image to image, which is a very bad thing for our purposes. Every sprite (except the big portrait) must hace the same palette, so in order to reduce the screenshots' depth we'll need to create a paletta with every color used by the character (and any visual effect, projectile, "striker", etc he/she has). Any decent program can save 256 color palettes to be applied to sprites later, but beware. It's precisaly this "master" palette's composition what can make our life more difficult later.

Color reduction and palette applicaton operations in Paint Shop Pro: Every palette-related operation is in the Colors menu. The ones we'll use most are:

1 - Decrease Color Depth - 256 colors: Before working with palettes we must convert the screenshots to 256 colors with this option. It's very important that the Optimized Octree y Nearest color options are active, which will assure the reduced image will have exactly the same colors the original image had (provided the original image doesn't contain more than 256 colors).

2 - Load palette: Very important.. It's used both to apply a palette to a 256 colors sprite and to reduce a higher color depth screenshot to the colors the chosen palette has. The Apply palette using field determines which method will be used to apply the palette's colors: Nearest color matching applies to every color in the original picture the most similar color in the palette, this is useful for example when applying a palette to a screenshot; Error diffusion dithering does the same but dithering the image, which in low resolution images (like a sprite) look horrible, so NEVER select this option; Maintain indexes can only be selected when the original image is a 256 color one, an what it does is assign to every color in the original picture the color with the same index in the palette we want to apply, which is useful, for example, to try alternate palettes (customes for our character) we designed in different sprites.
3 - Save Palette: Once we reduced an image de 256 colors or modified its palette, we'll save the palette to a .pal file with this option.
It's likely that some colors are shared both by the sprites in which the character appears and by the ones in which he doesn't (projectiles, special effects, hit sparks, "strikers", etc.). An example: let's assume our character's outfit is red, and that this character is capable of throwing a fireball which is yellow in the inside and red in the outside, the same red as the outfit If we don't do anything, the outfit and the fireball's outside will share colors, this is, the palette color indexes of the portion of the sprites which have the same shade of red will be the same. If now we change tha paleta and turn the outfit blue, we'll see that the fireball's outside has turned blue as well!. To fix this, we'll need to duplicate the shared colors in the palette, search for the sprites where they are incorrectly used (the fireball, in this case), apply it and substitute the colors, which is an annoying process to say the least, specially if the affected sprites are many, or if it happens more than once. This usually happens with the white color, many characters have white, and many visual effects have it too, so beware.

Showing
the color sharing problem: The character and the projectile sprites have some
parts of the same blue tone. If these colors are shared among them (this is, both
sprites have the same palette index # for those tones), it wil happen what is
shown in the last image: when changing the character's colors the projectile will
be affected (in this case, you can see how some blue tones in the projectile have
turned red).
The way to solve this problem is anticipating it from the beginning, creating an organized "master" palette with all necessary colors, duplicated if they have to be, and several "subpalettes", which will contain only the colors needed for a given subset of sprites which won't share colors with the rest (in the previous example, one for the character, and another for the fireball and any other effects). To accomplish this we'll follow the following steps:
|
Paint Shop Pro .PAL (palette) file format: The file is simply a text file composed by a 3-line header, which we shouldn't touch, followed by 256 lineas with each color¡s data (red, green and blue components), ordered from 0 to 255. To join several palettes, just open it with any text editor and paste the lines regarding the colors we want one after the other, taking care that when finished there are exactly 256 color lines below the header.
With this we'll have a "master" palette with all the necessary colors for every sprite. We'll only ouse this palette to design the different costumes for our character when chosen with one or another button. The palettes which we'll really use will be created now.
Now, to reduce screenshots of the character we'll appply "PalCharacter.pal", and to reduce shots of his effects stc. we'll apply "PalEffects.pal". What's the benefit of all this perilous process (though you only need to do this once per character)? The benefit is that, continuing with the example at this section's beginning, the red colors of the character's outfit and the fireball, although having the same components, will be repeated in the palette, and will appear once in each subpalette, so by applying the adequate subpalette, the correct color will be used. The consequence is that if we change the outfit, the fireball won't be affected, so we can change colors with entire freedom, with no fear of encountering surprisas later ;).
I'm aware that this has been a never ending untilligible piece and text and that no human being is capable of understanding that on a first sight ;), here is an example to throw some light into it:

First, we create an image per subpalette we want to create, and paste the sprites we judge enough to include all the colors that will be needed in each subpalette. In this example we'll have two palettes: one for the character itself and another for projectiles and effects. Note the pink background in the images, as we're certain the character nor the effects contain this color, and that we placed this color to the dirst index in both images (palettes).

Join all the subpalettes into one, setting the colors not used to pink. Between both subpalettes we'll leave some colors in pink, just in case we need to add some colors in the future. This will be the "master" palette.

Divide the "master" paletta as many times as subpalettes you wanted,
creating copies of the "master" palette and setting to pink, in each
copy, the colors which don't belong to its respective old subpalette. With this
we'll have the final subpalettes, which will be the ones we'll use to reduce the
screenshots' color depth, applying one or the other depending on which sprite
it is: the character or the effects.
One final advice: many emulators have an option to change the image background, which is usually black, to an intense pink. Use this option whenever is possible (as, for instance, in the example above), or else you'll be exposed to have problems later. Many characters have black, in the character itself or in its effects, so if you take the shots with a black background too, the black parts in the sprite will be "erased", and you'll have no choice but take the screenshot(s) again. Summing up: Set the background to pink and you'll avoid problems.