Editing Darkplaces material system/Stages
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{navigation title| | + | {{navigation title|Darkplaces material system|Stages}} |
== Texture Map == | == Texture Map == | ||
Specifies the base texture map (a 24 or 32-bit TGA or JPEG file) used for this material. | Specifies the base texture map (a 24 or 32-bit TGA or JPEG file) used for this material. | ||
Line 58: | Line 58: | ||
== alphaGen vertex == | == alphaGen vertex == | ||
− | Enables vertex-controlled transparency. Reguires per-vertex rgba attributes which is supported on [[ | + | Enables vertex-controlled transparency. Reguires per-vertex rgba attributes which is supported on [[bmodel | submodels]]. |
[[ASE]] format used by [[misc_model]] (and converted to map geometry during compile) supports per-vertex transparency. | [[ASE]] format used by [[misc_model]] (and converted to map geometry during compile) supports per-vertex transparency. | ||
Line 87: | Line 87: | ||
:Scrolls the texture coordinates with the given speeds. The values "s" and "t" conform to the "x" and "y" values (respectively) as they are found in the original texture file. The scroll speed is measured in "textures" per second. A "texture" is the dimension of the texture being modified and includes any previous material modifications to the original texture file). A negative s value would scroll the texture to the left. A negative t value would scroll the texture down. | :Scrolls the texture coordinates with the given speeds. The values "s" and "t" conform to the "x" and "y" values (respectively) as they are found in the original texture file. The scroll speed is measured in "textures" per second. A "texture" is the dimension of the texture being modified and includes any previous material modifications to the original texture file). A negative s value would scroll the texture to the left. A negative t value would scroll the texture down. | ||
:'''Example''': | :'''Example''': | ||
− | <font color=green> | + | <font color=green>Moves the texture down and right (relative to the TGA files original coordinates) at the rate of a half texture each second of travel.</font> |
<font color=blue>tcMod scroll</font> 0.5 -0.5 | <font color=blue>tcMod scroll</font> 0.5 -0.5 | ||
:'''IMPORTANT NOTE''': This should be the last tcMod in a stage. Otherwise there may be a popping or snapping visual effect in some materials. | :'''IMPORTANT NOTE''': This should be the last tcMod in a stage. Otherwise there may be a popping or snapping visual effect in some materials. | ||
Line 93: | Line 93: | ||
=== tcMod stretch <func> <base> <amplitude> <phase> <frequency> === | === tcMod stretch <func> <base> <amplitude> <phase> <frequency> === | ||
:Stretches the texture coordinates with the given function. Stretching is defined as stretching the texture coordinate away from the center of the polygon and then compressing it towards the center of the polygon. (see Key Concepts for waveform parameter definitions). | :Stretches the texture coordinates with the given function. Stretching is defined as stretching the texture coordinate away from the center of the polygon and then compressing it towards the center of the polygon. (see Key Concepts for waveform parameter definitions). | ||
− | |||
− | |||
− | |||
=== tcMod transform <m00> <m01> <m10> <m11> <t0> <t1> === | === tcMod transform <m00> <m01> <m10> <m11> <t0> <t1> === | ||
Line 101: | Line 98: | ||
:S = s * m00 + t * m10 + t0 | :S = s * m00 + t * m10 + t0 | ||
:T = s * m01 + t * m11 + t1 | :T = s * m01 + t * m11 + t1 | ||
− | :This is for use by programmers. | + | :This is for use by programmers. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=== tcMod turb <base> <amplitude> <phase> <freq> === | === tcMod turb <base> <amplitude> <phase> <freq> === | ||
:Applies turbulence to the texture coordinate. Turbulence is a back and forth churning and swirling effect on the texture. | :Applies turbulence to the texture coordinate. Turbulence is a back and forth churning and swirling effect on the texture. | ||
− | |||
− | |||
− | |||
− | |||
:'''IMPORTANT NOTE''': This should be first tcMod in a stage because it is only software tcMod (all other ones transform texture matrix). | :'''IMPORTANT NOTE''': This should be first tcMod in a stage because it is only software tcMod (all other ones transform texture matrix). | ||
+ | :* '''base''' : Undefined. | ||
+ | :* '''amplitude''' : This is essentially the intensity of the disturbance or twisting and squiggling of the texture. | ||
+ | :* '''phase''' : See the explanation for phase under the deformVertexes keyword. | ||
+ | :* '''freq''' : Frequency. This value is expressed as repetitions or cycles of the wave per second. A value of one would cycle once per second. A value of 10 would cycle 10 times per second. A value of 0.1 would cycle once every 10 seconds. | ||
=== tcMod page <width> <height> <delay> === | === tcMod page <width> <height> <delay> === | ||
Line 178: | Line 170: | ||
} | } | ||
} | } | ||
− | |||
− | |||
− |