xboxscene.org forums

Pages: 1 [2] 3 4

Author Topic: Need A Bmp Swizzle/unswizzle Util  (Read 319 times)

cypher35

  • Archived User
  • Full Member
  • *
  • Posts: 153
Need A Bmp Swizzle/unswizzle Util
« Reply #15 on: July 14, 2005, 08:04:00 PM »

well, after my first try i came up with a strange result, but i think i'm on the right track.

check it out:
user posted image

it's not completely unscrambled, but it's getting there...
Logged

Zdemon29958

  • Archived User
  • Full Member
  • *
  • Posts: 239
Need A Bmp Swizzle/unswizzle Util
« Reply #16 on: July 15, 2005, 02:46:00 AM »

Woah, that is good!

Here is one for Grand Theft Auto San Andreas:

What it is supposed to look like on PC:

user posted image

The swizzled image on xbox:

user posted image

I open them with txdworkshop, download it here if you want.
Logged

cypher35

  • Archived User
  • Full Member
  • *
  • Posts: 153
Need A Bmp Swizzle/unswizzle Util
« Reply #17 on: July 15, 2005, 12:49:00 PM »

QUOTE(Zdemon29958 @ Jul 15 2005, 04:57 AM)
Woah, that is good!
Logged

Horscht

  • Recovered User
  • Hero Member
  • *
  • Posts: 619
Need A Bmp Swizzle/unswizzle Util
« Reply #18 on: July 15, 2005, 12:56:00 PM »

well, it probably has to do with the fact that the first pic is from the PC-version therefore having a higher resolution than the xbox one.
Logged

Zdemon29958

  • Archived User
  • Full Member
  • *
  • Posts: 239
Need A Bmp Swizzle/unswizzle Util
« Reply #19 on: July 15, 2005, 04:59:00 PM »

All gta xbox images are compressed. That's how the game uses it.
Logged

BILLS

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Need A Bmp Swizzle/unswizzle Util
« Reply #20 on: July 17, 2005, 09:48:00 AM »

good job cypher  wink.gif

Up to usual bussiness i see  biggrin.gif
Logged

krawhitham

  • Archived User
  • Full Member
  • *
  • Posts: 212
Need A Bmp Swizzle/unswizzle Util
« Reply #21 on: July 17, 2005, 11:53:00 AM »

QUOTE(cypher35 @ Jul 15 2005, 08:57 PM)
Success!  i figured out the only reason that the image unswizzled strangely the first time was because the row order was reversed on the original file...
Logged

cypher35

  • Archived User
  • Full Member
  • *
  • Posts: 153
Need A Bmp Swizzle/unswizzle Util
« Reply #22 on: July 17, 2005, 05:11:00 PM »

Cool, i'll get to work on a swizzling/unswizzling utility...

I need to find some documentation on the bmp file format so that the app can auto-detect 24bpp vs 32bpp as well as the "reverse row order" tag that caused me problems before.  After that's done it's simply a matter of writing an algorythm that does the exact opposite of the one i've already written.

I may be a little busy over the next few days, but i'll see if i can get a command line app with wildcard support and all that fun stuff by the end of the week.
Logged

BILLS

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Need A Bmp Swizzle/unswizzle Util
« Reply #23 on: July 17, 2005, 05:26:00 PM »

QUOTE(cypher35 @ Jul 17 2005, 08:22 PM)
Cool, i'll get to work on a swizzling/unswizzling utility...
Logged

NAMA

  • Archived User
  • Newbie
  • *
  • Posts: 2
Need A Bmp Swizzle/unswizzle Util
« Reply #24 on: July 18, 2005, 02:30:00 PM »

QUOTE(aruaru @ Jul 18 2005, 09:13 PM)
If it helps you or anyone else.... here's some code I wrote for a texture editing util for NFSU... never released the XBOX version though. Sorry for the VB code... wink.gif It will need some modification as CTpkTexture is a class that's used for NFSU textures, but the property names should be enough to explain what data is needed. "Swizzle" and "Unswizzle" are the main functions, "SwizBlock" and "UnswizBlock" are just helpers.
Logged

NAMA

  • Archived User
  • Newbie
  • *
  • Posts: 2
Need A Bmp Swizzle/unswizzle Util
« Reply #25 on: July 18, 2005, 03:03:00 PM »

ok, i got some time to modify proge to handle bmp. and here is the result
original:
user posted image
unswizzled:
user posted image
Logged

aruaru

  • Archived User
  • Newbie
  • *
  • Posts: 28
Need A Bmp Swizzle/unswizzle Util
« Reply #26 on: July 18, 2005, 03:14:00 PM »

QUOTE(NAMA @ Jul 18 2005, 05:41 PM)
Are you sure the code was written by you or it's not converted from C/C++?
Logged

themewin

  • Archived User
  • Jr. Member
  • *
  • Posts: 76
Need A Bmp Swizzle/unswizzle Util
« Reply #27 on: July 18, 2005, 03:19:00 PM »

QUOTE(cypher35 @ Jul 18 2005, 01:22 AM)
Cool, i'll get to work on a swizzling/unswizzling utility...
Logged

Drilus

  • Archived User
  • Sr. Member
  • *
  • Posts: 301
Need A Bmp Swizzle/unswizzle Util
« Reply #28 on: July 18, 2005, 07:38:00 PM »

there's a big different between visual basic and batch scripting.

that's not the full code anyway. he provided as an example to others on how it swizzling/unswizzling might be done.
Logged

brienj

  • Archived User
  • Sr. Member
  • *
  • Posts: 281
Need A Bmp Swizzle/unswizzle Util
« Reply #29 on: July 18, 2005, 10:58:00 PM »

biggrin.gif

I think it's VERY ironic that such an AWESOME program will be made, because of such a POS game.   beerchug.gif
Logged
Pages: 1 [2] 3 4