User Tools

Site Tools


banjo_kazooie:model_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
banjo_kazooie:model_data [2024/11/26 15:24]
BanjoFreak64 [Effects Setup]
banjo_kazooie:model_data [2024/11/26 16:13] (current)
BanjoFreak64 [Animation Setup]
Line 98: Line 98:
  
 A vertex will be drawn at position (20, 98, -25). UV mapping will begin at -20 coordinates in the U axis and 20 coordinates in the V axis. This vertex will feature a color of #929292 with full opacity alpha of 0xFF or 255. A vertex will be drawn at position (20, 98, -25). UV mapping will begin at -20 coordinates in the U axis and 20 coordinates in the V axis. This vertex will feature a color of #929292 with full opacity alpha of 0xFF or 255.
 +
 +----
 +===== Animation Setup ======
 +The animation setup rigs bones to a model and anchors them to the origin, or the parent bone (0xFFFF). It is comprised of two sections: A header, and a bone setup.
 +
 +**Animation Header**
 +^ Offset from Animation Setup ^ Value Syntax ^ Description ^
 +| 0x0000 | [<color #​22b14c>​aa aa aa aa</​color>​] | Scaling Factor (float) |
 +| 0x0004 | [<color #​00a2e8>​bb bb</​color>​] | Bone Count |
 +| 0x0006 | [00 00] | Padding / Unk |
 +
 +**Example (74a8.bin, Slappa at address 0x2ca8):**
 +
 +''<​color #​22b14c>​42 34 00 00</​color>​ <color #​00a2e8>​00 19</​color>​ 00 00''​
 +
 +Sets the scaling factor as 45 (<color #​22b14c>​0x42340000</​color>​) and sets the bone count as 25 (<color #​00a2e8>​0x19</​color>​).
 +
 +**Bone Setup**
 +^ Offset following Animation Header ^ Value Syntax ^ Description ^
 +| 0x0000 | [<color #​A946F2>​xx xx xx xx</​color>​] | X Position of Bone (float) |
 +| 0x0004 | [<color #​00a2e8>​yy yy yy yy</​color>​] | Y Position of Bone (float) |
 +| 0x0008 | [<color #​f50569>​zz zz zz zz</​color>​] | Z Position of Bone (float) |
 +| 0x000C | [<color #​d1b219>​ii ii</​color>​] | Internal Bone ID |
 +| 0x000E | [<color #​ff5703>​pp pp</​color>​] | Parent Bone ID |
 +
 +**Example (74a8.bin, Slappa at address 0x2cb0):**
 +
 +''<​color #​A946F2>​BF 8E 23 70</​color>​ <color #​00a2e8>​C3 2D 44 F0</​color>​ <color #​f50569>​40 FC 92 09</​color>​ <color #​d1b219>​00 05</​color>​ <color #​ff5703>​FF FF</​color>''​
 +
 +Assigns a bone to the model at coordinates (<color #​A946F2>​-1.11</​color>,​ <color #​00a2e8>​-173.27</​color>,​ <color #​f50569>​7.89</​color>​),​ gives it an Internal Bone ID of 5 (<color #​d1b219>​0x5</​color>​) and connects that bone to Parent Bone -1 (<color #​ff5703>​0xFFFF</​color>​). This case just so happens to be the origin.
  
 ---- ----
Line 180: Line 210:
 | 0x04 | [<color #​00a2e8>​cc cc cc cc</​color>​] | f32 | Framerate (fps) | | 0x04 | [<color #​00a2e8>​cc cc cc cc</​color>​] | f32 | Framerate (fps) |
  
-Note that in order for textures to be animated, all texture data must be present and stacked sequentially. Only the 1st texture in the data stack is displayed and animated, however it can animate through the texture data stack with 4 different framecounts/​framerates. You can determine which textures are being animated by checking the [[https://​hack64.net/​wiki/​doku.php?​id=f3dex#:​~:​text=xx%5D%2000%2000%20%5B-,​bb,​-bb%20bb%20bb%5D|segmented value]] of the FD Set_T_Img display list command for that texture. For Banjo-Kazooie,​ the segmented value can be +Note that in order for textures to be animated, all texture data for each frame must be present ​in the texture section ​and stacked sequentially. Only the 1st texture in the data stack is displayed and animated, however it can animate through the texture data stack with 4 different framecounts/​framerates. You can determine which textures are being animated by checking the [[https://​hack64.net/​wiki/​doku.php?​id=f3dex#:​~:​text=xx%5D%2000%2000%20%5B-,​bb,​-bb%20bb%20bb%5D|segmented value]] of the FD Set_T_Img display list command for that texture. For Banjo-Kazooie,​ the segmented value can be 
  ''​0xF,​ 0xE, 0xD, or 0xC''​.  ''​0xF,​ 0xE, 0xD, or 0xC''​.
 ---- ----
banjo_kazooie/model_data.1732634676.txt.gz ยท Last modified: 2024/11/26 15:24 by BanjoFreak64