Difference between revisions of "Flat"

From DoomWiki.org

[unchecked revision][checked revision]
m
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A '''flat''' is an image that is drawn on the floors and ceilings of [[sector]]s.  Flats are very different from [[wall texture]]s. Flats are a raw collection of pixel values with no offset or other dimension information; each flat is a named [[lump]] of 4096 bytes representing a 64×64 square.  The pixel values are converted to actual colors in the same way as for the Doom [[picture format]].
+
A '''flat''' is an image that is drawn on the floors and ceilings of [[sector]]s.  Flats are very different from [[wall texture]]s. Flats are a raw collection of pixel values with no offset or other dimension information; each flat is a named [[lump]] of 4096 bytes representing a 64×64 square.  The pixel values are converted to actual colors in the same way as for the Doom [[picture format]], using the [[colormap]].
  
 
Flats are always drawn aligned to a fixed grid. This ensures that floor and ceiling textures flow smoothly from sector to sector. It can also cause problems for level designers, usually when placing teleport pads.
 
Flats are always drawn aligned to a fixed grid. This ensures that floor and ceiling textures flow smoothly from sector to sector. It can also cause problems for level designers, usually when placing teleport pads.
Line 5: Line 5:
 
Certain flats are animated to represent water, lava, blood, slime, or other substances. See [[animated flat]].
 
Certain flats are animated to represent water, lava, blood, slime, or other substances. See [[animated flat]].
  
With [[vanilla Doom]], placing flats in [[PWAD]] files presents a number of difficulties. In particular, all flats used (not just those replaced) must be present in the PWAD. Most [[source port]]s are able to overcome this limitation.
+
The [[Heretic]], [[Hexen]], and [[Strife]] codebases, as well as the [[Boom]] [[source port]], extend flat drawing to support scrolling. Other source ports have added additional features such as customizable alignment, scaling, rotation, warping, and high-resolution flat graphics. In Heretic and Hexen, flats that are meant to scroll are taller than 64 pixels (64x65 in Heretic, 64x128 in Hexen), this is a workaround to prevent overflows when accessing pixel data and not a change in the actual dimensions of the flat as rendered by the engine.
  
 
Complete details are in the [[Unofficial Doom Specs]].
 
Complete details are in the [[Unofficial Doom Specs]].
 
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]
 
[[Category:Resources]]
 
[[Category:Resources]]

Latest revision as of 09:52, 20 December 2015

A flat is an image that is drawn on the floors and ceilings of sectors. Flats are very different from wall textures. Flats are a raw collection of pixel values with no offset or other dimension information; each flat is a named lump of 4096 bytes representing a 64×64 square. The pixel values are converted to actual colors in the same way as for the Doom picture format, using the colormap.

Flats are always drawn aligned to a fixed grid. This ensures that floor and ceiling textures flow smoothly from sector to sector. It can also cause problems for level designers, usually when placing teleport pads.

Certain flats are animated to represent water, lava, blood, slime, or other substances. See animated flat.

The Heretic, Hexen, and Strife codebases, as well as the Boom source port, extend flat drawing to support scrolling. Other source ports have added additional features such as customizable alignment, scaling, rotation, warping, and high-resolution flat graphics. In Heretic and Hexen, flats that are meant to scroll are taller than 64 pixels (64x65 in Heretic, 64x128 in Hexen), this is a workaround to prevent overflows when accessing pixel data and not a change in the actual dimensions of the flat as rendered by the engine.

Complete details are in the Unofficial Doom Specs.