Transfer Heights

From Eternity Wiki
Jump to: navigation, search

209:Transfer_Heights(tag)

This is a static special which creates Boom-style fake ceiling and floor in tagged sector(s). This UDMF special is a direct equivalent of the Doom classic format special 242. Following documentation is based on Boom's BOOMREF.TXT document, updated as needed.

This allows the tagged sector to have two levels — an actual floor and ceiling, and another floor or ceiling where more flats are rendered. Things will stand on the actual floor or hang from the actual ceiling, while this function provides another rendered floor and ceiling at the heights of the sector on the first sidedef of the linedef. Typical use is "deep water" that can be over the player's head.

    ----------------------------------  < real sector's ceiling height
   |         real ceiling             | < control sector's ceiling texture
   |                                  |
   |                                  | < control sector's lightlevel
   |              A                   |
   |                                  | < upper texture as colormap
   |                                  |
   |                                  | < control sector's floor texture
    ----------------------------------  < control sector's ceiling height
   |         fake ceiling             | < real sector's ceiling texture
   |                                  |
   |                                  | < real sector's lightlevel
   |              B                   |
   |                                  | < normal texture as colormap
   |                                  |
   |          fake floor              | < real sector's floor texture
    ----------------------------------  < control sector's floor height
   |                                  | < control sector's ceiling texture
   |                                  |
   |                                  | < control sector's lightlevel
   |              C                   |
   |                                  | < lower texture as colormap
   |                                  |
   |          real floor              | < control sector's floor texture
    ----------------------------------  < real sector's floor height

Boom sectors controlled by a Transfer_Heights linedef are partitioned into 3 spaces. The viewer's xyz coordinates uniquely determine which space they are in.

If they are in space B (normal space), then the floor and ceiling textures and lightlevel from the real sector are used, and the colormap from the Transfer_Heights linedef's first sidedef's normal texture is used (COLORMAP is used if it's invalid or missing). The floor and ceiling are rendered at the control sector's heights.

If they are in space C ("underwater"), then the floor and ceiling textures and lightlevel from the control sector are used, and the lower texture in the Transfer_Heights linedef's first sidedef is used as the colormap.

If they are in space A ("head over ceiling"), then the floor and ceiling textures and lightlevel from the control sector are used, and the upper texture in the Transfer_Heights linedef's first sidedef is used as the colormap.

If only two of these adjacent partitions in z-space are used, such as underwater and normal space, one has complete control over floor textures, ceiling textures, light level, and colormaps, in each of the two partitions. The control sector determines the textures and lighting in the more "unusual" case (e.g. underwater).

It's also possible for the fake floor to extend below the real floor, in which case an invisible platform / stair effect is created. In that case, the picture looks like this (barring any ceiling effects too):

    ----------------------------------  < real sector's ceiling texture
   |   real ceiling = fake ceiling    |
   |                                  |
   |                                  |
   |              B                   | < real sector's lightlevel
   |                                  | < normal texture's colormap
   |                                  |
   |          real floor              |
    ----------------------------------  < invisible, no texture drawn
   |                                  |
   |                                  |
   |                                  | < real sector's lightlevel
   |              C                   | < normal texture's colormap
   |                                  |
   |                                  |
   |          fake floor              | < real sector's floor texture
    ----------------------------------  < fake sector's floor height

In this case, since the viewer is always at or above the fake floor, no colormap/lighting/texture changes occur -- the fake floor just gets drawn at the control sector's height, but at the real sector's lighting and texture, while objects stand on the higher height of the real floor.

It's the viewer's position relative to the fake floor and/or fake ceiling, which determines whether the control sector's lighting and textures should be used, and which colormap should be used. If the viewer is always between the fake floor and fake ceiling, then no colormap, lighting, or texture changes occur, and the view just sees the real sector's textures and light level drawn at possibly different heights.

If the viewer is below the fake floor height set by the control sector, or is above the fake ceiling height set by the control sector, then the corresponding colormap is used (lower or upper texture name), and the textures and lighting are taken from the control sector rather than the real sector. They are still stacked vertically in standard order -- the control sector's ceiling is always drawn above the viewer, and the control sector's floor is always drawn below the viewer.

The kaleidoscope effect only occurs when F_SKY1 is used as the control sector's floor or ceiling. If F_SKY1 is used as the control sector's ceiling texture, then under water, only the control sector's floor appears, but it "envelops" the viewer. Similarly, if F_SKY1 is used as the control sector's floor texture, then when the player's head is over a fake ceiling, the control sector's ceiling is used throughout.

F_SKY1 causes HOM when used as a fake ceiling between the viewer and normal space. Since there is no other good use for it, this kaleidoscope is an option turned on by F_SKY1. Note that this does not preclude the use of sky REAL ceilings over deep water -- this is the control sector's ceiling, the one displayed when the viewer is underwater, not the real one.

A colormap has the same size and format as Doom's COLORMAP. Extra colormaps may defined in Boom by adding them between C_START and C_END markers in wads. Colormaps between C_START and C_END are automatically merged by Boom with any previously defined colormaps.

WATERMAP is a colormap predefined by Boom which can be used to provide a blue-green tint while the player is under water. WATERMAP can be modified by pwads.

Ceiling bleeding may occur if required upper textures are not used.