Texture (DEF)

From EDukeWiki
Revision as of 16:18, 7 March 2023 by StrikerTheHedgefox (talk | contribs) (Reverted edits by MexMercury (talk) to last revision by StrikerTheHedgefox)
Jump to navigation Jump to search
This page is under construction.
Please help review and edit this page.

texture <tilenum> { [...] } (or tile)

Defines a Hightile texture to replace an ART-file tile. <tilenum> may be a number, or a defined label.

Tokens

pal <palnum> { [...] }

Replaces the palette <palnum>. If a palette has no pal definition palette 0 definition will be used. Tint will not be used on palettes defined with this instruction.

detail { [...] }

Defines a detail texture for the texture.

glow { [...] }

Defines a glow map for the texture.

specular { [...] }

DESCRIPTION

normal { [...] }

DESCRIPTION

file <filename> (or name)
Defines which texture file to use. File may be any PNG, JPG, DDS, TGA, BMP, GIF or PCX file. This instruction must be supplied.
alphacut <value>
Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.
nocompress
Prevents the texture from being compressed using S3TC if texture compression is enabled.
nodownsize
Prevents the texture from being downsized.
forcefilter
DESCRIPTION
artquality <value>
Prevents texture from being downsized, but allows S3TC compression if texture compression is set to "aggressive". (Aka. r_texcompr 2)
xscale <value> (or detailscale / scale / intensity)
yscale <value>
Sets the scale of the hightile texture in relation to the original texture. A <value> of 1.0 makes it the same size, higher makes it cover more then the original tile and smaller makes it cover a smaller area. xscale (aka scale, detailscale, intensity) sets the horizontal scale and yscale sets the vertical scale.
orig_sizex <value>
orig_sizey <value>
DESCRIPTION
specpower <value> (or specularpower / parallaxscale)
DESCRIPTION
specfactor <value> (or specularfactor / parallaxbias)
DESCRIPTION

Examples

texture 3586 {
  pal 0 { file "mymod/tree.png" }
  pal 21 { file "mymod/tree_red.png" xscale 2.0 yscale 2.0 alphacut 0 nodownsize nocompress }
  glow { file "mymod/tree_light.png" }
  detail { file "mymod/plant_texture.png" scale 0.5 }
}