Jump to content

Resources/Model Pointcloud: Difference between revisions

From HEModdingWiki
Ashrindy (talk | contribs)
Ashrindy (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox Resource|type=[[Resources#Models|Models]]|extension=.pcmodel|games=* [[Games/Sonic Frontiers|Sonic Frontiers]]  
{{Infobox Resource|type=[[Resources#Models|Models]]|extension=.pcmodel|games=* [[Sonic Frontiers|Sonic Frontiers]]  
* [[Games/Shadow Generations|Shadow Generations]]|tools=* [[Tools/KnuxTools|KnuxTools]]
* [[Shadow Generations|Shadow Generations]]|tools=* [[Tools/KnuxTools|KnuxTools]]
* [[Tools/Restoration Issue Pocketknife|Restoration Issue Pocketknife]]
* [[Tools/Restoration Issue Pocketknife|Restoration Issue Pocketknife]]
* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Model Pointcloud}}
* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Model Pointcloud}}
'''Model Pointcloud''' is a fileformat used since [[Games/Sonic Frontiers|Sonic Frontiers]], that's used to create terrains using a collection of instances with resource names.
'''Model Pointcloud''' is a fileformat used since [[Sonic Frontiers]], that's used to create terrains [[Resources/Terrain Model|(.terrain-model]][[Resources/Model|/.model)]] using a collection of instances with resource names.


== File Format ==
== File Format ==
This is one of the many BINA file formats, meaning it's very easily memory-mappable.
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.
Line 13: Line 13:


* '''Instance name,''' to easily differentiate between different instance.
* '''Instance name,''' to easily differentiate between different instance.
* '''Resource Name,''' to set the model name of the instance.
* '''Resource Name,''' to set the [[Resources/Terrain Model|Terrain Model]] or [[Resources/Model|Model]] name of the instance.
* '''Position,''' straight forward.
* '''Position,''' straight forward.
* '''Rotation,''' straight forward.
* '''Rotation,''' straight forward.
Line 24: Line 24:
     const char* instanceName;
     const char* instanceName;
     const char* resourceName;
     const char* resourceName;
     Vector3 position;
     csl::math::Position position;
     Vector3 rotation;
     csl::math::Position rotation;
     int unk0;
     int unk0;
     Vector3 Scale;
     csl::math::Position Scale;
     long unk1;
     long unk1;
};
};

Latest revision as of 14:10, 26 January 2025

Model Pointcloud
Resource TypeModels
File Extension.pcmodel
Used In Games
Container FormatBINA
Editing Tools
Reverse Engineering StatusDone

Model Pointcloud is a fileformat used since Sonic Frontiers, that's used to create terrains (.terrain-model/.model) 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 Terrain Model or Model 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 PointcloudModel{
    char signature[4];
    uint version;
    int instanceCount;
    Instance* instances;
};