COL (File Format): Difference between revisions

From Wexos's Wiki
Jump to navigationJump to search
No edit summary
Line 13: Line 13:
| 0x04 || Byte[4] || Timestamp? Always 16 08 12 20 (2012-08-16?) The game specifically checks if this value is correct, otherwise it won't read the file.
| 0x04 || Byte[4] || Timestamp? Always 16 08 12 20 (2012-08-16?) The game specifically checks if this value is correct, otherwise it won't read the file.
|-
|-
| 0x08 || UInt32 || {{Unknown-left|'''Unknown'''.}}
| 0x08 || Int32 || '''Grid width''' ('''W''').
|-
|-
| 0x0C || UInt32 || {{Unknown-left|'''Unknown'''.}}
| 0x0C || Int32 || '''Grid length''' ('''L''').
|-
|-
| 0x10 || Float || {{Unknown-left|'''Unknown'''. Grid size X?}}
| 0x10 || Float || '''Grid cell X size'''.
|-
|-
| 0x14 || Float || {{Unknown-left|'''Unknown'''. Grid size Y?}}
| 0x14 || Float || '''Grid cell Y size'''.
|-
|-
| 0x18 || Float[3] || '''AABB minimum coordinate'''.  
| 0x18 || Float[3] || '''AABB minimum coordinate'''.  
|-
|-
| 0x24 || Float[3] || '''AABB maximal coordinate'''.
| 0x24 || Float[3] || '''AABB maximal coordinate'''.
|}
== Grid ==
Followed by the header, the grid data is read from the start of the AABB minimum coordinate, from left to right. A total of '''W''' * '''L''' cells are loaded.
=== Cell ===
{| class="wikitable"
! Offset !! Type !! Description
|-
| 0x00 || Int32 || '''Number of [[#Triangle|Triangles]]''' ('''T''').
|-
| 0x04 || Int32 || '''Number of [[#Cube|Cubes]]''' ('''C''').
|}
==== Triangle ====
Followed by the cell header, there are '''T''' 0x70 triangles.
{| class="wikitable"
! Offset !! Type !! Description
|-
| 0x00 || Float[4] || {{Unknown-left|'''Unknown'''.}}
|-
| 0x10 || Float[3][3] || '''Triangle vertices''' XYZ position.
|-
| 0x34 || Float[3][3] || {{Unknown-left|'''Unknown'''. Perhaps triangle normals or some kind of direction XYZ position?}}
|-
| 0x58 || Int32 || {{Unknown-left|'''Unknown'''. Maybe determines which edges of the triangle are surrounded by walls?}}
|-
| 0x5C || UInt32 || '''[[COL flag]]'''.
|-
| 0x60 || Float[4] || {{Unknown-left|'''Unknown'''.}}
|}
==== Cube ====
Followed by the cell's triangles, there are '''C''' 0x40 cubes, perhaps used for wall collision.
{| class="wikitable"
! Offset !! Type !! Description
|-
| 0x00 || Float[4][4] || {{Unknown-left|'''Unknown'''.}}
|}
== Secondary Grid ==
Followed by the grid, there's a secondary grid with unknown blocks. As of version 1.18 of Mario Kart Arcade GP DX, it only seems to be used in ''FM_L_N_HIT.col'' and ''FM_L_N_HIT_cam.col''.
=== Cell ===
{| class="wikitable"
! Offset !! Type !! Description
|-
| 0x00 || Int32 || '''Number of [[#Unknown Section|Unknown sections]]''' ('''U''').
|}
==== Unknown Section ====
Followed by the cell header, there are '''U''' 0x38 unknown sections.
{| class="wikitable"
! Offset !! Type !! Description
|-
| 0x00 || Int32 || {{Unknown-left|'''Unknown'''.}}
|-
| 0x04 || Float[3][3] || {{Unknown-left|'''Unknown'''.}}
|-
| 0x28 || Float[4] || {{Unknown-left|'''Unknown'''. Always 0.}}
|}
|}



Revision as of 16:01, 29 June 2025

Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

COL is a collision format used in Mario Kart Arcade GP DX.

File Format

Header

The file starts with the following header:

Offset Type Description
0x00 Char[4] File magic. Always COL\0 in ASCII.
0x04 Byte[4] Timestamp? Always 16 08 12 20 (2012-08-16?) The game specifically checks if this value is correct, otherwise it won't read the file.
0x08 Int32 Grid width (W).
0x0C Int32 Grid length (L).
0x10 Float Grid cell X size.
0x14 Float Grid cell Y size.
0x18 Float[3] AABB minimum coordinate.
0x24 Float[3] AABB maximal coordinate.

Grid

Followed by the header, the grid data is read from the start of the AABB minimum coordinate, from left to right. A total of W * L cells are loaded.

Cell

Offset Type Description
0x00 Int32 Number of Triangles (T).
0x04 Int32 Number of Cubes (C).

Triangle

Followed by the cell header, there are T 0x70 triangles.

Offset Type Description
0x00 Float[4] Unknown.
0x10 Float[3][3] Triangle vertices XYZ position.
0x34 Float[3][3] Unknown. Perhaps triangle normals or some kind of direction XYZ position?
0x58 Int32 Unknown. Maybe determines which edges of the triangle are surrounded by walls?
0x5C UInt32 COL flag.
0x60 Float[4] Unknown.

Cube

Followed by the cell's triangles, there are C 0x40 cubes, perhaps used for wall collision.

Offset Type Description
0x00 Float[4][4] Unknown.

Secondary Grid

Followed by the grid, there's a secondary grid with unknown blocks. As of version 1.18 of Mario Kart Arcade GP DX, it only seems to be used in FM_L_N_HIT.col and FM_L_N_HIT_cam.col.

Cell

Offset Type Description
0x00 Int32 Number of Unknown sections (U).

Unknown Section

Followed by the cell header, there are U 0x38 unknown sections.

Offset Type Description
0x00 Int32 Unknown.
0x04 Float[3][3] Unknown.
0x28 Float[4] Unknown. Always 0.

Tools

The following tools can handle COL files:

  • (none)