An FAQ on DDS files for Windows users
Posted: 28.03.2005, 18:07
Hello Celestians,
I have written the following for Windows users like myself who know nothing about image manipulation but are trying to learn how to use .DDS textures in Celestia.
For many of you, what I have written will seem like the bleeping obvious. But it wasn't bleeping obvious to me. There is plenty of information out there, but it's hard to find and is not available in one single place. I therefore decided to write this FAQ in simple language to save others the fuss and bother that I went through.
For the record, I am using Windows XP with a Radeon 7000 graphics card.
Please note: I'm not an expert, and if anyone reading this FAQ sees anything wrong or foolish, or knows some better alternatives to my suggestions, please say so, and I'll edit them into the post.
Introduction
I intend the following to be a useful FAQ for the computer illiterate. However, I'm assuming that readers have a basic knowledge of how to make changes to Celestia - where to put texture files, how to edit an .ssc file, etc. If you don't know, there is plenty of documentation available at the Celestia Motherlode - http://www.celestiamotherlode.net/catal ... ation.html
What is a .DDS file?
DDS files are a special type of image file used by some graphics cards.
Advantages
They can give you more detailed textures and Celestia can load them faster than JPG images, making the program run smoother.
For example, my graphics card can only handle .JPG files up to a maximum size of 2048x1024 pixels. Anything bigger than that causes Celestia to crash or move impossibly slowly. But with .DDS textures I can go up to 8192x4096 pixels before this happens.
Disadvantages
Converting from JPG to DDS format results in a loss of image quality; the difference manifests primarily in the depth of colour. The differences are small and may not be noticed by the casual user, but if you take your textures seriously this may be a problem.
Although .DDS textures load quickly when being used by Celestia, they take up more disk space than other file formats and load slowly in programs that don't use your graphics card; so, when looking at them with image viewing software, you can expect some long pauses as your computer loads the image.
Will .DDS files work on my graphics card?
They were designed for NVidia cards, but some ATI cards can use them as well.
Celestia can tell you whether or not your card supports .DDS textures. Go to the 'Help' menu and select 'OpenGL Info'. You will be presented with list of OpenGL extensions that your card is fitted with; if "GL_EXT_texture_compression_s3tc" is present, your card supports .DDS.
How can I view .DDS files in Windows?
The major problem is that Windows doesn't know what .DDS files are. This means that none of the standard Microsoft graphics programs can open them, and they won't show as thumbnails in your folders.
However, two freeware programs are available to deal with this problem.
First, you should definitely download IrfanView. - http://www.irfanview.com/ - This is a simple program that enables you to view and resize graphics files, including .DDS files. Using this program you can look at the files without having to start up Celestia - which is handy. Warning: although DDS files load very swiftly in Celestia, they take a long time to load into a graphics viewer - it will take several minutes for a 16k DDS file to load into IrfanView. Don't look at them unless you really want to.
Second, you might want to go to this NVidia website - http://developer.nvidia.com/object/nv_t ... tools.html - and download the DDS Thumbnail Viewer. This is a program that will enable .DDS textures to show up as thumbnails when you're looking at folders in Windows Explorer. Another warning: it takes the computer ages to produce these thumbnails, so long that you may well get annoyed and switch the folder back to normal icon view. It's frustratingly slow, but I guess this may still be a useful utility at times; you decide.
How do I install .DDS textures in Celestia?
This should present no difficulties to anyone experienced in Celestia, but if you're new to it, the following should help:
If you simply want the .DDS texture to be the default one, the simplest method is to place the texture into the 'highres' folder, making sure to rename it by the name of the planet or moon in question (e.g. 'earth.dds', 'europa.dds' etc. Then, once Celestia is launched, type a capital 'R', to select the textures in the 'highres' folder.
If you want to be able to switch between different textures, the simplest method is to install the .DDS as an Alternate Surface. Using a text editor, simply create a new .ssc file containing code like the following and place it in your 'extras' folder.
This will enable you to compare your textures by right-clicking on the planet in question and selecting from a list of Alternate Surfaces.
How can I convert .JPG files to .DDS?
You may want to convert some of your .JPG files into .DDS to speed up Celestia. To do this you need special software, and you need to understand the exact kind of compression necessary.
The Software
There are various freeware programs that can convert files to .DDS. I have described them in order of user-friendliness.
Adobe Photoshop has a plugin that enables you to save files in DDS format - download it from here - http://developer.nvidia.com/object/nv_t ... tools.html
For non-Photoshop users, The ATI Compressonator is the best option for the computer illiterate. It is easy to use (although the resulting image quality may be less impressive than other available software). Go to this website - - http://www.ati.com/developer/compressonator.html - and download ATI's 'Compressonator' [sic]. This program does many things but all that matters for our purposes is that it converts JPG and PNG files to DDS.
The method is simple. Using Compressonator, open a JPG or PNG file. From the 'Compress' menu, select 'DirectX Texture Compression'. You must then choose your compression method from a list (see below for details; normally, you'll want 'DXT1'. The compression process take a while to complete but once it's done you'll get a split screen with the JPG file on the left and a new DDS on the right. Now go to 'File' and select 'Save Compressed'. This will save the DDS version of your original JPG.
DevIL is an Open Source graphics program downloadable from this website - http://openil.sourceforge.net/ Again, it is considered fast the resulting image quality is not perfect. This program is considered the best for handling the largest textures.
NVidia's compression software is considered to produce the best quality DDS images. However, it runs only from a command line (there is no Windows interface), so it might scare off those inexperienced in computing. Also, there is a size limit on files that can be handled. To download it, go to this website - http://developer.nvidia.com/object/nv_t ... tools.html - and download ' DDS Utilities'
Choosing the Correct Compression Method
The compression utilities all require you to choose a compression type. There are three basic types: DXT1, DXT3, and DXT5 (sometimes others in between are listed too). The difference is in whether an 'Alpha Channel' (a separate grayscale layer that can be used to define such things as transparency and specularity) is saved with the file.
If you are converting an ordinary planetary surface texture, you don't need an alpha channel, so choose DXT1. This will save the file without an alpha channel, thus saving space.
The alternative methods will save an alpha channel. DXT3 saves the file with an uncompressed lower quality alpha channel; DXT5 saves it with a compressed but higher quality alpha channel (the file size is the same for both formats). You will only need to use these formats if you are (a) saving a cloud map (because cloud maps use the alpha channel to define the transparent sections of the map), (b) saving a texture that belongs to a 3d model (for the same reason), or (c) saving a texture with specularity defined in the alpha channel.
Normalmaps: Experienced Celestia users reccomend that for Normalmaps you use DXT5 because the high quality of that format is necessary (but PNG is considered best for these textures). See the more detailed postings below this FAQ.
What is a mip-map?
Mip-maps are a series of smaller versions of the texture; they are stored within your DDS file and have the effect of smoothing the transitions as you move toward a texture. Experienced Celestia users reccomend that you always create mipmaps when generating a DDS file (see the more detailed postings below this FAQ). Most compression software includes a function that enables you to create mipmaps (for example, the ATI Compressonator has a dialogue box for creating mipmaps on the main page).
Advantages of mipmaps
Mipmaps enhance the performance of your textures by lowering the amount of scaling that your computer has to do.
In addition, they remove a flickering effect of the pixels that can be observed when zooming in or out of a large texture.
Disadvantages of mipmaps
The only disadvantage of mipmaps is that they increase the size of the image file. However, the increase is only about 10%, so it is almost always worth it for the gains in performance.
Important
You should create the mip-maps before you convert the file to DDS; this results in files not much bigger than an ordinary DDS. Do not create mip-maps after the conversion to DDS: this results in huge, unwieldy files.
Can I convert lots of textures without having to do each one separately?
Yes. Some compression utilities permit batch compression. You can select numerous files in a folder and request that each be converted to .DDS. This obviously saves a lot of bother; for example it enables you to swiftly convert the hundreds of small images in a virtual texture.
The following describes how to do this using ATI's Compressonator (other utilities will work differently).
From the 'File' menu, select 'Batch Compress'. Find the folder in which your textures are stored. Select all the ones you want to compress (you can draw a box around them to highlight many files; or, you can click on files while holding down the 'Shift' key). Use the dialogue boxes at the bottom to choose a conversion to .DDS (click the 'Options' button to choose the required DXT format). Make sure you also choose the correct folder to save your converted files to. Then click 'Compress'.
How can I create and edit .DDS files using Windows?
You shouldn't. It's much better to create and edit files in another format and then convert to DDS as a final step.
However, if you really want to, your basic problem will be that the standard Windows tools don't enable you to edit DDS textures. You'll need to download new software.
XnView v1.80.3 allows you to write .DDS files. Download from this website: http://www.xnview.com/
Note: some Celestia users have found problems with this software - consult this thread: http://www.celestiaproject.net/forum/viewtopic.php?t=8067
PhotoShop and Paint Shop users: The NVidia website - http://developer.nvidia.com/object/nv_t ... tools.html - offers a plugin for Adobe PhotoShop and Jasc PaintShop Pro that allows you to edit and create .DDS files.
Gimp: There is not yet a Windows executable plugin for DDS.
Final Request
As stated above, this is a preliminary FAQ written by a novice for novices. If anyone wiser can add extra advice, please do so and I'll edit it in
I have written the following for Windows users like myself who know nothing about image manipulation but are trying to learn how to use .DDS textures in Celestia.
For many of you, what I have written will seem like the bleeping obvious. But it wasn't bleeping obvious to me. There is plenty of information out there, but it's hard to find and is not available in one single place. I therefore decided to write this FAQ in simple language to save others the fuss and bother that I went through.
For the record, I am using Windows XP with a Radeon 7000 graphics card.
Please note: I'm not an expert, and if anyone reading this FAQ sees anything wrong or foolish, or knows some better alternatives to my suggestions, please say so, and I'll edit them into the post.
Introduction
I intend the following to be a useful FAQ for the computer illiterate. However, I'm assuming that readers have a basic knowledge of how to make changes to Celestia - where to put texture files, how to edit an .ssc file, etc. If you don't know, there is plenty of documentation available at the Celestia Motherlode - http://www.celestiamotherlode.net/catal ... ation.html
What is a .DDS file?
DDS files are a special type of image file used by some graphics cards.
Advantages
They can give you more detailed textures and Celestia can load them faster than JPG images, making the program run smoother.
For example, my graphics card can only handle .JPG files up to a maximum size of 2048x1024 pixels. Anything bigger than that causes Celestia to crash or move impossibly slowly. But with .DDS textures I can go up to 8192x4096 pixels before this happens.
Disadvantages
Converting from JPG to DDS format results in a loss of image quality; the difference manifests primarily in the depth of colour. The differences are small and may not be noticed by the casual user, but if you take your textures seriously this may be a problem.
Although .DDS textures load quickly when being used by Celestia, they take up more disk space than other file formats and load slowly in programs that don't use your graphics card; so, when looking at them with image viewing software, you can expect some long pauses as your computer loads the image.
Will .DDS files work on my graphics card?
They were designed for NVidia cards, but some ATI cards can use them as well.
Celestia can tell you whether or not your card supports .DDS textures. Go to the 'Help' menu and select 'OpenGL Info'. You will be presented with list of OpenGL extensions that your card is fitted with; if "GL_EXT_texture_compression_s3tc" is present, your card supports .DDS.
How can I view .DDS files in Windows?
The major problem is that Windows doesn't know what .DDS files are. This means that none of the standard Microsoft graphics programs can open them, and they won't show as thumbnails in your folders.
However, two freeware programs are available to deal with this problem.
First, you should definitely download IrfanView. - http://www.irfanview.com/ - This is a simple program that enables you to view and resize graphics files, including .DDS files. Using this program you can look at the files without having to start up Celestia - which is handy. Warning: although DDS files load very swiftly in Celestia, they take a long time to load into a graphics viewer - it will take several minutes for a 16k DDS file to load into IrfanView. Don't look at them unless you really want to.
Second, you might want to go to this NVidia website - http://developer.nvidia.com/object/nv_t ... tools.html - and download the DDS Thumbnail Viewer. This is a program that will enable .DDS textures to show up as thumbnails when you're looking at folders in Windows Explorer. Another warning: it takes the computer ages to produce these thumbnails, so long that you may well get annoyed and switch the folder back to normal icon view. It's frustratingly slow, but I guess this may still be a useful utility at times; you decide.
How do I install .DDS textures in Celestia?
This should present no difficulties to anyone experienced in Celestia, but if you're new to it, the following should help:
If you simply want the .DDS texture to be the default one, the simplest method is to place the texture into the 'highres' folder, making sure to rename it by the name of the planet or moon in question (e.g. 'earth.dds', 'europa.dds' etc. Then, once Celestia is launched, type a capital 'R', to select the textures in the 'highres' folder.
If you want to be able to switch between different textures, the simplest method is to install the .DDS as an Alternate Surface. Using a text editor, simply create a new .ssc file containing code like the following and place it in your 'extras' folder.
Code: Select all
AltSurface "Earth DDS texture" "Sol/Earth"
{
Texture "earth_dds_texture.dds"
}
This will enable you to compare your textures by right-clicking on the planet in question and selecting from a list of Alternate Surfaces.
How can I convert .JPG files to .DDS?
You may want to convert some of your .JPG files into .DDS to speed up Celestia. To do this you need special software, and you need to understand the exact kind of compression necessary.
The Software
There are various freeware programs that can convert files to .DDS. I have described them in order of user-friendliness.
Adobe Photoshop has a plugin that enables you to save files in DDS format - download it from here - http://developer.nvidia.com/object/nv_t ... tools.html
For non-Photoshop users, The ATI Compressonator is the best option for the computer illiterate. It is easy to use (although the resulting image quality may be less impressive than other available software). Go to this website - - http://www.ati.com/developer/compressonator.html - and download ATI's 'Compressonator' [sic]. This program does many things but all that matters for our purposes is that it converts JPG and PNG files to DDS.
The method is simple. Using Compressonator, open a JPG or PNG file. From the 'Compress' menu, select 'DirectX Texture Compression'. You must then choose your compression method from a list (see below for details; normally, you'll want 'DXT1'. The compression process take a while to complete but once it's done you'll get a split screen with the JPG file on the left and a new DDS on the right. Now go to 'File' and select 'Save Compressed'. This will save the DDS version of your original JPG.
DevIL is an Open Source graphics program downloadable from this website - http://openil.sourceforge.net/ Again, it is considered fast the resulting image quality is not perfect. This program is considered the best for handling the largest textures.
NVidia's compression software is considered to produce the best quality DDS images. However, it runs only from a command line (there is no Windows interface), so it might scare off those inexperienced in computing. Also, there is a size limit on files that can be handled. To download it, go to this website - http://developer.nvidia.com/object/nv_t ... tools.html - and download ' DDS Utilities'
Choosing the Correct Compression Method
The compression utilities all require you to choose a compression type. There are three basic types: DXT1, DXT3, and DXT5 (sometimes others in between are listed too). The difference is in whether an 'Alpha Channel' (a separate grayscale layer that can be used to define such things as transparency and specularity) is saved with the file.
If you are converting an ordinary planetary surface texture, you don't need an alpha channel, so choose DXT1. This will save the file without an alpha channel, thus saving space.
The alternative methods will save an alpha channel. DXT3 saves the file with an uncompressed lower quality alpha channel; DXT5 saves it with a compressed but higher quality alpha channel (the file size is the same for both formats). You will only need to use these formats if you are (a) saving a cloud map (because cloud maps use the alpha channel to define the transparent sections of the map), (b) saving a texture that belongs to a 3d model (for the same reason), or (c) saving a texture with specularity defined in the alpha channel.
Normalmaps: Experienced Celestia users reccomend that for Normalmaps you use DXT5 because the high quality of that format is necessary (but PNG is considered best for these textures). See the more detailed postings below this FAQ.
What is a mip-map?
Mip-maps are a series of smaller versions of the texture; they are stored within your DDS file and have the effect of smoothing the transitions as you move toward a texture. Experienced Celestia users reccomend that you always create mipmaps when generating a DDS file (see the more detailed postings below this FAQ). Most compression software includes a function that enables you to create mipmaps (for example, the ATI Compressonator has a dialogue box for creating mipmaps on the main page).
Advantages of mipmaps
Mipmaps enhance the performance of your textures by lowering the amount of scaling that your computer has to do.
In addition, they remove a flickering effect of the pixels that can be observed when zooming in or out of a large texture.
Disadvantages of mipmaps
The only disadvantage of mipmaps is that they increase the size of the image file. However, the increase is only about 10%, so it is almost always worth it for the gains in performance.
Important
You should create the mip-maps before you convert the file to DDS; this results in files not much bigger than an ordinary DDS. Do not create mip-maps after the conversion to DDS: this results in huge, unwieldy files.
Can I convert lots of textures without having to do each one separately?
Yes. Some compression utilities permit batch compression. You can select numerous files in a folder and request that each be converted to .DDS. This obviously saves a lot of bother; for example it enables you to swiftly convert the hundreds of small images in a virtual texture.
The following describes how to do this using ATI's Compressonator (other utilities will work differently).
From the 'File' menu, select 'Batch Compress'. Find the folder in which your textures are stored. Select all the ones you want to compress (you can draw a box around them to highlight many files; or, you can click on files while holding down the 'Shift' key). Use the dialogue boxes at the bottom to choose a conversion to .DDS (click the 'Options' button to choose the required DXT format). Make sure you also choose the correct folder to save your converted files to. Then click 'Compress'.
How can I create and edit .DDS files using Windows?
You shouldn't. It's much better to create and edit files in another format and then convert to DDS as a final step.
However, if you really want to, your basic problem will be that the standard Windows tools don't enable you to edit DDS textures. You'll need to download new software.
XnView v1.80.3 allows you to write .DDS files. Download from this website: http://www.xnview.com/
Note: some Celestia users have found problems with this software - consult this thread: http://www.celestiaproject.net/forum/viewtopic.php?t=8067
PhotoShop and Paint Shop users: The NVidia website - http://developer.nvidia.com/object/nv_t ... tools.html - offers a plugin for Adobe PhotoShop and Jasc PaintShop Pro that allows you to edit and create .DDS files.
Gimp: There is not yet a Windows executable plugin for DDS.
Final Request
As stated above, this is a preliminary FAQ written by a novice for novices. If anyone wiser can add extra advice, please do so and I'll edit it in