Author Topic: 3D Crono Cross model extraction?  (Read 13825 times)

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #30 on: October 14, 2007, 07:54:39 pm »
Wow Luminaire, that info helps me immensely. I didn't know about the bytes representing the # of objects in the file. Because of that, my search may have excluded a considerable number of .TMDs, so I'll look through it again.

Community, can we find a better .TMD viewer/scanner so Luminaire doesn't have to code one? That's a lotta work I imagine, though you'd be the hero of any other game community looking for .TMDs in their isos. We can wait; take your time if such a program becomes necessary to further progress, since there's a ton of other stuff to keep us occupied in the meantime.

Meanwhile, I'll search for .TMD headers in the .iso and in the .BIKs this week.

jono

  • Porrean (+50)
  • *
  • Posts: 64
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #31 on: October 14, 2007, 09:08:49 pm »
Wow, you guys have done alot while I've been away. I'm not confident .TMD would actually be used by Square for the actual games model format. TMD was a format that Sony used in tech demos and I think also early games (like Ridge Racer). So it's quite likely that most playstation games contain the Sony logo in .TMD format somewhere on the disc not compressed.

Also if Square was likely to ever use TMD then it would make sense to use it in early games like FFVII which it didn't (FFVII used a format called .lzs with a really funky animation system i've heard.)

Like luminaire said, it's likely that the program you used looked for a 'magic number' in the file headers to identify a TMD file If that number occours at the right place then the program tries to read the file as a TMD, producing gibberish if it is in fact not the correct format.

I am interested that you managed to use dx-ripper with a playstation emulator, are you making sure that the character whose geometry you want to capture is on screen at the time of capture? Sorry if this point has already been asked, I've only skimmed through the thread to catch up :)

On the note about changing the graphics plugin for epsxe, unfortunatly it wont make a difference as the plugin only takes care of drawing these pre-projected polygons to the view plane. All the projection is handled by the emulation of the graphics chip which is actually handled internally by epsxe. It makes sense to do it this way for compatibility I guess, I wonder if any psx emulators actually do all the projection work in directX/opengl.

On Zeality's point, it is possible because the character models would have to be interacting with some type of invisible 3d geometry on top of the background. I cant't think of another way to do it. They probably have a "bounding structure" that the character can't walk off, so any 'walkable' area would be a part of this geometry.

In the end I believe that square probably used a proprietry format (maybe an evolution of .lzs), without a bit more information I think I'd be at a loss to figure out exactly how a model format works without any documentation. It is possible but would rely on finding a file that we believe is a model then starting to experiment with it.

Another possiblity, and this is just a reproducing something I read a couple of years ago, is that the models are stored simply in psx graphics assembly, ready to be sent straight to the chip. I think quite a few software house started doing this with the psx, maybe square aswell. I'm not sure exactly how this would be formatted and everything but I just thought that it was interesting.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #32 on: October 14, 2007, 09:27:47 pm »
Good to see you back, jono, and you bring up lots and lots of good points. Take a look at the .BIK thread as well, since there might be stuff applicable to 3D model stuff going on there as well. We've ripped the PlayStation logo in .TMD format, at least, but as you point out that could be ripped from any PlayStation CD.

As far as 3D Ripper DX is concerned, I did the rip with Serge, Kid, and an extraenous third character standing around in Fort Dragonia, a few seconds after the game begins. I had hoped to capture some of their models, but I haven't viewed the 3DS Max-applicable files yet. I did a similar rip with Front Mission 3 over the summer, but could only get random stuff like spheres that are part of buildings in the background. I'm assuming that if the Chrono Cross 3DS, etc., files can be viewed, some totally pointless stuff will be in there.

Did you get those textures you wanted to look at, jono? If you haven't ripped 'em yet, I'll send them to you via email or my MediaMax account eventually, maybe with a split .rar.



jono

  • Porrean (+50)
  • *
  • Posts: 64
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #33 on: October 14, 2007, 09:36:17 pm »
I haven't got around to it actually, I'll try tonight, If I fail I may come crawling back for an email :)

I'll track down this other emulator and have a look.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #34 on: October 14, 2007, 09:43:57 pm »
The psxfin emulator can be obtained at: http://psxemulator.gazaxian.com/

You've probably heard of the emulator under the name pSX. It says "psxfin" once you've got it unzipped though, if I'm right. Strangeness.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #35 on: October 15, 2007, 12:45:43 am »
Running with an idea jono gave me in another thread, I decided to run TMD Rip on a VRAM dump. It produced one file, 4KB IIRC. Luminaire or jono, could you try opening this in lightwave or another program capable of viewing .TMDs and see what's inside? The file's attached.

Also, I just rediscovered a 5MB .TMD file on my PC probably produced during my earlier TMD Rip attempts. Is it possible to open up such a large file without crashing Lightwave or another 3D viewer? The hexadecimal header checks out as a .TMD with lots of objects. Take a gander if possible and when time is aplenty.
http://rapidshare.com/files/62630448/Unknown_TMD_Data.zip.html

[attachment deleted by admin]

jono

  • Porrean (+50)
  • *
  • Posts: 64
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #36 on: October 15, 2007, 10:18:28 am »
Ah, unfortunately it'll be probably a fair bit more difficult than that to find vertex arrays in memory. The models will only be stored as a .TMD (provided that is indeed the format square used) on the disc, once loaded they will exist in memory  as linear arrays of values (16 bit values if memory serves me correctly). I really have to get some time together to have a look with you.

Also, it is a bit unlikely that the geometry will exist in vram, generally it's used to store texture data. The vertex data is more likely to exist in the main memory of the psx. This just brought an interesting thought into my head, i'll start a new paragraph i think :)

Save states - a save state is actually a complete dump of the state of the emulated system. The state of the system would have to include the exact state of any memory that the system uses, with a discbased system like the sony all the data being used at a given time is loaded off of the disc and into memory. Basically this means that model data exists in save states taken when models are on screen, in one way or another. It would be in the section of the save state that stores the current state of the system's main memory.

If you can find any information about the epsxe save states post it, I had a quick look and found that ram starts at offset 1BA in an uncompressed epsxe save state. Now would be the difficult part, how do we know what data in ram is representing what?

I guess you could get a hex editor and have a look for a series of 16 bit numbers with very few zeros and little repetition. This 'could' be a sign of meaningful vertex data. Then you would either have to copy the sequence and feed it to through a script in blender or write a simple program to load a series of arrays from a simple file and attempt to draw them as a vertex array.

The trouble is I have no idea how the psx gu takes it's texture co-ordinates, normal, spacial co-ordinates ect. I'll make some time on the weekend and have a look. This could make figuring out the order of the vertex array very hard (provided we can identify one).

Also one good thing about this is, we would be likely to find the model's key-frames, meaning we could re-create the animation.

Maybe someone knows a bit more about the way the psx works and can give a hand with this idea. Still unsure if it would be correct though. I'm just hoping that the psx has very little ram otherwise this would be the worst job ever.

Wow, ended up being alot of writing.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: 3D Crono Cross model extraction?
« Reply #37 on: October 15, 2007, 11:01:57 am »
Once the TIMs are lined up, then perhaps we'll find that main location textures are stored next to their dynamic counterparts. Like, Termina's prerendered background might be right next to Van's paintings / piggy bank (which we can view) in the ISO.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #38 on: October 15, 2007, 02:46:51 pm »
@Zeality: I'll get a .TIM location-finding tutorial up soon so lots of Compendiumites can join in the fun. It's really quite easy, and I think everyone should be able to do it, and it doesn't even involve a hex editor anymore; it can accurately be done with a hex calculator and TIMViewer.

@jono: I usually take the VRAM dumps from savestates, so getting into those should be no problem. I can probably find .TIM data in the savestate since that's in VRAM, provided the character portraits and textures are still in .TIM format after it's put into VRAM. That might narrow things down a bit.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: 3D Crono Cross model extraction?
« Reply #39 on: October 15, 2007, 08:13:37 pm »
Obviously last resort options here, but:

1. Yasuyuki Honne *MIGHT* know what file format was used for textures, but he probably doesn't since he wasn't an engineer. Honne did most of the game's environmental art (he also worked on Trigger, and can be considered part of the "true" Chrono Dream Team). We have his blog, and I wanted to see if I could get in touch with the almighty Kato through him, but we don't have someone to translate Japanese.

2. Cross ripping may have been done in the JP Chrono community. Again, no way of finding out whatsoever without someone to translate Japanese. That we can't find someone to even help with Missing Piece / Ultimania is becoming a matter of embarrassment (let alone getting a chance to speak with Kato).

3. I plan on mailing Richard Honeywood to see if he'd like to talk about Chrono Cross sometime. He probably wouldn't know much on the technical side, but he did invent the accent system.

At any rate, you might want to open a thread at ROMHacking.net's General ROM hacking forum with the most up to date information on this effort. I offended the administration's delicate sensibilities with my dig at fan translation groups recently, so I'm staying away from there for the time being.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #40 on: October 18, 2007, 05:03:19 pm »
!!!

This is from a 2002 post on GameDev.net:

Quote

The trick is to have an emulator dump you the model. With the playstation, you can find the 3d-to-2d projection that the model underwent when being projected to the screen by hacking the GTE portion, and all the faces and textures (in screen coordinates) from the GPU portion (in the graphics plugin for most emulators). Those 2 can be used to reconstuct an original textured mesh (which can be easily animated with the skeleton system I'm using for my current project).

My particular tools were AdriPSX + the PEOPS GPU plugin (both open source).

The only way a game can prevent this is by not using software rendering (which is not particularly fast on a playstation), so I think it's safe to assume that most games will fall to this trick. I've tested it with Chrono Cross and managed to get a well animated Serge model:
screenshot of Serge: (http://bingweb.binghamton.edu/~bj92077/serge.jpg)
modeller + source + 2 dumped models: (http://bingweb.binghamton.edu/~bj92077/modeller.zip)

Original thread here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=93782

Anyone able to decipher exactly what this person's saying regarding GTE and GPU? I'll see if I can track down this AdriPSX and PEOPS GPU plugin. All links in the quote are long since broken. I haven't even tried contacting the person. Should we?

EDIT: Lower in the GameDev thread this user describes things slightly more clearly. Reproducing whatever process he used sounds like a lot of work. AdriPSX might be an emulator; wonder if there'd be any way to do this with epsxe?
« Last Edit: October 18, 2007, 05:08:13 pm by FaustWolf »

Luminaire85

  • Guru of Time Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 311
    • View Profile
    • Chrono Cinema
Re: 3D Crono Cross model extraction?
« Reply #41 on: October 18, 2007, 05:23:43 pm »
GTE = geometry transfer engine (does fast matrix math needed for graphics rendering)
GPU = graphics processing unit (handles actual rendering)

Source: http://darkwatcher.psxfanatics.com/console/details/psx.html

I read it as saying we can get the model data by modifying the source code of a PSX emulator and/or graphics plugin at the appropriate locations to, for example, spit out the data to a file. Normally I'd be wary of the practicality of such an approach, but since this person appears to have been successful (and with Chrono Cross, no less) we might be able to duplicate his efforts. If I can find some time I will also give it a try.

I'd be surprised if you could get a hold of the person, but I suppose you could try.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #42 on: October 18, 2007, 06:25:40 pm »
Thanks again, Luminaire. This will probably be a last, last, last resort unless you can do such things easily. But it's good to know it can be done. 

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: 3D Crono Cross model extraction?
« Reply #43 on: October 18, 2007, 06:39:27 pm »
Apparently I can't private message on Slashdot. I'll just ask R_D to do it tonight, since he might be subscribed.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: 3D Crono Cross model extraction?
« Reply #44 on: October 18, 2007, 06:53:31 pm »
The user's slashdot posts seem recent, too.