What's new

Smash Bros Melee Model Viewer Status

jahra!n

New member
Well its been a long time since i proposed to start working on this being my first attempt at a model viewer/extractor for a non pc game. My last release was for halo pc which was a full map model converter with added batch texture conversion support. (check http://gbxforums.gearboxsoftware.com/showthread.php?t=50412&page=1 for details)

I have been cought up in allot of stuff at school and with work and all but i did manage to squeeze a bit of time into trying to understand the .dat files for smash brothers melee.

So far i did make a few discoveries. Hopefully i can get the help from some experienced people here on this forum. So far i understand that the header in each file contains the size of the file at the 0 offset. It was quite obvious. But at Offset 4, theres a pointer to an index of the file which i am still trying to understand. I noticed that the values in the file index gradually increase and never go over the size of the file i proved they are some type of pointers to the blocks in the file. They all point directly to somewhere close to what appears to be a new block only about 32 bytes away. All this data is stored using Big Endians of coarse.

I been mainly observing the player files and the trophie files. The different files are determined by thier file name's prefix. The "Pl" stands for Player which contain all the models, textures, animations, etc for that player. The player names are abreviated. for example "PlPeWh" is accually Player Peach White which is peach in her white dress. Trophie files or 'Toy' files with the "Ty" prefix are named in a similar fashion. These are also package files with models and textures stored within these files.

Also something that resently halted my progress on this for a while was my suspicion of vertex coord blocks being compressed in these files since the blocks for the vertex coords seemed very random and didnt make any sort of floating point data. Then did happen to come accross a few models which did have the vertex blocks which used single precision floating point in there standard IEEE representation. It was the "TyPeacR2.dat". After loading the vertex points into a 3d viewer, i noticed it was the true vertex coords immediatly which was X Y Z for every 12 bytes. Shortly after that data, seperated by a line of 16 0 bytes, i found another block which stored the vertex normal I J K since they all normalize properl using the equation I^2 + J^2 + k^2 = 1. So i proved that this is indeed the vertex data. The polygon triangle index data comes shortly after a few unexplored blocks which im assuming is just texture coord and shader blocks for now.

Heres some pics of the vertex points that i loaded up into a 3d viewer. See if you can make out who that is. ;)
deepexploration200601300312314.jpg

deepexploration200601300312443.jpg


Anyways, I was informed by Thakis that the vertex data in these files which i thought to be compressed are stored just like some of the models in the Bmd files which he worked on. They are 16 bit fixed decimal thingies. I still have no clue how to convert this data in visual basic which i am using to program this viewer. Perhaps someone would be kind enough to explain or link me to a algorythm out simply so i can write a low level function to convert the hex. When i google search it, all i can find is c++ code which is like japanese to me....

Anyways, im still very open for some help with this. I apperently still have allot to learn about this stuff and i am very anxious to get this model viewer working.

EDIT:
More progress shots of actual meshes added on Page 2.
 
Last edited:

SarahHarp

New member
Wow, excellent work. I was eventually going to move to Smash Bros after I was finished with Metroid, but yeah. So good luck on your journey (it was really fun for me : ) )
And the 16bit thing... hmm, this seems very familiar to me. It seems that these are compressed values o.o Metroid has some normal values like this.

Oh and that is the peach model : )
 
Last edited:
OP
J

jahra!n

New member
O__o its that simple? Thakis was telling me somethig like that but said i have to find some value inside of the file to find to divide it by.

Ok right now im working on finding offsets to the triangle indecies so that i can have an actual model to show.
 

SarahHarp

New member
Yeah, getting the correct value might be the toughest part, metroid just uses basicly the largest value of all the signed shorts
 
Last edited:

BlueFalcon7

New member
nice job, you have taken the first step to making a model viewer, just one question, are the textures, and annimations stored in the same file?
 
OP
J

jahra!n

New member
YAHH! :bouncy: :bouncy: :bouncy:
I finaly cracked the triangle groups with big thanks to the help of SarahHarp! I still havent figured out how to get direct offsets to each triangle group so i had to code a search algorythm that scans every byte for possible triangle groups. It makes the loading process pretty slow but i will have it figured out eventually. As for now i have some actual models to show.

I havent added texture or normal support yet though, but just about 90% of the trophy models load up without crashing the app. Many of them have a few missing or false triangles/groups since the seaching algorythm isnt perfected. These are just the few things i managed to get loaded up on my first few tries.

Anyways, heres some more progress shots.
deepexploration200602172324234.jpg

deepexploration200602180140205.jpg

maya20060218002252176rc.jpg

deepexploration200602180125258.jpg

deepexploration200602180127233.jpg

deepexploration200602180152032.jpg

deepexploration200602180235226.jpg
 

BlueFalcon7

New member
nice job! but i have a few questions, are all .dat files in SSBM models? and is the skeleton data stored in the model?
 
OP
J

jahra!n

New member
BlueFalcon7 said:
nice job! but i have a few questions, are all .dat files in SSBM models? and is the skeleton data stored in the model?

Well not for the "Ty" files since they are only trophy models, no animations or anything. They do contain textures though. As for the "Pl" or player .dat files, they contain animations, bones, weights, textures, models, and some dynamic physics data (for players with capes, hair, etc). Im not sure yet but i think they may also contain sound effects too but im not to sure what sound hex looks like.

Pretty much all of the .dat files are all packages of many files/data blocks, but i do not know of anyway to determine one block from another in the index for the file since the blocks contain no definate header.

Also i need some help with converting the texture data, im pretty sure they are formated the same as metriod's textures since about ost of the other data in the files are stored the same.
 

thakis

New member
Nearly all gamecube texture file formats are similar, because the cube supports only about 10 different image data formats (see in yagcd, description of the tpl format). Some games (metroid) use different identifiers for the formats, though (the CMP format is format 14 in tpl (and bti) files, but it's format 10 in metroid files).
Additionally, the texture data has to store texture width and height somewhere (a power of two most of the time, always a multiple of 4), probably the number of mipmaps, and sometimes things like minification/magnification filter etc.
 

BlueFalcon7

New member
thakis said:
Nearly all gamecube texture file formats are similar, because the cube supports only about 10 different image data formats (see in yagcd, description of the tpl format). Some games (metroid) use different identifiers for the formats, though (the CMP format is format 14 in tpl (and bti) files, but it's format 10 in metroid files).
Additionally, the texture data has to store texture width and height somewhere (a power of two most of the time, always a multiple of 4), probably the number of mipmaps, and sometimes things like minification/magnification filter etc.


are you talking about the graphics card? because i beleive all the info the gamecube needs to know to open the textures, compression, models, and everyhing else you can think of is in the executable (the .dol) and i beleive thats how every other game in existince works.

also about the skeleton data and everyhing being stored in the character data, i can understand why jahar!an thought the model files were compressed data, but one thing mostly fo jahar!an, if this helps any, i noticed that in the metroid trophy that theres a reflection of a containment jar on the metroid if tou look at it closely, (it can be seen on the dolphin) i noticed it when i was dumping textures, but my question is; how would that pe put in?
 

psychodan

New member
Been hoping to see some SSBM Stuff. It had the absolute best stuff in it. Nicely done!

whats the second program that shows the untextured models? Is that an original one?
 

Top