Jump to content

OBD:AKVA: Difference between revisions

562 bytes removed ,  6 June 2008
more cleanup
mNo edit summary
(more cleanup)
Line 49: Line 49:


;General
;General
:BNVs are volumes that have a pathfinding grid assigned to them.
:BNVs are volumes that have a [[OBD:AKVA 0|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 [[OBD:AKBP|AKBP]] tree refines the volume after the [[OBD:Data types#AABB|AABB]] is checked
:*Child [[OBD:AKBA|AKBA]] defines the "sides" needed by the pathfinding graph
;0x00 - [[OBD:AKBP|AKBP]] tree
;0x00 - [[OBD:AKBP|AKBP]] tree
:This binary space partition (BSP) tree is used for a refined check against a character's position.
:This binary space partition (BSP) tree is used to check if a point is inside the BNV. A list of BNVs that can potentially contain a point is found using the environment octree (2nd [[OBD:IDXA_AKOT_2|IDXA]] of the [[OBD:AKOT|AKOT]] + [[OBD:OTLF|OTLF]]).
;0x08 - [[OBD:AKBA|AKBA]] range
;0x08 - [[OBD:AKBA|AKBA]] range
:The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
:The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
Line 62: Line 59:
::Examples: lobby in {{C3}} (level3), big hall under main power line in {{C8}} (level10).
::Examples: lobby in {{C3}} (level3), big hall under main power line in {{C8}} (level10).
;0x1C - Pathfinding grid
;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.
: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).
::Notably, that one BNV also has the 16 flag set at 0x5C (see below).
Line 68: Line 64:
: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 grid seems to be always centered of the "floor" of the BNV's AABB (see above).
: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 [[OBD:IDXA_AKOT_2|IDXA]] of the [[OBD:AKOT|AKOT]] + [[OBD:OTLF|OTLF]])
;0x5C - Floor and ceiling
;0x5C - Floor and ceiling
:Bitset:
:*the 4 bit is always set (means that the BNV is used)
:*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)
::(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 [[OBD:AKBP|AKBP]] tree
:The sloped floor and ceiling are used to apply a final cut to the volume defined by the [[OBD:AKBP|AKBP]] tree
708

edits