This article is still under construction!

What is DDS?

When looking through the TrueVision3D Forums you still see a lot of people using textures in JPEG, PNG, or even BMP with sizes of 280 x 476 or even 1830 x 3590 and for most people it seems to work, so why should I change to .dds?

DDS (Direct Draw Surface) is faster, smaller and perfectly suited to rendering in DirectX. It’s the native DX format and every other format gets converted to DDS on loading (longer loading times). It’s also the only format that has hardware compression support (JPEG gets decompressed on load time using the CPU). Now you may ask, “If it’s such a great format, why are people still working with other formats?”

There are mainly 3 reasons:
  • They don’t know about it
  • They don’t understand how to use it (it’s not easy at the beginning)
  • They have to use other formats because of their project (scientific data sets, …)

Reason one isn’t valid anymore, after reading the introduction, you know about DDS, so let’s come to argument two.

How do I use DDS?

First you need an application that either support export to *.dds or is able to convert to *.dds . There are several choices:

  • nVidias Texture Tools (Website)
    • Contains a 3DsMax Plug-In, an Adobe Photoshop Plug-In and some other useful tools (Windows Explorer Thumbnails for *.dds ,…)
  • DDS Plug-In for Paint.NET (Website)
  • DDS Plug-In for GIMP (Website)

As it is the most used out there I will concentrate on the nVidia DDS Exporter for Adobe Photoshop:

First you have to know, that all the advantages of the format have a disadvantage too (only a small one ;-)), every texture have to be 2^n in Width and Height ( for example: 128×256 or 1024×512 or 2×2).

Now let’s come to the different types of *.dds compression / formats that are available:

Compression formats:

  • DXT1
    • Opaque / 1-bit Alpha
    • Compression: 8:1 / 6:1
    • Simple non-alpha
  • DXT3
    • Explicit alpha
    • Compression: 4:1
    • Sharp alpha
  • DXT5
    • Interpolated alpha
    • Compression: 4:1
    • Gradient alpha
  • DXT5_NM
    • Special DXT5 for normal maps


As you see there are a lot of different compressions available for different usages. There are also a lot of uncompressed formats like 8:8:8:8 ARGB (32 bit) which are useful when you need to use GetPixel and SetPixel in TrueVision3D (only works with uncompressed textures).

Conclusion

This is only a short introduction to DDS, but you should really consider to use this format, convert your old JPG and PNG texture to DDS and you will notice a shorter loading time, less video memory, higher quality and performance.

There is also a Tutorial on the Wiki that uses the Microsoft DirectX Texture Tool and shows what an alpha layer is (Making DDS Textures for use with TrueVision ) it is a bit outdated, but still very useful.

And of course Zaknafein’s How to Correctly Generate Tangent-Space Normal Maps using the nVidia Texture Tools.

 
tutorialsarticlesandexamples/using_dds.txt · Last modified: 2013/11/22 13:32