OBD:AKVA: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
m (nearly final revision ^^)
Line 3: Line 3:
:BNVs are volumes that have a pathfinding grid assigned to them.
:BNVs are volumes that have a pathfinding grid assigned to them.
:The grid itself is in the RAW, while its overall parameters are in the DAT.
:The grid itself is in the RAW, while its overall parameters are in the DAT.
:*Child [[AKBP]] tree refines the volume after the [[OBD:Data types#AABB|AABB]] is checked
:*Child [[AKBA]] defines the "sides" needed by the pathfinding graph




Line 14: Line 16:
| WIDTH=70% | <B>Meaning</B>
| WIDTH=70% | <B>Meaning</B>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF0000" | 01 4E 02 00
| BGCOLOR="#FF0000" | 01 '''4E 02''' 00
| 590
| 590
| ALIGN=LEFT | 00590-.AKVA
| ALIGN=LEFT | 00590-.AKVA
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFF00" | 01 00 00 06
| BGCOLOR="#FFFF00" | 01 00 00 '''06'''
| 3
| 3
| ALIGN=LEFT | level 3
| ALIGN=LEFT | level 3
Line 34: Line 36:
| BGCOLOR="#FFC8C8" | 00 00 00 00
| BGCOLOR="#FFC8C8" | 00 00 00 00
| 0
| 0
| ALIGN=LEFT | index into [[AKBP]] array
| ALIGN=LEFT | index into [[AKBP]] array : BSP tree for this BNV
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 00 00 00 00
| BGCOLOR="#FFFFC8" | 00 00 00 00
Line 42: Line 44:
| BGCOLOR="#C8FFC8" | 00 00 00 00
| BGCOLOR="#C8FFC8" | 00 00 00 00
| 0
| 0
| ALIGN=LEFT | index into [[AKBA]] array ("from"?)
| ALIGN=LEFT | index into [[AKBA]] array : "side" range start
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 06 00 00 00
| BGCOLOR="#C8FFFF" | 06 00 00 00
| 6
| 6
| ALIGN=LEFT | index into [[AKBA]] array ("to"?)
| ALIGN=LEFT | index into [[AKBA]] array : "side" range end
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | FF FF FF FF
| BGCOLOR="#FFC8FF" | FF FF FF FF
| unknown
| -1
| ALIGN=LEFT | index in array of child BNV
| ALIGN=LEFT | index in array of child BNV
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC800" | FF FF FF FF
| BGCOLOR="#FFC800" | FF FF FF FF
| unknown
| -1
| ALIGN=LEFT | index in array of sibling BNV
| ALIGN=LEFT | index in array of sibling BNV
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C800C8" | FF FF FF FF
| BGCOLOR="#C800C8" | FF FF FF FF
| unknown
| -1
| ALIGN=LEFT | unknown, always -1
| ALIGN=LEFT | unknown, always -1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
Line 69: Line 71:
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | A0 3A 47 00
| BGCOLOR="#E7CEA5" | A0 3A 47 00
| 47 3A A0
| 0x473AA0
| ALIGN=LEFT | offset of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file
| ALIGN=LEFT | offset of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file : 0x473AA0
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | F7 01 00 00
| BGCOLOR="#FFDDDD" | F7 01 00 00
| 503
| 503
| ALIGN=LEFT | size of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file (in bytes)
| ALIGN=LEFT | size of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file : 503 bytes
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 80 40
| BGCOLOR="#64AAAA" | 00 00 80 40
Line 82: Line 84:
| BGCOLOR="#EBEBEB" | 00 00 20 41
| BGCOLOR="#EBEBEB" | 00 00 20 41
| 10.000000
| 10.000000
| ALIGN=LEFT | xmin
| ALIGN=LEFT | [[OBD:Data types#AABB|AABB]] X-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 58 C1
| BGCOLOR="#8C8CCC" | 00 00 58 C1
| -13.500000
| -13.500000
| ALIGN=LEFT | ymin
| ALIGN=LEFT | AABB Y-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 00 80 2A C4
| BGCOLOR="#FF00C8" | 00 80 2A C4
| -682.000000
| -682.000000
| ALIGN=LEFT | zmin
| ALIGN=LEFT | AABB Z-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#F0F096" | 00 40 47 44
| BGCOLOR="#F0F096" | 00 40 47 44
| 797.000000
| 797.000000
| ALIGN=LEFT | xmax
| ALIGN=LEFT | AABB X+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00 22 42
| BGCOLOR="#00C864" | 00 00 22 42
| 40.500000
| 40.500000
| ALIGN=LEFT | ymax
| ALIGN=LEFT | AABB Y+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C8FF" | 00 00 19 C4
| BGCOLOR="#00C8FF" | 00 00 19 C4
| 612.000000
| 612.000000
| ALIGN=LEFT | zmax
| ALIGN=LEFT | AABB Z+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C80040" | FE FF
| BGCOLOR="#C80040" | FE FF
Line 126: Line 128:
| BGCOLOR="#0096C8" | 00 00 00 00
| BGCOLOR="#0096C8" | 00 00 00 00
| 0
| 0
| ALIGN=LEFT | unknown, always 0, was a raw file offset once
| ALIGN=LEFT | unknown, always 0 (was a raw file offset once?)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF80C0" | 04 00 00 00
| BGCOLOR="#FF80C0" | 04 00 00 00
| 4
| 4
| ALIGN=LEFT | bit 4 always set, bit 1 set if floor is sloped, bit 16 see below
| ALIGN=LEFT | bit 4 always set, bit 1 set if "sloped", bit 16 see below
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| 0.000000
| ALIGN=LEFT | x-component of floor normal if sloped, 0 if horizontal
| ALIGN=LEFT | if "sloped", x-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| 0.000000
| ALIGN=LEFT | y-component of floor normal if sloped, 0 if horizontal
| ALIGN=LEFT | if "sloped", y-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| 0.000000
| ALIGN=LEFT | z-component of floor normal if sloped, 0 if horizontal
| ALIGN=LEFT | if "sloped", z-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| 0.000000
| ALIGN=LEFT | bottom plane D coefficient if sloped
| ALIGN=LEFT | if "sloped", distance of floor plane to origin
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| 0.000000
| ALIGN=LEFT | top plane D coefficient if sloped
| ALIGN=LEFT | if "sloped", distance of ceiling plane to origin
|}
|}
;xmin, ymin, zmin, xmax, ymax, zmax
;0x00 - [[AKBP]] tree
:BNVs are axis-aligned boxes, so the coordinates of two opposed corners define a BNV completely.
:This binary space partition (BSP) tree is used for a refined check against a character's position.
:It makes sense to specify a "minimal" corner and a "maximal" corner, in that order.
;0x08 - [[AKBA]] range
;Still unknown and probably important
:The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
;0x10 - Children and siblings
:Those occur when smaller BNVs are completely included into larger ones.
:The bigger BNV only links to its first child. If there are several children, the sibling link is used to define the series.
::Examples: lobby in {{{C3}}} (level3), big hall under main power line in {{{C8}}} (level10).
;0x1C - Pathfinding grid
:The RAW format is rather complex (see [[OBD:AKVA 0|HERE]]). It requires the X and Z size for parsing.
:BNV 165 in level4 (far side of tarmac, behind the fence) has a non-zero X-Z grid size but no RAW data.
::Notably, that one BNV also has the 16 flag set at 0x5C (see below).
:The grid usually "bleeds" outside the (x,z) extent of the BNV.
:The grid usually "bleeds" outside the (x,z) extent of the BNV.
:The amount of bleeding is defined by the grid's size (in tiles) and by the size of a tile.
:The amount of bleeding is defined by the grid's size (in tiles) and by the size of a tile.
:The only unknown is the offset of the grid with respect to the center of the BNV's base.
:The grid seems to be always centered of the "floor" of the BNV's AABB (see above).
:I suppose it's specified by some of the unknown floats. Didn't check.
;0x30 - AABB
:I don't remember seeing a ''rotated'' BNV, but there could be some of those.
:The axis-aligned bounding boxes are used for a first, quick check against a character's position.
::[[User:Geyser|geyser]] 20:02, 28 December 2006 (CET)
::(note that the AKVA itself is looked up via the octtree: 2nd [[IDXA]] of the [[AKOT]] + [[OTLF]])
:What about them, really? Maybe some of the "unknown; always 0" fields?
;0x5C - Floor and ceiling
:... (much later) well, they could also be 0 by default (hardcoded)
:Bitset:
::[[User:Geyser|geyser]] 23:20, 16 April 2007 (CEST)
:*the 4 bit is always set (meaning unknown)
;Floor normal
:*the 16 bit is set only for BNV 165 of level4 (no RAW part, see above)
:ssg's observations; didn't check. [[User:Geyser|geyser]]
:*the 1 bit is set for BNVs involving "sloped" floors and ceilings
;Children and siblings
::(typical environment requiring this feature is compact staircases)
:Those occur when smaller BNVs are included into larger ones.
:The sloped floor and ceiling are used to apply a final cut to the volume defined by the [[AKBP]] tree
:The bigger BNV only links to its first child. If there are several children, the sibling link is used to define the series.
::(the walls of which are typically vertical (possibly not axis-aligned) and horizontal)
;No raw part
:When the "sloped" bit isn't set, all 5 floats are always zero (and are probably ignored anyway).
:Only one example of a BNV that has an x-z grid size but no grid data: BNV 165 in level4 (far side of tarmac, behind the fence)
:''The 3 power lines in level10 have all 5 floats equal to zero even though the "sloped" bit is set
:Notably, that one BNV also has the 16 flag set (see above, before the floor normal).
::''(possibly a design error: interestingly, BNV detection and pathfinding work fine for those 3).




----
----
{{OBD_File_Footer|align=center|type=AKVA|prev=AKOT|next=BINA|name=BNV Node Array|family=Level|onistuff=akva}}
{{OBD_File_Footer|align=center|type=AKVA|prev=AKOT|next=BINA|name=BNV Node Array|family=Level|onistuff=akva}}
[[Category:Pathfinding]]

Revision as of 03:08, 19 April 2007

ONI BINARY DATA
AKOT << Other file types >> BINA
AKVA : BNV Node Array
switch to XML:AKVA page
Overview @ Oni Stuff
OBD.png

BNVs are volumes that have a pathfinding grid assigned to them.
The grid itself is in the RAW, while its overall parameters are in the DAT.
  • Child AKBP tree refines the volume after the AABB is checked
  • Child AKBA defines the "sides" needed by the pathfinding graph


akva_a.gif


Hex Translation Meaning
01 4E 02 00 590 00590-.AKVA
01 00 00 06 3 level 3
AD DE dead not used
1E 01 00 00 286 286 BNV nodes in array
First BNV node (black outline)
00 00 00 00 0 index into AKBP array : BSP tree for this BNV
00 00 00 00 0 BNV's ID (same as index in array)
00 00 00 00 0 index into AKBA array : "side" range start
06 00 00 00 6 index into AKBA array : "side" range end
FF FF FF FF -1 index in array of child BNV
FF FF FF FF -1 index in array of sibling BNV
FF FF FF FF -1 unknown, always -1
C9 00 00 00 201 size of the pathfinding grid along x : 201 tiles
16 00 00 00 22 size of the pathfinding grid along z : 22 tiles
A0 3A 47 00 0x473AA0 offset of the pathfinding grid data in the RAW file : 0x473AA0
F7 01 00 00 503 size of the pathfinding grid data in the RAW file : 503 bytes
00 00 80 40 4.000000 tile size of the pathfinding grid
00 00 20 41 10.000000 AABB X-
00 00 58 C1 -13.500000 AABB Y-
00 80 2A C4 -682.000000 AABB Z-
00 40 47 44 797.000000 AABB X+
00 00 22 42 40.500000 AABB Y+
00 00 19 C4 612.000000 AABB Z+
FE FF 64534 unknown, always -2
FE FF 64534 unknown, always -2
00 00 00 00 0 BNV's ID again
00 00 00 00 0 unknown, always 0
00 00 00 00 0 unknown, always 0
00 00 00 00 0 unknown, always 0 (was a raw file offset once?)
04 00 00 00 4 bit 4 always set, bit 1 set if "sloped", bit 16 see below
00 00 00 00 0.000000 if "sloped", x-component of floor/ceiling normal
00 00 00 00 0.000000 if "sloped", y-component of floor/ceiling normal
00 00 00 00 0.000000 if "sloped", z-component of floor/ceiling normal
00 00 00 00 0.000000 if "sloped", distance of floor plane to origin
00 00 00 00 0.000000 if "sloped", distance of ceiling plane to origin
0x00 - AKBP tree
This binary space partition (BSP) tree is used for a refined check against a character's position.
0x08 - AKBA range
The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
0x10 - Children and siblings
Those occur when smaller BNVs are completely included into larger ones.
The bigger BNV only links to its first child. If there are several children, the sibling link is used to define the series.
Examples: lobby in {{{C3}}} (level3), big hall under main power line in {{{C8}}} (level10).
0x1C - Pathfinding grid
The RAW format is rather complex (see HERE). It requires the X and Z size for parsing.
BNV 165 in level4 (far side of tarmac, behind the fence) has a non-zero X-Z grid size but no RAW data.
Notably, that one BNV also has the 16 flag set at 0x5C (see below).
The grid usually "bleeds" outside the (x,z) extent of the BNV.
The amount of bleeding is defined by the grid's size (in tiles) and by the size of a tile.
The grid seems to be always centered of the "floor" of the BNV's AABB (see above).
0x30 - AABB
The axis-aligned bounding boxes are used for a first, quick check against a character's position.
(note that the AKVA itself is looked up via the octtree: 2nd IDXA of the AKOT + OTLF)
0x5C - Floor and ceiling
Bitset:
  • the 4 bit is always set (meaning unknown)
  • the 16 bit is set only for BNV 165 of level4 (no RAW part, see above)
  • the 1 bit is set for BNVs involving "sloped" floors and ceilings
(typical environment requiring this feature is compact staircases)
The sloped floor and ceiling are used to apply a final cut to the volume defined by the AKBP tree
(the walls of which are typically vertical (possibly not axis-aligned) and horizontal)
When the "sloped" bit isn't set, all 5 floats are always zero (and are probably ignored anyway).
The 3 power lines in level10 have all 5 floats equal to zero even though the "sloped" bit is set
(possibly a design error: interestingly, BNV detection and pathfinding work fine for those 3).



ONI BINARY DATA
AKOT << Other file types >> BINA
AKVA : BNV Node Array
Level file