XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Aug 17, 2018 6:22 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: XenobladeX mtxt texture format
PostPosted: Mon Jul 18, 2016 6:26 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 181
Has thanked: 5 times
Have thanks: 113 times














You can make the ads go away by registering

So recently i got my hands on XenobladeX (or Xenoblade Chronicles X if you want).
I almost figured out model format, but textures are not my cup of tea, they have different pixel formats and different extensions but in the core they are all same. I'm curious now about standard format used for models.

See? The color is here, but segments are placed randomly in raster.
This is supposed to be DXT1(BC1) format.
Right texture is dumped from CEMU.
Image

Textures have MTXT header (I believe Castlevania used those too), the funny thing is, the header is backwards and at the end of file.

Thanks for any info. Samples below.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Sat Jul 23, 2016 2:08 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 181
Has thanked: 5 times
Have thanks: 113 times
Im not sure, but can this be stored in Morton (aka Z) order?
ATM I don't know what texture format WiiU adopted, so it looks like blind shot.

EDIT: After some more research I found this little program called texconv2, it may be answer to my question, the file seem to be gtx format, now I just need to find header for gtx and it should work.


Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Sat Jul 23, 2016 6:51 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 181
Has thanked: 5 times
Have thanks: 113 times
MTXT Header

Code:
endianess: big
header offset: EOF-122
names according to GTX Header Decription
struct MTXTHeader {
   uint swizzle;
   uint dimension;
   uint width;
   uint height;
   uint depth;
   uint nomips;
   uint type;
   uint size;
   uint aamode;
   uint tiling;
   uint unk;
   uint alignment;
   uint pitch;
}


Common formats: DXT1,DXT5,ATI2(normal maps)


Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Fri Sep 29, 2017 7:25 am 
Offline
VIP member
VIP member
User avatar

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 1102
Has thanked: 2186 times
Have thanks: 619 times
ok so if Xenoblade is a WiiU game then the texture is likely gx2 (or gtx?) format, your samples are probably gx2 image data with a custom header, or footer in this case.
texconv2 can supposedly convert gtx to dds as posted here
http://zenhax.com/viewtopic.php?t=534
there is a Noesis python script by Zaramot that calls texconv2 to convert gtx image data here
viewtopic.php?p=103731#p103731

looks like there is some pretty good python 3.4 source code here for unswizzling etc
https://github.com/aboood40091/GTX-Extractor
someday i would like to be able to use this in a script to eliminate having to use any tool called by the script :D

PredatorCZ wrote:
Code:
header offset: EOF-122

you meant 112 instead of 122 right? :?

_________________
Noesis
Hex2obj
QuickBMS
Asset Studio
TextureFinder


Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Sat Oct 14, 2017 2:44 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 181
Has thanked: 5 times
Have thanks: 113 times
Thanks for post Ace, I have finished converter months ago, so its fine.
Since Xenoblade 2 will use same engine I will test my tool and probably release it to public.

_________________
My Blog
Image


Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Mon May 14, 2018 7:20 am 
Offline
VIP member
VIP member
User avatar

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 1102
Has thanked: 2186 times
Have thanks: 619 times
i put together a Noesis python script for fun to open your mtxt sample :D

i used your findings along with info from previous links i posted.

to make this work
extract tex_XenobladeChroniclesX_WiiU_mtxt.py to Noesis\plugins\python folder
extract TexConv2.exe, TexConv2.bat, texUtils.dll and gfd.dll to Noesis\scenes folder


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Noesis
Hex2obj
QuickBMS
Asset Studio
TextureFinder


Top
 Profile  
 
 Post subject: Re: XenobladeX mtxt texture format
PostPosted: Wed Jun 13, 2018 8:16 am 
Offline
ultra-n00b

Joined: Wed Jun 13, 2018 8:13 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Thanks for post Ace, I have finished converter months ago, so its fine here
 since Xenoblade 2 will use same engine I will test my tool and probably release it to public.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: CrookedCr, gulanxiu13 and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group