VISI (MREA Section): Difference between revisions

no edit summary
imported>Jackoalan
imported>Jackoalan
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 19: Line 19:
|-
|-
| bool
| bool
| Unknown 1
| Has Actors
|
| If set, the game will resolve script entity IDs for the PVS lookup
|-
|-
| bool
| bool
Line 32: Line 32:
| u32
| u32
| Light count
| Light count
| Number of area lights encoded in octree leaves.
| Total number of area lights encoded in octree leaves.
|-
|-
| u32
| u32
| Unknown 3
| 2nd Layer Light Count
|
| Lights within total that are in the 2nd BABEDEAD layer.
|-
|-
| u32
| u32
Line 56: Line 56:
| u8[lightVisibilityNodeCount][leafSize]
| u8[lightVisibilityNodeCount][leafSize]
| Light visibility node array
| Light visibility node array
| Array of [[#Leaf Nodes|leaf node data]] indicating visibility of other objects from light's perspective.
| Array of [[#Leaf Nodes|leaf node data]] indicating visibility of other objects from light's perspective. 2nd layer lights are listed first.
|-
|-
| float[2][3]
| float[2][3]
| Octree AABB
| Octree AABB
| Total bounds subdivided by octree.
| Total bounds subdivided by octree. '''Note:''' the coordinates of the AABB are in local area space (i.e. inverse-transformed with the matrix in the MREA header).
|-
|-
| u32
| u32
| Total visibility bit count
| Total visibility object count
| Number of bits per-leaf that indicate visibility from the selected octree region (static + entities + lights).
| Number of objects per-leaf that indicate visibility from the selected octree region (static + entities + lights).
|-
|-
| u32
| u32
| Total light bit count
| Total light object count
| Number of bits after visibility bits that indicate in-bounds/out-of-bounds state of each light.
| Number of objects within total that are lights.
|-
|-
| u32
| u32
Line 113: Line 113:
The bits are arranged from LSB to MSB per-byte. First are the bits relating static MREA geometry  
The bits are arranged from LSB to MSB per-byte. First are the bits relating static MREA geometry  
in-order of the first MREA sections. Next are bits relating the scripted entities in the VISI entities table.
in-order of the first MREA sections. Next are bits relating the scripted entities in the VISI entities table.
Finally are the bits relating lights in order of the BABEDEAD section of the MREA. Following these is another
 
set of bits for each light indicating if it's in-bounds of the octree or not.
Finally are the bits relating lights in order of the BABEDEAD section of the MREA. The 2nd layer lights are related first. Each light encodes 2-bits apiece,
with the following enum represented:
 
{| class="wikitable"
! Value
! Description
|-
| 0
| Not Visible
|-
| 1
| Visible
|-
| 2
| Outside Octree Bounds
|}
Anonymous user