Difference between revisions of "Texture"

From DoomWiki.org

[unchecked revision][checked revision]
m (See also: sort first in its own cat)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
A '''texture''' is a graphic pattern used to cover a surface such as a [[wall]]. A texture usually is a rectangular pattern that may be ''tiled'' (repeated horizontally and/or vertically). It may also be ''clipped'' and/or ''offset''.
+
'''Textures''' are graphics built up from several [[lump|WAD lumps]] and used to cover [[Doom rendering engine|rendered]] [[wall]] surfaces. Note that textures placed on floors and ceilings are called [[flat]]s and use a different format.
  
Please refer to one of the following:
+
Each wall consists of a [[linedef]] that references one or two [[sidedef]]s (right and optionally left). Each sidedef has three texture names (lower, middle, and upper) with up to eight characters each. (The name "-" means no texture: either not applicable or totally transparent.)
* [[Flat]]s (for floor and ceiling textures)
 
* [[Wall texture]]s
 
  
==See also==
+
If a wall is tall enough that the texture needs to be tiled vertically, the texture graphics should be exactly 128 [[unit]]s high, or the [[tutti-frutti effect]] will occur. (This, however, has been addressed in most advanced [[source port]]s.)
 +
 
 +
There is no maximum width.  If the wall area is larger than the graphic, the pattern will be tiled.  Depending on the geometry of the map design, many textures may be clipped or offset (see [[Texture alignment]]).
 +
 
 +
To a limited extent, textures can be [[animated wall|animated]] to represent waterfalls, fire, dripping [[blood]] and the like.
 +
 
 +
== Technical ==
 +
 
 +
The [[Doom engine]] looks up a texture name using the wall texture lumps [[TEXTURE1 and TEXTURE2]]. (TEXTURE1 is present in all Doom versions; TEXTURE2 supports the additional textures in registered/Ultimate Doom, but is not found in [[Doom II]].) This yields a list of indices into the [[PNAMES]] lump. For each index, PNAMES gives the name of a lump known as a [[wall patch]]; each wall patch lump is stored in Doom's [[picture format]]. Rendering the texture's list of patches gives the final texture graphic that can be applied to any wall surface.
 +
 
 +
As with most lumps, if you replace a {{c|TEXTUREx}} lump in a [[PWAD]], the original IWAD lump will not be loaded. Therefore you need to copy the existing texture definitions from the IWAD into your PWAD, alongside any new ones. For Doom II, you can take advantage of the missing {{c|TEXTURE2}} lump and provide just new or changed texture definitions in that lump.
 +
 
 +
Complete details of the data structures are given in the [[Unofficial Doom Specs]].
 +
 
 +
== See also ==
 +
*[[Animated wall]]
 +
*[[Flat]]
 
*[[Hall of Mirrors effect]]
 
*[[Hall of Mirrors effect]]
 
*[[Invulnerability colormap bug]]
 
*[[Invulnerability colormap bug]]
 +
*[[Texture alignment]]
 
*[[Medusa effect]]
 
*[[Medusa effect]]
*[[Texture alignment]]
 
*[[Tutti-frutti effect]]
 
 
*[[Venetian blind crash]]
 
*[[Venetian blind crash]]
  
[[Category:Textures]]
+
[[Category:Textures|*]]
==External links==
 
[http://textures.z7server.com Texture Library]
 

Latest revision as of 12:30, 27 April 2020

Textures are graphics built up from several WAD lumps and used to cover rendered wall surfaces. Note that textures placed on floors and ceilings are called flats and use a different format.

Each wall consists of a linedef that references one or two sidedefs (right and optionally left). Each sidedef has three texture names (lower, middle, and upper) with up to eight characters each. (The name "-" means no texture: either not applicable or totally transparent.)

If a wall is tall enough that the texture needs to be tiled vertically, the texture graphics should be exactly 128 units high, or the tutti-frutti effect will occur. (This, however, has been addressed in most advanced source ports.)

There is no maximum width. If the wall area is larger than the graphic, the pattern will be tiled. Depending on the geometry of the map design, many textures may be clipped or offset (see Texture alignment).

To a limited extent, textures can be animated to represent waterfalls, fire, dripping blood and the like.

Technical[edit]

The Doom engine looks up a texture name using the wall texture lumps TEXTURE1 and TEXTURE2. (TEXTURE1 is present in all Doom versions; TEXTURE2 supports the additional textures in registered/Ultimate Doom, but is not found in Doom II.) This yields a list of indices into the PNAMES lump. For each index, PNAMES gives the name of a lump known as a wall patch; each wall patch lump is stored in Doom's picture format. Rendering the texture's list of patches gives the final texture graphic that can be applied to any wall surface.

As with most lumps, if you replace a TEXTUREx lump in a PWAD, the original IWAD lump will not be loaded. Therefore you need to copy the existing texture definitions from the IWAD into your PWAD, alongside any new ones. For Doom II, you can take advantage of the missing TEXTURE2 lump and provide just new or changed texture definitions in that lump.

Complete details of the data structures are given in the Unofficial Doom Specs.

See also[edit]