[release] GTX Extractor

Discussion in 'Wii U - Hacking & Backup Loaders' started by AboodXD, Jul 31, 2016.

  1. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    GTX Extractor v5.2

    GTX Extractor is a tool which extracts textures from the GX2 Texture ('Gfx2' / .gtx file extension) format used in Wii U games, and saves them as DDS.
    It can also convert DDS back to a .gtx file.

    Supported texture formats:
    • GX2_SURFACE_FORMAT_TCS_R8_G8_B8_A8_UNORM
    • GX2_SURFACE_FORMAT_TCS_R8_G8_B8_A8_SRGB
    • GX2_SURFACE_FORMAT_TCS_R10_G10_B10_A2_UNORM
    • GX2_SURFACE_FORMAT_TCS_R5_G6_B5_UNORM
    • GX2_SURFACE_FORMAT_TC_R5_G5_B5_A1_UNORM
    • GX2_SURFACE_FORMAT_TC_R4_G4_B4_A4_UNORM
    • GX2_SURFACE_FORMAT_TC_R8_UNORM
    • GX2_SURFACE_FORMAT_TC_R8_G8_UNORM
    • GX2_SURFACE_FORMAT_TC_R4_G4_UNORM
    • GX2_SURFACE_FORMAT_T_BC1_UNORM
    • GX2_SURFACE_FORMAT_T_BC1_SRGB
    • GX2_SURFACE_FORMAT_T_BC2_UNORM
    • GX2_SURFACE_FORMAT_T_BC2_SRGB
    • GX2_SURFACE_FORMAT_T_BC3_UNORM
    • GX2_SURFACE_FORMAT_T_BC3_SRGB
    • GX2_SURFACE_FORMAT_T_BC4_UNORM
    • GX2_SURFACE_FORMAT_T_BC4_SNORM
    • GX2_SURFACE_FORMAT_T_BC5_UNORM
    • GX2_SURFACE_FORMAT_T_BC5_SNORM
    FAQ:
    • How do I run this on my Mac/Linux (Ubuntu)?

      You need to run it from source code.

    • How do I run this from source code?

      On Windows:
      All you need is to install Python 3.4 or higher and open "gtx_extract.py" using python.exe.

      Other platforms:
      All you need is to install Python 3.4 or higher and run the command "python3 gtx_extract.py".

    • How do I build the source code?

      On Windows:
      After installing Python 3.4 or higher, install cx_Freeze and open "build.py" using python.exe.

      Other platforms:
      After installing Python 3.4 or higher, install cx_Freeze and run the command "python3 build.py". (build.py was tested on Windows only)

    Download.
    Source code / Github.
     
    Last edited by AboodXD, Aug 9, 2017


  2. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    There's a crazy bug that is going on, there's no reason for it..... >.<
    I'm trying my best to fix it!
     
  3. CuriousTommy

    CuriousTommy GBAtemp Fan

    Member
    422
    114
    Jul 22, 2014
    United States
    Keep up the good work, I can wait for all the formats to be supported. No more proprietary tools!

    (Also, thank you for the Linux support!)
     
  4. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Don't try this, I'll update it first then I'll tell you if you can use.
    There's a weird bug...
     
    CuriousTommy likes this.
  5. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    @CuriousTommy It's safe now. :)

    Everyone who downloaded this, please download it again! :D
     
    SirBeethoven likes this.
  6. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Warning if creating a BC3 (DXT5) .gtx file:
    The path to GTX Extractor must not have spaces in it!!
     
  7. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Here's a video of testing the results of GTX Extractor:


    What I did was:
    1. Extracted the original .gtx file.
    2. Edited the generated .png file.
    3. Created a new .gtx file using the edited .png file.
    4. Tested the new .gtx file in game.
     
    lordelan likes this.
  8. yahoo

    yahoo G͝B͢A͜t͞em҉p̡ R̨e͢g̷ul̨aŗ

    Member
    341
    237
    Aug 4, 2014
    United States
    What's changed since v1.1? I can't seem to find the original thread to compare, nor my posts from that thread. Was it deleted?
     
    Last edited by yahoo, Aug 1, 2016
  9. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Yes, because this version (v1.4) is completely different. (At least to me)

    If you want to compare, here is the old one and here is the new one.
     
  10. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    GTX Extractor in action:

     
  11. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    GTX Extractor v2.0 is finally here!! :D

    Changelog:
    • Added a new swizzling method, which adds more supported formats!
    • Sacrificed the .gtx file creating function (because a bug occurs when using the new swizzling method), but I promise I try to add it again. ;)
    @CuriousTommy I think you'll like this update! ;)

    Please note that as of this version, the "creating a .gtx file" feature was removed.
     
    CuriousTommy likes this.
  12. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    I'm back with version 2.1! :D

    Changelog:
    • The .gtx file creating function is back!
    • Did some cleaning up and bug fixing. :)

    I just want to say that naturally this program should support more format than listed above, but those listed above are the tested and working formats.
     
  13. vitese200

    vitese200 Newbie

    Newcomer
    5
    0
    Jul 25, 2016
    Serbia, Republic of
  14. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    It's possible, and so is BFLIM.
    I can add both of them.
     
  15. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Adding BFLIM support in the next release! :D

    Code:
    GTX Extractor v3.0
    (C) 2014 Treeki, 2015-2016 AboodXD
    Converting: wiiMario_Title_logo_00^l.bflim
    
    // ----- GX2Surface Info -----
      width     = 900
      height    = 367
      format    = GX2_SURFACE_FORMAT_TCS_R8_G8_B8_A8_UNORM
      imageSize = 1366016
      swizzle   = 65536, 0x10000
      alignment = 2048
    
    Finished converting: wiiMario_Title_logo_00^l.bflim
    We're getting there...
     
    CuriousTommy and vitese200 like this.
  16. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Hint: Hype overload!!
     
    CreeperMario likes this.
  17. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    The extractor is pretty much complete, I just need to do some ingame tesing.

    New Features:
    • Extract and create BFLIM files.
     
    CuriousTommy and CreeperMario like this.
  18. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    This BFLIM Extractor literally took me 10 minutes to write. :rofl2:

     
    CreeperMario likes this.
  19. Zarklord

    Zarklord GBAtemp Regular

    Member
    191
    65
    May 13, 2016
    United States
    hi i was wondering if you could add support for this gtx
    and yes before you ask it is legit
    even though it might seem like it isnt
    this came from inside a .pctl file from smash 4 and the game uses them
    though for what im not sure...
     
  20. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,686
    1,407
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    I'll see. :)