SZS file format explained

Post to this thread if you find out what's stored in all the files that are generated from the szs/rarc files :-) Some wild guesses by me:

.bmg: Messages/Subtitles. Contain lots of text.
.bmd: 3d model data?? Contains "VTX1" blocks which could stand for "Vertex". However, most of these files are not too big. The "map/map" subdir of the szs files in "data/scene" contains a map.bmpd which is quite big (nearly always > 1mb), this could be the main level model.
.jpa: Texture/Image??
bmt: Material??

Just to let you know, the yaz0 compression in the SZS files is also used in the REL files on Wind Waker. I suppose it's highly possible that its been used in other games as well, just with different extensions!

Status update

Hi,

I've managed to extract most of the texture data from the .bmd files (currently only s3tc1 compressed data is extracted, but most textures are in that format. It seems that the format byte has the same meaning as in .tpl files, so I hope I can extract the other formats soon, too). I will post an exe for it when I managed to extract the vertex/face data as well (it's stored in the .bmd files as well).

As you can see, tristrip loading kinda works now, too. I managed to decode which kind of data is stored in the model (colors, texcoords, normals, ...), but the viewer has not yet been updated to use this additional information, so the tris are grey...

Things still missing:
- I don't know how many normals/texcoords/colors are stored in the file. I could let the program count them, but it's gotta be stored somewhere in this file as well...
- There are different kinds of tristrips in a single model: some tris have only normals while others have normals and texture coords. I don't know at which boundaries tristrip types change - so only the first "type" is displayed right now (that's why not the whole scene below is triangulated).

I'll take a creative break tomorrow, I hope I'm able to display textured, lighted and colorful models this weekend

I know this maybe a stupid question, but would there be any possiblity of a guide to reverse-engineering file formats? I would love to help you out, but I've only ever reverse-engineered settings files (e.g. DAT files) so this is VERY different!

Hm, basically I open a file in a hex editor, look at it until I see what some of the bytes could mean, write a little program to test it my assumptions work, and if it works for about 5 different files I assume that my guess was right and I move on to the next block.

When I've finished decoding the vertex data, I'll post a document that describes the .bmd format and another one that describes which of the files helped me most to understand the format and what I learned from which file. Hopefully this weekend... :-)