ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Apr 13, 2021 8:35 am

All times are UTC




Post new topic  Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Fri Jan 31, 2020 8:39 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Image
https://drive.google.com/file/d/1Z_aSN- ... sp=sharing

Anyone know this format ?


Top
   
PostPosted: Tue Feb 11, 2020 10:05 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 706
looks like some Allen level PS2 shuffling in these samples. :D

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Tue Feb 11, 2020 10:54 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 123
doesn't look like a lot of shuffling beyond ps2_swizzle and palette thingies, but those are multiple files in it. i dunno how to extract/save all of those at once. if it does it, it could be done in noesis, perhaps. ;)

Image


Top
   
PostPosted: Wed Feb 12, 2020 12:07 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Acewell wrote:
looks like some Allen level PS2 shuffling in these samples. :D


Noticed that too. Hopefully he can figure this one out.. Been awhile and it is quite a popular format with PS2.

Yeah hopefully it can be done Episoder. I wish i knew more about graphic formats or even writing scripts I would try it myself.


Top
   
PostPosted: Wed Feb 12, 2020 12:23 am 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 706
yeah i think its more than just PS2 swizzle though, i can't get some unscrambled in Console Texture Explorer.
there is a mix of formats in the samples, some paletted some not, the bgra data is easily recognizable.
there is 240 bytes of metadata preceeding the 128 byte headers for the lookup table and then another for
the palette if there is a palette.
figuring out all the flags in the headers to parse the contents properly is the biggest hurdle here i think. :shock:

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Wed Feb 12, 2020 12:36 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Are the flags just colors indexes ? And if there is away to decipher where one texture stops and ends that could help? I really cant see graphic formats as well as I can 3D. I have done a few though.


Top
   
PostPosted: Wed Feb 12, 2020 11:34 am 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 123
yep. there's a 240 byte archive header. the surface header (128 bytes) starts with 0x20 0r 0x40 on 16 color palettes. followed by a hex how many kbytes the surface is. plain surface has 0x08 at 0x0E, palettes have 0x88 there. i'm certain the width and height are somehow 'encoded' in the offset 0x10 and 0x1C values of the surface header. if you math this 16 bit minus 6 you get a somewhat usable binary values. for example on the 16 bit palette you get 4 x 4 which represents 16 colors. will looks some more into this.

it's still easily readable, if you wanna have a manual go at it. ;)
Image


Top
   
PostPosted: Wed Feb 12, 2020 12:28 pm 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Thanks! I think we can figure this out. Your much closer than I ever got I could never get mine to show anything but swizzle.


Top
   
PostPosted: Thu Feb 13, 2020 6:20 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Image

Some more research


Top
   
PostPosted: Thu Feb 13, 2020 6:15 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 123
research? you tryna find tools? well it's incomplete but works kinda. no support for rgb or rgba textures. darkpla2.tex has one. no dice. it may or not crash on files that have them and fall apart. some textures like the car shadows look screwed up, but i couldn't find a better solution to fix the aspect ratios or general format bits. i dunno what else is wrong there.

feel free to modify if you figure out how it works. it's not rocket science. :mrgreen:


Attachments:
tex_twistedmetal_tex.rar [1.17 KiB]
Downloaded 276 times
Top
   
PostPosted: Thu Feb 13, 2020 6:55 pm 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
..


Last edited by Allen on Sun Jan 24, 2021 6:41 am, edited 2 times in total.

Top
   
PostPosted: Thu Feb 13, 2020 7:28 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 123
questionable. or just your interpretation. the palette flag is not always set. irrelevant due to hunk signature tho. there's no reliable way to compute the size of the chunk either. nor is there an indicator whether or not the index is swizzled. it could be raw index. i don't have that switch either tho. just an assumption it's always swizzled, while the 4 bit index is not. bit of luck the data comes out. but whatever... yeh :D

btw i know that alpha thing. i never correct it tho. i don't mess up raw data. i could loose information this way.


Top
   
PostPosted: Fri Feb 14, 2020 3:59 am 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
..


Last edited by Allen on Sun Jan 24, 2021 6:42 am, edited 2 times in total.

Top
   
PostPosted: Fri Feb 14, 2020 7:17 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Is this a python file or a script ?


Top
   
PostPosted: Fri Feb 14, 2020 9:06 am 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
DJ Normality wrote:
Is this a python file or a script ?

Episoder has posted a Noesis script that can extract 8bpp and 4bpp images, most of the images.


Top
   
PostPosted: Sun Feb 23, 2020 11:44 am 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
Ok but i really cant seem to do this on my own based upon this picture which i saved before it was taken off.. Where do you find the Pallet Offsets. And what does the starting point look like for the image.
Image

Just a little more detail and I can figure it out I think. Every Twisted Metal PS1-PS2 uses .TEX so just trying to figure it out. The script dont work with the other versions of the game.


Top
   
PostPosted: Mon Feb 24, 2020 7:29 am 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
..


Last edited by Allen on Sun Jan 24, 2021 6:41 am, edited 1 time in total.

Top
   
PostPosted: Thu Dec 24, 2020 4:03 pm 

Joined: Tue Jul 24, 2018 8:52 am
Posts: 493
How do i use this to convert a texture ?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 18 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited