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...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.
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.
More progress shots of actual meshes added on Page 2.