Vehicle Data/Burnout 3: Difference between revisions

From Burnout Wiki
Content added Content deleted
(Moved from Burnout Vehicle page.)
 
(Updated based on Revenge symbols and normalized information.)
Line 1: Line 1:
Based on information from Burnout Revenge Alpha 7 debugging symbols.
= Layout (Version 0x17) =

{|class="wikitable
= Structures =
=== CB3VehicleData ===
{| class="wikitable
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || RwUInt32 || mxVersionNumber || Version number || 29
! Offset
! Name
! Type
! Value
! Notes
|-
|-
| 0x4 || 0x4 || RwInt32 || mxLoadedState || Loaded state || Always 0 in asset. Set in memory
| 0x00 || Version number || uint || 0x17 ||
|-
|-
| 0x04 || Loaded state || int || 0x00 ||
| 0x8 || 0x4 || RwInt32 || ? || File size (bytes) ||
|-
|-
| 0x08 || File size (bytes) || int || ||
| 0xC || 0x1 || RwInt8 || mn8NumBodyParts || Body Part count ||
|-
|-
| 0x0C || Body Part count || byte || ||
| 0xD || 0x1 || RwInt8 || mn8NumWheels || Wheel count ||
|-
|-
| 0x0D || Wheel count || byte || ||
| 0xE || 0x2 || RwInt16 || mn16MinLOD || Minimum LOD ||
|-
|-
| 0x0E || Minimum LOD || short || ||
| 0x10 || 0x2 || RwInt16 || mn16MaxLOD || Maximum LOD ||
|-
|-
| 0x10 || Maximum LOD || short || ||
| 0x12 || 0x2 || || || Padding ||
|-
|-
| 0x14 || Object radius || float || ||
| 0x14 || 0x4 || RwReal || mrObjectRadius || Object radius ||
|-
|-
| 0x18 || Wheel radius || float || ||
| 0x18 || 0x4 || RwReal || mrWheelRadius || Wheel radius ||
|-
|-
| 0x1C || Wheel scales || float[6] || ||
| 0x1C || 0x18 || RwReal[6] || marWheelScales || Wheel scales ||
|-
|-
| 0x34 || Body part radii || float[6] || ||
| 0x34 || 0x18 || RwReal[6] || marBodyPartRadii || Body part radii ||
|-
|-
| 0x4C || LOD database offsets || [[Burnout_Vehicle#LOD_Database|LOD Database]]*[5] || ||
| 0x4C || 0x14 || [[#CB3VehicleLODData|CB3VehicleLODData]]*[5] || mapLODData || LODs ||
|-
|-
| 0x60 || Vehicle texture offset || Texture* || ||
| 0x60 || 0x4 || [[#CGtTexture|CGtTexture]]* || mpTexture || Vehicle texture ||
|-
|-
| 0x64 || Shadow body object offset || Vehicle Object* || ||
| 0x64 || 0x4 || [[#CB3VehicleObject|CB3VehicleObject]]* || mpShadowBodyObject || Shadow body object ||
|-
|-
| 0x68 || 0x4 || [[#CB3VehicleObject|CB3VehicleObject]]* || mpShadowWheelObject || Shadow wheel object ||
| 0x68 || Shadow wheel object offset || Vehicle Object* || ||
|-
|-
| 0x6C || Texture colour overlay offset || Texture* || ||
| 0x6C || 0x4 || [[#CGtTexture|CGtTexture]]* || mpTextureColourOverlay || Texture colour overlay ||
|-
|-
| 0x70 || Chassis bone deform matrices || Matrix3x4[20] || ||
| 0x70 || 0x500 || [[CGtMatrix3x4]][20] || ? || Chassis bone deform matrices ||
|-
|-
| 0x570 || Chassis skin-to-bone deform matrices || Matrix3x4[20] || ||
| 0x570 || 0x500 || [[CGtMatrix3x4]][20] || ? || Chassis skin-to-bone deform matrices ||
|-
|-
| 0xA70 || Chassis bone lengths || float[20] || ||
| 0xA70 || 0x50 || RwReal[20] || ? || Chassis bone lengths ||
|-
|-
| 0xAC0 || Chassis bone rig type || EBoneRigType || || 0x00 = normal bone rig<br>0x01 = large bone rig<br>0x02 = no bone rig
| 0xAC0 || 0x4 || [[#EBoneRigType|EBoneRigType]] || meMainBoneRigType || Chassis bone rig type ||
|-
|-
| 0xAC4 || Body part types || EBodyPartType[6] || || 0x00 = Wheel<br>0x01 = Body part
| 0xAC4 || 0x18 || [[#EBodyPartType|EBodyPartType]][6] || maeBodyPartType || Body part types ||
|-
|-
| 0xADC || Hinge axes || byte[6] || ||
| 0xADC || 0x6 || RwUInt8[6] || mau8HingeAxes || Hinge axes ||
|-
|-
| 0xAE2 || Body part bone indices || byte[6][2] || ||
| 0xAE2 || 0xC || RwUInt8[6][2] || maau8BodyPartBoneIndices || Body part bone indices ||
|-
|-
| 0xAEE || Wheel bone indices || byte[6][2] || ||
| 0xAEE || 0xC || RwUInt8[6][2] || maau8WheelBoneIndices || Wheel bone indices ||
|-
|-
| 0xAFC || Hinge max angles || float[6] || ||
| 0xAFA || 0x2 || || || Padding ||
|-
|-
| 0xB14 || Body part bone weights || float[6][2] || ||
| 0xAFC || 0x18 || RwReal[6] || marHingeMaxAngles || Hinge max angles ||
|-
|-
| 0xB44 || Wheel bone weights || float[6][2] || ||
| 0xB14 || 0x30 || RwReal[6][2] || maarBodyPartBoneWeights || Body part bone weights ||
|-
|-
| 0xB80 || Wheel matrices || Matrix3x4[6] || ||
| 0xB44 || 0x30 || RwReal[6][2] || maarWheelBoneWeights || Wheel bone weights ||
|-
|-
| 0xD00 || Body part matrices || Matrix3x4[6] || ||
| 0xB74 || 0xC || || || Padding ||
|-
|-
| 0xB80 || 0x180 || [[CGtMatrix3x4]][6] || maWheelMatrices || Wheel matrices ||
| 0xEA0 || Body part attach points || Vector3[6] || ||
|-
|-
| 0x1060 || Hull || Vehicle Hull || ||
| 0xD00 || 0x180 || [[CGtMatrix3x4]][6] || maBodyPartMatrices || Body part matrices ||
|-
|-
| 0x1660 || Hull exists? || Bool32 || ||
| 0xE80 || 0x20 || [[CGtAxisAlignedBox]] || mBBox || ||
|-
|-
| 0x1664 || Tag points || Tag Point*[18] || ||
| 0xEA0 || 0xC0 || [[CGtAxisAlignedBox]][6] || maBodyPartBBoxes || ||
|-
|-
| 0x16AC || Tag point counts || byte[18] || ||
| 0xF60 || 0x100 || ? || ? || || Null in available samples
|-
|-
| 0x16C8 || Number of payload sets || sbyte || ||
| 0x1060 || 0x500 || [[#CB3ConvexVehicleHull|CB3ConvexVehicleHull]] || mHull || Hull ||
|-
|-
| 0x16C9 || Number of payloads || sbyte || ||
| 0x1660 || 0x4 || RwBool || mbHullExists || Does hull exist ||
|-
|-
| 0x1664 || 0x48 || [[#CB3VehicleTag|CB3VehicleTag]]*[18] || mpaTagPoints || Tag points ||
| 0x16CA || Current payload set || sbyte || -1 if not set ||
|-
|-
| 0x16AC || 0x12 || RwUInt8[18] || mauTagPointCounts || Tag point counts ||
| 0x16DC || ESM offsets || [[Burnout_Vehicle#Engine_Sound_Model_(ESM)|Engine Sound Model]]*[2] || ||
|-
| 0x16BE || 0x2 || || || Padding ||
|-
| 0x16C0 || 0x4 || [[#CB3VehiclePayloadSet|CB3VehiclePayloadSet]]* || mpaPayloadSets || ||
|-
| 0x16C4 || 0x4 || [[#CB3VehiclePayload|CB3VehiclePayload]]* || mpaPayloads || ||
|-
| 0x16C8 || 0x1 || RwInt8 || mn8NumPayloadSets || Number of payload sets ||
|-
| 0x16C9 || 0x1 || RwInt8 || mn8NumPayloads || Number of payloads ||
|-
| 0x16CA || 0x1 || RwInt8 || mn8CurrentPayloadSet || Current payload set || -1 if not set
|-
| 0x16CB || 0x1 || || || Padding ||
|-
| 0x16CC || 0x10 || ? || ? || || Null in available samples
|-
| 0x16DC || 0x8 || [[#CB3SoundESMStruct|CB3SoundESMStruct]]*[2] || mapESMs || ESMs ||
|}

=== CB3VehicleLODData ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x40 || [[#CB3VehicleLODDataBase|CB3VehicleLODDataBase]] || || Base class ||
|}
|}


=== LOD Database ===
=== CB3VehicleLODDataBase ===
The '''LOD Database''' format stores a given vehicle's LOD model.
The '''LOD Database''' format stores a given vehicle's LOD model.


Line 92: Line 117:
It seems a LOD Database can contain a maximum of 12 vehicle objects, though it's unknown if this rule is enforced by the game or if it can be larger than that.
It seems a LOD Database can contain a maximum of 12 vehicle objects, though it's unknown if this rule is enforced by the game or if it can be larger than that.


{|class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
! Offset
! Name
! Type
|-
|-
| 0x0 || 0x4 || [[#CB3VehicleObject|CB3VehicleObject]]* || mpBodyObject || Body object ||
| 0x00 || Body object offset || [[Burnout_Vehicle#Vehicle_Object|Vehicle Object]]*
|-
|-
| 0x4 || 0x18 || [[#CB3VehicleObject|CB3VehicleObject]]*[6] || mapBodyParts || Body parts ||
| 0x04 || Body part offsets || Vehicle Object*[5]
|-
|-
| 0x18 || 0xC || [[#CB3VehicleObject|CB3VehicleObject]]*[3] || mapWheelObject || Wheel objects ||
| 0x18 || Wheel object offsets || Vehicle Object*[4]
|}
|}


=== Vehicle Object ===
=== CB3VehicleObject ===
{|class="wikitable"
{|class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x1 || RwInt8 || mn8NumMeshes || Mesh count ||
! Offset
! Name
! Type
! Description
|-
|-
| 0x00 || Mesh count || sbyte ||
| 0x1 || 0x1 || RwInt8 || mn8GlassMeshIndex || Glass mesh index ||
|-
|-
| 0x01 || Glass mesh index || sbyte ||
| 0x2 || 0x2 || || || Padding ||
|-
|-
| 0x4 || 0x4 || [[#CB3VehicleMesh|CB3VehicleMesh]]* || mpaMeshes || Meshes ||
| 0x04 || Mesh array offset || [[Burnout_Vehicle#Vehicle_Mesh|Vehicle Mesh]]*[] || Pointer to an array of Vehicle Meshes
|-
|-
| 0x08 || Normal shift || float ||
| 0x8 || 0x4 || RwReal || || Normal shift ||
|}
|}


=== Vehicle Mesh ===
=== CB3VehicleMesh ===
The format for a Vehicle Mesh definition differs by platform.
The format for a Vehicle Mesh definition differs by platform.
==== PS2 ====
==== PS2 ====
{|class="wikitable"
{|class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || RwUInt8* || mpRenderDataFirst || Render data (first) ||
! Offset
! Name
! Type
! Description
|-
|-
| 0x00 || Render data (first) || byte* ||
| 0x4 || 0x4 || RwUInt8* || mpRenderDataRest || Render data (rest) ||
|-
|-
| 0x8 || 0x2 || RwUInt16 || mx16MeshFlags || Mesh flags || TODO: List flags
| 0x04 || Render data (rest) || byte* ||
|-
|-
| 0x08 || Mesh flags || ushort ||
| 0xA || 0x1 || RwUInt8 || mu8Alpha1 || Alpha1 ||
|-
|-
| 0xB || 0x1 || RwUInt8 || mu8TextureIndex || Texture index ||
| 0x0A || Alpha1 || byte ||
|-
|-
| 0xC || 0x1 || RwUInt8 || mu8SourceOpacity || Source opacity ||
| 0x0B || Texture index || byte ||
|-
|-
| 0xD || 0x1 || RwUInt8 || mu8CurrentOpacity || Current opacity ||
| 0x0C || Source opacity || byte ||
|-
|-
| 0x0D || Current opacity || byte ||
| 0xE || 0x1 || RwUInt8 || mu8Shininess || Shininess ||
|-
|-
| 0x0E || Shininess || byte ||
| 0xF || 0x1 || RwUInt8 || mu8UNUSED || Unused ||
|-
| 0x0F || Unused || byte ||
|}
|}

==== Xbox ====
==== Xbox ====
{|class="wikitable"
{|class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || RwReal || ? || ||
! Offset
! Name
! Type
! Description
|-
|-
| 0x00 || unk0 || float ||
| 0x4 || 0x4 || RwReal || ? || ||
|-
|-
| 0x04 || unk1 || float ||
| 0x8 || 0x4 || RwReal || ? || ||
|-
|-
| 0x08 || unk2 || float ||
| 0xC || 0x4 || RwInt8* || ? || Render data ||
|-
|-
| 0x0C || Render Data || byte* ||
| 0x10 || 0x4 || RwUInt32 || ? || Render data size ||
|-
|-
| 0x10 || Render Data Size || int ||
| 0x14 || 0x4 || RwUInt32 || ? || ||
|-
|-
| 0x14 || unk3 || int ||
| 0x18 || 0x1 || RwUInt8 || ? || ||
|-
|-
| 0x18 || unk4 || byte ||
| 0x19 || 0x1 || RwUInt8 || ? || ||
|-
|-
| 0x19 || unk5 || byte ||
| 0x1A || 0x1 || RwUInt8 || ? || ||
|-
|-
| 0x1A || unk6 || byte ||
| 0x1B || 0x1 || RwUInt8 || ? || ||
|}

=== CGtTexture ===
{{todo|List texture structure.}}

=== CB3ConvexVehicleHull ===
{{todo|List hull structure.}}

=== CB3VehicleTag ===
{{todo|List vehicle tag point structure.}}

=== CB3VehiclePayloadSet ===
{{todo|List payload set structure.}}

=== CB3VehiclePayload ===
{{todo|List payload structure.}}

=== CB3SoundESMStruct ===
{{todo|List ESM structure.}}
This format contains playback parameters and pitching info for a given vehicle's engine sound effects, stored mostly as floating-point numbers. BGVs use two of these files for high and low speed ranges. The files were merged into the BGV starting with revision 0x17; prior to this, they were stored externally in the same folder as the BGV, with the file extensions <code>.HSM</code> and <code>.LSM</code>.

= Enumerations =
=== EBoneRigType ===
{| class="wikitable"
! Name !! Value !! Comments
|-
|-
| 0x1B || unk7 || byte ||
| eNormalBoneRig || 0 || Normal bone rig
|-
|-
| eLargeBoneRig || 1 || Large bone rig
|-
| eNoBoneRig || 2 || No bone rig
|}
|}


=== Engine Sound Model ===
=== EBodyPartType ===
{{todo|Update with correct information: goes up to at least 5}}
This format contains playback parameters and pitching info for a given vehicle's engine sound effects, stored mostly as floating-point numbers. BGVs use two of these files for high and low speed ranges. The files were merged into the BGV starting with revision 0x17; prior to this, they were stored externally in the same folder as the BGV, with the file extensions <code>.HSM</code> and <code>.LSM</code>.
{| class="wikitable"
! Name !! Value !! Comments
|-
| ? || 0 || Wheel
|-
| ? || 1 || Body part
|}

Revision as of 18:14, 1 February 2023

Based on information from Burnout Revenge Alpha 7 debugging symbols.

Structures

CB3VehicleData

Offset Length Type Name Description Comments
0x0 0x4 RwUInt32 mxVersionNumber Version number 29
0x4 0x4 RwInt32 mxLoadedState Loaded state Always 0 in asset. Set in memory
0x8 0x4 RwInt32 ? File size (bytes)
0xC 0x1 RwInt8 mn8NumBodyParts Body Part count
0xD 0x1 RwInt8 mn8NumWheels Wheel count
0xE 0x2 RwInt16 mn16MinLOD Minimum LOD
0x10 0x2 RwInt16 mn16MaxLOD Maximum LOD
0x12 0x2 Padding
0x14 0x4 RwReal mrObjectRadius Object radius
0x18 0x4 RwReal mrWheelRadius Wheel radius
0x1C 0x18 RwReal[6] marWheelScales Wheel scales
0x34 0x18 RwReal[6] marBodyPartRadii Body part radii
0x4C 0x14 CB3VehicleLODData*[5] mapLODData LODs
0x60 0x4 CGtTexture* mpTexture Vehicle texture
0x64 0x4 CB3VehicleObject* mpShadowBodyObject Shadow body object
0x68 0x4 CB3VehicleObject* mpShadowWheelObject Shadow wheel object
0x6C 0x4 CGtTexture* mpTextureColourOverlay Texture colour overlay
0x70 0x500 CGtMatrix3x4[20] ? Chassis bone deform matrices
0x570 0x500 CGtMatrix3x4[20] ? Chassis skin-to-bone deform matrices
0xA70 0x50 RwReal[20] ? Chassis bone lengths
0xAC0 0x4 EBoneRigType meMainBoneRigType Chassis bone rig type
0xAC4 0x18 EBodyPartType[6] maeBodyPartType Body part types
0xADC 0x6 RwUInt8[6] mau8HingeAxes Hinge axes
0xAE2 0xC RwUInt8[6][2] maau8BodyPartBoneIndices Body part bone indices
0xAEE 0xC RwUInt8[6][2] maau8WheelBoneIndices Wheel bone indices
0xAFA 0x2 Padding
0xAFC 0x18 RwReal[6] marHingeMaxAngles Hinge max angles
0xB14 0x30 RwReal[6][2] maarBodyPartBoneWeights Body part bone weights
0xB44 0x30 RwReal[6][2] maarWheelBoneWeights Wheel bone weights
0xB74 0xC Padding
0xB80 0x180 CGtMatrix3x4[6] maWheelMatrices Wheel matrices
0xD00 0x180 CGtMatrix3x4[6] maBodyPartMatrices Body part matrices
0xE80 0x20 CGtAxisAlignedBox mBBox
0xEA0 0xC0 CGtAxisAlignedBox[6] maBodyPartBBoxes
0xF60 0x100 ? ? Null in available samples
0x1060 0x500 CB3ConvexVehicleHull mHull Hull
0x1660 0x4 RwBool mbHullExists Does hull exist
0x1664 0x48 CB3VehicleTag*[18] mpaTagPoints Tag points
0x16AC 0x12 RwUInt8[18] mauTagPointCounts Tag point counts
0x16BE 0x2 Padding
0x16C0 0x4 CB3VehiclePayloadSet* mpaPayloadSets
0x16C4 0x4 CB3VehiclePayload* mpaPayloads
0x16C8 0x1 RwInt8 mn8NumPayloadSets Number of payload sets
0x16C9 0x1 RwInt8 mn8NumPayloads Number of payloads
0x16CA 0x1 RwInt8 mn8CurrentPayloadSet Current payload set -1 if not set
0x16CB 0x1 Padding
0x16CC 0x10 ? ? Null in available samples
0x16DC 0x8 CB3SoundESMStruct*[2] mapESMs ESMs

CB3VehicleLODData

Offset Length Type Name Description Comments
0x0 0x40 CB3VehicleLODDataBase Base class

CB3VehicleLODDataBase

The LOD Database format stores a given vehicle's LOD model.

LODs, or Levels of Detail, are lower-poly, lower-detail (hence the name) models that games use for objects that are far away from the player, to keep framerates smooth. BGVs contain 4 LOD Databases, which in turn each contain one LOD model of minimum (LOD 3), low (LOD 2), medium (LOD 1) and high (LOD 0) quality.

It seems a LOD Database can contain a maximum of 12 vehicle objects, though it's unknown if this rule is enforced by the game or if it can be larger than that.

Offset Length Type Name Description Comments
0x0 0x4 CB3VehicleObject* mpBodyObject Body object
0x4 0x18 CB3VehicleObject*[6] mapBodyParts Body parts
0x18 0xC CB3VehicleObject*[3] mapWheelObject Wheel objects

CB3VehicleObject

Offset Length Type Name Description Comments
0x0 0x1 RwInt8 mn8NumMeshes Mesh count
0x1 0x1 RwInt8 mn8GlassMeshIndex Glass mesh index
0x2 0x2 Padding
0x4 0x4 CB3VehicleMesh* mpaMeshes Meshes
0x8 0x4 RwReal Normal shift

CB3VehicleMesh

The format for a Vehicle Mesh definition differs by platform.

PS2

Offset Length Type Name Description Comments
0x0 0x4 RwUInt8* mpRenderDataFirst Render data (first)
0x4 0x4 RwUInt8* mpRenderDataRest Render data (rest)
0x8 0x2 RwUInt16 mx16MeshFlags Mesh flags TODO: List flags
0xA 0x1 RwUInt8 mu8Alpha1 Alpha1
0xB 0x1 RwUInt8 mu8TextureIndex Texture index
0xC 0x1 RwUInt8 mu8SourceOpacity Source opacity
0xD 0x1 RwUInt8 mu8CurrentOpacity Current opacity
0xE 0x1 RwUInt8 mu8Shininess Shininess
0xF 0x1 RwUInt8 mu8UNUSED Unused

Xbox

Offset Length Type Name Description Comments
0x0 0x4 RwReal ?
0x4 0x4 RwReal ?
0x8 0x4 RwReal ?
0xC 0x4 RwInt8* ? Render data
0x10 0x4 RwUInt32 ? Render data size
0x14 0x4 RwUInt32 ?
0x18 0x1 RwUInt8 ?
0x19 0x1 RwUInt8 ?
0x1A 0x1 RwUInt8 ?
0x1B 0x1 RwUInt8 ?

CGtTexture

Hmmm...
Hmmm...
To do:
List texture structure.

CB3ConvexVehicleHull

Hmmm...
Hmmm...
To do:
List hull structure.

CB3VehicleTag

Hmmm...
Hmmm...
To do:
List vehicle tag point structure.

CB3VehiclePayloadSet

Hmmm...
Hmmm...
To do:
List payload set structure.

CB3VehiclePayload

Hmmm...
Hmmm...
To do:
List payload structure.

CB3SoundESMStruct

Hmmm...
Hmmm...
To do:
List ESM structure.

This format contains playback parameters and pitching info for a given vehicle's engine sound effects, stored mostly as floating-point numbers. BGVs use two of these files for high and low speed ranges. The files were merged into the BGV starting with revision 0x17; prior to this, they were stored externally in the same folder as the BGV, with the file extensions .HSM and .LSM.

Enumerations

EBoneRigType

Name Value Comments
eNormalBoneRig 0 Normal bone rig
eLargeBoneRig 1 Large bone rig
eNoBoneRig 2 No bone rig

EBodyPartType

Hmmm...
Hmmm...
To do:
Update with correct information: goes up to at least 5
Name Value Comments
? 0 Wheel
? 1 Body part