OBD:AKVA

From OniGalore
Revision as of 20:58, 27 September 2009 by Iritscen (talk | contribs) (I can only assume this was meant to be a Y ^^)
Jump to navigation Jump to search
ONI BINARY DATA
AKOT << Other file types >> BINA
AKVA : BNV Node Array
switch to XML:AKVA page
Overview @ Oni Stuff
OBD.png


Akva a.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 4E 02 00 590 00590-.AKVA
0x04 lev_id 01 00 00 06 3 level 3
0x08 char[20] AD DE dead unused
0x1C int32 1E 01 00 00 10000 array size
First element (black outline)
0x00 int32 00 00 00 00 0 index into AKBP array; BSP tree for this BNV
0x04 int32 00 00 00 00 0 BNV's ID (same as index in array)
0x08 int32 00 00 00 00 0 index into AKBA array; "side" range start
0x0C int32 06 00 00 00 6 index into AKBA array; "side" range end
0x10 int32 FF FF FF FF -1 index in array of child BNV
0x14 int32 FF FF FF FF -1 index in array of sibling BNV
0x18 int32 FF FF FF FF -1 runtime only
0x1C int32 C9 00 00 00 201 size of the pathfinding grid along x in tiles
0x20 int32 16 00 00 00 22 size of the pathfinding grid along z in tiles
0x24 offset A0 3A 47 00 00 47 3A A0 at this position starts the pathfinding grid part in the raw file
0x28 int32 F7 01 00 00 503 size of the pathfinding grid part in the raw file in bytes
0x2C float 00 00 80 40 4.000000 tile size of the pathfinding grid
0x30 float 00 00 20 41 10.000000 AABB X- (AABB = Axis-aligned bounding box)
0x34 float 00 00 58 C1 -13.500000 AABB Y-
0x38 float 00 80 2A C4 −682.000000 AABB Z-
0x3C float 00 40 47 44 797.000000 AABB X+
0x40 float 00 00 22 42 40.500000 AABB Y+
0x44 float 00 00 19 C4 -612.000000 AABB Z+
0x48 int16 FE FF -2 grid x origin (in tiles)
0x4A int16 FE FF -2 grid z origin (in tiles)
0x4C int32 00 00 00 00 0 BNV's ID again
0x50 int32 00 00 00 00 0 runtime only
0x54 int32 00 00 00 00 0 path debug info size
0x58 int32 00 00 00 00 0 path debug info offset (in the raw file)
0x5C int32 04 00 00 00 4 flags; used values:
0x01 00 00 00 - sloped floor
0x04 00 00 00 - BNV used
0x10 00 00 00 - no grid
0x60 float 00 00 00 00 0.000000 if "sloped", x-component of floor/ceiling normal
0x64 float 00 00 00 00 0.000000 if "sloped", y-component of floor/ceiling normal
0x68 float 00 00 00 00 0.000000 if "sloped", z-component of floor/ceiling normal
0x6C float 00 00 00 00 0.000000 if "sloped", distance of floor plane to origin
0x70 float 00 00 00 00 0.000000 if "sloped", distance of ceiling plane to origin


General
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.
0x00 - AKBP tree
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 IDXA of the AKOT + OTLF).
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 CHAPTER 03 . PUZZLE PIECES (level3), big hall under main power line in CHAPTER 08 . AN INNOCENT LIFE (level10).
0x1C - Pathfinding grid
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's alignment on the "floor" of the BNV's AABB is defined by the x and z offsets in tiles (at 0x48 and 0x4A).
0x5C - Floor and ceiling
(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