Vehicle Data: Difference between revisions

no edit summary
(Use month abbreviations)
No edit summary
Line 2:
 
This format contains most of the data related to any given vehicle, including mesh data, Level of Detail models, texture data, pointers to external files, deformation matrices, collision detection parameters and physics configuration info.
 
= Versions =
{| class="wikitable"
Line 21 ⟶ 22:
* Version 0x1D and onward store deformation matrices in a different order to previous revisions.
 
= Subtypes =
All currently known offsets for revision 0x17 can be found [https://docs.google.com/spreadsheets/d/1t0ZpOjCC9_2RJfcgQ8NLD8oJZfoZmpxxHEnNF5AN2Wo here].
== LOD Database ==
 
The '''LOD Database''' format stores both a given vehicle's LOD model as well as the model's rendering parameters.
= LOD database format =
 
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 0), low (LOD 1), medium (LOD 2) and high (LOD 3) quality.
 
Each LOD in a BGV contains a list of pointers to its submeshes at the very beginning; there are always exactly 12 pointers since itIt seems the maximum amount of submeshes a BGVLOD Database can contain is 12, though it's unknown if this rule is enforced by the game or if it can be larger than that.
 
=== Layout ===
{|class="wikitable"
|-
! Offset
! Type
! Description
|-
| 0x00 || Submesh* || Submesh offset(s)
|}
 
= Layout =
=== Version 0x17 ===
{|class="wikitable
|-
! Offset
! Name
! Type
! Value
! Notes
|-
| 0x00 || Version number || RwUInt32 || 0x17 ||
|-
| 0x08 || File size in bytes || RwInt32 || ||
|-
| 0x0C || Bodypart count || RwInt8 || ||
|-
| 0x0D || Wheel count || RwInt8 || ||
|-
| 0x0F || Minimum LOD || RwInt16 || ||
|-
| 0x10 || Maximum LOD || RwInt16 || ||
|-
| 0x14 || Global X Coordinate || RwReal || ||
|-
| 0x18 || Global Y Coordinate || RwReal || ||
|-
| 0x4C || LOD database offset(s) || CB4VehicleLODData*[5] || ||
|-
| 0x60 || Vehicle texture offset || CGtTexture* ||
|-
| ... || || || ||<!-- TODO: The rest of it -->
|}
 
=== Version 0x1F ===
{|class="wikitable
Line 39 ⟶ 82:
! Notes
|-
| 0x00 || mxVersionNumber || RwUInt32 || 0x170x1F ||
|-
| 0x04 || mxLoadedState || RwInt32 || 0x00 ||
Line 57 ⟶ 100:
| 0x14 || marWheelScales || RwReal[6] || ||
|-
| 0x2C || marBodyPartRadii || RwReal[8] || ||
|-
| 0x4C || marBodyPartRadii || CB4VehicleLODData*[5] || ||
|-
| 0x4C0x60 || marBodyPartRadiimpTexture || CB4VehicleLODDataCGtTexture*[5] || ||
|-
| ... || || || ||<!-- TODO: The rest of it -->