User Tools

Site Tools


banjo_tooie: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
banjo_tooie:geometry_layouts [2020/04/22 17:43]
pfedak
banjo_tooie:geometry_layouts [2020/04/22 19:09] (current)
pfedak [Geometry Layouts]
Line 1: Line 1:
 ====== Geometry Layouts ====== ====== Geometry Layouts ======
  
-These scripts load display lists within the [[banjo_tooie:​model_data|model file]], with certain aspects, properties, and checks applied. They are found at the end of a model file. Commands 0x00 through 0x10 are identical to those in [[banjo_kazooie:​geometry_layouts|Banjo-Kazooie]],​ so we list only new commands. Note that level and skybox models can only use the old commands, and will not respect bone indices.+These scripts load display lists within the [[banjo_tooie:​model_data|model file]], with certain aspects, properties, ​ 
 +and checks applied. They are found at the end of a model file. Commands 0x00 through 0x10 are identical to those in  
 +[[banjo_kazooie:​geometry_layouts|Banjo-Kazooie]],​ so we list only new commands. Note that level and skybox models can  
 +only use the old commands, and will not respect bone indices.
  
 +Almost all of the new commands involve enabling software lighting effects on some vertices. The lighting uses the model file'​s ​
 +list of vertex normals, allowing lighting to be combined with vertex colors. Other than environment mapping (setting texture ​
 +coordinates to simulate a reflective surface), effects aren't determined by the commands, and must be enabled by the object ​
 +logic or other game conditions.
 +==== 0x11: LOAD DL (LIGHTING) ====
  
-==== 0x03: LOAD DL ==== +Loads a display list from an offset ​into the F3DEX segment ​(see [[banjo_kazooie:​geometry_layouts#​x03load_dl|command 0x03]]) and then enables software lighting on a range of vertices.
- +
-Loads a display list from offset ​of F3DEX2 ​segment+
 Usage: Usage:
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
-| [00 00 00 03] | Load DL Command ID | +| [00 00 00 11] | Load DL Command ID | 
-| [00 00 00 <​color ​darkred>​aa</​color>​] | 00 to end GeoLayout after command, 0x10 to continue ​+| [00 00 00 <​color ​red>​aa</​color>​] | Continue* ​
-| [<​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 ​green>bb bb</​color>​ <​color ​blue>cc cc</​color>​] | <​color ​green>​bbbb</​color>​=Offset in DL Segment/​0x08,​ <​color ​blue>​cccc</​color>​=First Triangle Index 
-| [00 00 00 00] | If <​color ​darkred>aa</​color>​=10these four bytes are written before the next command. ​| +| [<color purple>​dd dd</​color> ​00 <color orange>​ee</​color>​] | <​color ​purple>dddd</​color>​=Triangle Count<color orange>​ee</​color>​=Enable env mapping ​|
-*Continue: If 00, GeoLayout stops after command. If 0x10, GeoLayout continues. +
-''​Example:​ 00 00 00 03 00 00 00 00 00 2D 00 10''​ +
- +
-Addr= 0x2D*0x08 offset from F3DEX2 Segment Start, 0x168 +
-0x10= 16 triangles in DL+
  
 ---- ----
  
-==== 0x05BONE ====+==== 0x12SKINNING (LIGHTING) ​====
  
-Usage currently unknown.+Loads display lists that draw triangles across bones (see [[banjo_kazooie:​geometry_layouts#​x05skinning|command 0x05]]) and enables lighting on a list of verticesThe lists of vertex counts are in parallel to the DL index list, and refer to sequential ranges following the first vertex index. They are accessed in order alternating child-parent-child-parent-... 
 +^ Value/​Syntax ^ Description ^ 
 +| [00 00 00 12] | Command ID | 
 +| [00 00 00 <color red>​aa</​color>​] | Continue* | 
 +| [<color green>bb bb</​color>​ <color blue>cc cc</​color>​] | <color green>​bbbb</​color>​=offset in DL segment/​0x08 for parent bone vertices| 
 +| [<color purple>​dd dd</​color>​ <color orange>​ee ee</​color>​] | <color blue>​cccc</​color>,<​color purple>​dddd</​color>,<​color orange>​eeee</​color>​... zero-terminated list of DL offsets for current bone | 
 +| ... | | 
 +| 0x14:​[<​color green>ff ff</​color>​ <color blue>gg gg</​color>​] | <color green>​ffff</​color>,<​color blue>​gggg</​color>,​...=vertex counts for lighting, using parent bone (possibly zero) | 
 +| ... | | 
 +| 0x20:​[<​color green>hh hh</​color>​ <color blue>ii ii</​color>​] | <color green>​hhhh</​color>,<​color blue>​iiii</​color>,​...=vertex counts for lighting, using child bone (possibly zero)| 
 +| ... | | 
 +| 0x2c:​[<​color palegreen>​jj jj</​color>​ 00 <color sienna>​kk</​color>​] | <color palegreen>​jjjj</​color>​=index of first vertex, <color sienna>​kk</​color>​=Enable env mapping|
  
 ---- ----
  
-==== 0x08?????? ​====+==== 0x15ENABLE LIGHTING ​====
  
-Usage currently unknown.+Enable lighting on lists of vertices on arbitrary bonesThe ranges are consecutive,​ starting from the first index. 
 +^ Value/​Syntax ^ Description ^ 
 +| [00 00 00 15] | Command ID | 
 +| [00 00 00 <color red>​aa</​color>​] | Continue* | 
 +| [<color green>bb bb</​color>​ <color blue>cc cc</​color>​] | <color green>​bbbb</​color>​=Range Count, <color blue>​cccc</​color>​=Start Vertex| 
 +| [<color purple>​dd dd</​color>​ <color orange>​ee ee</​color>​] |for each range: <color purple>​dddd</​color>​=Bone Index, <color orange>​eeee</​color>​=Vertex Count | 
 +| ... | |
  
 ---- ----
  
-==== 0x0A?????? ​====+==== 0x16SKINNING ​====
  
-Usage currently unknown.+Seems equivalent to [[banjo_kazooie:​geometry_layouts#​x05skinning|command 0x05]], though through a different function.
  
 ---- ----
  
-==== 0x0DDRAW DISTANCE ​====+==== 0x17SPLIT LIGHTING ​====
  
-Applies draw distance to descending geometry +Enable lighting on a list of vertices split across the current and parent bone.
-Usage:+
 ^ Value/​Syntax ^ Description ^ ^ Value/​Syntax ^ Description ^
-| [00 00 00 0D] | Command | +| [00 00 00 17] | Command ​ID 
-| [00 00 00 <​color ​darkred>​aa</​color>​] | 00 for final instance, 28 otherwise ​+| [00 00 00 <​color ​red>​aa</​color>​] | Continue* ​
-| [<​color ​darkred>XX XX</​color>​ <​color ​darkgreen>YY YY</​color>​ <color darkblue>​ZZ ZZ</​color>​] | Draw distance: Negative Coords| +| [<​color ​green>bb bb</​color>​ <​color ​blue>cc cc</​color>​] | <​color ​green>bbbb</​color>​=Start Vertex, ​<​color ​blue>cccc</​color>​=Child Vertex Count
-| [<​color ​darkred>XX XX</​color>​ <​color ​darkgreen>YY YY</​color> ​<color darkblue>​ZZ ZZ</​color>​] | Draw distance: Positive Coords ​+| [<​color ​purple>dd dd</​color> ​00 <​color ​orange>ee</​color>​] |<​color ​purple>dddd</​color>​=Parent Vertex Count, <​color ​orange>ee</​color>​=Enable env mapping ​|
-| [<​color ​darkred>bb bb</​color>​ <​color ​darkgreen>cc cc</​color>​] | <​color ​darkred>bbbb</​color>​= ​?? Usually 0018, <​color ​darkgreen>cccc</​color>​= ​????? |+
  
 ---- ----
 +==== 0x18: SKINNING (LIGHTING) ====
  
-==== 0x11LOAD DL ==== +Equivalent to [[banjo_tooie:geometry_layouts#​x12skinning_lighting|command 0x12]].
- +
-Usage currently unknown. +
- +
----- +
- +
-==== 0x18: LOAD DL ==== +
- +
-Usage currently unknown.+
  
 ---- ----
  
 +*The "​continue"​ value is the offset to the next sibling geo layout command. A zero means there is no next sibling, ​
 +so processing goes up to the parent level or ends if this is the top level.
banjo_tooie/geometry_layouts.1587577408.txt.gz · Last modified: 2020/04/22 17:43 by pfedak