DDS Creation with ATI Compressonator: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Geep (talk | contribs)
→‎Introduction: Missing DLL in install
Geep (talk | contribs)
Line 16: Line 16:
== Compressing Diffuse and Specular Maps ==
== Compressing Diffuse and Specular Maps ==
* Open your source (TGA) file
* Open your source (TGA) file
* Create Mip Maps using the '''Box-Filter''' with the lowest mip map size of '''1x1'''.
* In the Mip Maps toolbar's pulldown, select '''Box-Filter'''. Press "Generate", and then a Lowest Mip-Level size of '''1x1'''.
[[Image:01_mips.jpg|frameless]]
[[Image:01_mips.jpg|frameless]]


[Note - actually, better quality filters that Box are preferred.]
[Note - actually, better quality filters that Box are preferred.]
* Click the Compress button next to "DirectX Texture Compression"
* In the Compression toolbar's pulldown, select '''DirectX Texture Compression'''. Click the "Compress" button.
* Select the correct compression type:
* Choose the correct compression type:
**'''Diffusemap:''' Does the texture have '''transparency'''(i.e., leaves, spiderwebs, etc)? '''NO: DXT1'''. '''YES: DXT5'''
**'''Diffusemap:''' Does the texture have '''transparency'''(i.e., leaves, spiderwebs, etc)? '''NO: DXT1'''. '''YES: DXT5'''
**'''Specularmap: DXT1''' - specular does not require alpha information.
**'''Specularmap: DXT1''' - specular does not require alpha information.
**'''Normalmap: NONE''' - Use TGA!
**'''Normalmap: NONE''' - Use TGA!
* Make sure that the channel weighting values are as follows :
* Don't change the default channel weighting values of :
:'''red=0.3086'''
:red=0.3086
:'''green=0.6094'''
:green=0.6094
:'''blue=0.082'''
:blue=0.082


* Click Compress
* Click "Compress"
[[Image:02_compression.jpg|frameless]]
[[Image:02_compression.jpg|frameless]]



Revision as of 22:27, 18 August 2020

Note - Prior to August, 2020, a longer version of content lived at DDS creation. Go there for a newly-written tool-independent overview of DDS creation. Further revision of the material below was done.

Introduction

ATI's "The Compressonator" is an old program and should not be your first choice, but may still have its uses.

Find "The Compressonator" version 1.21.1044 here. Install/unzip it to a folder and create a shortcut if you like.

(At one time, the foregoing exact version was required, because it alone could compress DXT5 RXGB normalmaps. Compression of normalmaps should no longer be done.)

After running the installer, you will likely find when you try to run "The Compressonator", that the installation was incomplete. To complete it, inspect the distribution .zip for a folder that contains MSVCP71.DLL. With Admin privileges, copy MSVCP71.DLL to where the program lives, typically c:/Program Files (x86)/ATI Technologies Inc/The Compressonator.

Please review DDS creation for general information about

  • working with TGA and DDS, and where files should be placed in your FM
  • guidance about DDS creation settings

Compressing Diffuse and Specular Maps

  • Open your source (TGA) file
  • In the Mip Maps toolbar's pulldown, select Box-Filter. Press "Generate", and then a Lowest Mip-Level size of 1x1.

[Note - actually, better quality filters that Box are preferred.]

  • In the Compression toolbar's pulldown, select DirectX Texture Compression. Click the "Compress" button.
  • Choose the correct compression type:
    • Diffusemap: Does the texture have transparency(i.e., leaves, spiderwebs, etc)? NO: DXT1. YES: DXT5
    • Specularmap: DXT1 - specular does not require alpha information.
    • Normalmap: NONE - Use TGA!
  • Don't change the default channel weighting values of :
red=0.3086
green=0.6094
blue=0.082
  • Click "Compress"

  • Save your DDS to the /dds/ tree

Change the File Extension to Lowercase

The Compressonator automatically names the file *.DDS, but all files should be lowercase (including TGAs). Be sure to rename the files to a lowercase .dds extension before game testing:

Option A: Use Windows Explorer. You need to change your Explorer settings to display the file extension:

  1. Open up Windows Explorer
  2. Go Tools > Folder Options
  3. Click the View tab and disable Hide extensions for known file types

Then you can highlight your file and hit F2 (or right-click > Rename) and change the extension to lowercase.

Option B: This can also be done via the command line Start > Run... > cmd (then cd to your textures folder) and rename the files via:

ren *.DDS *.dds

About Transparency

At this time TDM only supports hard edges for transparency, so you won't get a gradual blending. However, saving the 8-bit alpha channel - and using DXT5 compression - "future-proofs" your material for a day when TDM could support this smooth blending. In the meantime, hard edge clipping occurs by default at 50%; use the the "alphaTest" keyword in your material to easily control this.

When converting from TGA with Alpha to DDS, the alpha doesn't always work correctly. Causes for this vary, but:

  • One easy workaround is to save your texture out as a TIFF and then open that in The Compressonator.
  • If you are saving from Photoshop/GIMP, disable Layers in the save options, but make sure it's set to preserve transparency.
  • When opening it in The Compressinator, right click in the image and view RGBA/Alpha to check that it is correct, before generating mipmaps or compressing.

Batch Processing

Choose File > Batch Compress or hit F4 to open the batch compression dialog. Choose the same compression settings described above, while taking care to separate file groups that use different compression settings.

Command Line Parameters

ATI's compressonator provides some command line parameters to compress the textures:

thecompressonator -convert "specular.tga" "specular.dds" DXT1 -mipmaps 
thecompressonator -convert "diffuse.tga" "diffuse.dds" DXT1 -mipmaps 
thecompressonator -convert "diffuse_with_alpha.tga" "diffuse.dds" DXT5 -mipmaps

Converting From DDS to Common Image File Formats

This is trivial but slightly confusing on The Compressonator:

  • File Menu > Save Original
  • At the bottom of the dialog, below the file name input, select save as type. It may show DDS by default; don't be put off.
  • Select file format from BMP, PNG, or TGA (use TGA generally for Dark Mod.)
  • Make sure the filename you want is shown in the input box and click save.

See also

  • DDS creation for general, tool-independent information about DDS creation. Also, the original wiki page history of content now on this page may be found there.