Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Kingdom Hearts Birth By Sleep models

Post questions about game models here, or help out others!
valvoga
advanced
Posts: 67
Joined: Sat May 01, 2010 3:03 am
Has thanked: 9 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by valvoga »

For tim2, file we can convert tim2 file to png using MrAdults amazing tools "mesh2rdm"
Here is the link :
http://www.richwhitehouse.com/index.php ... rdmv45.zip
To use it just make a new notepad type "mesh2rdm file.tm2 outfile.png" in the notepad,then rename .txt with .bat then press enter on the bat file
GameAreAwesome
ultra-n00b
Posts: 9
Joined: Mon Jun 07, 2010 6:49 am
Has thanked: 1 time

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by GameAreAwesome »

Falo wrote:
ultimaespio wrote:Oh, that model is the Fairy Godmother :P

Going by the textures that is lol.

If its needed, i can forward you towards the Crisis Core format, but i think its really out of date now.

Falo, what did you use to extract the PMO and TIM2 files?
any Hex Editor should work.
here 2 quickbms scripts,

extract_pmo.txt should extract 858 PMO's,
extract_tm2_from_pmo.txt extracts all tm2 files from any PMO.

the biggest PMO is #424 (Terra-Xehanort)

the script is not complete, it uses ((BONOffset - Offset) + 32 + (BoneCount * 160)) to calculate Size, this will not work for pmo's without bones
until i know how to read the mesh it's the only solution.
How do I extract it with hex editor?
GameAreAwesome
ultra-n00b
Posts: 9
Joined: Mon Jun 07, 2010 6:49 am
Has thanked: 1 time

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by GameAreAwesome »

Hey guys I have extracted alot of tm2 and have made to easy models anyway the most thing Im looking for is the map models (if there are any) and the font for all the letters and numbers its maybe a texture file or maybe a PGF file(psp font file) or maybe a txt files anyway can anybody try to find that for me because Im trying to edit some stuff with the game files and put them back into the game so please help me 8D
User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Falo »

sorayahya wrote:Hey guys I have extracted alot of tm2 and have made to easy models anyway the most thing Im looking for is the map models (if there are any) and the font for all the letters and numbers its maybe a texture file or maybe a PGF file(psp font file) or maybe a txt files anyway can anybody try to find that for me because Im trying to edit some stuff with the game files and put them back into the game so please help me 8D
after decrypting BBS1, BBS2 and BBS3 dat, i found more *.pmo files, the map models could be in BBS2.dat, every *.pmo there don't have bones (my script won't work) but from the tex names, it could be (kg10_05ts.tm2, kg10_sky.tm2, etc.)

(to decrypt them you need a CFW PSP, jpcsp rev >1500 and Jpcsp Connector)

i wrote another bms script for extracting *.arc files
the first (0.arc) file has all the font files

cmdfont.clu, FontIcon.mtx, menufont.inf, menufont.clu, menufont.mtx, ...
mtx is the texture file, every letter is 8x8 or 16x16, but it's not TIM2, i can't decode them fully

for the model files, i'm still not able to read them fully, but i'm now able to read any mesh header without errors,
(i use 010 Editor Templates to read them)
here my basic header format:

Code: Select all

short DataCount1;
if (DataCount1 == 0)
{
    short DataCount1_1;
}
byte Mesh_unk1;
byte DataSize1;
short Mesh_unk2;
byte Mesh_unk3;
byte MeshType;
byte Mesh_unk4;
byte DataCount2;
byte Mesh_unk5;
byte Mesh_unk6;
byte Mesh_unk7[8];
so far i know 4 MeshType's
0x30, 0x31, 0x40, 0x41

0x30 and 0x40 have a 20 byte header
0x31 and 0x41 have a 24 byte header

all 4 are used in static and deformable mesh, but i'm not able to understand the mesh format,
it seams easy, but i get only junk in my 3D Viewer after exporting to obj
i can't identify what is vertice, normal or uv....
i try to read them as signed shorts, don't know if this is wrong, i'm not good in reversing 3d models.

Code: Select all

short MeshData[DataSize1/2];
Printf("v %d %d %d\n", MeshData[0], MeshData[1], MeshData[2]);
You do not have the required permissions to view the files attached to this post.
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] Kingdom Hearts Birth By Sleep models

Post by ultimaespio »

Falo, fatduck managed it on the last page, so maybe you could just ask him how he managed it, or you could forward this to someone else who knows more that can help you? :P

valvoga, sorayahya, I see what you've done.
valvoga
advanced
Posts: 67
Joined: Sat May 01, 2010 3:03 am
Has thanked: 9 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by valvoga »

how to extract the PMO and TIM2 files using hex editor and quick bms script please help i don't understand because im a noob if you don't mind please explain it in details how to do it please
Azurfan
advanced
Posts: 61
Joined: Wed Jun 23, 2010 10:12 pm
Has thanked: 23 times
Been thanked: 3 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Azurfan »

I successfully encoded BBS1\BBS2\BBS3. Is there a way just to filter out the TM2 files?
User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Falo »

After very very long thinking and many failed trys:
http://www.imagebanana.com/view/jiba9ahh/test.jpg

It's a common psp format, at first i thought it was half-float but it is "signed short / 100" like ff7cc.
Vertices are now readable ^^, next normals and uv, i hope i can finish it this weekend.
I successfully encoded BBS1\BBS2\BBS3. Is there a way just to filter out the TM2 files?
I could write you a bms script, but most of the tm2 files are textures and useless without models.

//edit
small update:
http://www.imagebanana.com/view/2xxgns52/test2.jpg

now my c prog reads size 12,14,16,18, Verts, Normals and uv, model output is perfect but no faces...
i found some data which could be faces, but 74 faces for 402 Verts in Mesh0 seams a bit strange...
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by chrrox »

try just using the faces as if the verts are in the correct order a lot of psp games do this where there is no face data in the files they are just in tri-strip order.
User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Falo »

chrrox wrote:try just using the faces as if the verts are in the correct order a lot of psp games do this where there is no face data in the files they are just in tri-strip order.
doesn't work
http://www.imagebanana.com/view/5onjo20o/faces.jpg

maybe my code is wrong

Code: Select all

			// generate faces
			for(numFaces=numFaces+numData1;y<numFaces;y=y+3)
			{
				fprintf(outfile,"f %d %d %d\n",y+1,y+2,y+3);
			}
Azurfan
advanced
Posts: 61
Joined: Wed Jun 23, 2010 10:12 pm
Has thanked: 23 times
Been thanked: 3 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Azurfan »

Falo wrote:After very very long thinking and many failed trys:
http://www.imagebanana.com/view/jiba9ahh/test.jpg

It's a common psp format, at first i thought it was half-float but it is "signed short / 100" like ff7cc.
Vertices are now readable ^^, next normals and uv, i hope i can finish it this weekend.
I successfully encoded BBS1\BBS2\BBS3. Is there a way just to filter out the TM2 files?
I could write you a bms script, but most of the tm2 files are textures and useless without models..
That's no problem, I'm looking for all plain textures. A script would be very helpful.
valvoga
advanced
Posts: 67
Joined: Sat May 01, 2010 3:03 am
Has thanked: 9 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by valvoga »

I think we should ask fatduck he already extract the model see in page 1
User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Falo »

// edit 1

after again some hours testing different combinations i got it to work,

the strange table is very simple, let's say we have 100 Vertices,
this table could be then 25, 20, 15, 10, 10, 5, 5, 5, 5, 0 (25+20+15+10+10+5+5+5+5+0 = 100)

Code: Select all

for(int x=0;x<numTables;x++)
{
	if(Table[x] != 0) // special case 0 -> no face
	{
		for(int i=1,i+2<Table[x];i++,numVerts++)
		{
			fprintf(outfile,"f %d %d %d\n",numVerts+1,numVerts+2,numVerts+3);
		}
		numVerts=numVerts+3;
	}
}
so what does this code ?:
simple it skips 2 faces...

here an exported Aqua Model:
http://www.imagebanana.com/view/kb0noouu/aqua.jpg
it's 90% finished, it just need some code tweaks and i have a fully working exporter. (some very little Faces are missing....)

// update 1:
http://www.imagebanana.com/view/aiyw16s/aqua.jpg
http://www.imagebanana.com/view/ly98aum/eraqus.jpg
http://www.imagebanana.com/view/8iaej2vk/Vanitas.jpg
http://www.imagebanana.com/view/8295do2t/Zack.jpg

faces are completly fixed now and UV data works but need some work,
PS: this is how to decode UV

Code: Select all

fprintf(outfile,"vt %f %f\n",TextureU/128,(TextureV+128)/128);
// update 2:
http://www.imagebanana.com/view/zxaitryn/Vanitas2.jpg
it was just a small bug UV works now complete,
the last few bugs are from rendering and tm2 exporter alpha color bug (fixable with Game Graphic Studio / Photoshop)

i'm working now on decoding normals and reversing structSize 20,22,24,26,28 (building/world models)
Azurfan
advanced
Posts: 61
Joined: Wed Jun 23, 2010 10:12 pm
Has thanked: 23 times
Been thanked: 3 times

Re: [Request] Kingdom Hearts Birth By Sleep models

Post by Azurfan »

Wow that look really great. :D
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] Kingdom Hearts Birth By Sleep models

Post by ultimaespio »

Woah nice :D

...thats a rather mean choice for an avatar...:P
Post Reply