Results 1 to 30 of 39

Thread: Converting .Texture to .DDS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Converting .Texture to .DDS

    Hi All

    Playing around with the files that came with mt_unit_xmls.rar (sorry can't find the download link again), converting the uncompressed .TEXTURE files to .DDS files is fairly simple. You just strip the first 48 bytes from the .TEXTURE file and save the result as .DDS file. So extracting the .TEXTURE information to a DDS is fairly simple. However finding out the information to put back into a TEXTURE file may be more difficult, but probably do-able.

    For anybody else that wants to have a guess at the .TEXTURE header information, the values for the EN_Peasant_Padded_england.TEXTURE are :-

    (by 32 words)
    1
    48
    0
    7562340
    1237572
    51208848
    1235648
    576
    0
    2084197989
    3
    1024(depth/width of texture)

    My guess (and it's just that) would be that it would be pretty safe to use a silmilar header for a similar texture -ie cloth for cloth, mail for mail, etc. But when the unpacker comes out we'll know more .

    Cheers

    GrumpyOldMan

  2. #2

    Default Re: Converting .Texture to .DDS

    Interesting info - maybe we're not too far away from adding a new texture to the game?

    I've added it to the researchwiki.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  3. #3

    Default Re: Converting .Texture to .DDS

    I've been looking at the texture files in a hexeditor and comparing them, noticed some things. Between files of the same size and dxt type theres no change in the header, between files of the same size and different dxt types one byte changes, the 29th. This is 10 for DXT5 and 40 for DXT1. This applies to textures for units. Between textures for units ant those for other types of models, such as those in the attachment sets and new vegetations folder the 17th and 18th and 25th and 26th bytes change values.

    My guess is that as the header is only changing between different types of models and dxt formats, it should be safe to strip out the header, edit the dds and reinsert the header and try it ingame. I've made an attempt to do this but I only have the demo and it doesnt seem to use unpacked files so it came to nowt. If anyone else wants to try it the file is here: http://rapidshare.com/files/7762805/test.rar.html
    Unzip into the data folder, it should replace french chivalric or dismounted knights.

  4. #4

    Default Re: Converting .Texture to .DDS

    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.

  5. #5

    Default Re: Converting .Texture to .DDS

    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.

  6. #6

    Default Re: Converting .Texture to .DDS

    Apparently we weren't far away at all! This is great news - I'm going to have to try this out
    Last edited by Epistolary Richard; 12-17-2006 at 13:09.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  7. #7

    Default Re: Converting .Texture to .DDS

    Out of interest what hex editor software is available or do people recommend?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO