yaz0r has (almost) perfected the emulation of the j3d engine (models were working before yaz0rs contribution, no?), while thakis is creating a file/model viewer, Quite Different :huh:
Although, the picture in "this post" (along with his Avatar) suggests that yaz0r has also written a model viewer! :doh: If this is correct, is it gonna be released as part of Dolphin, separately or...at all?
On a side note, even if something has already been done, it should not prevent someone else from persuing the same goal! There are many GCM viewers/extractors out there, I still wrote my own to see if I could!
Is releasing a model viewer against copyright? as long as you don't release any copyrighted material with it, it's no different then releasing an emulator! And the groups that made model viewers/editors for Quake, Half-Life and Doom3 have never had any problems!?! :huh:
I'm not an expert on legal matters, so please feel free to correct me! :whistling
I just wanted to say that I'm still working on this, even if yaz0r has done this before. I'm currently finishing joint support, something I could never have finished without yaz0r's help (to show you that's not that easy, here's a line from the source: "m = g_matrices[g_drawData.indices[curr.matrixTable[curr.tristrips[j].matrixIndex/3]]];" - and in this line two levels of indirection are already precalculated. Try to see 5 levels of indirection just by looking at a hex dump! ). Here are two images, one without and one with joint support (it only makes a difference for animated models, though).
After that I'll take a look at materials or animations.
By now, all geometry loads correctly (at least for all the files I tried...). Below are some images showing how mario evolved over time. In this order:
- Vertices only, but displayed all wrong
- Raw face data, but some faces are missing (I can't code...)
- Raw face data, complete
- Basic scenegraph support
- Support for tristrips that require several matrices
- Same as before, but with "skinned" vertices (more than one bone may influence a vertex) (but this didn't change the appearance) and default values for undefined matrix indices (some matrix indices are stored as 0xffff in the file) (this fixed the appearance).
I decided to do animations before materials (mainly because that's something yaz0r has not yet done ;-) ) and it turned out to be quite easy. The animations are stored in the .bck files. Here's a screenshot of yoshi walking (animations don't look to impressive in screenshots, I know...), all animations that I tried (mario walking, rolling, jumping, some yoshi moves etc) seem to work. Materials next.
I was searching for a file that contains information where objects are to be placed in a map (so the palm can be displayed in a level trees, for example). I haven't found this file yet, but I "accidentally" decoded another file format - .ymp. It seems that .ymp files store some kind of heightmap information with white being some special value. For each level a "ymap.ymp" file is stored..if anyone is interested, I can post documentation on this format and a converter that converts a .ymp file to a few .bmp files which you can view with your favourite image viewer. Perhaps you have an idea what this files could be used for...
Here's an example image (obviously it's the "main place" in the town - where the entry to the first level ist):
I've written a 3d viewer for .ymp files because you can't really tell how a heightmap looks by looking at its grayscale image...still no idea what these heightmaps could be used for. As said before, if anyone is interested, I can post its exe and source...
0xff is interpreted as height 0 in the images below (might not be right), the first image is the the 3d view of the above grayscale image:
Possible, but the heightmaps contain only a part of a level (and different parts for different missions in a level) and some levels have no heightmap at all. Additionally, there are .col files which might store collision geometry.
Btw.: I think I found out which file stores where objects are to be placed in a level...it's probably the scene.bin file in the map directory of every level.