hi,
currently we have many different texture formats. I want to consolidate this, because of better handling. I thought of converting all current Textures to DDS.
Wikipedia:
http://en.wikipedia.org/wiki/S3_Texture_Compression
benefits:
- DDS is a raw surface dump and can be loaded directly into the graphiccard staying compressed in video ram
- it supports different compressions
- it supports different kinds of alpha channels (partial alpha if you use DXT2-5)
- it supports prcalculated Mipmaps in the same file
- Ogre uses a custom DDS codec and works also for OpenGL and Linux
- OpenGL + Linux Mipmap supported
drawbacks:
- real benefit only for DirectX (Windows) Users, because as far as I know it don't work with OpenGL (windows/linux). Using OpenGL, it must be decoded as all other Fileformats (png, tga, jpg).
addition:
Using S3 (dxt) Texture Compression also in OpenGL - NVIDIA document
Quote:
steve (ogre developer):Thinking about it, our DDSCodec is only used for GL anyway since we short-circuit it for loading DDS in DirectX, since the DDS format is a raw surface dump and can be loaded directly into D3D with no decoding.
There are several types of DXT compression offered by DirectX:
DXT1
0 or 1 bit alpha
DXT2
Explicit 4-bit alpha, color data is premultiplied by alpha – UnrealEd does not use this format
DXT3
Explicit 4-bit alpha, not premultiplied
DXT4
Interpolated alpha, color data is premultiplied by alpha – UnrealEd does not use this format
DXT5
Interpolated alpha, not premultiplied
Which DXT Compression to Use?
Obviously, there are some trade-offs between the different formats which make them better or worse for different types of images. Some general rules of thumb for good use of DXT textures are as follows:
1. If your image has no alpha, use DXT1 compression. Using DXT3/5 will double your image size over DXT1 and not gain anything.
2. If your image has 1-bit (on or off) alpha information, use DXT1 with one-bit alpha. If the DXT1 image quality is too low and you don't mind doubling image size, use DXT3 or DXT5 (which one doesn't matter, they'll give the same results).
3. If your image has smooth gradations of alpha (fading in/out slowly), DXT5 is almost certainly your best bet, as it will give you the most accurate transparency representation.
4. If your image has sharp transitions between multiple alpha levels (one pixel is 100%, the next one is 50%, and another neighbor is 12%), DXT3 is probably your best bet. You may want to compare the alpha results in DXT1, DXT3 and DXT5 compression, however, to make sure.
Specification:
http://oss.sgi.com/projects/ogl-sample/ ... n_s3tc.txt
NVidia has some Tools on their Homepage to produce DDS files from Commandshell or Photoshop.
http://developer.nvidia.com/object/nv_t ... tools.html
The GIMP also has a plugin which can handle DXT-compressed DDS images.
Please tell me what you think of it.
This is a talk...so please write your opinions down.
regards
SiENcE