Jump to content

Vehicle Data: Difference between revisions

no edit summary
No edit summary
Line 20:
 
* Version 0x1D and onward store deformation matrices in a different order to previous revisions.
* The LOD Database version present in revision 0x14 BGVs are the only version to use '''global pointers''' for their submesh tables. These point to the exact location in the file of each submesh, whereas '''local pointers''', used in all subsequent versions of the format, use offsets relative to the beginning of the LOD. For example, a pointer to offset <tt>0x1820</tt> in a 0x14-era LOD Database would appear to point to <tt>0x140</tt> in all other versions.
 
= Header =
=== Version 0x17 ===
Line 118:
 
It seems the maximum amount of submeshes a LOD 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.
 
=== Version Differences ===
* The LOD Database version present in revision 0x14 BGVs are the only version to use '''global pointers''' for their submesh tables. These point to the exact location in the file of each submesh, whereas '''local pointers''', used in all subsequent versions of the format, use offsets relative to the beginning of the LOD. For example, a pointer to offset <tt>0x1820</tt> in a 0x14-era LOD Database would appear to point to <tt>0x140</tt> in all other versions.
 
=== Layout ===
Line 130 ⟶ 127:
|-
| 0x00 || Submesh*[12] || Submesh offset(s)
|}
 
== Vehicle Object ==
=== Layout ===
{|class="wikitable"
|-
! Offset
! Name
! Type
! Description
|-
| 0x00 || Mesh count || sbyte ||
|-
| 0x01 || Glass mesh index || sbyte ||
|-
| 0x04 || Meshes || Vehicle Mesh(*)[] || Pointer to an array of Vehicle Meshes
|-
| 0x08 || Normal shift || float ||
|}
 
== Vehicle Mesh ==
=== Layout ===
{|class="wikitable"
|-
! Offset
! Name
! Type
! Description
|-
| 0x00 || Render data (first) || byte* ||
|-
| 0x04 || Render data (rest) || byte* ||
|-
| 0x08 || Mesh flags || ushort ||
|-
| 0x0A || Alpha1 || byte ||
|-
| 0x0B || Texture index || byte ||
|-
| 0x0C || Source opacity || byte ||
|-
| 0x0D || Current opacity || byte ||
|-
| 0x0E || Shininess || byte ||
|-
| 0x0F || Unused || byte ||
|-
|}
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.