Palette (environment): Difference between revisions
Hendricks266 (talk | contribs) m EDuke32, not Eduke32; grammar; gray->white |
|||
(15 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
This page is an exhaustive listing of the 8-bit palette swaps in Duke Nukem 3D. | |||
The data controlling them can be found and modified in the [[palette data files]]. | |||
==Colors of the base palette== | |||
The following plot shows the red, green and blue color intensities of Duke3D's base palette on a 0--1 scale. | |||
[http://lunatic.eduke32.com/basepal0_rgb.png Base palette colors] | |||
It can be seen that it contains six ramps (sequences in which R, G and B all increase monotonically) of 32 colors, three blocks of 16 colors (two of which are ramps), and 16 remaining fullbright colors. Rearranging consecutive blocks of 16 colors by the permutation [0 1 2 3 5 4 6 7 8 13 10 11 12 9 14 15] makes this stand out more clearly: | |||
[http://lunatic.eduke32.com/basepal0_rgb_reord.png Rearranged base palette colors] | |||
==Global Palettes== | ==Global Palettes== | ||
For use with [[setgamepalette]]: | For use with [[setgamepalette]]: | ||
Line 17: | Line 29: | ||
|- valign=top | |- valign=top | ||
|3 | |3 | ||
|3D Realms Logo | |3D Realms Logo (changed in v1.4). | ||
| [[image:pale.png|48px]] [[image:palf.png|48px]] | | [[image:pale.png|48px|v1.3D]] [[image:palf.png|48px|v1.4+]] | ||
|- valign=top | |- valign=top | ||
|4 | |4 | ||
Line 29: | Line 41: | ||
|- valign=top | |- valign=top | ||
|6 | |6 | ||
| | |Temporary slot for self-contained [[ANM]] palettes. Example provided is LOGO.ANM. | ||
| [[image:palh.png|48px]] | | [[image:palh.png|48px]] | ||
|} | |} | ||
Line 38: | Line 50: | ||
! ID !! Image !! Effect !! Description | ! ID !! Image !! Effect !! Description | ||
|- valign=top | |- valign=top | ||
| 0 | | 0 <br /> 3 <br /> 9 <br /> [[#Empty Slots|empty]] | ||
| [[image:pala.png|48px]] | | [[image:pala.png|48px]] | ||
| Normal | | Normal | ||
Line 51: | Line 63: | ||
| [[image:pal2.png|48px]] | | [[image:pal2.png|48px]] | ||
| All red | | All red | ||
| Red lights | | Blood pool <br />Red lights | ||
|- valign=top | |- valign=top | ||
| 4 | | 4 | ||
| [[image:pal4.png|48px]] | | [[image:pal4.png|48px]] | ||
| Full black ( | | Full black (including fullbrights) | ||
| Shadows | | Shadows | ||
|- valign=top | |- valign=top | ||
Line 71: | Line 83: | ||
| [[image:pal7.png|48px]] | | [[image:pal7.png|48px]] | ||
| All yellow | | All yellow | ||
| Slime splash <br /> Yellow/Brown lights | | Slime splash, FECES puddle <br /> Yellow/Brown lights | ||
|- valign=top | |- valign=top | ||
| 8 | | 8 | ||
Line 110: | Line 122: | ||
| 16 | | 16 | ||
| [[image:pal16.png|48px]] | | [[image:pal16.png|48px]] | ||
| Blue to dark | | Blue to dark blue | ||
| Player 8 | | Player 8 | ||
|- valign=top | |- valign=top | ||
Line 131: | Line 143: | ||
| [[image:pal21.png|48px]] | | [[image:pal21.png|48px]] | ||
| Blue to red | | Blue to red | ||
| Red Key Card <br /> Assault Captain <br /> | | Red Key Card <br /> Assault Captain <br /> Battlelord Sentry | ||
|- valign=top | |- valign=top | ||
| 23 | | 23 | ||
Line 149: | Line 161: | ||
|} | |} | ||
== | ==Fog Palettes== | ||
EDuke32 includes four [[DEF Language#fogpal|fog palettes]] starting | EDuke32 includes four [[DEF Language#fogpal|fog palettes]] starting at palette index 26. | ||
Note that lookup.dat can be modified to support more than 25 palette remaps for 8-bit sprites; in this case, the included fog palettes start wherever the first unused palette position is. For example, a modified copy of lookup.dat with 30 remaps instead of 25 would result in the fog palettes occupying indexes 31, 32, 33, and 34 instead of 26, 27, 28, and 29. | |||
They are: | They are: | ||
fogpal 26 | fogpal 26 63 63 63 | ||
fogpal 27 | fogpal 27 63 0 0 | ||
fogpal 28 0 | fogpal 28 0 63 0 | ||
fogpal 29 0 0 | fogpal 29 0 0 63 | ||
This gives the fog colors of white (26), red (27), green (28) and blue (29). | This gives the fog colors of white (26), red (27), green (28) and blue (29). | ||
==Empty Slots== | |||
All empty palette swaps, including those without [[DEF Language#fogpal|fog palettes]], default to pal 0. | |||
If you are using [[DEF Language|defs]] to add additional skins or variations to empty palette slots of a model or texture which do not correspond to any palette swap, or [[DEF Language#fogpal|fog palettes]], it is '''very highly recommended''' to begin the indices for your custom variations at palette value #133. This is because modified [[Palette data files|LOOKUP.DAT and PALETTE.DAT]] files such as [http://lzg.duke4.net/extclut.htm ExtCLUT] can contain up to 128 palette entries. These additional values may conflict with your custom feature. The extra four spaces are to account for the [[#Fog Palettes|predefined fogpals]] explained above. |
Latest revision as of 03:44, 13 December 2014
This page is an exhaustive listing of the 8-bit palette swaps in Duke Nukem 3D.
The data controlling them can be found and modified in the palette data files.
Colors of the base palette
The following plot shows the red, green and blue color intensities of Duke3D's base palette on a 0--1 scale. Base palette colors
It can be seen that it contains six ramps (sequences in which R, G and B all increase monotonically) of 32 colors, three blocks of 16 colors (two of which are ramps), and 16 remaining fullbright colors. Rearranging consecutive blocks of 16 colors by the permutation [0 1 2 3 5 4 6 7 8 13 10 11 12 9 14 15] makes this stand out more clearly: Rearranged base palette colors
Global Palettes
For use with setgamepalette:
ID | Palette | Image |
---|---|---|
0 | Normal | |
1 | Underwater | |
2 | Night Vision Goggles Submersible Slime |
|
3 | 3D Realms Logo (changed in v1.4). | |
4 | Title Screen | |
5 | Episode 1 Ending | |
6 | Temporary slot for self-contained ANM palettes. Example provided is LOGO.ANM. |
Palette Swaps
For use with spritepal, pal, et cetera:
ID | Image | Effect | Description |
---|---|---|---|
0 3 9 empty |
Normal | Default color Player 1 (ID 9) | |
1 | All blue | Frozen creatures Unavailable menu option Blue lights | |
2 | All red | Blood pool Red lights | |
4 | Full black (including fullbrights) | Shadows | |
5 | Red to brown | Brown Team (Duke-Tag) Exit Level Nuke | |
6 | All reverse green | Night Vision Goggles heat Protozoid Slimer, Protector Drone, and Alien Queen gibs | |
7 | All yellow | Slime splash, FECES puddle Yellow/Brown lights | |
8 | All green | Green lights | |
10 | Blue to dark red | Player 2 | |
11 22 |
Blue to green | Player 3 (ID 11) Assault Trooper (ID 22) | |
12 18 |
Blue to gray | Player 4 (ID 12) | |
13 | Blue and red to dark gray | Player 5 | |
14 | Blue and red to dark green | Player 6 Secret Exit Level Nuke | |
15 | Blue to brown | Player 7 | |
16 | Blue to dark blue | Player 8 | |
17 | Brown, green, orange and purple to blue Blue to green |
||
19 | Brown, green, orange and purple to red Blue to green |
||
20 | Brown, green, orange and purple to blue Blue to gray |
||
21 | Blue to red | Red Key Card Assault Captain Battlelord Sentry | |
23 | Blue to yellow | Yellow Key Card | |
24 | Gray to red Red to gray |
||
25 | Green to red |
Fog Palettes
EDuke32 includes four fog palettes starting at palette index 26.
Note that lookup.dat can be modified to support more than 25 palette remaps for 8-bit sprites; in this case, the included fog palettes start wherever the first unused palette position is. For example, a modified copy of lookup.dat with 30 remaps instead of 25 would result in the fog palettes occupying indexes 31, 32, 33, and 34 instead of 26, 27, 28, and 29.
They are:
fogpal 26 63 63 63 fogpal 27 63 0 0 fogpal 28 0 63 0 fogpal 29 0 0 63
This gives the fog colors of white (26), red (27), green (28) and blue (29).
Empty Slots
All empty palette swaps, including those without fog palettes, default to pal 0.
If you are using defs to add additional skins or variations to empty palette slots of a model or texture which do not correspond to any palette swap, or fog palettes, it is very highly recommended to begin the indices for your custom variations at palette value #133. This is because modified LOOKUP.DAT and PALETTE.DAT files such as ExtCLUT can contain up to 128 palette entries. These additional values may conflict with your custom feature. The extra four spaces are to account for the predefined fogpals explained above.