Materials (Metroid Prime): Difference between revisions
→UV Animations
>Aruki (→UV Animations: better overview) |
>Aruki |
||
Line 621: | Line 621: | ||
==== Mode 2: UV Offset ==== | ==== Mode 2: UV Offset ==== | ||
This mode is used to scroll both U and V at the same time. It has four float parameters: ''offsetA'', ''offsetB'', ''scaleA'', and ''scaleB''. | This mode is used to scroll both U and V at the same time. It will only generate a texture matrix. It has four float parameters: ''offsetA'', ''offsetB'', ''scaleA'', and ''scaleB''. | ||
<pre>uOffset = (s * scaleA) + offsetA; | <pre>uOffset = (s * scaleA) + offsetA; | ||
Line 628: | Line 628: | ||
==== Mode 3: Rotation ==== | ==== Mode 3: Rotation ==== | ||
This mode rotates the texture. It has two float parameters: ''offset'' and ''scale''. | This mode rotates the texture. It will only generate a texture matrix. It has two float parameters: ''offset'' and ''scale''. | ||
<pre>float angle = (s * scale) + offset; | <pre>float angle = (s * scale) + offset; | ||
Line 644: | Line 644: | ||
==== Mode 4/5: U/V Offset ==== | ==== Mode 4/5: U/V Offset ==== | ||
These modes can be used to scroll U and V independently from each other; they can also be used to have more advanced . The same calculation is done for both modes, with the only difference being whether the calculated offset is applied to U or V. There are four float parameters: ''scale'', ''numFrames'', ''step'', and ''offset''. | These modes can be used to scroll U and V independently from each other; they can also be used to have more advanced . The same calculation is done for both modes, with the only difference being whether the calculated offset is applied to U or V. It will only generate a texture matrix. There are four float parameters: ''scale'', ''numFrames'', ''step'', and ''offset''. | ||
The animation is made up of a number of pseudo-frames, where ''step'' controls the amount that the texture scrolls by each frame, and ''numFrames'' sets how many frames are iterated through before resetting back to 0. ''scale'' roughly controls animation playback speed, and ''offset'' modifies the time input value. | The animation is made up of a number of pseudo-frames, where ''step'' controls the amount that the texture scrolls by each frame, and ''numFrames'' sets how many frames are iterated through before resetting back to 0. ''scale'' roughly controls animation playback speed, and ''offset'' modifies the time input value. |