Difference between revisions of "BSP (File Format)"
Jump to navigation
Jump to search
m |
m (Correction from static analysis (stebler apparently was also aware of this from what I see in the physics engine article)) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 13: | Line 13: | ||
| 0x190 || vec3 || Second cuboid dimensions for the inertia tensor, with mass 12. | | 0x190 || vec3 || Second cuboid dimensions for the inertia tensor, with mass 12. | ||
|- | |- | ||
− | | 0x19c || f32 || A | + | | 0x19c || f32 || A multiplier applied to the angular velocity component computed from kart rigid body dynamics. |
|- | |- | ||
| 0x1a0 || f32 || {{Unknown-left|'''Unknown'''.}} | | 0x1a0 || f32 || {{Unknown-left|'''Unknown'''.}} | ||
Line 52: | Line 52: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |+ | + | |+ Wheel Substructure |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 59: | Line 59: | ||
| 0x02 || u16 || Padding. | | 0x02 || u16 || Padding. | ||
|- | |- | ||
− | | 0x04 || f32 || Suspension | + | | 0x04 || f32 || Suspension spring stiffness. It multiplies the distance between the current position and the bottommost position. |
|- | |- | ||
− | | 0x08 || f32 || Suspension factor | + | | 0x08 || f32 || Suspension damping factor. It multiplies the wheel speed on the vertical axis. |
|- | |- | ||
− | | 0x0c || f32 || | + | | 0x0c || f32 || Maximum suspension travel. This value is the distance between the topmost and the bottommost wheel positions. |
|- | |- | ||
− | | 0x10 || vec3 || | + | | 0x10 || vec3 || Suspension top (highest point the wheel can reach when jouncing). For bikes' front wheel, this is relative to the handle position and rotation from [[bikePartsDispParam.bin]]. |
|- | |- | ||
| 0x1c || f32 || Wheel X rotation. Always zero. | | 0x1c || f32 || Wheel X rotation. Always zero. | ||
Line 80: | Line 80: | ||
== Tools == | == Tools == | ||
The following tools can handle BSP files: | The following tools can handle BSP files: | ||
− | * [[BSP Table]], by [[Atlas]] | + | * [[BSP Table]], by [[Atlas]] |
[[Category:File Format/MKW]] | [[Category:File Format/MKW]] |
Latest revision as of 17:52, 19 November 2023
BSP (Binary Settings and Physics) is a file format that contains vehicle collision data. BSP files are found in the bsp directory in Common.szs.
File Format
Offset | Type | Description |
---|---|---|
0x00 | f32 | Initial Y position. If a collision is found, the normal to the floor multiplied by this value is added to the position from the KMP. |
0x04 | hitbox[16] | An array of 16 hitboxes. |
0x184 | vec3 | First cuboid dimensions for the inertia tensor, with mass 1. |
0x190 | vec3 | Second cuboid dimensions for the inertia tensor, with mass 12. |
0x19c | f32 | A multiplier applied to the angular velocity component computed from kart rigid body dynamics. |
0x1a0 | f32 | Unknown. |
0x1a4 | wheel | For bikes, the front wheel. For karts, the front right wheel. |
0x1d0 | wheel | For bikes, the back wheel. For karts, the back right wheel. |
0x1fc | wheel[2] | Unused. For karts, the game reuses the two previous definitions with a negated X position. |
0x254 | f32 | Maximum vertical distance of the vehicle body's rumble animation. |
0x258 | f32 | Speed of the vehicle body's rumble animation. |
0x25c | End of file. |
Offset | Type | Description |
---|---|---|
0x00 | bu16 | Enable flag. |
0x02 | u16 | Padding. |
0x04 | vec3 | Sphere center position. |
0x10 | f32 | Sphere radius. |
0x14 | bu16 | Only collide with walls. |
0x16 | u16 | Tire collision index. |
0x18 | End of substructure. |
Offset | Type | Description |
---|---|---|
0x00 | bu16 | Enable flag. |
0x02 | u16 | Padding. |
0x04 | f32 | Suspension spring stiffness. It multiplies the distance between the current position and the bottommost position. |
0x08 | f32 | Suspension damping factor. It multiplies the wheel speed on the vertical axis. |
0x0c | f32 | Maximum suspension travel. This value is the distance between the topmost and the bottommost wheel positions. |
0x10 | vec3 | Suspension top (highest point the wheel can reach when jouncing). For bikes' front wheel, this is relative to the handle position and rotation from bikePartsDispParam.bin. |
0x1c | f32 | Wheel X rotation. Always zero. |
0x20 | f32 | Wheel radius. |
0x24 | f32 | Sphere radius used for collision detection. The difference between this value and the previous one is added to the wheel center to get the sphere center. 43 most of the time. |
0x28 | u32 | Unknown. |
0x2c | End of substructure. |
Tools
The following tools can handle BSP files: