Announcement

Collapse
No announcement yet.

BAT File Help for DDS Conversions

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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, 08:28 AM.
    My Blender Models

    #2
    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

    Comment


      #3
      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
      My Blender Models

      Comment

      Working...
      X