© Copyright 2005-2006 Веб-мастер HexBit hexbit@inbox.ru

Техническая документация по формату COL .

Автор: Steve-m.

This is all information I found out about the collision files (*.col) of Grand Theft Auto III and GTA Vice City.
If you find any mistakes or can help to reveal the remaining secrets, please let me know!
You can use my CollEditor to view and edit these files.

Contents:
- General
- Collision objects
~ Header
~ Collision spheres
~ Unknown
~ Collision boxes
~ Vertices
~ Faces
- Additional information
~ Surface values
~ Surface parameters

General
~~~~~~~

Collision files don't have a file header, they consist of single collision objects (so they can be called collision archives).

Collision Objects
~~~~~~~~~~~~~~~~~

Collision objects can contain spheres, boxes and a mesh defined by vertices and faces.
They do have a header (72 byte).

.:HEADER:.

4 byte - CHAR[4] - must be "COLL"
4 byte - DWORD - size: add 8 to get the size of the actual coll object
20 byte - CHAR[20] - name of the object
4 byte - DWORD - unknown, maybe an id, not needed by the game
4 byte - FLOAT - radius of bounding sphere
12 byte - FLOAT[3] - position of bounding sphere (x,y,z)
12 byte - FLOAT[3] - minimum point of bounding box (x,y,z)
12 byte - FLOAT[3] - maximum point of bounding box (x,y,z)

.:COLL SPHERES:.

4 byte - DWORD - number of collision spheres
then the sphere data follow, 20 byte per sphere
(
4 byte - FLOAT - radius of sphere
12 byte - FLOAT[3] - position of sphere (x,y,z)
1 byte - BYTE - surface value
1 byte - BYTE - surface parameter
2 byte - WORD - unused (always 0)
)

.:UNKNOWN:.

4 byte - DWORD - number of [unknown] (always 0)

.:COLL BOXES:.

4 byte - DWORD - number of collision boxes
then the box data follow, 28 byte per box
(
12 byte - FLOAT[3] - minimum point of box (x,y,z)
12 byte - FLOAT[3] - maximum point of box (x,y,z)
1 byte - BYTE - surface value
1 byte - BYTE - surface parameter
2 byte - WORD - unused (always 0)
)

.:VERTICES:.

4 byte - DWORD - number of vertices
then the vertex data follow, 12 byte per vertex
(
12 byte - FLOAT[3] - vertex (x,y,z)
)

.:FACES:.

4 byte - DWORD - number of faces
then the face data follow, 16 byte per face
(
12 byte - DWORD[3] - numbers of the three vertices that build a face
1 byte - BYTE - surface value
1 byte - BYTE - surface parameter
2 byte - WORD - unused (always 0)
)

Additional Information
~~~~~~~~~~~~~~~~~~~~~~

.:SURFACE VALUES:.

They define the structure and material of the particular face, sphere or box.
GTA3 uses numbers 0 - 32 and Vice City 0 - 34.

00 Standard
01 Street
02 Grass
03 Soil
04 Dirt
05 Beton
06 Aluminum
07 Glas
08 Metal Pole
09 Door
10 Metal Sheet
11 Metal
12 Small Metal Post
13 Large Metal Post
14 Medium Metal Post
15 Steel
16 Fence
17 [unknown and unused]
18 Sand
19 Water
20 Wooden Box
21 Wooden Lathes
22 Wood
23 Metal Box
24 Metal Box
25 Hedge
26 Rock
27 Metal Container
28 Metal Barrel
29 [unknown and unused]
30 Metal Card Box
31 [unknown]
32 Gate/Bars
33 Sand 2 (VC)
34 Grass 2 (VC)

.:SURFACE PARAMETERS:.

They define the part of a car to be damaged and must be used for a correct damage model.
GTA3 and Vice City are both using numbers 0 - 12 and 17.

00 Default / Chassis
01 Bonnet
02 Boot
03 Front Bumper
04 Rear Bumper
05 Left Front Door
06 Right Front Door
07 Left Rear Door
08 Right Rear Door
09 Left Front Wing
10 Right Front Wing
11 Left Rear Wing
12 Right Rear Wing
17 Windscreen

 


 

Hosted by uCoz