Linedef type 606
Linedef type 606, Colormap, is a type of linedef special which floods every tagged sector with a specific color at a desired intensity. This effect is commonly used to give water and other liquids a colored hue when inside them, but is also used for many other visual effects.
Setup
The color and intensity used is taken from an HTML-like hexadecimal color code, specified in the front side upper texture of the special linedef. The format used for the color codes is #RRGGBBA
, where RR
, GG
, and BB
are two hexadecimal digits each that determine the amount of red, green, and blue, respectively. The A
at the end stands for "alpha" and determines the intensity of the color. It should be a letter from A–Z, with A being the most transparent and Z being the most opaque. Lowercase letters a–z can also be used and have the same meaning as the uppercase letters. If anything else besides letters is used, or if the alpha value is omitted, it will default to full opacity (Z).
The color specified in the front upper texture is the one that will be displayed if the affected sector is at full brightness. We will call it the light color in the following. As the brightness level of the sector decreases, the colormap will fade towards a different color, called the fade color. By default, this will be black (#0000000). However, a custom fade color can be supplied in the front lower texture field, using the same format detailed above for the front upper texture field. This can be used to create fog effects. Note that the alpha value of the fade color is ignored in Software mode – the fade color will always be displayed at full intensity.
Optional extra settings can be supplied in the front middle texture field, using the format #ABBCC
. The two-digit decimal numbers BB
and CC
indicate the brightness levels between which the colormap will fade from the light color to the fade color. There are 32 brightness levels available, with 0 being the brightest and 31 the darkest. By default, the colormap will fade over the entire brightness range, i.e., it will start fading at brightness level 0 and stop fading at level 31. BB
sets the brightness level at which the fade will start. The value must be within the range of 0–30. CC
sets the brightness level at which the fade will end. The value must be within the range of 1–31. All brightness levels before BB
will display the light color, and all brightness levels after CC
will display the fade color. In-between, the colormap will gradually fade from the light color to the fade color.
Giving the control linedef a tag of 65535 will apply the colormap to all sectors in the map, without exception.
The A
at the start is a single-digit number from 0–9 that toggles on or off certain flags related to translucent FOFs and PolyObjects affected by the colormap:
Flag value | Flag name | Description |
---|---|---|
1 | CMF_FADEFULLBRIGHTSPRITES
|
If this flag is enabled, the brightness of sprites with the FF_FULLBRIGHT frame flag will be faded when they are beneath the planes of an affected translucent FOF or PolyObject, like all other sprites. Otherwise, they will be displayed at full brightness.
|
4 | CMF_FOG
|
If this flag is enabled, fog block-like plane lighting will be used for affected translucent FOFs and PolyObjects if the colormap is applied to their control sectors. This causes the surfaces of such an FOF/PolyObject to be rendered at the control sector's brightness level instead of being displayed at full brightness. |
The values can be combined, i.e., a value of 5 will enable both behaviors. The default value is 0.
Note that if two colormap specials are tagged to the same sector, they will not be mixed – one of them will simply be ignored. However, if a group of colormaps share the same target sector but are tagged to different control sectors, their priorities will be set according to the order the control linedefs were created in.
On its own, a colormap will only affect what is actually inside the sector. This means at most all you will see is a colored spot on the floor, walls, and ceiling, as well as any Things inside the sector appearing tinted. Other parts of the map that are simply viewed "through" the colormap sector will appear no differently. If the effect you want is more like a "wall" of color that tints everything seen through it, like a tinted window, use linedef type 202 (Fog Block), and apply the colormap to the control sector instead.
|
Vanilla colormap values
This is a list of every colormap used in vanilla maps and what they are used for.
Usage | Light color | Extra settings | Fade color |
---|---|---|---|
GFZ water (blue) | #40A0FFJ | None | #0000000 (default) |
THZ goo water (lavender) | #B76FB7Z | None | #0000000 (default) |
DSZ water (teal) | #008587R | #10032 | #1B1B34F |
CEZ1 global (orange) | #FF6600H | None | #000819Z |
CEZ2 water (blue) | #0055FFJ | None | #071E30 |
ACZ1 skybox | #000000J | #01820 | #A73F3FZ |
ACZ2 global (orange) | #EE5000H | #00427 | #21224EZ |
ACZ2 skybox | #000000A | #01820 or #00124 | #2E2E5CZ |
ACZ3 outside (orange) | #EE5000P | None | #0000000 (default) |
RVZ lava (orange) | #FF7F00Z | None | #FF7F00Z |
Alarm floodlight (red) | #FF0000Z | None | #0000000 (default) |
Flip-gravity FOF (light blue) | #00AAFF0 | None | #00AAFF0 |
ERZ2 teleporter (yellow) | #999999D | None | #FFFF00Z |
ATZ water (blue) | #0070B0K | None | #0000000 (default) |
TLZ acid (green) | #00FF00Z | None | #0000000 (default) |
Old THZ slime (purple) | #E000E0S | None | #0000000 (default) |
FCZ global (cyan) | #3399FFH | None | #000022Z |
DFZ water (blue) | #0000FFJ | None | #0000000 (default) |
NRZ global (fade to white) | #000000A | None | #FFFFFFZ |
Sample
- Example file: ex_ld606_colormap.wad (MAP01)
How to use |
---|
|