-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This is mostly just a documentation of all of the known structures and their contents. See the sidebar for more details.
Format for the NGC/DGC or NPS/DPS archive format: https://github.com/Jellonator/chum-world/wiki/BigFile
https://github.com/Jellonator/chum-world/wiki/SGC-Format
type | status | usage |
---|---|---|
ANIMATION | Structured | Mesh/skin animations |
BITMAP | Solvedish | Textures/bitmap data |
CAMERA | Solvedish | Camera node, related to cutscenes |
CAMERAZONE | Unsolved | Unknown but most likely related to cameras |
COLLISIONVOL | Structured | Invisible, rectangular triggers, e.g. warps to other levels or checkpoints. |
GAMEOBJ | Solved | List of NODE-based prefabs. |
HFOG | Structured | Seems to apply fog effects to child nodes. |
LIGHT | Structured | Directional lights, such as a sun |
LOD | Structured | Unknown, but most likely means "Level of Detail" |
MATERIAL | Structured | Used to apply materials to meshes or surfaces. |
MATERIALANIM | Structured | Animated materials. |
MATERIALOBJ | Solved | A list of MATERIALANIM references. |
MESH* | Solved | 3D mesh data |
NODE* | Structured | Node data, arranges game objects as some kind of node tree |
OCCLUDER | Partial | May be related to ambient occlusion or occlusion culling |
OMNI | Structured | light that emits in all directions |
PARTICLES | Structured | Particle emitter data |
ROTSHAPE* | Solvedish | Rotating shapes that face the camera. |
RTC | Unsolved | Realtime cinematic |
SKEL* | Unsolved | Does not appear to actually exist in game files, only ever referenced. |
SKIN* | Readable | Stores skinning formation about models (vertex groups) |
SOUND* | Solvedish | Sound effect data |
SPLINE | Solvedish | Used for 3D paths (e.g. Jellyfish or the Squidward race) |
SURFACE* | Readable | 3D Surface files, used for level geometry and collision shapes. |
TXT | Solved | Text files, translation data, and compiled Python scripts. |
USERDEFINE | Solved | Custom tags applied to NODE files. |
WARP* | Solved | Skybox |
WORLD | Partial | World data, contains the layout of all of the entities. |
*These file types have separate classes which handle loading in the PS2 release of the game, meaning they have significantly different structures than their Gamecube counterparts.
Solve status:
- Unsolved - Format is almost entirely unknown.
- Partial - Part of the structure of known, but not all of it.
- Structured - The structure of the format is known, but the purpose of certain values are still unknown.
- Readable - The format is known well enough to extract the data from the game.
- Solved - Format is known to the point where data can be read from and written to the game, allowing for modifications of that file type.
- Solvedish - Solved, but there's a couple unknown values which have safe defaults.
Note that the solve statuses only apply to the Nintendo Gamecube build of the game. The PS2 build is much less well known, although many of the structures are very similar. Keep in mind the PS2 is little-endian while the Gamecube is big-endian.
Here are some common structures that appear throughout the games' data:
struct Vector3 {
float x;
float y;
float z;
}
3d vector
struct Vector2 {
float x;
float y;
}
2d vector
struct Mat4x4 {
float transform[16];
}
3d transform.
Matrices are stored in row-major order.
The translation is stored in transform[12]
, transform[13]
, transform[14]
.
transform[3]
, transform[7]
, and transform[11]
are typically 0.0 and transform[15]
is typically 1.0.
struct Mat3x3 {
float transform[9];
}
2d transform
struct Quaternion {
float i;
float j;
float k;
float w;
}
3d rotation stored as a normalized quaternion.
Many files contain a 100 byte header that consists of the following data:
struct TransformationHeader{
float unknown[4];
Mat4x4 transform;
char junk[16];
uint16_t type;
uint16_t subtype; // ?
// Rest of file's data begins here
}
These are the file types that contain this structure:
Name | Type | Valid Subtypes |
---|---|---|
SURFACE | 1 | 392, 396 |
SPLINE | 2 | 56, 184, 312, 440 |
SKIN | 3 | 0, 2 |
ROTSHAPE | 4 | 0 |
LOD | 5 | 0, 2 |
MESH | 6 | 0, 4 |
CAMERA* | 7 | 32 |
OCCLUDER | 10 | 56 |
CAMERAZONE | 11 | 56 |
LIGHT | 12 | 48 |
HFOG | 13 | 48 |
COLLISIONVOL | 14 | 16 |
OMNI | 16 | 0 |
PARTICLES | 18 | 96 |
* This type has junk data in place of the transform
value.
The purpose of the type
value is so that objects know how to interpret the file when they are loaded; for example, an object may load a LIGHT or an OMNI light in the same location, and the type
byte lets the object know how to treat this file.
The purpose of the subtype
value is unknown. It seems to be some kind of flag value.
Junk Data: https://github.com/Jellonator/chum-world/wiki/Junk-data