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
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
Casuir 16:52 12-17-2006
Those are mipmaps, they're smaller versions of the same texture the game engine uses when the model is further away to save memory. There should be a popup box when you open the files in photoshop which asks you if you want to load them:

Uncheck it, when you save the file there'll be a dialogue which asks you if you want to generate them, make 11 if its 1024*1024. It'll ask you the format to save it as well, if there was an alpha channel DXT5 if not DXT1.

Done some looking at the Normal maps, should be relatively simple to create some, just get the normal filter plugin for photoshop from nvidias website and apply it to your texture. By changing the scale to 6 in the settings dialog I got something which came very close to CA's own normal map for the texture I was using.

Theres an alpha channel in the normal map dds as well, this seems to be what controls the specular lighting. I deleted it from one of the textures and this was the result:

Same texture as the one on the gendarmes above, no alpha in the normal map, no shiny bits.

Reply
Up
Single Sign On provided by vBSSO