Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Twisted Metal Black (PS2) .TEX

Featured Replies

  • Author
  • Localization

Acewell, posted Tue Feb 11, 2020 10:05 pm (53934)


looks like some Allen level PS2 shuffling in these samples. :D
  • Author
  • Localization

episoder, posted Tue Feb 11, 2020 10:54 pm (53936)


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
  • Author
  • Localization

DJ Normality, posted Wed Feb 12, 2020 12:07 am (53939)


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.
  • Author
  • Localization

Acewell, posted Wed Feb 12, 2020 12:23 am (53943)


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:
  • Author
  • Localization

DJ Normality, posted Wed Feb 12, 2020 12:36 am (53945)


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.
  • Author
  • Localization

episoder, posted Wed Feb 12, 2020 11:34 am (53955)


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
  • Author
  • Localization

DJ Normality, posted Wed Feb 12, 2020 12:28 pm (53956)


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.
  • Author
  • Localization

DJ Normality, posted Thu Feb 13, 2020 6:20 am (53973)


Image

Some more research
  • Author
  • Localization

episoder, posted Thu Feb 13, 2020 6:15 pm (53980)


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:

tex_twistedmetal_tex.rar

  • Author
  • Localization

Allen, posted Thu Feb 13, 2020 6:55 pm (53982)


..
  • Author
  • Localization

episoder, posted Thu Feb 13, 2020 7:28 pm (53983)


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.
  • Author
  • Localization

Allen, posted Fri Feb 14, 2020 3:59 am (53993)


..
  • Author
  • Localization

DJ Normality, posted Fri Feb 14, 2020 7:17 am (54000)


Is this a python file or a script ?
  • Author
  • Localization

Allen, posted Fri Feb 14, 2020 9:06 am (54003)


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.
  • Author
  • Localization

DJ Normality, posted Sun Feb 23, 2020 11:44 am (54181)


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.
  • Author
  • Localization

Allen, posted Mon Feb 24, 2020 7:29 am (54211)


..
  • Author
  • Localization

DJ Normality, posted Thu Dec 24, 2020 4:03 pm (61268)


How do i use this to convert a texture ?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.