Page 2 of 36

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Sat Jun 05, 2010 1:52 pm
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

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Tue Jun 08, 2010 7:48 am
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?

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Tue Jun 08, 2010 8:31 am
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

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Tue Jun 08, 2010 2:22 pm
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]);

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Tue Jun 08, 2010 2:50 pm
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.

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Wed Jun 09, 2010 4:23 am
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

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Thu Jun 24, 2010 6:53 pm
by Azurfan
I successfully encoded BBS1\BBS2\BBS3. Is there a way just to filter out the TM2 files?

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Fri Jun 25, 2010 3:32 am
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...

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Fri Jun 25, 2010 10:31 am
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.

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Fri Jun 25, 2010 1:35 pm
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);
			}

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Fri Jun 25, 2010 6:11 pm
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.

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Sat Jun 26, 2010 12:41 am
by valvoga
I think we should ask fatduck he already extract the model see in page 1

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Sat Jun 26, 2010 8:18 am
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)

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Sun Jun 27, 2010 11:31 pm
by Azurfan
Wow that look really great. :D

Re: [Request] Kingdom Hearts Birth By Sleep models

Posted: Mon Jun 28, 2010 1:00 am
by ultimaespio
Woah nice :D

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