I did read somewhere [I think Dino mentioned using a custom .bat file] about simply dragging a 24bit file over a .bat file processed using imagetool spat out a .dds.
Can any of you heavy users of a paint prog. shed any light on this method?
Dave.
Challenge accepted!
I use dxtex (comes with the directx SDK) to create my textures. I also use ImageMagick which allows you to script processing that I can do some clever things. Using a number of batch files I can just export from PSP a 24bit BMP (which I need to do anyway as the modelling program needs the BMP) and then drag and drop the image onto a shortcut on my desktop to the batch file.
Here is a complex example showing how I convert a bump map image made in GIMP to a correctly formatted bump map dds:
"C:\Program Files (x86)\ImageMagick-6.7.3-Q16\convert.exe" %~n1.bmp -flip -channel Red -separate processing\temp_a.bmp
"C:\Program Files (x86)\ImageMagick-6.7.3-Q16\convert.exe" %~n1.bmp -flip -channel Red -brightness-contrast -100 processing\temp.bmp
dxtex "processing\temp.bmp" -m "temp.dds"
rename temp.dds %~n1.dds
The first two lines read the bmp (%~n1.bmp), process them and then save them out to a couple of temp files which are kept in a folder called processing, one being the full image and the other being the alpha channel.
The third line calls dxtex. dxtex is clever because it will load an alpha channel automatically if there is a file with _a appended to the filename (I can't seem to get imagetool to do this and with DXTbmp it's a bit of a pain as well).
The final line just renames the temp file back to the original file name with the .dds extension.
This example is simpler and takes a BMP with an alpha image and flips them vertically (with the first two lines) and then runs these temp images through dxtex (dxtex does not automatically flip the BMP) saving them as DXT5 with mipmaps. Again the last line renames the temp image back to original file name with a .dds extension.
"C:\Program Files (x86)\ImageMagick-6.7.3-Q16\convert.exe" %~n1.bmp -flip processing\temp.bmp
"C:\Program Files (x86)\ImageMagick-6.7.3-Q16\convert.exe" %~n1_a.bmp -flip processing\temp_a.bmp
dxtex "processing\temp.bmp" DXT5 -m "temp.dds"
rename temp.dds %~n1.dds
The above example is one I use a lot. All I do is export the image from PSP and export the alpha channel with the same file name but _a added to the end. I then just drag and drop the image onto the shortcut and the batch file does the rest. Ridicuolously (sic) simple.
Using imagetool to create simple DXT1 textures simply requires a shortcut to be created and the following information to be added to the "target" properties for the shortcut. The important bits being the -nogui -nomip -dxt1 and -dds flags. As mentioned before the problem is that I can't get imagetool to load alpha channels with this method.
"C:\Users\me\My Documents\FSX Aircraft\Eaglet\FSDS\Texture\ImageTool.exe" -nogui -nomip -DXT1 -dds