Twisted Metal Black (PS2) .TEX
-
- Posts: 706
- Joined: Fri Aug 08, 2014 1:06 am
Re: Twisted Metal Black (PS2) .TEX
looks like some Allen level PS2 shuffling in these samples.
-
- Posts: 123
- Joined: Fri Oct 27, 2017 7:36 pm
Re: Twisted Metal Black (PS2) .TEX
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.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
Acewell wrote:looks like some Allen level PS2 shuffling in these samples.
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.
-
- Posts: 706
- Joined: Fri Aug 08, 2014 1:06 am
Re: Twisted Metal Black (PS2) .TEX
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.
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.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
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.
-
- Posts: 123
- Joined: Fri Oct 27, 2017 7:36 pm
Re: Twisted Metal Black (PS2) .TEX
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.
it's still easily readable, if you wanna have a manual go at it.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
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.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
-
- Posts: 123
- Joined: Fri Oct 27, 2017 7:36 pm
Re: Twisted Metal Black (PS2) .TEX
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.
feel free to modify if you figure out how it works. it's not rocket science.
-
- Posts: 156
- Joined: Tue Sep 01, 2015 9:44 am
Re: Twisted Metal Black (PS2) .TEX
..
Last edited by Allen on Sun Jan 24, 2021 6:41 am, edited 2 times in total.
-
- Posts: 123
- Joined: Fri Oct 27, 2017 7:36 pm
Re: Twisted Metal Black (PS2) .TEX
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
btw i know that alpha thing. i never correct it tho. i don't mess up raw data. i could loose information this way.
btw i know that alpha thing. i never correct it tho. i don't mess up raw data. i could loose information this way.
-
- Posts: 156
- Joined: Tue Sep 01, 2015 9:44 am
Re: Twisted Metal Black (PS2) .TEX
..
Last edited by Allen on Sun Jan 24, 2021 6:42 am, edited 2 times in total.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
Is this a python file or a script ?
-
- Posts: 156
- Joined: Tue Sep 01, 2015 9:44 am
Re: Twisted Metal Black (PS2) .TEX
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.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
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.
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.
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.
-
- Posts: 156
- Joined: Tue Sep 01, 2015 9:44 am
Re: Twisted Metal Black (PS2) .TEX
..
Last edited by Allen on Sun Jan 24, 2021 6:41 am, edited 1 time in total.
-
- Posts: 647
- Joined: Tue Jul 24, 2018 8:52 am
Re: Twisted Metal Black (PS2) .TEX
How do i use this to convert a texture ?