Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

TGA files are used for some of the graphics in NWN. It is a uncompressed format which means no quality loss but a huge amount of speed and huge files when the image dimensions are even moderately big.

It has the lowest the lowest priority of texture formats usually, outranked by PLT then DDS (ie filename.dds will load over filename.plt which loads over filename.tga) but if you have the same DDS and TGA file at the same "level" the TGA loads first - see Content Load Order for more information.

File Format

NWN supports uncompressed 32bit TGA files with alpha. They must be powers of 2, such as 32x32 or 128x1024.

These are the sizes with filesize - because TGA is not compressed it gets big, fast. The larger sizes also tend to lag when loading by the engine due to the generation of mipmaps and transfer to the GPU inefficiently. See recommendations below - pretty much don't use TGA!

They can be uncompressed or compressed with RLE compression (using Bottom Left, not sure about Top Left). GIMP for instance can output compressed RLE which is up to half the size for some icons/textures.

For anything other than game icons (GUI icons, feats, spells, scrolls, and items) it is highly recommended to use DDS instead.

Image DimensionsUncompressed Image Dimensions TGA File SizeNotes
32x324KBGame's default (now awful) icon size (eg; feats, spells)
64x6416KB
128x12864KB
256x256256KB

Maximum limit of certain shiny water effects. Retaining TGA for this might be advisable to improve quality slightly.

512x5121MB
1024x10244MB
2048x204812MB

...

The TGA file format was used by Bioware to retain quality and compatibility due to the very early introduction of DDS. Therefore it got used for a large portion of the original game files. Once Hordes of the Underdark came around most usual textures were made in DDS only or original TGA ones were converted to DDS.

It might have at the time retained some quality - especially on tiny 32x32 icons - that DDS would have lost.@~85

Nowadays DDS should be used in 99% of cases. A higher quality DDS file scaled down by the engine or mipmapped to a suitable size is much better looking than the slow loading of a smaller dimension TGA. IE a 256x256 inventory icon in DDS looks and performs better than an 128x128 TGA, especially with the UI scaling nowadays. The fact that 256x256 DDS is 85KB but is 4x the pixels of the 128x128 64GB TGA also helps - a huge increase in pixels at a minimum increase of filesize!

It would be recommended if you did use DDS to include PNG or TGA source files, possibly of a higher resolution then the DDS, in case you need to rescale them later. You can also not load DDS files into the new NUI system so PNG equivalents is a good idea if they will be used in such a way (generally icons).

The only uses that still require TGA:

.

Due to qwirks with the game engine this is a list of suitable uses of TGA:

  • Icons - primarily because of use for NUI and in the case of inventory icons that TGA files need to be present to even be recognised as valid, and also this assists the toolset (although that doesn't resize icons).
    • GUI icons
    • Feats
    • Spells
    • Inventory icons
  • Definition files for PLT files, The definitions for PLT files such as pal_skin01.tga used by the game, since these are read bit-by-bit and DDS may lower the quality (or does DDS even load for them?).

There may be other things, but well, that needs testing.

  • for toolset and chargen

DDS should be used for most everything else.

See also See Textures for a full use case breakdown between formats.