How-To: All you ever wanted to know about DDS
Posted: 08 Mar 2010, 03:13
This article will show you how to convert textures for models into the DDS format, simply and easily, using free software.
What's DDS, and why should you use it?
DDS stands for "Direct Draw Surface". It is a texture format developed specifically for the needs of realtime 3D programs, such as games.
All commercial games use DDS; it is the standard format for realtime 3D applications because of the performance advantages it gives.
If you are here because you are interested in learning more about how to make content for realtime settings, either for games you'd like to program someday or as an artist, learning about DDS is mandatory.
2. DDS is handled by video cards, through their drivers, and has some major performance advantages, depending on which version of DDS is used:
A. DDS DXT1, while only allowing for 1-bit alpha (i.e., black or white pixels only), takes up 1/8th of the texture RAM on a video card, vs. formats like TGA and PNG.
B. DDS DXT3 and DXT5, which allow for compressed, 8-bit alpha, take up 1/4th of the texture RAM on a video card, vs. formats like TGA and PNG.
C. All DXT formats are pre-optimized in a number of ways, and generally operate a little faster than other formats.
3. DDS allows you to have a lot of control over how each mip level looks. TGA, PNG, etc. do not. Therefore, your textures can and will look different on different hardware, driver settings, etc., if you use other formats.
4. DDS looks "right" in UpSpring and in Spring itself; it was the graphics format UpSpring was designed to handle.
How do I convert my textures to DDS?
There are a large number of applications / plugins for doing this- this list is maybe a quarter of the programs available, but I've tested all of these (aside from the PSP plugin). All of the ones linked here are free, and the GIMP plugin is Open Source.
There is a plugin for GIMP. Source is provided, for users wanting to use this natively under Linux or other operating systems. This is almost as powerful as the Photoshop plugin, and is a powerful tool.
nVidia's Photoshop plugin. This is probably the best choice, if you have Photoshop and are a graphics guru. It is a very powerful and flexible tool.
This is an older version of the Photoshop plugin that is compatible with PaintShop Pro 9. I have never used this, and can't vouch for it, but there's a link.
ATi's Compressionator. This is a free tool available for download from AMD. It is a very useful tool both for compression and for previewing the mipmap levels post-compression.
DDS Converter 2.1. This is a free tool for compressing DDS files. It's a little unintuitive to set up, but it's one of the easiest tools to use, once you've configured it.
OK, I have this software or plugin, but it looks really complicated? What settings should I use?
There really aren't any "best" settings that work perfectly for all applications. DDS is powerful and flexible; that means that it can do a lot of things, but it also means it's pretty complicated.
That said, giving you, the newbie, that answer doesn't actually help you any. So, here's a practical workflow, using the Compressionator, which is probably the easiest of the available tools to use:
1. Open The Compressionator.
2. Click on File-->Open to select the image you want to compress.
3. Click on Compress-->DirectX Texture Compression to select the DDS compression settings.
4. On the left, there are radio buttons under Texture Format. Click on the radio button marked DXT5 (6/8 interpolated alpha), like this:
5. Click Compress. This may take a second or two, for a large texture.
6. Click on File-->Save Compressed to save the compressed image to your unittextures folder.
7. In UpSpring, open your model, click on the Mapping tab, click the appropriate browse button, and select the new texture. Don't forget to save your model after adding the texture. If the texture is "wrong", because you flipped it previously, you will need to flip it vertically in whatever paint program you used, save it, and re-convert it (or, if you're using the GIMP / Photoshop plugins, just open it with them, flip and re-save them).
That's it. The Compressionator is very easy to use, and produces a good result most of the time.
What's DDS, and why should you use it?
DDS stands for "Direct Draw Surface". It is a texture format developed specifically for the needs of realtime 3D programs, such as games.
All commercial games use DDS; it is the standard format for realtime 3D applications because of the performance advantages it gives.
If you are here because you are interested in learning more about how to make content for realtime settings, either for games you'd like to program someday or as an artist, learning about DDS is mandatory.
2. DDS is handled by video cards, through their drivers, and has some major performance advantages, depending on which version of DDS is used:
A. DDS DXT1, while only allowing for 1-bit alpha (i.e., black or white pixels only), takes up 1/8th of the texture RAM on a video card, vs. formats like TGA and PNG.
B. DDS DXT3 and DXT5, which allow for compressed, 8-bit alpha, take up 1/4th of the texture RAM on a video card, vs. formats like TGA and PNG.
C. All DXT formats are pre-optimized in a number of ways, and generally operate a little faster than other formats.
3. DDS allows you to have a lot of control over how each mip level looks. TGA, PNG, etc. do not. Therefore, your textures can and will look different on different hardware, driver settings, etc., if you use other formats.
4. DDS looks "right" in UpSpring and in Spring itself; it was the graphics format UpSpring was designed to handle.
How do I convert my textures to DDS?
There are a large number of applications / plugins for doing this- this list is maybe a quarter of the programs available, but I've tested all of these (aside from the PSP plugin). All of the ones linked here are free, and the GIMP plugin is Open Source.
There is a plugin for GIMP. Source is provided, for users wanting to use this natively under Linux or other operating systems. This is almost as powerful as the Photoshop plugin, and is a powerful tool.
nVidia's Photoshop plugin. This is probably the best choice, if you have Photoshop and are a graphics guru. It is a very powerful and flexible tool.
This is an older version of the Photoshop plugin that is compatible with PaintShop Pro 9. I have never used this, and can't vouch for it, but there's a link.
ATi's Compressionator. This is a free tool available for download from AMD. It is a very useful tool both for compression and for previewing the mipmap levels post-compression.
DDS Converter 2.1. This is a free tool for compressing DDS files. It's a little unintuitive to set up, but it's one of the easiest tools to use, once you've configured it.
OK, I have this software or plugin, but it looks really complicated? What settings should I use?
There really aren't any "best" settings that work perfectly for all applications. DDS is powerful and flexible; that means that it can do a lot of things, but it also means it's pretty complicated.
That said, giving you, the newbie, that answer doesn't actually help you any. So, here's a practical workflow, using the Compressionator, which is probably the easiest of the available tools to use:
1. Open The Compressionator.
2. Click on File-->Open to select the image you want to compress.
3. Click on Compress-->DirectX Texture Compression to select the DDS compression settings.
4. On the left, there are radio buttons under Texture Format. Click on the radio button marked DXT5 (6/8 interpolated alpha), like this:
5. Click Compress. This may take a second or two, for a large texture.
6. Click on File-->Save Compressed to save the compressed image to your unittextures folder.
7. In UpSpring, open your model, click on the Mapping tab, click the appropriate browse button, and select the new texture. Don't forget to save your model after adding the texture. If the texture is "wrong", because you flipped it previously, you will need to flip it vertically in whatever paint program you used, save it, and re-convert it (or, if you're using the GIMP / Photoshop plugins, just open it with them, flip and re-save them).
That's it. The Compressionator is very easy to use, and produces a good result most of the time.