PC Mode
Org Mobile Site
Forum > Medieval 2: Total War > Medieval 2: Total War > M2:TW Modification > Learn to Mod > Modding Tutorials & Tools >
Thread: Converting .Texture to .DDS
Casuir 21:25 12-16-2006
Never mind, I got it to work, never read the bit about the command line
Screenies:



I probably should have done something a bit better looking but it works.

Reply
Casuir 12:15 12-17-2006
Couple more tests, mounts buildings and banners:






I've only noticed one other byte changing between files, the 46th seems to change value depending on the size of the file, although I've noticed two files of different dimensions but same area having the same value. Likewise I've noticed two files of the same dxt type having different values for the 29th byte, 10 and 20. I havent noticed two different dxt formats using the same value though. The other two byte sequences dont seem to have any effect ingame if you change them to those used by another type of model. Other than that I havent noticed any other changes between the headers in different files than those 6 bytes.

Reply
Epistolary Richard 13:08 12-17-2006
Apparently we weren't far away at all! This is great news - I'm going to have to try this out

Reply
wilddog 13:51 12-17-2006
Out of interest what hex editor software is available or do people recommend?

Reply
alpaca 14:00 12-17-2006
I use Hex Workshop

Reply
Dave1984 14:51 12-17-2006
I apologise if I appear stupid, but I do not have any experience with hex editors or understanding binary.
Using GrumpyOldMan's converter, opening the .dds in photoshop (with .dds plugin) the file opens as blank.

Opening the file with a hex editor (such as Hex Workshop) obviously displays the file in it's binary form (OK I'm striking out here, I don't know if that's what it's called) but it is not readable to the untrained eye.
So when you all talk of deleting this byte or that byte, and the 46th byte changing between files, what does it mean, and how can those of us without hex editor knowledge apply it to converting the files so that we can begin reskinning?

Thanks guys!

Reply
Throumbaris 15:03 12-17-2006
That is totally A+ work there! Is there any chance of us seeing a converter?

Reply
Casuir 15:21 12-17-2006
I dont use hex commander but the process with it should be similar. Make a copy of and open up the texture file you want to edit in your hex editor. Write down the numbers highlighted here:



Delete them then save and exit. Change the file extension from .texture to .dds. Open it up in your graphics program and make note of the format, ie DXT1 or DXT5 and no. of mipmaps. Do your editing and save the file with the same settings. Now open up the dds in your hex editor and insert the hex string you deleted at the start. Compare it with the original file to make sure its correct. Save, exit and rename the files so the new one is used by the model. Start your game with the --io.file_first switch and you should be able to see your changes ingame. Remember to delete the two files that cause the game to crash as well.

Reply
Dave1984 16:20 12-17-2006
Originally Posted by Casuir:
I dont use hex commander but the process with it should be similar. Make a copy of and open up the texture file you want to edit in your hex editor. Write down the numbers highlighted here:



Delete them then save and exit. Change the file extension from .texture to .dds. Open it up in your graphics program and make note of the format, ie DXT1 or DXT5 and no. of mipmaps. Do your editing and save the file with the same settings. Now open up the dds in your hex editor and insert the hex string you deleted at the start. Compare it with the original file to make sure its correct. Save, exit and rename the files so the new one is used by the model. Start your game with the --io.file_first switch and you should be able to see your changes ingame. Remember to delete the two files that cause the game to crash as well.

Thanks Casuir, that's much appreciated.

On opening the file in photoshop, it shows up fine but has replicated itself exactly on the right several times, each time progressively smaller. Is this normal?

Reply
Up
Single Sign On provided by vBSSO