Jump to content

Resources/Light Pointcloud: Difference between revisions

From HEModdingWiki
Ashrindy (talk | contribs)
Created page with "{{Infobox Resource|type=Models|extension=.pcrt|games=* Sonic Frontiers * Shadow Generations|tools=* KnuxTools * Restoration Issue Pocketknife * AshDumpTool|status=Done|container=BINA|name=Light Pointcloud}} '''Light Pointcloud''' is a fileformat used since Sonic Frontiers, that's used to c..."
 
Ashrindy (talk | contribs)
No edit summary
Line 1: Line 1:
{{Infobox Resource|type=[[Resources#Models|Models]]|extension=.pcrt|games=* [[Games/Sonic Frontiers|Sonic Frontiers]]  
{{Infobox Resource|type=[[Resources#Lighting|Lighting]]|extension=.pcrt|games=* [[Games/Sonic Frontiers|Sonic Frontiers]]  
* [[Games/Shadow Generations|Shadow Generations]]|tools=* [[Tools/KnuxTools|KnuxTools]]
* [[Games/Shadow Generations|Shadow Generations]]|tools=* [[Tools/KnuxTools|KnuxTools]]
* [[Tools/Restoration Issue Pocketknife|Restoration Issue Pocketknife]]
* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Light Pointcloud}}
* [[Tools/AshDumpTool|AshDumpTool]]|status=Done|container=BINA|name=Light Pointcloud}}
'''Light Pointcloud''' is a fileformat used since [[Games/Sonic Frontiers|Sonic Frontiers]], that's used to create lights using a collection of instances with resource names.
'''Light Pointcloud''' is a fileformat used since [[Games/Sonic Frontiers|Sonic Frontiers]], that's used to create lights using a collection of instances with resource names.

Revision as of 19:44, 7 January 2025

Light Pointcloud
Resource TypeLighting
File Extension.pcrt
Used In Games
Container FormatBINA
Editing Tools
Reverse Engineering StatusDone

Light Pointcloud is a fileformat used since Sonic Frontiers, that's used to create lights using a collection of instances 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 instances itself.

The structure of an instance is

  • Instance name, to easily differentiate between different instance.
  • Resource Name, to set the light 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 PointcloudLight{
    char signature[4];
    uint version;
    int instanceCount;
    Instance* instances;
};