What's new

PM:TTYD model file format, pet project

OP
R-II

R-II

New member
Well I've gone back several times over the past few months trying to wrap my brain around this block and I still havn't really gotten anywhere. Here's a sample of what I'm dealing with:

Code:
BLOCK 27.3
       time                                                      *     *
  0:   0.000,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0
  1:   3.000,    0,    0,    0,    0,    0,    1,    0,    0,    0,    4
  2:   5.000,    0,    0,    0,    0,    1,    0,    0,    0,    4,    4
  3:   6.000,    0,    0,    0,    0,    1,    1,    0,    0,    8,    2
  4:   9.000,    0,    0,    0,    0,    2,    1,    0,    0,   10,    4
This is the animation frame block - the starred collumns index and give the number of block 27.8 entries per frame, respectively.

Code:
BLOCK 27.8
      Hex      Signed Bytes          Unsigned Bytes    Float
  0: A9020202 ( -87,   2,   2,   2) (169,  2,  2,  2) (  -0.000)
  1: 37E9EBE8 (  55, -23, -21, -24) ( 55,233,235,232) (   0.000)
  2: 11010200 (  17,   1,   2,   0) ( 17,  1,  2,  0) (   0.000)
  3: 48030016 (  72,   3,   0,  22) ( 72,  3,  0, 22) ( 134144.344)
  4: 11FDFEFE (  17,  -3,  -2,  -2) ( 17,253,254,254) (   0.000)
  5: 00000000 (   0,   0,   0,   0) (  0,  0,  0,  0) (   0.000)
  6: 0000000A (   0,   0,   0,  10) (  0,  0,  0, 10) (   0.000)
  7: 00000000 (   0,   0,   0,   0) (  0,  0,  0,  0) (   0.000)
  8: 00000001 (   0,   0,   0,   1) (  0,  0,  0,  1) (   0.000)
  9: 00000220 (   0,   0,   2,  32) (  0,  0,  2, 32) (   0.000)
 10: 00000220 (   0,   0,   2,  32) (  0,  0,  2, 32) (   0.000)
 11: C176554A ( -63, 118,  85,  74) (193,118, 85, 74) ( -15.396)
 12: 4161E6C0 (  65,  97, -26, -64) ( 65, 97,230,192) (  14.119)
 13: 00000001 (   0,   0,   0,   1) (  0,  0,  0,  1) (   0.000)
This is the evil block that supposedly represents animating the model. I converted the values to a few different types for examination, but nothing's really jumping out. I'm suspecting there may be mixed types among the block, but that wouldn't agree with any of the frame indexing (but the indexing itself looks like it's meaningless based on some general patterns I've seen). I also suspect this somehow indexes the scenegraph, but I havn't figured out how. Another thing is that some of the values near the bottom of the block appear to be floating point, but it's very spotty at best in test cases. If this was to directly manipulate the scenegraph however, all the values would have to be floating point apart from indexes, so there's more going on...

Anyway I know it's a lot to chew, but I'm hoping someone that knows more about animation can give me some better ideas at how to tackle this. You can of course get limitless examples of these blocks by using util->data view in the PM Viewer and scrolling towards the bottom.
 
OP
R-II

R-II

New member
It's not a TPL viewer actually, it's a 3D model viewer for Paper Mario 2. Allthough the model's textures are all stored in TPL files.

I don't imagine my code is terribly different from Thakis's (allthough much messier), so I couldn't say why you'd be encountering problems. Maybe it has something to do with your OpenGL support?
 

BlueFalcon7

New member
i noticed that there were .tpl files in f-zero GX, for some reason its not working - not even on my friends computer (nVidia Ge force FX 5200) could you check it out?
 
OP
R-II

R-II

New member
At some point the curiosity will get the best of me and I'll take another stab at those cryptic numbers.

I also want to see if I can make the textures 'crisper'. And maybe solve the speed bottlenecks. And a couple other little things. But at this very moment I'm not working on it.
 

CrazyThing

New member
Better late then never. Heh. Good to know that you want to keep at it. May I assume that couple of other little things includes the messed up Mario files? ;D
 

SarahHarp

New member
Omg this is ironic..!
I was seriously thinking of this type of thing (however for a differnt game - MP2:E ) though I was going to try something more along the lines of a model 'ripper' instead of 'viewer' (so I can edit the polygons in Maya).
However... I have NO idea how to get inside the .gcm file and look for/obtain the vertex data and whatnot (I mainly just need the Samus model.)
If you could elaborate or PM me on how exactly you did this I would GREATLY appriciate it.

Thanks.

Sarah.
 
OP
R-II

R-II

New member
Thakis posted a gcdumper (search it), I don't have a link offhand, but that will extract all the files from the GCM.

Then you have to start looking through the data of the different file types and deduce which ones are the model files. You might get lucky, and discover it's a known type, but otherwise you're going to have fun trying to break the file down into logical blocks and figuring out what they do and how they reference eachother.

PM2's models were stored in a fairly simple format - there's not even material data associated with them. But I have no idea how the data is stored for MP2 and it's sure to be more complex.

@crazything: Yeah, that and Peach's head and Grodus' head (something about heads). There's still data I havn't deduced a use for yet, so I'll spend more time examining that. I've got a CMS project I have to get finished though before I can spend a lot of time on other things. But then again, I just got on Winter break now, so maybe.
 
OP
R-II

R-II

New member
I started work on this again, rewriting it from scratch. The old codebase was a horrible scratchpad I couldn't work with anymore. The interface is a bit nicer thanks to a prebuilt Windows API I'm using, and manipulating models is equally as fast for all models now (the dragon will not go 1px every 2 seconds now). The data viewer is also redesigned to display data by block, so it won't hang launching that either.

I'm not quite up to the same level I was with the last one, still no lighting or animation, but I started to play with blending. I don't quite have it yet though. There's also what appears to be collision geometry in some of the models, but I have yet to find any difference in that geometry to get rid of it.
pmviewer2_1.png
 

thakis

New member
R-II hasn't posted for over a year. This thread is over eight months old. I doubt he'll even read your question :p
 
OP
R-II

R-II

New member
Posts? In 2007? I probably should have kept a closer eye on this place.

I should get around to posting what I've done, there has been some progress since I last visited this topic. At the very least, the newer viewer is much faster and doesn't muddy up the textures any longer.

Heh, I guess my answers are a little late for those who asked them, but maybe it'll help the next person if I get something up.
 

BlueFalcon7

New member
Wow, its great to see that you are still working on this. I have learned way more about computers, and how 3D stuff works. I also reread the thread, and realized that my mistake was that I was going to the .tpl files, which were the textures, instead of going to the directory you specified in the beginning of the thread.

I sorta lost my copy of PM2 over many reformats, and switching hard drives, but I will get it when either Dolphin64, gekko, or the new WineCube comes out.

Anyways, the screenshots look nice. Good luck ;)
 
S

Sasuke3.0

Guest
hey Retriever, I never thought you'd work on this some more.
Do you think that Super Paper Mario has the same or similar format as PM:tTYD?
 

Top