Difference between revisions of "Maya Spline"
From Retro Modding Wiki
(Created page with "A '''Maya Spline''' is a 2D hermite curve first introduced in Metroid Prime 2: Echoes. It's used in various file formats to animate some sort of effect over time. It most comm...") |
(→Format) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
== Format == | == Format == | ||
− | === Metroid Prime 2 === | + | === Structure === |
+ | |||
+ | ==== Metroid Prime 2/3 ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 47: | Line 49: | ||
| '''Maximum Amplitude''' | | '''Maximum Amplitude''' | ||
| Maximum amplitude used for clamped splines. | | Maximum amplitude used for clamped splines. | ||
+ | |} | ||
+ | |||
+ | ==== Donkey Kong Country Returns ==== | ||
+ | |||
+ | Basically the same data as in Prime 2/3, but shifted around slightly. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Type | ||
+ | ! Count | ||
+ | ! Name | ||
+ | ! Notes | ||
+ | |- | ||
+ | | u32 | ||
+ | | 1 | ||
+ | | '''Knot Count''' | ||
+ | | Number of knots in the spline. | ||
+ | |- | ||
+ | | [[#Knot|Knot]] | ||
+ | | ''Knot Count'' | ||
+ | | '''Knot Array''' | ||
+ | | Array of knots forming the actual spline. | ||
+ | |- | ||
+ | | float | ||
+ | | 1 | ||
+ | | '''Minimum Amplitude''' | ||
+ | | Minimum amplitude used for clamped splines. | ||
+ | |- | ||
+ | | float | ||
+ | | 1 | ||
+ | | '''Maximum Amplitude''' | ||
+ | | Maximum amplitude used for clamped splines. | ||
+ | |- | ||
+ | | u8 | ||
+ | | 1 | ||
+ | | [[#Infinite Type Enum|'''Pre Infinity''']] | ||
+ | | Infinity setting for time ranges before the start time of the spline curve. | ||
+ | |- | ||
+ | | u8 | ||
+ | | 1 | ||
+ | | [[#Infinity Type Enum|'''Post Infinity''']] | ||
+ | | Infinity setting for time ranges after the end time of the spline curve. | ||
+ | |- | ||
+ | | u8 | ||
+ | | 1 | ||
+ | | [[#Clamp Mode Enum|'''Clamp Mode''']] | ||
+ | | Clamp mode setting. | ||
|} | |} | ||
Latest revision as of 13:00, 3 March 2017
A Maya Spline is a 2D hermite curve first introduced in Metroid Prime 2: Echoes. It's used in various file formats to animate some sort of effect over time. It most commonly shows up in MREA files in script object properties, but it can also appear in other formats.
Contents
Format
Structure
Metroid Prime 2/3
Type | Count | Name | Notes |
---|---|---|---|
u8 | 1 | Pre Infinity | Infinity setting for time ranges before the start time of the spline curve. |
u8 | 1 | Post Infinity | Infinity setting for time ranges after the end time of the spline curve. |
u32 | 1 | Knot Count | Number of knots in the spline. |
Knot | Knot Count | Knot Array | Array of knots forming the actual spline. |
u8 | 1 | Clamp Mode | Clamp mode setting. |
float | 1 | Minimum Amplitude | Minimum amplitude used for clamped splines. |
float | 1 | Maximum Amplitude | Maximum amplitude used for clamped splines. |
Donkey Kong Country Returns
Basically the same data as in Prime 2/3, but shifted around slightly.
Type | Count | Name | Notes |
---|---|---|---|
u32 | 1 | Knot Count | Number of knots in the spline. |
Knot | Knot Count | Knot Array | Array of knots forming the actual spline. |
float | 1 | Minimum Amplitude | Minimum amplitude used for clamped splines. |
float | 1 | Maximum Amplitude | Maximum amplitude used for clamped splines. |
u8 | 1 | Pre Infinity | Infinity setting for time ranges before the start time of the spline curve. |
u8 | 1 | Post Infinity | Infinity setting for time ranges after the end time of the spline curve. |
u8 | 1 | Clamp Mode | Clamp mode setting. |
Knot
Offset | Type | Name | Notes |
---|---|---|---|
0x0 | float | Time (X) | Time the knot is placed at; also serves as the knot's X position on the spline. |
0x4 | float | Amplitude (Y) | Amplitude of the knot; also serves as the knot's Y position on the spline. |
0x8 | u8 | Unknown | |
0x9 | u8 | Unknown |
Infinity Type Enum
This file format is almost completely documented Values are unknown but are probably similar to the values on this page. |
Clamp Mode Enum
ID | Mode |
---|---|
0 | Unclamped |
1 | Clamped between min/max |
2 | Unknown |