Page 1 of 1

Berserk (*.MTP2)

Posted: Sun Apr 08, 2012 4:35 am
by mariokart64n
I'm trying to extract texture data from the mtp2 files, but I'm having a hard time extracting the individual texture data from the archive or texture package.
seems my offset and size calculations are wrong, and I don't know where to start on how to analyze the texture data


Here's are my structures
mtp_header { // 16bytes
byte[4] magic, "MTP2 "
byte[4] buffer offset
byte[4] buffer size
byte[2] unknown, always 1
byte[2] count
}

texture_entry { // 68bytes
byte[4] offset * 0x0100
byte[4] unknown, always 0x02
byte[2] compression??, usually 0x13 or 0x14
byte[2] unknown, usually 0x00
byte[4] unknown, value seems progressive
byte[12] padding? all 0's
byte[2] texture height
byte[2] texture width
byte[4] size * 0x0100
byte[16] padding? all 0's
string[16] texture name
}


In the samples I've included some textures dumped from the PS2 emu. may help to decipher the texture data
ps2_mtp_files.zip

Re: Berserk (*.MTP2)

Posted: Tue Apr 10, 2012 11:59 am
by youngmark
I'm interested in converting mtp2&mpt3, too.
I searched forum but didn't find much.
Here's a sample mtp3 file from PS2 Soukou Kihei Votoms and Gundam Meisters.
http://www.mediafire.com/?ou65odp8q6z5t47

Re: Berserk (*.MTP2)

Posted: Thu Apr 12, 2012 4:59 am
by mariokart64n
I was able to verify that my offset calculation works.. or well got lucky lol

I wrote 0's on the suppose of face texture... and indeed the models face turned black.

I then tried to write 0's to find out the bits per pixel, and to figure what sort of palette data I was dealing with.

I concluded that the format is on par with DXT, having a 8bpp size ratio. however I'm unable to determine palette...

for now I read the 8bits as my RGB, and converted it as is. I got a grey scale image, however it would seem to be swizzled....

Image

my attempted sorta failed :( but seems I'm close to figuring out the pixel order