Resources/Collision Pointcloud: Difference between revisions
Appearance
No edit summary |
|||
Line 6: | Line 6: | ||
== File Format == | == File Format == | ||
This is one of the many BINA file formats | This is one of the many BINA file formats. | ||
The structure of this format is very simple, it contains a signature '''"CPIC"''', the version '''"2"''' ''(no instances have been found with the version 1)'' and the list of instances itself. | The structure of this format is very simple, it contains a signature '''"CPIC"''', the version '''"2"''' ''(no instances have been found with the version 1)'' and the list of instances itself. |
Revision as of 14:18, 26 January 2025
Resource Type | Physics |
---|---|
File Extension | .pccol |
Used In Games | |
Container Format | BINA |
Editing Tools | |
Reverse Engineering Status | Done |
Collision Pointcloud is a fileformat used since Sonic Frontiers, that's used to place collision models (.btmesh) in a stage using a collection of instances with resource names.
File Format
This is one of the many BINA file formats.
The structure of this format is very simple, it contains a signature "CPIC", the version "2" (no instances have been found with the version 1) and the list of instances itself.
The structure of an instance is
- Instance name, to easily differentiate between different instance.
- Resource Name, to set the Bullet Mesh file name of the instance.
- Position, straight forward.
- Rotation, straight forward.
- Scale, straight forward.
- Unknown value.
Technical Info
Since this is a BINA file format, it's very easy to show this type in a struct/memory map it.
struct Instance{
const char* instanceName;
const char* resourceName;
csl::math::Position position;
csl::math::Position rotation;
int unk0;
csl::math::Position Scale;
long unk1;
};
struct PointcloudCollision{
char signature[4];
uint version;
int instanceCount;
Instance* instances;
};