I got annoyed that there's no reasonable simple and smart DDS batch convertor.
So I made my own.
It's very simply (command line based), but it does have a basic UI that allows changing all the important options that are of interest for BF42. Might add some of the more advanced options if there's a demand for it.
There's no need for a tutorial, all options and switches are explained in the interface.
It's also possible to run the bat with some parameters that make usage even easier. I quote the batch file:
Code: Select all
REM Possible command line switches:
REM Paths have to end with "\"
REM /b - will be automatically used as a base path, e.g.
REM pointing to your levels (or game) directory (G:\Battlefield 1942)
REM /p - The pathname that you want to be parsed. This is put after the base pathname
REM and also can replace b completely.
REM /f - The files you want to be parsed. Can include wildcards (e.g. Tx*.tga)
REM /o - Where you want the converted files to be saved (default is same dir)
REM /overwrite - Overwrite existing files (default is false, files will get a trailing "_")
REM /forcewrite - Overwrite existing files (default is false, files will get a trailing "_")
REM /q x - Quality setting, x can be 1234 (default is 3)
REM /s - Silent: Tool runs silent and will close when done.
REM If first three are specified, the tool instantly parses: [Base pathname]\[pathname]\[filenames]
REM Example: ddsconvert /b G:\bfdev /q2 - This launches interface, but sets a base path already.
REM Useful for "WIP" stuff when the level name differs often.
REM Example: ddsconvert /p G:\bfdev\bf1942\levels\gazala\Textures /f Tx*.tga /q4 /s
REM This would run the whole folder quick&silent.
The most important one for basic users might be the "/b" switch. Use that to add your basic edit folder in there ( I use G:\bfdev, as that's the folder where I extract all my levels in order to use them with Editor42 as well). This way the tool will always assume that directory as the "base", and whenever the tool asks for paths, you can use relative pathnames based on that /b path. Meaning that I'd only have to write "bf1942 \levels\gazala\Textures\" instead of "G:\bfdev\bf1942\levels\Gazala\Textures\".
If you want to go even further, you can just specify all of the switches I included and just let the tool run. But really, in that case you could just run the nvdxt tool itself anyway
The tool has two main operation modes. One that allows you to specify all paths and filenames manually, and another that assumes the basic folder layout that the level-.rfa files have (which is "bf1942\levels\xxx\Textures"). Using this mode combined with the /b switch would mean that I could just type "gazala\" and be done
It also has two setting menus, one for quality settings and another for write settings.
Quality menu includes a menu for picking the desired DXT type as well as one for the algorithm speed.
Write menu includes option on how to handle the batch process (Overwrite? Forcewrite? Outdir?)
All options and switches are explained in the interface.
1) Place the "ddsconvert.bat" in the folder where your nvdxt.exe resides (get that here if you don't have it already: http://developer.nvidia.com/legacy-texture-tools
- DDS Utilities).
2) Create a shortcut of it on your desktop (or wherever you want, for convenient access) and add the following to the "target" line:
Make sure to change the path behind the /b to point to your (extracted) levels folder, obviously. If your path contains spaces, you have to surround the path with "" (e.g. "G:\BF DEV BLA\"), else you don't.
Remember that it is important that you ALWAYS end pathnames with an "\" throughout the whole tool. Can't(=Don't want to) work around that one, sorry.
Now, whenevery you run this one, the actual tool gets called with the /b parameter
A fully automated, silent call to the tool could look like this:
Code: Select all
G:\bfdev\ddsconvert.bat /o G:\bfdev\test\ /b G:\bfdev\ /p bf1942\levels\shanghai_streets\Textures\ /f Tx*.dds /q 2 /overwrite /s /dxt5
Considering this batch file has 382 lines of code, it's perfectly possible for it to still have some bugs, though I tested it pretty thoroughly.
Feedback is appreciated!