Author Topic: Kingdom Hearts: 358/2 Days Models  (Read 11351 times)

BlitzNCS

  • *
  • Posts: 889
  • Master of nothing in particular
    • View Profile
    • My Youtube
Kingdom Hearts: 358/2 Days Models
« on: 2009-06-10 18:17:00 »
Probably nobody is interested, but i was hoping that somebody could help me figure these out. it would help me a lot, and enable me to make some kickass codes for this game. but since this isn't really a kingdom hearts forum at all, i'm happy for this to go ignored if it must be.

heres the link to the files
http://files.filefront.com/Days+modelszip/;13883163;/fileinfo.html

i'm pretty sure these contain a few animations, too.

i'm not expecting a modelviewer or anything amazing to become of this, i just basically want to now how to mod bones. but if this a common file format with a modelviewer already, let me know :P
« Last Edit: 2009-06-10 21:45:43 by NeoCloudstrife »

Trishty

  • Guest
Re: Kingdom Hearts: 358/2 Days Models
« Reply #1 on: 2009-06-11 16:21:58 »
If you can rip Kingdom Hearts: 358/2 Days Models. You can give me a modelview? Moogle model in game very cool.

obesebear

  • *
  • Posts: 1389
    • View Profile
Re: Kingdom Hearts: 358/2 Days Models
« Reply #2 on: 2009-06-11 16:34:26 »
Try using gitmo? If they used the same format as the dissidia game, gitmo will be able to extract the models.  If you can extract the models, I think mesh2rdm can export them as .obj or whatever else you want.

BlitzNCS

  • *
  • Posts: 889
  • Master of nothing in particular
    • View Profile
    • My Youtube
Re: Kingdom Hearts: 358/2 Days Models
« Reply #3 on: 2009-06-11 17:21:44 »
I've already extracted some, the link is in my first post. the models arent in .gmo format, so mesh2rdm wont work on them, but the bone names look suspiciously similar, and they're layed out the same. all i really wanna know is what to change so the bones acan be swapped.

Chev

  • *
  • Posts: 35
    • View Profile
Re: Kingdom Hearts: 358/2 Days Models
« Reply #4 on: 2009-10-12 16:25:18 »
Ok, so I hope you guys won't mind me bringing this back from the dead.

I needed a distraction from my lack of progress on FF9 so I had a look at this. Didn't get much from the sample files at first so I dumped the whole game's contents using a program called dsbuff, to get a broader idea of how the thing's structured. Turned out to be pretty interesting for a whole lot of reasons since by looking at the directory names you can get clues as to what you're searching for ( for example your 3E sample file is from the mission NPCs directory, so since there's "ven" in the model name and it uses Roxas' bones I can already guess it's Ventus' character model), but one of the most interesting things is that there are debug models in the ms (monsters) directory which, though they don't contain the bone info you're interested in, are simple and clearly identified and thus seem like a good starting point.

It looks like the chunks are using pleasantly readable IDs, like MDL0 for model data, TEX0 for texture, JNT0 for bones. The bones, material and model names are in there too.

What puzzled me at first was that at times the strings are cut by an unrelated character, including those that serve to identify chunks, but then I realized some LZS-like compression's at work, and those interruptions are control bytes. Also seems the compressed files always have "KAPH" as an ID, but that's already in the compressed part (so it's at offset 0x05, after one integer for data length and the first control byte) so it may just be a parent chunk that's often used.

I've also found a file, shadow.nsbmd, which turned out to be a noncompressed version of a model chunk (probably the flat round shadow you get below characters)

The beginning seems to be:
Code: [Select]
0x00 byte4 chunk_type, "BMD0"
0x04 byte4 unknown
0x08 uint chunk_length //chunk_type included
0x0C ushort subchunk_list_pointer //from the beginning of the chunk
0x0E ushort subchunk_count

and then for the shadow file, the list, containing one subchunk

Code: [Select]
0x10 offset to MDL0 chunk
the subchunk starts as

Code: [Select]
0x14 byte4 chunk_type "MDL0"
0x18 uint chunk_length  //chunk_type included

Aaaaand that's all for now. I don't have much more info to offer yet, since I'm pretty new at reverse-engineering file formats, and for FF9 I was mostly following the wiki. It's all rather interesting, mind you. For now I need to refresh my rather rusty compression knowledge, so I can have more samples to look at. Still, it's a start, and since the names seem to be self-explanatory it shouldn't be too hard to decipher.

This link has the compressed cube and sphere debug meshes, and the noncompressed shadow.nsbmd, if anyone wishes to add his two cents while I'm working on a decompressor.

http://www.megaupload.com/?d=BLTZAJ6X
« Last Edit: 2009-10-12 16:27:00 by Chev »

BlitzNCS

  • *
  • Posts: 889
  • Master of nothing in particular
    • View Profile
    • My Youtube
Re: Kingdom Hearts: 358/2 Days Models
« Reply #5 on: 2009-10-12 20:51:18 »
Well, dunno if it's of any use, but i found out that the days models are actually standard DS Models, with Custom bone opcodes:
http://img5.imagebanana.com/view/d6nbxsnf/kh358_01.JPG

Quote from: Falo from FFproject.net
Some informations about KH 358/2 Days models:

(use dslazy/dsbuff/dsts/nds header viewer/... to extract the files)

Folder:
ba = Battle
--ch = Character
----ax = Axel
----.....
--ef = Effect
--ma = Magic
...
ms = Monster

Files:

*.p or *.p2 = P2 Archiv
*.z or *.*.z = Compressed Files (custom LZSS)

inside of P2 files are compressed KAPH files, these are another archive format, inside of them are BMD0 (Models) & BCA0 (Animations) & other stuff

they are standard NDS BMD0 & BCA0 files, but with custom bone opcodes.

nsbmd can open them when you modify the sourcecode.

here a pic:
http://img5.imagebanana.com/view/d6nbxsnf/kh358_01.JPG
needs more fixes, but works...

Chev

  • *
  • Posts: 35
    • View Profile
Re: Kingdom Hearts: 358/2 Days Models
« Reply #6 on: 2009-10-12 21:32:23 »
I had already mostly figured out all directories but if the file formats are following a known standard this is all gonna be a hell of a lot easier :D

seems like this and this should be just what I need. And compression's just the same as in FF7, apparently

I guess there's good chances it'll work with FF3 and 4 DS too.
« Last Edit: 2009-10-12 21:54:35 by Chev »