Texture (DEF): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Hendricks266 (talk | contribs) No edit summary |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Under construction}} | {{Under construction}} | ||
<span {{code}}>'''texture''' <tilenum> { [...] }</span> | <span {{code}}>'''texture''' <tilenum> { [...] }</span> (or '''tile''') | ||
Defines a Hightile texture to replace an ART-file tile. <tilenum> may be a number, or a defined label. | Defines a Hightile texture to replace an ART-file tile. <tilenum> may be a number, or a defined label. | ||
Line 45: | Line 45: | ||
:: <span {{code}}>'''forcefilter'''</span> | :: <span {{code}}>'''forcefilter'''</span> | ||
:: | :: Always apply texture filtering regardless of user settings. Useful for UI elements. | ||
:: <span {{code}}>'''artquality''' | :: <span {{code}}>'''artquality'''</span> | ||
:: | :: Similar to <code>nocompress nodownsize</code>, but smarter. Use if your texture is similar to pixel art, such as textures from Duke 64 that use colors outside the global 256-color palette. Prevents texture from being downsized, but allows S3TC compression if texture compression is set to "aggressive" (aka. r_texcompr 2), which is sometimes necessary on low-end devices such as old ARM hardware. | ||
:: <span {{code}}>'''xscale''' <value></span> (or '''detailscale''' / '''scale''' / '''intensity''')<br /> | :: <span {{code}}>'''xscale''' <value></span> (or '''detailscale''' / '''scale''' / '''intensity''')<br /> |
Latest revision as of 13:29, 3 April 2023
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
- Always apply texture filtering regardless of user settings. Useful for UI elements.
- artquality
- Similar to
nocompress nodownsize
, but smarter. Use if your texture is similar to pixel art, such as textures from Duke 64 that use colors outside the global 256-color palette. Prevents texture from being downsized, but allows S3TC compression if texture compression is set to "aggressive" (aka. r_texcompr 2), which is sometimes necessary on low-end devices such as old ARM hardware.
- Similar to
- xscale <value> (or detailscale / scale / intensity)
- yscale <value>
- xscale <value> (or detailscale / scale / intensity)
- 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>
- orig_sizex <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 } }