Materials (Metroid Prime): Difference between revisions
→Material Animations
>Aruki |
>Aruki |
||
Line 576: | Line 576: | ||
|} | |} | ||
=== | === UV Animations === | ||
The | The UV animations section immediately follows the texgen flags. It starts with this short header: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 594: | Line 594: | ||
|} | |} | ||
A material can have multiple animations; each animation will generate a separate texture matrix, which can then be used by texgen to transform the texture coordinates accordingly. The structure of the animations themselves is somewhat simple. Each animation has a 32-bit ''mode'' setting, followed by a number of float parameters. The number and usage of these float parameters varies depending on what mode is set. There are 8 possible modes, | A material can have multiple animations; each animation will generate a separate texture matrix, which can then be used by texgen to transform the texture coordinates accordingly. The structure of the animations themselves is somewhat simple. Each animation has a 32-bit ''mode'' setting, followed by a number of float parameters. The number and usage of these float parameters varies depending on what mode is set. There are 8 possible modes. | ||
Note that despite the name, the UV animations section is meant for transforming UV coordinates in general; they don't necessarily have to be actual animations. | |||
For all of the following modes, ''s'' refers to ''seconds mod 900''. | For all of the following modes, ''s'' refers to ''seconds mod 900''. | ||
Line 626: | Line 628: | ||
==== Mode 3: Rotation ==== | ==== Mode 3: Rotation ==== | ||
This mode rotates the | This mode rotates the texture. It has two float parameters: ''offset'' and ''scale''. | ||
<pre>angle = (s * scale) + offset;</pre> | <pre>angle = (s * scale) + offset;</pre> | ||
The | The texture is then rotated by ''angle'' degrees. | ||
==== Mode 4/5: U/V Offset ==== | ==== Mode 4/5: U/V Offset ==== |