Difference between revisions of "Sonic Jam/Models"
From Sonic Retro
m |
(Added Sonic's Model Addresses) |
||
Line 1: | Line 1: | ||
− | + | __NOTOC__ | |
+ | {{SCHG SJ}} | ||
+ | Model data starts at $3F908 in MUSEUM.MUS. | ||
==Model Format== | ==Model Format== | ||
Line 47: | Line 49: | ||
This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following: | This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following: | ||
− | < | + | <ol><li>Pointer to start of vertices (long), number of vertices (long)</li> |
<li>Pointer to start of indexing table (long), number of quads (long)</li> | <li>Pointer to start of indexing table (long), number of quads (long)</li> | ||
Line 53: | Line 55: | ||
<li>Pointer to draw command (long)</li> | <li>Pointer to draw command (long)</li> | ||
− | <li>Pointer to vertex normals (long)</li></ | + | <li>Pointer to vertex normals (long)</li></ol> |
===Model Groups=== | ===Model Groups=== | ||
Line 67: | Line 69: | ||
==Model List== | ==Model List== | ||
− | Here's the list of models in the game that | + | Here's the list of models in the game that are currently known. Addresses given are pointers to footers, for both model groups and individual models. |
{|class="prettytable" style="width:auto;" | {|class="prettytable" style="width:auto;" | ||
− | !Sonic||$42620 | + | ! Name||Address |
+ | |-} | ||
+ | |||
+ | {|class="prettytable" style="width:auto;" | ||
+ | ! Sonic||$42620 | ||
+ | |- | ||
+ | | Body||$40058 | ||
+ | |- | ||
+ | | Head||$40C58 | ||
+ | |- | ||
+ | | Right Thigh||$40DA8 | ||
+ | |- | ||
+ | | Right Calf||$41048 | ||
+ | |- | ||
+ | | Right Foot||$412A0 | ||
+ | |- | ||
+ | | Left Thigh||$413F0 | ||
+ | |- | ||
+ | | Left Calf||$41690 | ||
+ | |- | ||
+ | | Left Foot||$418E8 | ||
+ | |- | ||
+ | | Right Bicep||$41A50 | ||
+ | |- | ||
+ | | Right Forearm||$41CF0 | ||
+ | |- | ||
+ | | Right Hand||$41F18 | ||
+ | |- | ||
+ | | Left Bicep||$42080 | ||
+ | |- | ||
+ | | Left Forearm||$42320 | ||
+ | |- | ||
+ | | Left Hand||$42548 | ||
|- | |- | ||
− | | | + | | Tail||$42608 |
|} | |} | ||
{{SCHGuides}} | {{SCHGuides}} | ||
[[Category:SCHG: Sonic Jam]] | [[Category:SCHG: Sonic Jam]] |
Revision as of 22:23, 18 February 2021
SCHG: Sonic Jam |
---|
Main Article |
Sonic World |
Model data starts at $3F908 in MUSEUM.MUS.
Model Format
Models generally consist of the following parts. There are some exceptions, but the general order stays the same.
Vertices
The first part are vertices, stored as a 3D vector.
Indexing Table
The second part is the indexing table for quads, using the vertices given. Indices are words, and jump by $08. The first vertex would be $0000; the second would be $0008. There's one for each quad.
Vertex Normals
The third, for objects that use Dynamic Gouraud Shading, are the vertex normals. These are normalized 3D vectors. As you'd expect, there's one for each vertex.
Draw Settings
After the above is the draw settings. There's one list of settings for each quad. Each list is 16 bytes long. Here's its format:
Description | Length |
---|---|
Unknown. Highest bit seems to turn off backface culling. | Byte |
Unknown. Bits $1 and $2 affect depth testing in certain instances. | Byte |
Texture index. $0-$1DB. | Word |
CMDPMOD command for VDP1. Bit flags. | Word |
Unknown. | Word |
Static/Dynamic Gouraud Shading Table Index. | Word |
CMDCTRL command for VDP1. Bit flags. | Word |
Unknown. | Word |
Unknown. | Word |
This can vary from model to model, depending on which parts are present. For Sonic, this consists of the following:
- Pointer to start of vertices (long), number of vertices (long)
- Pointer to start of indexing table (long), number of quads (long)
- Pointer to draw command (long)
- Pointer to vertex normals (long)
Model Groups
Some models, such as Sonic and Tails, consist of multiple models in a group. After the last model in the group, there's a footer.
The first part of the footer is a list of addresses pointing to each model's footer.
The second part is a list of 3D Vectors, relative positions for each model. They correspond to the addresses given in the previous section.
Certain model groups have some seemingly unused data that appears before the footer. This data seems to correlate with how the model group parenting hierarchy is set up.
Model List
Here's the list of models in the game that are currently known. Addresses given are pointers to footers, for both model groups and individual models.