Color Palette: Difference between revisions
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Weissblatt's ''color palette'' is defined in a set of special [[Lump|Lumps]] which define what colors can be used by [[Flat|Flats]] and [[Doom Picture|Pictures]]. | Weissblatt's ''color palette'' is defined in a set of special [[Lump|Lumps]] which define what colors can be used by [[Flat|Flats]] and [[Doom Picture|Pictures]]. By default Weissblatt relies on the lumps <code>PLAYPAL</code>, <code>COLORMAP</code> as well as the <code>TRANSxx</code> TINTTABs to render the game, although custom color palettes may be defined at runtime. | ||
== Color Palette Format == | == Color Palette Format == | ||
| Line 7: | Line 7: | ||
* '''Page 1''', the default palette | * '''Page 1''', the default palette | ||
* '''Page 5''', a palette with a red tint | * '''Page 5''', a palette at 75% red with a constant value of 113 for green and blue, resulting in a red tint | ||
* '''Page 6''', | * '''Page 6''', an inverted palette at 75% brightness | ||
==== COLORMAP ==== | ==== COLORMAP ==== | ||
| Line 14: | Line 14: | ||
==== TINTTAB ==== | ==== TINTTAB ==== | ||
''TINTTAB''s are a format first defined in [[wikipedia:Hexen:_Beyond_Heretic|Hexen]] [https://doomwiki.org/wiki/TINTTAB] to | ''TINTTAB''s are a format first defined in [[wikipedia:Hexen:_Beyond_Heretic|Hexen]] to pre-calculate color values[https://doomwiki.org/wiki/TINTTAB]. They are used to calculate transparency and colored lighting effects. | ||
== Custom Color Palettes == | Like COLORMAPs they are simple byte index-based translation tables, however TINTTABs are defined as 256x256 pixels, offering a translation between any two colors within the color palette. | ||
== Custom Color Palettes and COLORMAPs == | |||
The game engine supports loading custom color palettes upon map load and per [[Lua Scripting|Lua scripting]]. | |||
To define a custom palette, simply add the lumps <code>PALxxxx</code> for your palette and <code>CLMxxxx</code> for it's COLORMAP respectively. <code>xxxx</code> must be replaced with a number between 0000 and 9999. To load this palette on map load, use the attribute <code>Palette = <NUM></code> in the map's [[SOC]] header. | |||
[[Category:Technology]] | |||
[[Category:Guide]] | |||
Latest revision as of 09:08, 7 April 2025
Weissblatt's color palette is defined in a set of special Lumps which define what colors can be used by Flats and Pictures. By default Weissblatt relies on the lumps PLAYPAL, COLORMAP as well as the TRANSxx TINTTABs to render the game, although custom color palettes may be defined at runtime.
Color Palette Format[edit | edit source]
Color palettes are simple dumps of 24-Bit RGB888 values. Each color palette consists of 14 pages of 256 color values each. Given 8 bits per-color per-channel, this amounts to a total file size of 10.5 kB.
Weissblatt itself only uses three of these 14 pages:
- Page 1, the default palette
- Page 5, a palette at 75% red with a constant value of 113 for green and blue, resulting in a red tint
- Page 6, an inverted palette at 75% brightness
COLORMAP[edit | edit source]
COLORMAPs are translation tables used to calculate light levels in Doom and by extension Weissblatt. They are 256x32 "pixels" large, covering for each palette color as well as 32 possible light levels, which are automatically calculated in-engine. Unlike color palettes, a COLORMAP's pixels are stored as palette indices though, not RGB values.
TINTTAB[edit | edit source]
TINTTABs are a format first defined in Hexen to pre-calculate color values[1]. They are used to calculate transparency and colored lighting effects.
Like COLORMAPs they are simple byte index-based translation tables, however TINTTABs are defined as 256x256 pixels, offering a translation between any two colors within the color palette.
Custom Color Palettes and COLORMAPs[edit | edit source]
The game engine supports loading custom color palettes upon map load and per Lua scripting.
To define a custom palette, simply add the lumps PALxxxx for your palette and CLMxxxx for it's COLORMAP respectively. xxxx must be replaced with a number between 0000 and 9999. To load this palette on map load, use the attribute Palette = <NUM> in the map's SOC header.