Ninja Model Formats
The following information delves into the model formats used in games that utilize the Ninja SDK, such as Sonic Adventure and Sonic Adventure 2. While the contents of the raw data vary between formats, they all share the same OBJECT container.
OBJECT Container
When viewed in code, an OBJECT container will have the following arrangement. Despite the existence of this container, it may often not be used as a reference point for calling model data within the specified game. This is determined on a case-by-case basis, and all models exported by SA Tools and SAIO will include it by default.
| Offset (Hex) | Type | Description |
|---|---|---|
| 0 | INT32 | Model flags |
| 4 | Pointer | Model data. This points to the main container for the specified model. This value can also be null to establish an empty node in a hierarchy. |
| 8 | Float(3) | Position |
| 14 | INT32(3) | Rotation |
| 20 | Float(3) | Scale |
| 2C | Pointer | Child OBJECT. |
| 30 | Pointer | Sibling OBJECT. |
| 34 | INT32 | Quaternion value. Some games may not account for this space being present within their data, so its inclusion may cause issues. Sonic Adventure 2 (PC) incorporates this space for models in the game's code but not Sonic Adventure, for example. This portion is not included by default in SA Tools Hub/SAIO exports except for "Ginja" models. |
Basic Models
Primarily used in Sonic Adventure, Basic models are the first model type developed for Ninja. Skinning is not normally possible with this format, but a specialized variant has been developed for use with Sonic Adventure DX (2004) with the "Weighted Characters" mod.
Sonic Adventure 2 utilizes this format for collisions and death barriers, never in a visible sense.
Sonic Adventure DX introduces a variation of Basic models - referred to as "Basic+" or "BasicDX" - and is the primary format of that game.
| Offset (Hex) | Type | Description |
|---|---|---|
| 0 | Pointer | Vertex data |
| 4 | Pointer | Normals data |
| 8 | INT32 | Vertex/Normal count |
| C | Pointer | Mesh data |
| 10 | Pointer | Material data |
| 14 | INT16 | Mesh count |
| 16 | INT16 | Material count |
| 18 | Float(3) | Model center. This is used for bounds calculation |
| 24 | Float | Model radius. This is used for bounds calculation |
| 28 | INT32 | Used in "Basic+"/"BasicDX" model data only. |
Chunk Models
Chunk models are the premier format used in Sonic Adventure 2. This format supports skinning by default.
Sonic Adventure DX incorporates this model format for specific parts of the game, notably the Chao models and the Cream the Rabbit cameos.
| Offset (Hex) | Type | Description |
|---|---|---|
| 0 | Pointer | Vertex data |
| 4 | Pointer | Polygon data |
| 8 | Float(3) | Model center. This is used for bounds calculation |
| 14 | Float | Model radius. This is used for bounds calculation |
"Ginja" (GC) Models
This format was introduced in Sonic Adventure 2 Battle and further refined in Billy Hatcher and the Giant Egg. Utilizing a combination of Ninja and Nintendo's systems, "Ginja" models (a portmanteau of "GameCube" and "Ninja") are often Chunk models converted to make use of newer technologies. Sonic Adventure 2 Battle's implementation does not have skinning support, which was addressed in Billy Hatcher.
Currently, neither SA Tools Hub nor SAIO has the ability to read or export "Ginja" models with skinning.
| Offset (Hex) | Type | Description |
|---|---|---|
| 0 | Pointer | Vertex data |
| 4 | Pointer | Weight data |
| 8 | Pointer | Opaque polygon data |
| C | Pointer | Translucent polygon data |
| 10 | INT16 | Opaque polygon data count |
| 12 | INT16 | Translucent polygon data count |
| 14 | Float(3) | Model center. This is used for bounds calculation |
| 20 | Float | Model radius. This is used for bounds calculation |
| General Information | File Formats • Model Formats • Level List • Texture Files • Game Builds • CAM & SET Files | |
|---|---|---|
| Character Information | Character List • Actions • Animation Lists • Faces | |
| Sound Information | General | Voice List • Music Files |
| Sound Effects | Stage Sounds • Stage Background Sounds | |
| Other | Cutscene List • Fish List | |
| General Information | File Formats • Model Formats • Levels • Texture Files • Light and Fog Data • Game Builds | ||
|---|---|---|---|
| Character Information | General | Model Data • Animation Files • Actions | |
| Animation Lists | Speed-Types | Sonic • Shadow • Amy • Metal Sonic | |
| Hunting-Types | Knuckles • Rouge • Tikal • Chaos Zero | ||
| Shooting-Types | Mech Tails • Mech Eggman • Chao Walker • Dark Chao Walker | ||
| Miscellaneous | Tails • Eggman • Super Sonic • Super Shadow | ||
| Sound Information | Voice List • Music Files • Sound Effects | ||
| Other | Cutscenes | ||