Clustered Mesh: Difference between revisions
m
no edit summary
(what a mess) |
mNo edit summary |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1:
{{ParadiseResourceTypeInfobox
| name = ClusteredMesh
| othernames = CollisionMeshData
| example = [[File:Paradise ClusteredMesh Example.png|frameless|220px]]<br />Track unit 203's clustered mesh.
| id = 0x24
| category = Generic
| memdist = Main Memory only
| importedby = [[ID List]]
| editor = Viewer only<br />Use [[Modding/Burnout Paradise|Blender addons]]
}}
{{subpage|Development|text=Information on versions of the Clustered Mesh resource type used during development.}}
Clustered Mesh resources were used for world collision (WORLDCOL) prior to the introduction of the [[Polygon Soup List]] resource type.
Line 7 ⟶ 20:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || [[#rw::collision
|-
| 0x4 || 0xC || || || Padding ||
Line 14 ⟶ 27:
|}
=== rw::collision
==== 32-bit ====
{| class="wikitable"
Line 33 ⟶ 46:
| 0x58 || 0x4 || uint32_t || surfaceID || ||
|-
| 0x5C || 0x4 || uint32_t || m_flags || ||
|}
=== rw::collision::VolumeFlag ===
Note that this is sourced from February 2007 data and may or may not have changed in later versions.
{| class="wikitable"
|-
! Name !! Value !! Comments
|-
| VOLUMEFLAG_ISENABLED || 1 ||
|-
| VOLUMEFLAG_TRIANGLENORMALISDIRTY || 2 ||
|-
| VOLUMEFLAG_TRIANGLEONESIDED || 16 ||rowspan=8|These precise values (but not the existence of the flags themselves) are technically platform-specific and is documented for PS3. It may or may not be actually different on other platforms.
|-
| VOLUMEFLAG_TRIANGLEEDGE0CONVEX || 32
|-
| VOLUMEFLAG_TRIANGLEEDGE1CONVEX || 64
|-
| VOLUMEFLAG_TRIANGLEEDGE2CONVEX || 128
|-
| VOLUMEFLAG_TRIANGLEUSEEDGECOS || 256
|-
| VOLUMEFLAG_TRIANGLEVERT0DISABLE || 512
|-
| VOLUMEFLAG_TRIANGLEVERT1DISABLE || 1024
|-
| VOLUMEFLAG_TRIANGLEVERT2DISABLE || 2048
|-
| VOLUMEFLAG_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}
Line 57 ⟶ 101:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x30 || [[#rw::collision::Aggregate|Aggregate]] ||
|}
Line 67 ⟶ 111:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x30 || [[#rw::collision::Procedural|Procedural]] ||
|-
| 0x30 || 0x4 || [[#rw::collision::KDTree|KDTree]]* || mKDTree || ||
Line 107 ⟶ 151:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || float32_t || mVertexCompressionGranularity || || Relevant for cluster compression modes 1 and 2
|-
| 0x4 || 0x2 || uint16_t || mFlags || ||
|-
| 0x6 || 0x1 || uint8_t || mGroupIdSize || Number of bytes || 1 or 2
|-
| 0x7 || 0x1 || uint8_t || mSurfaceIdSize || Number of bytes || 1 or 2
|}
=== rw::collision::CMFlags ===
Note that this is sourced from February 2007 data and may or may not have changed in later versions.
{| class="wikitable"
|-
! Name !! Value !! Comments
|-
| CMFLAG_INT16VERTEX || 1 ||
|-
| CMFLAG_INT16NORMAL || 2 ||
|-
| CMFLAG_20BITCLUSTERINDEX || 4 ||
|-
| CMFLAG_ONESIDED || 16 ||
|-
| CMFLAG_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}
Line 174 ⟶ 237:
| 0xB || 0x1 || uint8_t || normalCount || ||
|-
| 0xC || 0x1 || uint8_t || compressionMode || VERTICES_UNCOMPRESSED
|-
| 0xD || 0x3 || uint8_t[3] ||
|-
| 0x10 || 0x10 || [[
|}
==== Vertex data ====
{| class="wikitable"
|+ VERTICES_UNCOMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0<br>(repeating) || 0x10 || [[
|}
{| class="wikitable"
|+ VERTICES_16BIT_COMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0 || 0xC ||
|-
| 0xC<br>(repeating) || 0x6 ||
|}
{| class="wikitable"
|+ VERTICES_32BIT_COMPRESSED
|-
! Offset !! Length !! Type !! Name
|-
| 0x0<br>(repeating) || 0xC ||
|}
===== rw::collision::ClusteredMeshCluster::Vertex16 =====
{| class="wikitable"
! Offset !! Length !! Type !! Name
|-
|-
| 0x2 || 0x2 || uint16_t || y
|-
| 0x4 || 0x2 || uint16_t || z
|}
===== rw::collision::ClusteredMeshCluster::Vertex32 =====
{| class="wikitable"
! Offset !! Length !! Type !! Name
|-
| 0x0 || 0x4 || int32_t || x
|-
| 0x4 || 0x4 || int32_t || y
|-
| 0x8 || 0x4 || int32_t || z
▲| 0x0<br>(repeating) || 0xC || ? || ? || || Multiply components by mVertexCompressionGranularity?
|}
Line 215 ⟶ 303:
! Length !! Type !! Description !! Comments
|-
| 0x1 || uint8_t || '''Lower nibble''' (type)<br>
|-
| 0x1 || uint8_t || '''Only present if type ==
|-
| Vertex count<br>(triangle count + 2) || uint8_t || Vertex index ||
|-
| 0x1 || uint8_t || '''Only present with UNITFLAG_NORMAL'''<br>Normal index probably ||
▲| 0x2 || ? || ? || ?
|-
|
|-
| Group ID size (see [[#rw::collision::ClusterParams|ClusterParams]]) || uint8_t or uint16_t || '''Only present with
|-
| Surface ID size (see [[#rw::collision::ClusterParams|ClusterParams]]) || uint8_t or uint16_t || '''Only present with
|}
|