User Tools

Site Tools


banjo_kazooie:geometry_layouts

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
Last revision Both sides next revision
banjo_kazooie:geometry_layouts [2019/12/12 18:52]
pfedak skinning geo layout
banjo_kazooie:geometry_layouts [2023/08/27 21:05]
minirop added 0x0E UNKNOWN
Line 9: Line 9:
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
 | [00 00 00 01] | Sort Command ID | | [00 00 00 01] | Sort Command ID |
-| [00 00 <color #​ff7f27>​aa aa</​color>​] | Continue* |+| [<color #ff7f27>aa aa aa aa</​color>​] | Command Length(0x28)|
 | [<color darkred>​xx xx xx xx</​color>​] | first child x (float) | | [<color darkred>​xx xx xx xx</​color>​] | first child x (float) |
 | [<color darkgreen>​yy yy yy yy</​color>​] | first child y (float) | | [<color darkgreen>​yy yy yy yy</​color>​] | first child y (float) |
Line 27: Line 27:
 | [00 00 00 02] | Bone Command ID | | [00 00 00 02] | Bone Command ID |
 | [00 00 <color darkred>​aa aa</​color>​] | Load DL - DL Segment Address/8 (Example: 0x1C = 0xE0)| | [00 00 <color darkred>​aa aa</​color>​] | Load DL - DL Segment Address/8 (Example: 0x1C = 0xE0)|
-| [<color darkgreen>​bb</​color>​ <color darkblue>​cc</​color>​ <color purple>​dd dd</​color>​] | <color darkgreen>​bb</​color>​=Continue*, <color darkblue>​cc</​color>​=Bone ID, <color purple>​dddd</​color>​=??​ | +| [<color darkgreen>​bb</​color>​ <color darkblue>​cc</​color>​ <color purple>​dd dd</​color>​] | <color darkgreen>​bb</​color>​=Command Length(0x10), <color darkblue>​cc</​color>​=Bone ID, <color purple>​dddd</​color>​=??​ | 
-| [00 00 00 00] | If <color darkgreen>​bb</​color>​=10,​ these four bytes are written before the next command. | +| [00 00 00 00] | If <color darkgreen>​bb</​color>​=10,​ these four bytes are written before the next command. ​(Padding) ​
-*Continue: If 00, GeoLayout stops after command. If 0x10, GeoLayout continues.+
 ---- ----
  
Line 38: Line 38:
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
 | [00 00 00 03] | Load DL Command ID | | [00 00 00 03] | Load DL Command ID |
-| [00 00 00 <color darkred>​aa</​color>​] | 00 to end GeoLayout after command, ​0x10 to continue ​|+| [<color darkred>aa aa aa aa</​color>​] | Command Length* (0x10)|
 | [<color darkgreen>​bb bb</​color>​ <color darkblue>​cc cc</​color>​] | <color darkgreen>​bbbb</​color>​=Offset in DL Segment/​0x08,​ <color darkblue>​cccc</​color>​=Tri Count | | [<color darkgreen>​bb bb</​color>​ <color darkblue>​cc cc</​color>​] | <color darkgreen>​bbbb</​color>​=Offset in DL Segment/​0x08,​ <color darkblue>​cccc</​color>​=Tri Count |
-| [00 00 00 00] | If <color darkred>​aa</​color>​=10,​ these four bytes are written before the next command. | +| [00 00 00 00] | If <color darkred>​aa</​color>​=10,​ these four bytes are written before the next command. ​(Padding)
-*Continue: If 00, GeoLayout stops after command. If 0x10, GeoLayout continues.+
 ''​Example:​ 00 00 00 03 00 00 00 00 00 2D 00 10''​ ''​Example:​ 00 00 00 03 00 00 00 00 00 2D 00 10''​
  
Line 55: Line 55:
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
 | [00 00 00 05] | Skinning Command ID | | [00 00 00 05] | Skinning Command ID |
-| [00 00 <color darkred>​aa aa</​color>​] | Continue* |+| [<color darkred>aa aa aa aa</​color>​] | Command Length(Varies)|
 | [<color darkgreen>​bb bb</​color>​ <color darkblue>​cc cc</​color>​] | <color darkgreen>​bb bb</​color>​=DL segment offset, sets up vertics on previous bone | | [<color darkgreen>​bb bb</​color>​ <color darkblue>​cc cc</​color>​] | <color darkgreen>​bb bb</​color>​=DL segment offset, sets up vertics on previous bone |
 | [<color purple>​dd dd</​color>​ <color #​b5e61d>​ee ee</​color>​] | <color darkblue>​cc cc</​color>,​ <color purple>​dd dd</​color>,​ <color #​b5e61d>​ee ee</​color>,​ ...=zero-terminated list of DL offsets for current bone, using setup vertices | | [<color purple>​dd dd</​color>​ <color #​b5e61d>​ee ee</​color>​] | <color darkblue>​cc cc</​color>,​ <color purple>​dd dd</​color>,​ <color #​b5e61d>​ee ee</​color>,​ ...=zero-terminated list of DL offsets for current bone, using setup vertices |
Line 61: Line 61:
 ---- ----
  
-==== 0x08?????? ​====+==== 0x06BRANCH ​==== 
 +(unused?)
  
-Usage currently unknown.+JumpsUsage: 
 + 
 +^ Value/​Syntax ^ Description ^ 
 +| [00 00 00 06] | Branch Command ID | 
 +| [<color darkred>​aa aa aa aa</​color>​] | Command Length* (0x10)| 
 +| [<color darkgreen>​bb bb bb bb</​color>​] | GeoLayout Command Target Offset (This should accept negative values)| 
 +| [<color #​FFFFFF>​00 00 00 00</​color>​] | Padding |
  
 ---- ----
  
 +==== 0x08: LOD ====
 +
 +Runs a geometry layout if the distance from the camera is in a certain range.
 +
 +
 +^ Value/​Syntax ^ Description ^
 +| [00 00 00 08] | LOD Command ID |
 +| [<color orange>​aa aa aa aa</​color>​] | Command Length* (0x20)*|
 +| [<color #​b5e61d>​bb bb bb bb</​color>​] | max distance (float) |
 +| [<color #​99d9ea>​cc cc cc cc</​color>​] | min distance (float) |
 +| [<color darkred>​xx xx xx xx</​color>​] | test position x (float) |
 +| [<color darkgreen>​yy yy yy yy</​color>​] | test position y (float) |
 +| [<color darkblue>​zz zz zz zz</​color>​] | test position z (float) |
 +| [<color #​c8bfe7>​dd dd dd dd</​color>​] | geometry layout offset | 
 +
 +*Note that the command length actually includes the length of the child GL list to run, and the length can be 0 to denote the end of a list, but there could still be MANY child commands to run.
 +----
 +
 +==== 0x0A: REFERENCE POINT ====
 +
 +Computes a point on the current model to be referenced later. Used for spawning sparkle particles and Clanker'​s teeth/bolt positions. Usage:
 +
 +
 +^ Value/​Syntax ^ Description ^
 +| [00 00 00 0A] | Reference Point Command ID |
 +| [<color orange>​aa aa aa aa</​color>​] | Command Length* (0x18)|
 +| [<color #​b5e61d>​bb bb</​color>​ <color purple>​cc cc</​color>​] | <color #​b5e61d>​bb bb</​color>​= reference point index, <color purple>​cc cc</​color>​=bone index |
 +| [<color darkred>​xx xx xx xx</​color>​] | bone offset x (float) |
 +| [<color darkgreen>​yy yy yy yy</​color>​] | bone offset y (float) |
 +| [<color darkblue>​zz zz zz zz</​color>​] | bone offset z (float) |
 +
 +----
 +
 +==== 0x0C: SELECTOR ====
 +
 +Selects one or more child geometry layouts to run. Used for blinking and many other model part selections, like Mumbo'​s hut. 
 +Each model sets a list of selectors, where positive values are the index of a (single) child layout to run 
 +and negative values (after being negated) are bitfields indicating multiple children to run. Usage:
 +
 +^ Value/​Syntax ^ Description ^
 +| [00 00 00 0C] | Reference Point Command ID |
 +| [<color orange>​aa aa aa aa</​color>​] | Command Length* (Varies) |
 +| [<color #​b5e61d>​bb bb</​color>​ <color purple>​cc cc</​color>​] | <color #​b5e61d>​bb bb</​color>​=child count, <color purple>​cc cc</​color>​=selector index |
 +| [<color darkred>​dd dd dd dd</​color>​] | <color darkred>​dd dd dd dd</​color>,​ <color darkgreen>​ee ee ee ee</​color>,​ ...=list of <color #​b5e61d>​bb bb</​color>​ offsets to geometry layouts that might be selected |
 +| [<color darkgreen>​ee ee ee ee</​color>​] |  |
 +| ... | |
 +
 +----
  
 ==== 0x0D: DRAW DISTANCE ==== ==== 0x0D: DRAW DISTANCE ====
Line 74: Line 129:
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
 | [00 00 00 0D] | Command | | [00 00 00 0D] | Command |
-| [00 00 00 <​color ​darkred>​aa</​color>​] | 00 for final instance, 28 otherwise ​|+| [<​color ​orange>aa aa aa aa</​color>​] | Command Length*  ​|
 | [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Draw distance: Negative Coords| | [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Draw distance: Negative Coords|
 | [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Draw distance: Positive Coords | | [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Draw distance: Positive Coords |
 | [<color darkred>​bb bb</​color>​ <color darkgreen>​cc cc</​color>​] | <color darkred>​bbbb</​color>​= ?? Usually 0018, <color darkgreen>​cccc</​color>​= ????? | | [<color darkred>​bb bb</​color>​ <color darkgreen>​cc cc</​color>​] | <color darkred>​bbbb</​color>​= ?? Usually 0018, <color darkgreen>​cccc</​color>​= ????? |
 +
 +*Command Length: If value is nonzero, GeoLayout continues, else it is the last command.
  
 ---- ----
  
 +==== 0x0E: UNKNOWN ====
 +
 +Usage:
 +^ Value/​Syntax ^ Description ^
 +| [00 00 00 0E] | Command |
 +| [<color orange>​aa aa aa aa</​color>​] | Command Length |
 +| [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Coords |
 +| [<color darkred>​XX XX</​color>​ <color darkgreen>​YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Coords |
 +| [00 00 00 00] | padding |
 +| ... | Child commands* ​ |
 +
 +*Child commands: if Command Length is not zero, then read commands until the size if reached
 +
 +----
  
banjo_kazooie/geometry_layouts.txt · Last modified: 2023/08/27 21:10 by minirop