Difference between revisions of "AROT (MREA Section)"
From Retro Modding Wiki
(AROT header) |
|||
Line 1: | Line 1: | ||
+ | [[File:Octree2.svg|thumb|right|400px|Left: Recursive subdivision of a cube into [[wikipedia:octant (solid geometry)|octant]]s. Right: The corresponding octree.]] | ||
+ | |||
+ | Within [[MREA (File Format)|MREA]] resources, the '''AROT section''' stores an [[wikipedia:Octree|octree]] which | ||
+ | is used to accelerate rendering of areas. | ||
+ | |||
+ | Octrees are a form of [[wikipedia:Binary Space Partitioning|BSP tree]] that subdivide an area across 3-dimensions. | ||
+ | They are structured recursively, starting with a ''root'' node and traversing their way to individual ''leaf'' nodes. | ||
+ | A valid octant will split sub-octants across 3-tiers, one for each dimension of euclidean space. | ||
+ | |||
=== Header === | === Header === | ||
Revision as of 02:33, 10 April 2015
Within MREA resources, the AROT section stores an octree which is used to accelerate rendering of areas.
Octrees are a form of BSP tree that subdivide an area across 3-dimensions. They are structured recursively, starting with a root node and traversing their way to individual leaf nodes. A valid octant will split sub-octants across 3-tiers, one for each dimension of euclidean space.
Header
Offset | Size | Data Type | Description | Notes |
---|---|---|---|---|
0x0 | 4 | long | Magic | AROT
|
0x4 | 4 | long | Version | Always 0x1 |
0x8 | 4 | long | Mesh-Bitmap Count | Count of mesh-bitmaps |
0xC | 4 | long | Mesh-Bitmap Bit-Count | Count of bits in each mesh-bitmap |
0x10 | 4 | long | Node Count | Number of octant nodes |
0x14 | 24 | float2x3 | AABB | AABB that fully-encloses area and serves as the octree's root-shape |