Hacking [release] GTX Extractor

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
GTX Extractor v4.0 was just released!

Changelog:
  • Added the ability to convert gtx files with multiple textures to multiple dds files.
  • Added a new format: R4_G4_UNORM (LA4)
Feel free to report bugs, as there are no know bugs ATM.

Download.
Source code / Github.

------------------------------------------------------------------------------------

It's actually funny that at 3.0, I said probably no more updates, but now we reached 4.0! XD
 

The Koopa Kingdom

Well-Known Member
Newcomer
Joined
Oct 14, 2015
Messages
71
Trophies
0
Location
Castle Grounds
XP
325
Country
United States
  • Like
Reactions: CuriousTommy

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
If you really want a detailed answer, ask @Exzap.
The swizzle part is mostly his.

--------------------- MERGED ---------------------------

Feel free to ask me anything about BFLIM or GTX, but not swizzling.
Even I am inexperienced about swizzling, it was a nightmare until @Exzap came and helped.

--------------------- MERGED ---------------------------

BTW, your documentation says "For 0x31, the script uses the regular swizzle() function", that is wrong, it uses swizzle_BC(). (I think you figured out this later ;))

--------------------- MERGED ---------------------------

Also, the error "This type of BC compression is not equivalent to DXT compression!" is not relevant, it's a false error that I never bothered to fix.
That's why you should forget about BFLIM Extractor and focus on GTX Extractor and GTX files instead.

BFLIM Extractor is so incomplete to the point where it converts half of some images instead of the whole thing...

For example, "result = bytearray(dataSize)" should have been "result = bytearray(data)", so it would access the data directly and only swizzle the needed parts of the image. (Something like that, I'm terrible at explaining)

You see, this is later fixed in GTX extractor.

--------------------- MERGED ---------------------------

Also, it is OK for the swizzle value to be big.
 
Last edited by AboodXD,

The Koopa Kingdom

Well-Known Member
Newcomer
Joined
Oct 14, 2015
Messages
71
Trophies
0
Location
Castle Grounds
XP
325
Country
United States
BTW, your documentation says "For 0x31, the script uses the regular swizzle() function", that is wrong, it uses swizzle_BC(). (I think you figured out this later ;))
Yep, I realized that later.

That's why you should forget about BFLIM Extractor and focus on GTX Extractor and GTX files instead.
Yeah, I didn't realize that GTX Extractor was a thing until I was already making progress in the BFLIM script.

If you really want a detailed answer, ask @Exzap.
Thanks! He doesn't seem too active here so I'll send him a message on Reddit.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Yeah, so the swizzling function isn't from Decaf, but from Cemu. (Yes, I had some of Cemu's source code)

Also, it is OK for the swizzle value to be big.
 
Last edited by AboodXD,

CuriousTommy

Well-Known Member
Member
Joined
Jul 22, 2014
Messages
524
Trophies
0
Age
27
XP
647
Country
United States
Hi, I'm currently going through GTX Extractor (And BFLIM Extractor too, I'm just looking at in the Swizzle_BC part which seems to be the same throughout both), and am documenting all of my findings for my own project. Would you mind explaining, in AddrLib_computeSurfaceAddrFromCoordMacroTiled(), what a pipe and bank are? I'd greatly appreciate it.

I am really happy that you are making a cross-platform C++ QT project for Mario Kart 8! Is there a thread that shows you progress on the program, or is the google docs (besides twitter) the only place that shows your progress on the program?
 

The Koopa Kingdom

Well-Known Member
Newcomer
Joined
Oct 14, 2015
Messages
71
Trophies
0
Location
Castle Grounds
XP
325
Country
United States
I am really happy that you are making a cross-platform C++ QT project for Mario Kart 8! Is there a thread that shows you progress on the program, or is the google docs (besides twitter) the only place that shows your progress on the program?
Twitter would probably be the best place to follow progress. When/if I get textures to show, I'll put it on Github. When/if I get something useful to show with the FMDL, then I'll probably make a thread. However, since this is a very ambitous project, I'd rather not make a thread until then, because I don't want to make a bunch of promises I'm unsure I'll be able to deliver.
 
  • Like
Reactions: CuriousTommy

TheTechGenius

</Web Dev>
Member
Joined
Apr 7, 2017
Messages
815
Trophies
0
Age
36
XP
668
Country
United States
I wonder if this would work with BOTW? Such as making the non dyeable armors dyeable, or maybe color them armors yourself, using this program.

I wish we could make our own armor and weapon mods, and use them in game. Like how Skyrim for PC has Weapons and Armor add-on mods. Now that would be awesome.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
um im not sure what the issue is but

but something odd is happening(all the files should be more like 210 and 211.ddsnot this weird rotation stuff)
EDIT: included convert.rar which has a functioning dds and a unfunctioning dds and gtx's
Hi, your problem was fixed! ;)

I'm going to release a new version soon.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Whoops, sorry for not posting any updates, especially since I said:
I'm going to release a new version soon.

I just released v5.1!

5.1 Changelog:
  • Added a functional DDS reader.
  • Added the ability to create GTX files from scratch.
  • Added support for A8.
  • Fixed a bug in calculation for tileMode 16.
  • Fixed A1RGB5, RGB565, ARGB4, and A2RGB10.
  • Added mipmaps extracting and packing.
  • Fixed compSel usage.
  • Improved the DDS header generator.
  • Milestone: this extractor now supports more formats than TexConv2. (A8 and A4L4)

5.0 Changelog:
  • Cleaning up.
  • Added parameters calculation for more accurate (de)swizzling.
  • Ported Swizzle code to Cython for more speed.
  • Added Component Selector.
  • Lots of bug fixing.

Please note that this might be the final release as I won't be improving this program anymore.
But feel free to report bugs because I might fix them and make a new release.

Download.
 
Last edited by AboodXD,
  • Like
Reactions: Pachee

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,222
Trophies
2
XP
34,454
Country
Mexico
Hey Abood, sorry for the bump.
I was reading through GTX-Extractor and I read that apparently it can extract .GSH files as well.

I tried to use it, but I cannot get the hang of it.
I am trying to extract 3 .gsh files at the moment, could you help me extracting these, please?
They're inside the .zip I uploaded.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    NinStar @ NinStar: we are fucked