Have we broken open section 3 of the models yet? It's not in the wiki (other than the fact that it affects shading and model positioning), and a quick search over the forums didn't turn up anything useful, so I did some poking around in there over the last couple of days. I think I've managed to figure out a fair bit of this section from examining Serge, Kid, and Guile's models. Here's what I've got. (If we DO already have this and I just missed it, let me know so I can delete this post. It's kinda long, probably due to my tendency to ramble.)
Section 3 is 0x160 bytes long, no matter how complex the model is. It seems to have three distinct segments of constant lengths, so it doesn't have any sort of header.
The first 0x100 bytes of it define points around the model. Each point is made up of 8 byte long chunks which look something like this:
XX XX YY YY ZZ ZZ AA AA
The X's, Y's, and Z's define a coordinate in 3D space like we've already seen in section 2 (as well as pretty much the same thing in section 4). As I've said before, I have problems thinking in 3D, so I may have the axes out of order. (I'm guessing it's the same order as section 2, but I could be wrong.) The A's contain the ID of whatever articulation the coordinate is relative to.
A few of these are in roughly the same position on all the models I've looked at. (Remember that I'm getting this from Serge, Kid, and Guile. These are, notably, humanoid models. Non-humanoids like Poshul or Pip might differ.) Here are the indexes of the coordinates, which are useful in the third segment. Multiply them by 8 to get the actual offsets into section 3:
00 - Top of head
01 - Front of face
02 - Neck
03 - Right shoulder
04 - Left shoulder
05 - Right elbow
06 - Left elbow
07 - Right hand
08 - Left hand
09 - Waist
0A - Right knee
0B - Left knee
0C - Right ankle
0D - Left ankle
0x0E defines the height the camera sits at when it rotates around the character during their idle animation. Only the vertical component of this one seems to matter.
0x0F defines the distance between the character and whatever enemy they happen to be attacking at the time. Only one of the horizontal axes seems to matter here, and only the magnitude of the distance, not its direction, so you can't do something funny like have the character go charging past their opponent in preparation for an attack. Um, not that that was the first thing I tried or anything.
0x10 is located on the upper center of the model's torso.
0x11 is relative to the right hand on Serge, Kid, and Guile, but seems to sit a distance off from it, and I can't tell if it's roughly the same distance or direction. This seems so out of place that part of me wants to believe that this defines a distance like 0x0E and 0x0F, but I haven't been able to determine what it affects, if anything.
The indexes from here are dependent on the model and seem a tad chaotic. On Serge's model, 0x12 sits directly on the weapon articulation. Guile has an entry exactly like this, but it's the very last one in the section at index 0x1F. Kid has no corresponding entry, as she has no weapon articulation. (Or at least, none that I could find. She's got an articulation directly after the right hand where the weapon is on Serge, Guile, and Lynx, but it doesn't seem to actually affect anything.) There's a lot of entries made up entirely of 0s here, with some other entries tossed in towards the end. Only the one Guile has at 0x1F has any significance that I've figured out yet.
I'm going to jump the second segment here and come back to it in a minute. The third segment is fairly short, anyways.
The third segment begins somewhere around 0x120 bytes in. I can't make this segment's length make sense no matter how much I look at it, so I might be missing something, but what I've got seems to make sense. This segment is made of 8 byte long coordinates pretty much exactly like the ones in the first segment, in the form XXXX YYYY ZZZZ AAAA with the exception that the AA AA bytes are now indexes into the list of coordinates defined by segment one. For example, if one coordinate here was 0000 0000 0000 0700 then it would sit directly on the right hand coordinate.
The only part of the third segment that I've managed to assign any importance to is the coordinate that begins 0x1A bytes from the
end of section 3. The game attaches the character's weapon to the coordinate defined here. By changing what coordinate in segment 1 this points to, we could, say,
make Kid a lefty.
Alright, back to the second segment, which defines the model's shading. Segment 2 is 0x20 bytes long, divided into 0x4 byte chunks. There are 8 chunks, but the amount that actually do anything is dependent on the model. For each that's actually used, it controls the shading to a specific part of the model. For example, Serge only uses two of them, one of which affects the area of his shirt below the belt, and one of which affects everything else. Kid is similar, having one chunk for her skirt and one chunk for the rest of the model.
Each chunk is of the form
RR GG BB EF
where RR, GG, and BB define how red, green, and blue, the model should be. The neutral value for these is 0x80. Higher values tint the model more of that color, lower values tint the model less of that color.
E and F are the fun parts. It's one byte, but the 4 highest order bits and the 4 lowest order bits (in other words, the first digit and second digit) control different things.
E controls what texture (if any) gets drawn over the model's normal one. Here's what the individual values do: (A lot of these look the same to me. There may be subtle variations between some of the "identical" ones, but I didn't see them.)
0 - Normal
1 - Normal
2 -
Highly reflective3 - Highly reflective
4 -
Reflective5 - Reflective
6 - Reflective
7 - Reflective
8 - Normal
9 - Normal
A -
Weird texture application (Looks like this could be Serge's normal texture, just applied in a weird way.)
B - Weird texture application
C -
Garbage texture (This one isn't static, it changes every frame. If I had to guess, I'd say it's supposed to point to a texture loaded by an attack or tech, but which is simply garbage normally.)
D - Garbage texture
E - Garbage texture
F - Garbage texture
F controls the model's transparency and a related effect or two. Here comes the list:
0 - Solid
1 -
Invisible2 -
Transparent3 - Invisible
4 - Solid
5 - Invisible
6 -
Transparent and bright7 - Invisible
8 - Solid
9 - Invisible
A -
Transparent and invertedB - Invisible
C - Solid
D - Invisible
E -
Transparent and very faintF - Invisible
Combining these can be interesting. For example, here's
Serge made of glass.
And wow was THAT longer than I anticipated. Let me know if I'm being redundant by posting this or if anything needs clarification.