Materials (Metroid Prime): Difference between revisions

Jump to navigation Jump to search
→‎UV Animations: better overview
>Aruki
>Aruki
(→‎UV Animations: better overview)
Line 578: Line 578:
=== UV Animations ===
=== UV Animations ===


The UV animations section immediately follows the texgen flags. It starts with this short header:
The UV animations section immediately follows the texgen flags. Its purpose is to generate texture matrices and post-transform matrices, which are then used to transform UV coordinates. This is commonly used to animate textures via simple UV scrolls, but it's also often used to simulate reflective surfaces that move with the camera. Materials can have multiple UV animations; in that case, each animation generates a separate texture/post-transform matrix and are loaded into GX sequentially. Texgen is used to set which matrices are used by which UV coordinates (if any).
 
The section starts with this short header:


{| class="wikitable"
{| class="wikitable"
Line 594: Line 596:
|}
|}


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.
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''.
Anonymous user

Navigation menu