fillup.gif Palette Editing (PLAYPAL)

 

This tool let’s you easily modify the DOOM PLAYPAL palettes (and DOOM derivates) and the COLORMAP entries. As with other elements of DOOM editing, it pays to understand how these operate for best results. If you are not familiar with palettes and colormap concepts, it may take a few trials to understand the overview explained below.

 

Overview

 

Briefly, a palette is used if the number of bits used to describe a color are limited. Anything less than 16bit color requires a palette. Let’s use 8 bit color as an example, since DOOM uses 8 bit color. There are 256 RGB entries. Each color (R=red, G=green, B=blue) takes up 8 bits, so that means it’s 256x3 or 768 bytes for each palette in DOOM. The graphics consist of 8 bit numbers (0 to 255) that represent an index value into this palette of 256 colors.

 

Each DOOM source port may implement these elements differently. If you use the original DOOM exe and it works and then it doesn’t work (or do the same thing) on a source port, either the source port has a mistake or they chose to do it a different way.

 

The DOOM palettes are stored in an entry called PLAYPAL. When you select this tool, the first palette displayed is the Base Palette. This is the palette that most of the game is played in.

 

The PLAYPAL shown is either from the PWAD you have loaded or is from the IWAD. Most PWADs do not have PLAYPAL entries. The name of the file that contains the PLAYPAL is displayed on the bottom of the Dialog.

 

There are 14 different palettes for DOOM (more for HEXEN). These comprise a range of Damage Palettes, Item pickup Palettes and one for the radiation suit. The type of palette is displayed on the top of the Dialog. The palettes work in combination with another entry called COLORMAP. The name of the file that contains the COLORMAP is displayed on the bottom of the Dialog.

 

The COLORMAP maps colors from the DOOM palette to alternate positions. There are 34 COLORMAP entries. To see COLORMAP values, click on the Process Colormap checkbox and scroll the Colormap box. You’ll see the image displayed change. The Colormap is always indexed to the base palette - the first one - regardless of the palette you have displayed.

 

The upper left corner of the dialog displays the Index value and the corresponding map value. The Index value is the offset into the current colormap. The map value is the palette index value at that location. If you don’t have "Process Colormap" enabled, then both of these are just the offset into the current palette.

 

For example, in the default IWAD for DOOM, in the first COLORMAP the first entry (0) which is BLACK, maps into palette entry 0. Entries 0 to 167 all map into the same position. Until we get to entry 168 which maps to palette entry 4. If you look at the DOOM palette, you’ll see that palette entry 4 and 168 are identical - they are both WHITE.

 

As you click the cursor (or use the arrow keys) and you’ll find some others that are identical in value.

 

All the tools below operate on the original palette selected. The various tools modify the original palette for subsequent commands. The slider controls only temporarily change a palette. The change is fixed in memory if you press Apply Palette or select a different palette using the Palette selection control.

 

It’s easier on the eyes if you have your desktop set to at least 16k colors, but it’s not required. (Note: the colors displayed by DeePsea will change if you change the palette. Some GUI elements may not refresh until you use them. This is a minor thing and I doubt I’ll bother with this. Just drag something over buttons and they will clear themselves.

 

Selecting the Color(s) to change

Select the color to change by moving the mouse on top of the color entry and pressing the left mouse button. Or you can use the cursor keys to move around too.

 

If you want to change a range of colors, hold down the shift key and then press the left mouse button for the first entry. Now move over to the last entry you want to change and press the left mouse button again (while still holding the shift key down),. You’ll see all the active entries with a selection rectangle drawn around them. You can also hold the shift key down and use the cursor keys.

 

Palette and Colormap Edit Tools

 

Apply Palette

Stores the current Palette in the internal buffer as modified. Be sure to do this when you modify a Palette if you want to keep the changes.

 

Edit Color

Changes the color of an entry. Either press the Edit Color button or right click or double left click inside the palette displayed.

For straight palette mode, enter the RGB value for the entry and press OK.

If you checked Process Colormap enter the palette index value to use at that colormap location.

 

Gradient

Change the colors of a range of entries. Select the entry range as described above and press the Gradient button.

 

For palette mode, enter the beginning RGB for the first (lowest color index) entry and the ending RGB for the last (highest color index) entry. All the entries from first to last will have a gradual RGB change made.

 

For Colormaps, this is similar except we are just giving a range of palette index values.

 

Just experiment to see how this works.

 

Create 32 Colormaps

Create 32 colormaps from the base palette to the current palette displayed. What you do normally is select palette 0, select all colors and appy changes to it using the sliders. Normally you make the palette darker for "distance" lighting. You could make the final palette displayed "foggy" and then the whole level will assume a fog haze. Then press this button to make 32 gradients from the base palette to the final blend you selected.

 

DO NOT use this tool to create colormaps if you have imported a new PALETTE that is totally different from the stock DOOM palette unless you modified all the textures to match.

 

Get Palette From BMP

Import any 256 color BMP or PCX and the palette from that image replaces the current PLAYPAL palette entry. The new Palette is automatically applied to the internal Buffer.

 

If you replace the first PLAYPAL (base palette 0) with a new 256 color BMP palette, you are given 3 choices: 1) Match the new palette to the original DOOM palette; 2) Match the first 32 colormaps to the original DOOM palette; 3) Store asis. The first two options will preserve the display of the original DOOM graphics, within the capacity of the palette to do so.

 

All PLAYPALs beyond the first one replaced with a new 256 color BMP palette have 2 choices: 1) Match the new palette to the original DOOM palette at that location; 2) Store asis.

 

Creating 32 colormaps attempts to match your new Palette to the original DOOM palette via the colormap translation. You can manually override individual colormap entries for your purpose using the colormap editing feature.

 

Once you modifiy the palette in this manner DO NOT use the automatic Create 32 Colormaps feature, unless you modify all the textures to match. Experiment to see how this looks.

 

If you change just about all the DOOM graphics using this new palette, then use the Create 32 Colormaps to match to the new palette. You can also tweak the palette in some other program (such as PSP) and then use DeePsea to import the palette.

 

When the palette is modified by matching the new palette colors to the original DOOM palette (not the colormaps), then a report is produced listing all the colors that could not be matched to the DOOM palette and a listing of all colors in the new palette that are duplicates.

 

GrayScale Palette DOOM

Change the current palette to a grayscale that matches the DOOM colors. This is NOT the same as a full grayscale.

 

GrayScale Colormap

Change the current colormap to a grayscale index that matches the DOOM colors.

 

GrayScale Palette Standard

Change the current palette to a standard full scale grayscale. This does NOT matches the DOOM colors. Primarily useful for tinkering with ZDOOM decals.

 

 

Change the brightness or hue of a range of entries

 

Select the type of adjustment to make, either by a Percent or Absolute. Percent changes the original RGB value by a percentage. Absolute adds that much to each color value.

 

Select the entry range as described above and now use the RGB color sliders or edit box controls. Enter the amount to adjust by. The maximum range is +/- 255.

 

Saving

When you are all done, press Save to save the PLAYPAL and COLORMAP. By checking the save PLAYPAL and save COLORMAP check boxes, you can select which lumps to save.

 

If you select an existing PWAD, the entries are merged or replaced in the PWAD. If the file doesn’t exist, a new PWAD is created. Now open up the PWAD that you just created if it’s not the current PWAD you are editing.

 

Reset

Resets the PLAYPAL displayed back to the value of the one in a PWAD - if any were read or to the IWAD if none.

Resets the COLORMAP displayed back to the value of the one in a PWAD - if any were read or to the IWAD if none.

 

Selecting the PLAYPAL or COLORMAP source

By checking the appropriate checkboxes you can override the file where the current lumps are being read from. Of course if you don’t have a PWAD with the lump, you can’t override it. If you uncheck the all, the current files displayed are used.

 

Checkbox Options

 

Process Colormap

Shows the colors displayed as translated via the colormap

All Palettes

The current colormap is applied to all Palettes selected, not just 0. Mainly useful for just playing around.

All Colors

Automatically selects all the colors

Graphic Preview

Displays a DOOM graphic instead of the palette.

Graphic Fixed

The graphic displayed above cycles each time Preview is pressed. This locks in the current picture.

Save PLAYPAL

Saves the PLAYPAL lump in the file selected.

Save COLORMAP

Saves the COLORMAP lump in the file selected.

Show Grid

Displays a black rectangle around each entry.

Show Selection

Highlights the selections that are active. Disable this option to see a cleaner looking preview of the palette.

IWAD palette

The current palette from the IWAD is read and restored

IWAD colormap

The current colormap from the IWAD is read and restored

PWAD palette

The current palette from the PWAD is read and restored (if there is one)

PWAD colormap

The current colormap from the PWAD is read and restored (if there is one)

Notes

 

When you modify a PLAYPAL, the colors used by DeePsea may be changed as well. DeePsea only uses the first palette and the first colormap.