19,416
edits
m (→Compression size 6: note on duration vs final tick; corrected angle correspondence) |
m (localized image) |
||
Line 5: | Line 5: | ||
[[ | [[Image:tram_r11.gif]] | ||
Line 30: | Line 30: | ||
Here's the minimal structure of the body animation tracks for a TRAM file (address stored at 0x34 in the dat) | Here's the minimal structure of the body animation tracks for a TRAM file (address stored at 0x34 in the .dat). The example below is for '''SHINZOMidle1''': those bone tracks are found at 0x480020 in the original level18_Final.raw. The global structure is 19 bone tracks, preceded by a list of their offsets (the "header"). | ||
The global | |||
Information required to read this part : | Information required to read this part : | ||
*number of body parts (at 0x16A in the dat, always 19 in Oni) | *number of body parts (at 0x16A in the .dat, always 19 in Oni) | ||
*"compression size" (at 0x160 in the dat, 6 for almost all anims, 16 for a few) | *"compression size" (at 0x160 in the .dat, 6 for almost all anims, 16 for a few) | ||
*frame count (at 0x16C in the dat) | *frame count (at 0x16C in the .dat) | ||
The size of a bone track is not known in advance. See "General info" below. | The size of a bone track is not known in advance. See "General info" below. | ||
[[Image:TRAM 0x34.png]] | |||
Line 330: | Line 326: | ||
'''N.B.''' An animation with frame count 10, like the above '''SHINZOMidle1''', also has a ''duration'' of 10 game ticks which extends 1 tick past the final rotation keyframe. If an intermediate pose needs to be calculated during the final tick (e.g., during slowmo), it will be interpolated between the final keyframe of the current animation and the first keyframe of the following animation. In the case of '''SHINZOMidle1''', the rotation pose is exactly the same throughout the animation, so the pose during the last tick of an idle loop will be constant as well (apart from the height shift). | '''N.B.''' An animation with frame count 10, like the above '''SHINZOMidle1''', also has a ''duration'' of 10 game ticks which extends 1 tick past the final rotation keyframe. If an intermediate pose needs to be calculated during the final tick (e.g., during slowmo), it will be interpolated between the final keyframe of the current animation and the first keyframe of the following animation. In the case of '''SHINZOMidle1''', the rotation pose is exactly the same throughout the animation, so the pose during the last tick of an idle loop will be constant as well (apart from the height shift). | ||
====Origin and direction of the angles==== | ====Origin and direction of the angles==== | ||
If the (0°, 0°, 0°) orientation is set for every bone, then all the bones point along the x axis of the character (from right to left) and face upwards | If the (0°, 0°, 0°) orientation is set for every bone, then all the bones point along the x axis of the character (from right to left) and face upwards |