Batch texture converters
Results 1 to 25 of 25

Thread: Batch texture converters

  1. #1

    Batch texture converters

    Just wondering how to create a batch file that'll convert all DDS files with no MIPs to ones that do have MIPS (DXT5 preferably). Although some have issues with blurry textures when they have MIPs, if they don't have MIPs, I have issues with jagged textures when viewed from afar.

    Anyway, it doesn't really need to be explained, as I simply want something that'll do the job! Any help would be appreciated. :ernae:

  2. #2
    imagetool -nobeep -dxt5 -dds *.dds

    Of course you can change "-dxt5" to -dxt3 or -dxt1..

  3. #3
    Thanks very much! Works a treat.

  4. #4
    Nils ...... That could have saved me almost a day when I converted the Carnado Piper P-180. I posted that thread just before the forum crashed.
    Thanks .... I made a copy.
    Joe Watson
    Lake Placid, Florida

  5. #5
    I'll hold back my "works a treat" comment, just for a little while, as it seems to have converted them in some bizarre way! It converts them to DXT5 with MIPs, no problem, but it also seems to have done this to every file:

    Attachment 55660

    Any ideas?

  6. #6
    Quote Originally Posted by Tweek View Post
    I'll hold back my "works a treat" comment, just for a little while, as it seems to have converted them in some bizarre way! It converts them to DXT5 with MIPs, no problem, but it also seems to have done this to every file:

    Attachment 55660

    Any ideas?

    DDS files are 'inverted' from what you would see with a BMP
    file, however you may be asking about some other feature
    which, without something to compare to, I couldn't address.

    I do know that a few weeks ago I went through a mass texture
    converting exercise with all my AI textures.
    I converted the BMP's to DTX3 or perhaps it was DTX5 initially.
    I seemed to see an increase in system stuttering as a result so
    went on to convert the textures to DTX1 and resize to 512x512.
    THAT was a mistake as any 'chrome' was completly washed out
    and many of the textures became severly pixelated.

    Fortunately I had backups and was able to restore back to the
    originals ( BMP's ) and am going to reattempt the conversion
    first to DTX3 and see if performance improves, Then I may
    do a batch resize from 1024 down to 512.

    I have created batch files that work on an entire directory
    structure, looking for BMP's in texure folders and converting them
    or resizing them. Since all my AI are in two unique main directories
    ( AI and Military AI ) I can work on them with this batch method.

    Paul

  7. #7
    Quote Originally Posted by GypsyBaron View Post
    however you may be asking about some other feature
    which, without something to compare to, I couldn't address.
    This is how it should look:
    Attachment 55666

    Seeing as it deviates from the standard flipping, pixelation, discolouring, or distorting that you might expect, this just seems to have gone over it with a glowing paint brush! Never seen anything quite like it, so I'm stumped...

  8. #8
    Quote Originally Posted by Tweek View Post
    This is how it should look:
    Attachment 55666

    Seeing as it deviates from the standard flipping, pixelation, discolouring, or distorting that you might expect, this just seems to have gone over it with a glowing paint brush! Never seen anything quite like it, so I'm stumped...
    That is similar to what I saw when I did all my conversions.

    What format is the original and what format did you convert to?

    Something obviously went haywire there....

    BTW, imagetool will run recursively with a -r option included.

    Paul

  9. #9
    Not entirely sure how to find out the exact format of the original DDS files (perhaps someone else with the IRIS T-6 could assist), but they've been converted to DDS DXT5 with MIPs.

  10. #10
    OMG, that's my fault - sorry! :redf: I forgot the "-nodither" switch: imagetool -nobeep -nodither -dxt5 -dds *.dds

    You have to reinstall the T-6.

  11. #11
    Member
    Join Date
    Jul 2007
    Location
    EGNL, Barrow-in-Furness, Cumbria, UK
    Age
    64
    Posts
    313
    Hi Folks

    Just a Heads Up []

    Be aware -

    Converting any model's textures
    to a different suffix from those existing in the .mdl file,
    e.g.
    From .BMP to .DDS

    Will add an I/O calls overhead,
    and may introduce some stuttering when changing views.

    The model is still calling for .BMPs,
    and will therefore parse/search all fallback paths
    before it substitutes the DDS textures for those originally called.


    YMMV with stuttering,
    depending on your PC's capabilities and config.



    HTH
    ATB
    Paul

    The ODG Project


    I've never felt so frustrated.......
    died so frequently/spectacularly/or needlessly.......
    yet had so much fun, in a long time.

    Flight's Landing Challenges - Earn your wings !

  12. #12
    I use a hex editor (Hex Editor MX) to rename BMP to DDS in the model.

  13. #13
    Quote Originally Posted by Nils View Post
    OMG, that's my fault - sorry! :redf: I forgot the "-nodither" switch: imagetool -nobeep -nodither -dxt5 -dds *.dds

    You have to reinstall the T-6.
    Not a problem! Thanks for the fix.

  14. #14
    After reinstalling and testing, it still seems to be creating that strange effect. I've definitely edited the batch file as you've said to, so perhaps there's another underlying problem?

  15. #15
    Hmm that was the only difference to my batch files and i have never seen this before. But i usually don't use MIPs for my aircraft i fly.
    Now i tested it with the PC-9 and i get the same problem. The normal conversion to DXT5/DDS is working, but only without MIPs.
    With MIPs it only works when i do it manually.

    EDIT: Have you tested the texture in FSX?

  16. #16
    They show exactly as they do in the bitmap in FSX.

  17. #17
    Quote Originally Posted by BASys View Post
    Hi Folks

    Just a Heads Up []

    Be aware -

    Converting any model's textures
    to a different suffix from those existing in the .mdl file,
    e.g.
    From .BMP to .DDS

    Will add an I/O calls overhead,
    and may introduce some stuttering when changing views.

    The model is still calling for .BMPs,
    and will therefore parse/search all fallback paths
    before it substitutes the DDS textures for those originally called.

    YMMV with stuttering,
    depending on your PC's capabilities and config.

    HTH
    ATB
    Paul
    Thanks for the reminder on this, Paul.

    I was aware of this but didn't expect to see such a drastic
    adverse effect on my system, but then I have several
    hundred AI models and many more paints.

    For now I'm staying with my original BMP textures until I
    can find the time to hex edit the mdl files to look for DDS
    textures first...a rather daunting task that I don't think can
    be relegated to batch processing

    FSX has some strange default load/search conditions that become
    obvious when using Filemon. Early on I changed all of my 'aircraft.cfg'
    files to 'sim.cfg' since that's the first 'choice' for FSX.
    Also, it will look for gauges in a local folder before it looks for
    them in a CAB and then ion to the main gauges folder, which
    is good if you are into tweaking XML gauges

    Paul

  18. #18
    @Tweek
    Maybe this works: http://www.box.net/shared/6zboxv6fg1
    You only have to change the number of MIPs, if you have a different resolution than 1024... or you can try it without "-m #", maybe they will be generated automatically.

  19. #19
    Hmm, that doesn't seem to have any effect on the files at all. You'd think it would be a little simpler than this, wouldn't you? :costumes:

  20. #20
    It works on my system. I tested it with a 4MB, 32Bit DDS texture, which is now a 1,366MB DXT5 DDS Texture with 9 Mips. I hope you used the bat and not the exe...

  21. #21
    I'm putting the bat and exe in the texture folder, then running the bat. It quickly flashes up with the little cmd window, with some text, then quickly closes again before I get a chance to read what the text says. All of the textures stay at 4Mb.

  22. #22
    What format do your textures have? If they are BMPs, you have to change "*.dds" to "*.bmp" in the bat file.

    Or you might try to convert only one or two files in a separate folder. Maybe the source files have to be in the same format.

    I just tested it with 4 4MB files and it really works.

  23. #23
    Definitely DDS files. Tried removing every other file in the folder, except one DDS, and it didn't even convert that!

    After all this time, I probably could have converted each file individually in Photoshop.

  24. #24
    Ah well, I've found a program that does the trick just as well (simply called DDS Converter 2). Converts them perfectly, with mipmaps, so I guess I don't need a bat file. Thanks for all your help anyway, and hopefully it's helped out others, too.

  25. #25
    OK, i have found the reason why it didn't worked on your system.. the DX SDK has to be installed to use the tools
    Too late for you, but maybe helpful for others...

Members who have read this thread: 1

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
  •