Batch .dds convert from .png

I need to convert a few hundred pictures (.png) into format dds (with R8G8B8). The problem is that of the methods I know of, only in the I can convert with the parameters I need.

As you can guess, it is extremely tedious to do a routine manual operation even with an auto clicker with a bunch of files.
Maybe someone will tell me the way how this can be done automatically?

1 Like

Take a look at texconv:

Note that this is a command line based .exe so to automize the process you’ll need a script to run the program over multiple files with the parameters you need.

The .exe can be downloaded from:

there is the Nvidia texture tools

However, I can not figure out how to use it.

Are you using windows or some other OS?

Can write a very simple bash script that should probably solve ‘your’ problem. But do you know how to use the console or is it that there are some dependencies missing on the .exe?

Finally, using ‘reply’ option increases the probability of getting a faster response.

1 Like

I hope you’re still here. I was very busy and could not respond to your post as soon as I saw it.

I use Windows 10, and to be honest, your script would really help me a lot (even without knowing its actions, I think it would be good).

This is probably the simplest conversion script, it takes all .png files in the current directory (.png files, texconv.exe and the .bat file must be in the same directory) and converts them to a R8G8B8A8 .dds file. It should execute by a simple double-click (windows might complain however, so make sure to check for viruses! :slight_smile: ).

ConvertDDS.bat (85 Bytes)

I noticed however that texconv.exe doesn’t support uncompressed R8G8B8 specifically (for various reasons it makes sence), generally converting to DXT1 (BC1_UNORM for texconv) is prefered in that case (but it is also a compression, so it depends on what you are actually using the .dds textures for). But if you want explicitly R8B8G8 without compression i was able to do it with imagemagick.

Finally, the script is very simple and you might be interested in recursive behavior etc. but it should be easy to extend by reading the available commands in the related github link i posted. The .bat file is a simple .txt file and can be edited if opened in text editor (using the console instead works to ;).

1 Like

r8g8b8 gives a really big size after conversion. However, it is the only format that gave me an image of 1 to one at the output. Because I tried to convert to dx1 and got steps on gradients and, in general, much worse image quality at the output.

By the way, can’t he convert (without a8) without an alpha channel? Otherwise it is still an extra size.

But if you want explicitly R8B8G8 without compression i was able to do it with imagemagick.


After installation, run the following .bat file to convert the textures in the same directory: ConvertDDS.bat (112 Bytes)

for %%f in (*.png) do (
  magick "%%~nf.png" -define dds:compression=NONE "%%~nf.DDS"

The .exe is registered in the installation so it’s slightly easier to use in that regard.

1 Like

Removing this link as requested.

It looks like that tool is made for converting explicitly to a specific format supported by the game engine. Which seems like a waste of .exe, other options are more flexible.

1 Like

Depends if you use that game engine or not. But there has been a resurgence of modders for that engine and on the off chance you were one.