Jump to content

Resources/Collision Pointcloud: Difference between revisions

From HEModdingWiki
Added Collision Pointcloud
 
Ashrindy (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Collision Pointcloud is a format for storing position and rotations of points to be used to place [[Resources/Bullet Mesh|Bullet Meshes]]. It was first used in [[Games/Sonic Frontiers|Sonic Frontiers]].
{{Infobox Resource|type=[[Resources#Physics|Physics]]|extension=.pccol|games=* [[Sonic Frontiers|Sonic Frontiers]]  
* [[Shadow Generations|Shadow Generations]]|tools=* [[Tools/KnuxTools|KnuxTools]]
* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Collision Pointcloud}}


Each point contains the following information:
'''Collision Pointcloud''' is a fileformat used since [[Sonic Frontiers]], that's used to place collision models [[Resources/Bullet Mesh|(.btmesh)]] in a stage using a collection of instances with resource names.


* Instance Name, what the instance itself is named
== File Format ==
* Asset Name, which is the name of the BtMesh that is to be placed on the point
This is one of the many BINA file formats.
* Position
* Rotation
* Scale
* Unknown unsigned 32-bit integer.


PCCol files may be edited primarily with [[Tools/KnuxTools|KnuxTools]].
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 [[Resources/Bullet Mesh|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.<syntaxhighlight lang="c++">
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;
};
</syntaxhighlight>

Latest revision as of 14:19, 26 January 2025

Collision Pointcloud
Resource TypePhysics
File Extension.pccol
Used In Games
Container FormatBINA
Editing Tools
Reverse Engineering StatusDone

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[edit | edit source]

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[edit | edit source]

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;
};