Jump to content

Research: Collision files (*.col)


pivke
 Share

Recommended Posts

Hi all,

 

as some of you were interested in the collision files, I started to research them. There are 2 versions of collision files. Once there are simple collsion files with only 1 bounding box, and then there are collision files with several sections (several bounding boxes, probably for more complex objects which can't be represented with 1 single bounding box).

 

Simple *.col-version:

CBBX - "Cube BoundingBox"
{
	//Defines origin base position of the whole mesh
	FLOAT CenterXAxis;
	FLOAT CenterZAxis;
	FLOAT CenterYAxis;
	
	FLOAT MaximumXAxis; //Global final position: CenterXAxis +- MaximumXAxis
	FLOAT MaximumZAxis; //Global final position: CenterZAxis +- MaximumZAxis
	FLOAT MaximumYAxis; //Global final position: CenterZAxis +- MaximumZAxis
	
	DWORD Unknown1;
	DWORD Diameter; //Maybe diameter for bounding sphere?
}

 

*.col version with several sections:

CBBX - "Cube BoundingBox" (file with multiple sections)
{
	//Defines origin base position of the whole mesh
	FLOAT CenterXAxis;
	FLOAT CenterZAxis;
	FLOAT CenterYAxis;
	
	FLOAT MaximumXAxis; //Global final position: CenterXAxis +- MaximumXAxis
	FLOAT MaximumZAxis; //Global final position: CenterZAxis +- MaximumZAxis
	FLOAT MaximumYAxis; //Global final position: CenterZAxis +- MaximumZAxis
	
	DWORD Diameter; //Maybe diameter for bounding sphere?
}

COL - "Collision"
{
	DWORD Unknown;
	DWORD NumberOfBoundingBoxes;
	DWORD Unknown;
}

struct BoundingBox
{
	//The following is representing 1 vertex
	//Maximum on X axis
	FLOAT MaximumX; //x coordinate of first point
	FLOAT MaximumY; //y coordinate of first point	
	FLOAT MaximumZ; //z coordinate of first point
	
	//The following is representing 1 vertex
	//Maximum on Z axis
	FLOAT MaximumX; //x coordinate of first point
	FLOAT MaximumY; //y coordinate of first point	
	FLOAT MaximumZ; //z coordinate of first point
	
	FLOAT Unknown;
	FLOAT Unknown;
	FLOAT Unknown;
	
	FLOAT Unknown;
	FLOAT Unknown;
	FLOAT Unknown;
}

GRDP - "Groupdata"
{
	DOWRD NumberOfIndices;

	DWORD Indices[ NumberOfIndices ];
}

 

On the more complex format you can see, that it is holding several bounding boxes, which are indexed in the "GRDP"-section. We know this pattern from *.msh-mesh files. As you can see, there are still some unknown variables. I could write a software which lets you create custom bounding boxes for your custom models, but I think it would be better to reserch the missing variables first.

  • Like 3
Link to comment
Share on other sites

Successfully changed a complex *.col-collision file to the simple version of it. So the game let's you decide wether you want to use several bounding boxes or just one.

 

Changed Rocks.col with several bounding boxes to one single bounding box (erased it):
lego0001faur9.png

  • Like 1
Link to comment
Share on other sites

2 hours ago, pivke said:

Successfully changed a complex *.col-collision file to the simple version of it. So the game let's you decide wether you want to use several bounding boxes or just one.

 

Changed Rocks.col with several bounding boxes to one single bounding box (erased it):
lego0001faur9.png

That's cool.

Link to comment
Share on other sites

50 minutes ago, Terrev said:

Neat stuff. Also, maybe you're aware, but the texture quality in your screenshot seems to be set to low, which the game sometimes defaults to despite saying it's on high.

Thanks for mentioning that Terrev. When I saw your thread the first time I was pissed that I played the game my whole childhood with low texture settings. For this one I didn't really care, as I never do when doing reverse engeneering or testing.

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.