Results 1 to 3 of 3

Thread: BAT File Help for DDS Conversions

  1. #1
    Join Date
    Apr 2003
    Location
    New York, USA.
    Posts
    2,226

    Default BAT File Help for DDS Conversions

    Hi Folks,

    I'm a Unix guy - where I could do this in two seconds. Windows makes everything difficult - LOL.

    Having some trouble with Windows BAT.

    I just want a counter setup so I know how many texture files my script has left to process while running. It's converting files to DDS using the NVidia Legacy DDS Toolset. It takes a considerable amount of time to process a large number of textures (especially with compression) - so I want some progress info while running.

    So before I start my loop processing of the textures (which works fine) - I just want to count the "BMP" files in a given directory and set a variable with the result - that I can decrease by (1) on every cycle of my DDS loop. The "dir" command gives me the correct output - it's just assigning that output to a variable that seems to be the issue.

    What am I doing wrong? Trying to follow examples found on the net. Is there a better way to simply count the BMP files in a given directory?

    Code:
    @echo off
    REM Set Paths
    set "terrtex=E:\MSTSmini\CT River\Train Simulator\Routes\ConnRiv\TERRTEX"
    set "ImgTool="Y:\NVIDIA Corporation\DDS Utilities\nvdxt.exe""
    
    REM Count Files
    FOR %%i IN ('dir /b /s /A-d "%terrtex%\*.bmp" | find "" /v /n /c') do set RESULT=%%i
    echo The directory is %RESULT%
    
    REM Make DDS
    cd /D "%terrtex%"
    FOR %%i IN (*.bmp) DO (%ImgTool% -box -dxt1c -outdir "%terrtex%" -file "%%i"  
    echo "%%i")
    
    echo.
    echo.
    
    echo Run Complete...
    Thanks.

    Regards,
    Scott
    Last edited by scottb613; 11-29-2021 at 09:28 AM.

  2. #2
    Join Date
    Nov 2007
    Location
    SW MO
    Posts
    619

    Default

    Hi Scott,

    Is there a reason to convert all of the tiles to .dds? Are there benefits beyond ease of editing?
    I just go with the ones I want to detail beyond what TSRE will do.
    TSRE and ORMG handle a mixture just fine.

    Randy

  3. #3
    Join Date
    Apr 2003
    Location
    New York, USA.
    Posts
    2,226

    Default

    Hi Randy,

    Thanks for the continued interest.

    Yeah - my latest plan is to convert all Terrtex on my route projects to 2048x2048 - to see if it works well. We're talking thousands of Terrtex patches. Creating MipMaps for ACE files proves difficult - as previously stated on ET - "ReMipIt" won't process files over 1024x1024 and the other tools we have don't have the ability to process thousands of texture files at a time. While I have found a work around that's not great for HD ACE MipMaps - DDS files seem far smaller than ACE compressed files. A 2048x2048 DXT1 compressed DDS with MipMaps is approx 2.77MB. Given the number of high resolution textures we're asking video cards to handle - I want to be as efficient as possible with the new HD Terrtex.

    The other advantage DDS files bring to the table - is I can have two sets of workable Terrtex textures - the ACE's will remain uncompressed allowing me to edit in TSRE at will (you don't want to keep editing compressed files - as with each compression cycle there is loss - therefore your files will continue to degrade) - and I can compress the DDS for better efficiency while running ORTS. If I make changes to the ACE's in TSRE - I can simply run my script posted above to generate a completely new set of DDS files - while maintaining the integrity of the source ACE.

    Regards,
    Scott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-->