Soulpatrol wrote:
The only Problem i see is that the .ftex Files seams crypted to me.
Same Problem as with the MGSV_QAR_Tool, no CryptKey inside the xml and the Header of the .ftex Files are crypted.
For the lua Script's all worked fine, theres a Key inside the xml and all are readable.
Maybe i missunderstand something since im new to this and see here others showing the Textures.
So do i need more Steps to convert the Textures to .dds as extracting the .dat File and use FtexTool or FtexUnpacker ?
(i copy the needed .ftexs Files too before i try to use the .ftex on a Tool)
Heres a Screen of a Ftex Header:
Anyway many thanks and im sure other Coders are happy about your research and sharing

I don't think it's crypted really, looks like it's the endian issue to me, here is an example of a PC .ftex:

You can see that this has FTEX at the start instead of XETF which consoles use, this is because of the
endianness that PS3/360 use, since it's a different endian byte-ordering PCs programs would read values in the file in reverse (eg. reading 0x01000000 instead of 0x1, or XETF instead of FTEX), which would probably cause crashes like what you've had.
I'll try taking a look into FtexTool for you now, hopefully shouldn't be too hard to make it endian-aware.
Edit: seem to have FtexTool converting ftex -> dds and vice versa fine for PS3 textures, but 360 textures seem corrupted, maybe some sort of swizzling? Not sure how to get around that..
Edit2: Alright, looks like deswizzling is working fine now, every 360 texture I tested extracted fine anyway.
Haven't worked on re-swizzling them yet though so you won't be able to create/edit 360 textures yet, only extract them.
Download at
https://github.com/emoose/FtexTool/rele ... ianSupport
Add big endian FTEX support, add deswizzle option (-sw)
New switches:
- -sw / -swizzle = deswizzle (and eventually reswizzle) the texture
- -be / -bigendian = create an FTEX file in big endian
PS3 FTEX's can be converted to and from .dds fine (use the -be / -bigendian option when converting .dds back to .ftex though!)
360 FTEXs should extract fine if you use the -sw / -swizzle switch when converting .ftex to .dds, luminance hasn't had deswizzling added though so that might not extract properly
Note that currently you won't be able to convert .dds files back into 360 FTEX, until reswizzling is added in.
So to convert PS3 FTEX to DDS you'd just run FtexTool like normal (ftextool blahblah.ftex), but to convert the DDS back into FTEX you have to use the -be switch to create a bigendian FTEX (ftextool -be blahblah.dds)
To convert 360 FTEX to DDS you need to add the -sw switch to deswizzle the texture first (ftextool -sw blahblah.ftex), like said above you can't convert dds back into 360 FTEX yet, but hopefully soon. (when it's possible you would have to run "ftextool -be -sw blahblah.dds", to create a big-endian swizzled FTEX)