Resources/Model Pointcloud: Difference between revisions
Appearance
No edit summary |
|||
Line 18: | Line 18: | ||
* '''Scale,''' straight forward. | * '''Scale,''' straight forward. | ||
* '''Unknown value'''. | * '''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.<syntaxhighlight lang="c++"> | |||
struct Instance{ | |||
const char* instanceName; | |||
const char* resourceName; | |||
Vector3 position; | |||
Vector3 rotation; | |||
int unk0; | |||
Vector3 Scale; | |||
long unk1; | |||
}; | |||
struct PointcloudModel{ | |||
char signature[4]; | |||
uint version; | |||
int instanceCount; | |||
Instance* instances; | |||
}; | |||
</syntaxhighlight> |
Revision as of 19:11, 7 January 2025
Resource Type | Models |
---|---|
File Extension | .pcmodel |
Used In Games | |
Container Format | BINA |
Editing Tools | |
Reverse Engineering Status | Done |
Model Pointcloud is a fileformat used since Sonic Frontiers, that's used to create terrains using a collection of points with resource names.
File Format
This is one of the many BINA file formats, meaning it's very easily memory-mappable.
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 points itself.
The structure of a point is
- Instance name, to easily differentiate between different points.
- Resource Name, to set the model name of the point.
- 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;
Vector3 position;
Vector3 rotation;
int unk0;
Vector3 Scale;
long unk1;
};
struct PointcloudModel{
char signature[4];
uint version;
int instanceCount;
Instance* instances;
};