Game Editing > idTech Editing Hints & Tips

Custom DDS textures showing as 'black'

(1/1)

kat:
If you've got some custom textures which need their DDS counterparts doing you may (have) run into this problem where textures appear 'black' in both the editor and the game. This happens because the wrong compression algorithm has been used on one of the images; usually the normalmap is at fault because it uses a 'special' algorithm that only ATI's Compressonator can process, using anything else tends to 'black' out the images when used.

It's best to use the command prompt to process the normalmap so you're using exactly the same settings id software used for their assets; using the Compressonators interface may introduce settings that are not needed or one that just interfere with the 'base' settings.

DDS settings for normalmaps
The settings used for DDS compressing the normalmap are;


--- Code: ----convert "[b]normal.tga[/b]" "[b]normal.dds[/b]" RxGB +red 0.0 +green 0.5 +blue 0.5 -mipmaps
--- End code ---

"normal.tga" and "normal.dds" refer to the file path locations and name of the assets loaded as a tga and then saved as a dds;


--- Code: ---C:\\assets\textures\walls\wall_trim_normal.tga
C:\\assets\textures\walls\dds\wall_trim_normal.dds
--- End code ---

So you can load an image from one location and save it to another.

Command Prompt
If you've never used the Command Prompt before it's used as follows; this assumes a Windows XP machine with the Compressonator installed to C:Program FilesATIThe Compressonatorthecompressonator.exe


--- Code: ---Start » Programs » Accessories » Command Prompt (WinXP)
--- End code ---

The default directory is usually shown as;

--- Code: ---C:\\Documents and Settings\[user]
--- End code ---
That needs to be changed so it's showing the folder in which the Compressonator program is sitting;


--- Code: ---Enter 'cd..', without the quotes, twice (or the number of times required to get back to the root C: drive)
--- End code ---

Once there we need to travel up the directory structure to get to the correct folder like so;

--- Code: ---cd Program Files [return/enter]
cd ATI [return/enter]
cd The Compressonator [return/enter]
--- End code ---

This will bring us to the root folder of the Compressonators installation;


--- Code: ---C:\\Program Files\ATI\The Compressonator\>
--- End code ---

And have us ready to use the DDS settings mentioned above to process the normalmaps. This is done as follows. At the command prompt, type the following;


--- Code: ---thecompressonator.exe -convert "[file/path/to/load]normal.tga" "[file/path/to/save]normal.dds" RxGB +red 0.0 +green 0.5 +blue 0.5 -mipmaps
--- End code ---

If a file path isn't set for the save location the program defaults to saving in the Compressonators own folder.

Other DDS compression settings

* Diffuse - no alpha = DXT1
* Diffuse - alpha = DXT3
* Specular - no alpha = DXT1
* Specular - alpha = DXT3
* Height - no alpha = DXT1
* Height - alpha = DXT3 Written at command prompt like so;


--- Code: ---thecompressonator.exe -convert "[file/path/to/load]diffuse.tga" "[file/path/to/save]diffuse.dds" DXT1 -mipmaps

thecompressonator.exe -convert "[file/path/to/load]diffuse_alpha.tga" "[file/path/to/save]diffuse_alpha.dds" DXT3 -mipmaps
--- End code ---

Specular and Height maps are treated in the same way as the diffuse.

Navigation

[0] Message Index

Go to full version