Color palettes

FIXME This article is work in progress.

Most graphics in UA are stored in indexed 256-color mode. Color palettes are used to define the colors. They are stored inside ILBM files or in separate files which usually have a .pal extension.

File locations

  • \<datadir\SETx\palette\ - each model set contains several palette files to render the 3D world. There are also .org files which are probably leftovers from the original palette editing process. They follow similar format.
  • \<datadir>\MC2RES\ - contains Standard.pal - its purpose is currently unknown

Palette file usage

In hardware rendering mode, the ILBM bitmaps are rendered according to their internal palettes.

In software rendering mode, the default palette is used. It's most likely stored in a Standard.pal file somewhere, but it's currently unknown FIXME how the file is defined. It may be hard-coded as well.

Each level file contains 8 “slots” which define some color palettes. These palette files are probably selected from the model set directory. The 3D world is probably rendered according to these “slots”. The VBMP bitmaps do not contain a palette.

The palette of the level selection mask is used when editing the mask.

The color definitions in the world.ini configuration file contain both the RGB values and the palette index which is probably used in software rendering mode.

File format

The format of .pal files follows the EA85/IFF format and is similar to the format of ILBM files. However, palette files only contain the header and the color map.

FORM <length> ILBM
BMHD <length>
<header data>
ANNO <length>            ;this chunk is not required - some files may not have it
<annotation data>
CMAP <length>
<RGB values>             ;each color is stored as a 3-byte triplet of R, G, B values

The .org files may also have a CAMG chunk at the end of the file. It's related to Amiga display modes.

Using ordinary ILBM files as palette files may work but has not been tested. FIXME

modding/pal_file.txt · Last modified: 2019/01/27 10:57 (external edit)
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0