User:Fox/wip: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
Fox (talk | contribs)
No edit summary
Line 17: Line 17:
The brace-enclosed block may contain these instructions:
The brace-enclosed block may contain these instructions:


:<span {{Def subelement}}>pal <i><palnum> { ... }</i></span>
: <span {{Def subelement}}>pal <i><palnum> { ... }</i></span>


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


:The brace-enclosed block may contain these instructions:
: The brace-enclosed block may contain these instructions:


::<span {{Def subelement}}>file <i><filename></i></span> (or <span {{Def subelement}}>name <i><filename></i></span>)
:: <span {{Def subelement}}>file <i><filename></i></span> (or <span {{Def subelement}}>name <i><filename></i></span>)


::Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.
:: Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.


::<span {{Def subelement}}>alphacut <i><cutoff-value></i></span>
:: <span {{Def subelement}}>alphacut <i><cutoff-value></i></span>


::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.
:: 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.


::<span {{Def subelement}}>nocompress</span>
:: <span {{Def subelement}}>nocompress</span>


::Prevents the texture from being compressed using S3TC if texture compression is enabled.
:: Prevents the texture from being compressed using S3TC if texture compression is enabled.


::<span {{Def subelement}}>nodownsize</span>
:: <span {{Def subelement}}>nodownsize</span>


::Prevents the texture from being downsized.
:: Prevents the texture from being downsized.


::<span {{Def subelement}}>xscale <i><value></i></span><br />
:: <span {{Def subelement}}>xscale <i><value></i></span><br />
::<span {{Def subelement}}>yscale <i><value></i></span>
:: <span {{Def subelement}}>yscale <i><value></i></span>


::Sets the scale of the hightile texture in relation to the original texture. A <i><value></i> 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. <b>xscale</b> (aka <b>scale</b>, <b>detailscale</b>, <b>intensity</b>) sets the horizontal scale and <b>yscale</b> sets the vertical scale.
:: Sets the scale of the hightile texture in relation to the original texture. A <i><value></i> 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. <b>xscale</b> (aka <b>scale</b>, <b>detailscale</b>, <b>intensity</b>) sets the horizontal scale and <b>yscale</b> sets the vertical scale.


:<span {{Def subelement}}>detail <i>{ ... }</i></span>
: <span {{Def subelement}}>detail <i>{ ... }</i></span>


:Defines a [[Detail_mapping|detail texture]] for the texture. The brace-enclosed block may contain these instructions:
: Defines a [[Detail_mapping|detail texture]] for the texture. The brace-enclosed block may contain these instructions:


::<span {{Def subelement}}>file <i><filename></i></span>
:: <span {{Def subelement}}>file <i><filename></i></span>


::Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.
:: Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.


::<span {{Def subelement}}>scale <i><value></i></span>
:: <span {{Def subelement}}>scale <i><value></i></span>


::<i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).
:: <i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).


:<span {{Def subelement}}>glow <i>{ ... }</i></span>
: <span {{Def subelement}}>glow <i>{ ... }</i></span>


:Defines a [[Glow_mapping|glow map]] for the texture. The brace-enclosed block may contain these instructions:
: Defines a [[Glow_mapping|glow map]] for the texture. The brace-enclosed block may contain these instructions:


::<span {{Def subelement}}>file <i><filename></i></span>
:: <span {{Def subelement}}>file <i><filename></i></span>


::Specifies which glow map file to use. This instruction must be supplied.
:: Specifies which glow map file to use. This instruction must be supplied.


=====<div {{Def link}}>tint</div>=====
=====<div {{Def link}}>tint</div>=====
Line 76: Line 76:
The brace-enclosed block may contain these instructions:
The brace-enclosed block may contain these instructions:


:<span {{Def subelement}}>pal''' <i><palnum></i></span>
: <span {{Def subelement}}>pal''' <i><palnum></i></span>


:The palette number the tint applies to.
: The palette number the tint applies to.


:<span {{Def subelement}}>'''red''' <i><value></i></span> (or <span {{Def subelement}}>'''r''' <i><value></i></span>)<br />
: <span {{Def subelement}}>'''red''' <i><value></i></span> (or <span {{Def subelement}}>'''r''' <i><value></i></span>)<br />
:<span {{Def subelement}}>'''green''' <i><value></i></span> (or <span {{Def subelement}}>'''g''' <i><value></i></span>)<br />
: <span {{Def subelement}}>'''green''' <i><value></i></span> (or <span {{Def subelement}}>'''g''' <i><value></i></span>)<br />
:<span {{Def subelement}}>'''blue''' <i><value></i></span> (or <span {{Def subelement}}>'''b''' <i><value></i></span>)
: <span {{Def subelement}}>'''blue''' <i><value></i></span> (or <span {{Def subelement}}>'''b''' <i><value></i></span>)


:Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.
: Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.


:<span {{Def subelement}}>'''flags''' <i><flags></i></span>
: <span {{Def subelement}}>'''flags''' <i><flags></i></span>


:Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:
: Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:


:0 = no effects<br />
: 0 = no effects<br />
:1 = convert to greyscale<br />
: 1 = convert to greyscale<br />
:2 = invert colors
: 2 = invert colors


== Test ==
== Test ==
== Test ==
== Test ==

Revision as of 23:43, 10 October 2009

Definitions

texture

texture <tilenum> { ... }

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

Example:

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 }
}

The brace-enclosed block may contain these instructions:

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.
The brace-enclosed block may contain these instructions:
file <filename> (or name <filename>)
Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.
alphacut <cutoff-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.
xscale <value>
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.
detail { ... }
Defines a detail texture for the texture. The brace-enclosed block may contain these instructions:
file <filename>
Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.
scale <value>
<value> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).
glow { ... }
Defines a glow map for the texture. The brace-enclosed block may contain these instructions:
file <filename>
Specifies which glow map file to use. This instruction must be supplied.
tint

tint { ... }

Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles.

Example:

tint { pal 1 red 127 green 127 blue 255 flags 0 }
tint { pal 2 green 127 blue 127 }

The brace-enclosed block may contain these instructions:

pal <palnum>
The palette number the tint applies to.
red <value> (or r <value>)
green <value> (or g <value>)
blue <value> (or b <value>)
Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.
flags <flags>
Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:
0 = no effects
1 = convert to greyscale
2 = invert colors

Test

Test