Maya Spline
From Retro Modding Wiki
Revision as of 12:55, 3 March 2017 by Aruki (Talk | contribs) (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...")
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.
Format
Metroid Prime 2
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. |
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 |