Vertical textures

From AlephWiki

Jump to: navigation, search

Texturing onto Vertical Surfaces

Return to History

Loren Petrich

Here's how sides work in the Marathon engine. Each line has an index for a side object for its clockwise-side and counterclockwise-side polygons; each side object is only visible from its associated polygon. Each side object contains three textures: the primary one, the secondary one, and the transparent one. These get rendered in the order primary, secondary, and transparent.

There are some conventions for which texture gets used where; these depend on the floor and ceiling heights of the polygon and its neighbor across the line. I'll call the floor and ceiling of the polygon observed from f0 and c0, and those of the neighboring polygon f1 and c1. I'll assume c0 >= f0 and c1 >= f1.

  • No neighboring polygon, or out-of-range polygon (too high: f1 >= c0; too low: c1 <= f0). The whole side gets primary, secondary, and transparent textures. [_full_side]
  • Full-length portal to neighboring polygon (f1 <= f0, c1 >= c0): the whole side gets the transparent texture. [_full_side]
  • Portal in upper part of side (f0 < f1 < c0; c1 > c0). The f0-to-f1 part gets the primary texture and the f1-to-c0 part gets the transparent texture. [_low_side]
  • Portal in lower part of side (f1 < f0; f0 < c1 < f1). The f0-to-c1 part gets the transparent texture and the c1-to-c0 part gets the primary texture. [_high_side]
  • Portal in middle of side (f1 > f0; c1 < c0). The f0-to-f1 part gets the secondary texture, the f1-to-c1 part gets the transparent texture, and the c1-to-c0 part gets the primary texture. [_split_side]


The value _composite_side is not used by the code; ignore it. I think it's a M1 holdover that became redundant in M2.

Personal tools