This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
banjo_kazooie:animations [2024/11/26 14:49] BanjoFreak64 [Transform Structure] |
banjo_kazooie:animations [2026/01/31 22:52] (current) minirop [Element Header] fixed address in table |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======== Animation Data ======== | ======== Animation Data ======== | ||
| - | Banjo-Kazooie uses animation files comprised of a list of Internal Bone IDs, their transformation type (scale, rotate or translate), and across which frames of an animation these transformations occur. Animation indices can be found by searching the [[https://hack64.net/wiki/doku.php?id=banjo_kazooie:rom_map | Rom Map]]. | + | Banjo-Kazooie uses animation files comprised of a list of [[https://hack64.net/wiki/doku.php?id=banjo_kazooie:model_data#animation_setup:~:text=ii%20ii%5D-,Internal%20Bone%20ID,-0x000E|Internal Bone IDs]], their transformation type (scale, rotate or translate), and across which frames of an animation these transformations occur. Animation indices can be found in the [[https://hack64.net/wiki/doku.php?id=banjo_kazooie:rom_map | Rom Map]]. |
| Line 9: | Line 9: | ||
| ^ Address ^ Value / Syntax ^ Description ^ | ^ Address ^ Value / Syntax ^ Description ^ | ||
| | 0x0000 | [<color #ed1c24>xx xx</color>] | Start Frame of animation | | | 0x0000 | [<color #ed1c24>xx xx</color>] | Start Frame of animation | | ||
| - | | 0x0004 | [<color #ffaec9>yy yy</color>] | End Frame of animation | | + | | 0x0002 | [<color #ffaec9>yy yy</color>] | End Frame of animation | |
| - | | 0x0008 | [<color #a800ff>zz zz</color>] | Element Count | | + | | 0x0004 | [<color #a800ff>zz zz</color>] | Element Count | |
| - | | 0x000C | [00 00] | Padding / Unknown | | + | | 0x0006 | [00 00] | Padding / Unknown | |
| **Example (60f0.bin, Banjo's Backflip at address 0x0):** | **Example (60f0.bin, Banjo's Backflip at address 0x0):** | ||
| Line 17: | Line 17: | ||
| ''<color #ed1c24>00 0F</color> <color #ffaec9>00 A5</color> <color #a800ff>00 48</color> 00 00'' | ''<color #ed1c24>00 0F</color> <color #ffaec9>00 A5</color> <color #a800ff>00 48</color> 00 00'' | ||
| - | Loads an animation beginning at frame 15 (0x0F) and ending at frame 165 (0xA5) with 72 (0x48) elements across those frames. | + | Loads an animation beginning at frame 15 (<color #ed1c24>0x0F</color>) and ending at frame 165 (<color #ffaec9>0xA5</color>) with 72 (<color #a800ff>0x48</color>) elements across those frames. |
| Line 25: | Line 25: | ||
| ^ Offset from End of Header ^ Value / Syntax ^ Description ^ | ^ Offset from End of Header ^ Value / Syntax ^ Description ^ | ||
| | 0x0000 | [<color #00c6ff>aa a</color><color #ff8a00>b</color>] | <color #00c6ff>aa</color> = Internal Bone ID, <color #ff8a00>b</color> = Transform Type* | | | 0x0000 | [<color #00c6ff>aa a</color><color #ff8a00>b</color>] | <color #00c6ff>aa</color> = Internal Bone ID, <color #ff8a00>b</color> = Transform Type* | | ||
| - | | 0x0004 | [<color #5724ff>cc cc</color>] | Data Count | | + | | 0x0002 | [<color #5724ff>cc cc</color>] | Data Count | |
| **Example (60f0.bin, Banjo's Backflip at address 0x08):** | **Example (60f0.bin, Banjo's Backflip at address 0x08):** | ||
| Line 31: | Line 31: | ||
| ''<color #00c6ff>00 1</color><color #ff8a00>0</color> <color #5724ff>00 09</color>'' | ''<color #00c6ff>00 1</color><color #ff8a00>0</color> <color #5724ff>00 09</color>'' | ||
| - | This element targets Internal Bone ID 0x1, rotates the bone around the X axis, and does this at 9 different points between frames 15 and 165. | + | This element targets Internal Bone ID 1 (<color #00c6ff>0x1</color>), rotates the bone around the X axis (<color #ff8a00>0x0</color>), and does this at 9 (<color #5724ff>0x9</color>) different points between frames 15 and 165. |
| ^ *Transform Type ^ Value ^ | ^ *Transform Type ^ Value ^ | ||
| Line 44: | Line 44: | ||
| | Z Translation | 8 | | | Z Translation | 8 | | ||
| ===== Transform Structure ===== | ===== Transform Structure ===== | ||
| - | The transform structure details the frames in which a transformation of the bone occurs (i.e. translate, rotate, or scale) and by how much the bone moves between frames with respect to the scale of the model (transform factor).Transform structure is repeated for instances [<color #5724ff>cc cc</color>] before introducing the next element header where [<color #5724ff>cc cc</color>] = Data Count. The first two bytes of data contain two bits representing unknown values and fourteen bits which determine the frame of a transformation. | + | The transform structure details the frames in which a transformation of the bone occurs and by how much the bone moves between frames with respect to the scale of the model (transform factor). Transform structure is repeated for instances [<color #5724ff>cc cc</color>] before introducing the next element header where [<color #5724ff>cc cc</color>] = [[https://hack64.net/wiki/doku.php?id=banjo_kazooie:animations#element_header:~:text=0x0004-,%5Bcc%20cc%5D,-Data%20Count|Data Count]]. The first two bytes of data contain two bits representing unknown values and fourteen bits which determine the frame of a transformation. |
| *Bitwise Parameters: | *Bitwise Parameters: | ||