[Request] KH 358/2 (& re:Coded) Model Format Info Provided

Post questions about game models here, or help out others!
User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

[Request] KH 358/2 (& re:Coded) Model Format Info Provided

Post by Zerox » Fri Sep 10, 2010 10:01 pm

Hey everyone, I'd really like to be able to view and edit 3D models from Kingdom Hearts: 358/2 Days in a 3D program of my choice. I know of a tool called Consol Tool made by Low Lines that can view them but it doesn't have an export function and there is no easy way to capture the model from his openGL viewer.

He has provided documention on the format though that I am hoping someone here could use to make a simple converter. Perhaps to something like .obj or something else easy to import.

You can find the documentation on the format here: http://llref.emutalk.net/v2/docs.php?or ... d=bmd0.xml

Information on animations that he has so far is also provided here: http://llref.emutalk.net/v2/docs.php?or ... d=bca0.xml Though animations are not my goal as I'm trying to get to the stationary models used as the playing area of the game. Though eventually player models and such would be nice as well. Though I would assume if stationary buildings could be converted characters wouldn't be too hard in addition to it.

You can get the raw models here (Note: The models I'm am interested in are in the Mi>Wd folder): http://www.propl.nl/random/KH3582_Models.zip

Can anyone please help me out? I would be very grateful. This same information may be applicable to other DS game models as well.

Thank you for any help you can provide me.

Edit: I have more progress on the files of Days and Re:coded thanks to Barubary. I'll post quotes of what he told me about it. I hope this can help you guys figure out this format even further.
Barubary wrote: - .z files are LZ-compressed files
- .p2 files have the following format:

Code: Select all

char[2] magicHeader; // 'P2'
WORD nFiles; // maybe longer/shorter. MSB flags filenames
QWORD padding;
DWORD dataStart;
WORD offsets[nFiles]; // to get real offset: << 9 + dataStart
WORD padding; // only if nFiles % 2 = 1
DWORD sizesAndFlags[nFiles]; // MSB flags compression
char filenames[8][nFiles]; // length 0 if nFiles & 0x8000 != 0
byte* data; // possibly preceded by padding, so that start matches dataStart
- .pak files have the following format:

Code: Select all

char[4] magicHeader; // 'KAPH'
DWORD padding; // ?
// if any of the offsets below are FFFFFFFF, it is not present
DWORD BCAdataOffset;
DWORD BVAdataOffset;
DWORD BMAdataOffset;
DWORD BTPdataOffset;
DWORD BTAdataOffset;
DWORD unknownOffset1;
DWORD unknownOffset2;
DWORD BMDdataOffset;

each offsets points to data formatted as such:
DWORD one; // always 1? (maybe number of files with this format? never seen something else though)
DWORD fileStart;
DWORD fileLength;
- .p2d / .pobj files have the following format:

Code: Select all

char[4] magicHeader; // 'D2KP'
DWORD padding;
DWORD* FATFolderEntryOffsets; // continues up to first offset. some offsets may be 0xFFFFFFFF

// each FAT Folder entry is formatted as follows:
DWORD numFiles;
DWORD[numFiles] offsets;
DWORD[numFiles] sizes;

// the data follows, possibly preceded by padding.
And how he actually decompressed them with his tools:
Barubary wrote:For 358/2 Days (and for my R:c rips) I used an unpacker that could only decompress one specific file or folder at a time, and thus quite unusable for anybody who didn't create the program in the first place. I've now ported it to my more generic unpacker, NinUnpack, which should now be able to unpack all packages in both KH DS games. Drag a folder or a (set of) files on the executable (or use the command line) to unpack the given files. (providing a folder will only unpack the files directly in that folder; it is not recursive)
The game has three pack formats: P2, PK2D an HPAK. The first is just a generic archive file, like NARC but without folders. It has extension .p2 (or sometimes .p2f), but sometimes there is no extension at all for these files. PK2D (extension .D2KP, possibly others as well) only packs 2D graphic files. HPAK (extension .KAPH or .pak) only packs 3D graphic files.

Note that some files are compressed as well (in the normal filesystem, in packs, and I believe also in packs in packs). DSDecmp (or any other decompressor for DS formats) should work on those files (they usually have a .z extension, but sometimes none).
Last edited by Zerox on Mon Nov 29, 2010 8:20 am, edited 2 times in total.

Panzah
advanced
Posts: 62
Joined: Wed Jul 21, 2010 10:11 pm
Has thanked: 6 times
Been thanked: 3 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Panzah » Fri Sep 10, 2010 10:25 pm

If I may, I too would like to add my request to a DX-based viewer with export function or just converter as stated by Zerox. Thanks in advance.

User avatar
Aurangzeb56
advanced
Posts: 67
Joined: Fri Jul 30, 2010 7:38 am
Location: Pakistan
Contact:

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Aurangzeb56 » Mon Sep 13, 2010 5:57 pm

zerox can you upload this console tool,since i can;t find a way to download this from anywhere ^^"
Image

Other forums/Channel I am in:
Youtube Channel
Gamespot
Game Trailers
KH-Vids

User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Zerox » Tue Sep 14, 2010 1:25 am

Conole Tool is a program being developed by Low Lines. You can get it here in his signature: http://www.romhacking.net/forum/index.p ... 407.0.html

Though as I mentioned there isn't a way to get the models from his viewer (and I'll be honest it's not the best viewer I've ever seen.

For this reason I'd really like some sort of converter to be developed. Or perhaps someone could guide me in how I should start developing this myself. If anyone has such interest please let me know, either here in the thread or pm.

ultimaespio
mega-veteran
mega-veteran
Posts: 267
Joined: Wed Apr 14, 2010 7:55 pm
Has thanked: 4 times
Been thanked: 5 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by ultimaespio » Tue Sep 14, 2010 6:00 pm

Ah, its Java. No 3d Ripping software works with it :/

So until he makes a windows application, I don't think you'll get them :(

User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Zerox » Tue Sep 14, 2010 10:23 pm

ultimaespio wrote:Ah, its Java. No 3d Ripping software works with it :/

So until he makes a windows application, I don't think you'll get them :(
Indeed it is. As I mentioned perhaps someone knows how to convert a .jar to a .exe that functions well still. It is also openGL though and he intends to stay with java only because of it's cross-platform ability.

invisghost
advanced
Posts: 55
Joined: Tue Jul 13, 2010 7:16 pm
Has thanked: 1 time
Been thanked: 11 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by invisghost » Fri Oct 01, 2010 6:04 am

I'll see if I can whip anything up. But for the meantime you guys can get DJ Java Decompiler and decompile the jar file. You'll at least be able to see how the application reads the file. Doesn't mean its the right way of reading them, just means it "works".

ultimaespio
mega-veteran
mega-veteran
Posts: 267
Joined: Wed Apr 14, 2010 7:55 pm
Has thanked: 4 times
Been thanked: 5 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by ultimaespio » Fri Oct 01, 2010 2:29 pm

I was gonna forward you to Modelsresource...but it was you who uploaded it, so...

Apparently I've uploaded models onto there too, but I haven't :S

User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Zerox » Sat Oct 02, 2010 4:06 pm

invisghost wrote:I'll see if I can whip anything up. But for the meantime you guys can get DJ Java Decompiler and decompile the jar file. You'll at least be able to see how the application reads the file. Doesn't mean its the right way of reading them, just means it "works".
Awesome this is fantastic news. I tried Java Decompiler and it worked pretty well for getting access to the format information as .j files that could be opened in Notepad. I also posted links to the information he has so far at the top of the thread, as well as sample model files if that helps any.

It's his newest version that displays them at least mostly correct:

http://llref.emutalk.net/downloads/cons ... _demo2.zip

Thank you and good luck. =)
ultimaespio wrote:I was gonna forward you to Modelsresource...but it was you who uploaded it, so...

Apparently I've uploaded models onto there too, but I haven't :S
Eh who were you going to send there, who uploaded what? And what do you mean you put models there but you haven't that doesn't make much sense? Besides your name isn't on their forum at all.

ultimaespio
mega-veteran
mega-veteran
Posts: 267
Joined: Wed Apr 14, 2010 7:55 pm
Has thanked: 4 times
Been thanked: 5 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by ultimaespio » Sat Oct 02, 2010 4:15 pm

I was talking to you. I ripped models years ago on another forum, and someone else has uploaded them to models resource with my name.

http://www.models-resource.com/submitter/ultima%20espio

And I meant that you were the one who uploaded the Moogle model I was gonna show you :P

User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Zerox » Sat Oct 02, 2010 7:36 pm

Huh that's odd. They're rules say that no rips will be added unless the original ripper submits them. I guess those might be relics from when they were testing the build of the site and before all the rules were in place.

Ah well. But yeah the XIII Moogle was my rip though it was a pain to do so: http://www.spriters-resource.com/commun ... ?tid=14817

This sorta describes my process there.

ultimaespio
mega-veteran
mega-veteran
Posts: 267
Joined: Wed Apr 14, 2010 7:55 pm
Has thanked: 4 times
Been thanked: 5 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by ultimaespio » Sat Oct 02, 2010 8:34 pm

I'm not really interested in 358 Days ones, a bit too low poly for me :P

I'd like to have a look at them though, compare them to other ds models.

Anyway, I recognise some of those members names on that forum. Shadowth117 sounds really familiar...I don't mind about you uploading those models, I was just a bit surprised to find that I was the one who submitted it.

valvoga
advanced
Posts: 67
Joined: Sat May 01, 2010 3:03 am
Has thanked: 9 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by valvoga » Mon Oct 04, 2010 10:03 am

But still,its gonna be great if we can extract the model

User avatar
Zerox
mega-veteran
mega-veteran
Posts: 186
Joined: Mon Aug 09, 2010 3:50 am
Has thanked: 4 times
Been thanked: 7 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Zerox » Sat Oct 09, 2010 4:14 am

Hey I bring good news, Kingdom Hearts Re: Coded uses the exact same format so after a converter for this is made we'll have access to two games models! :]

Well invisghost, true to your name you've been invisible for a week. Do you got any news for us? Any obstacles you've encountered that perhaps we could help with?

User avatar
Mirrorman95
ultra-veteran
ultra-veteran
Posts: 353
Joined: Tue Jul 20, 2010 2:08 am
Has thanked: 16 times
Been thanked: 23 times

Re: [Request] Converter for KH 358/2 Models Format Info Prov

Post by Mirrorman95 » Thu Oct 21, 2010 9:05 am

I'd love to get those Aubade z files. I mean I have them, but not in a format my computer can understand. With Crystal Tile, I saw that one of the files, w_.p2 in Roxas's ba folder, had the words Material, MDL, pro_w02, and pro0_trace in it, and since MDL is a common 3D model file type for Kingdom Hearts games, if we could just unpack them somehow then we would probably have the models.
BBSFM and KH2FM+ saves are compatible with KH2.5. viewtopic.php?t=13424

Post Reply