What ARE DDS files?
Blitz3D Forums/Blitz3D Beginners Area/What ARE DDS files?
| ||
Just out of curiousity, i've been working with PNG JPG and BMP files for ever when writing games the Obvious question i actually dont know is What are DDS textures, whats their advantages and what should i use them for? i've also noted that DDS files can be loaded into BSP files.. but i dont know what this difference are. :-( |
| ||
snippet from wikipedia: The Microsoft DirectDraw Surface (.dds) file format is used to store textures and cubic environment maps, both with and without mipmap levels. This format can store uncompressed and compressed pixel formats, and is the preferred file format for storing DXTn compressed data. This file format is supported by the Microsoft DirectX Texture tool (DXTex Tool), as well as some third party tools, and by the Direct3D extensions (D3DX) library. in short, DDS textures take less space im ram (usually 1/4 to 1/6 of the original size, depends on the texture though) but still look pretty good. |
| ||
Compressed Textures Microsoft DirectDraw Surface (.dds) file format. up 8:1 compression. will work with OpenGL as well: The DXT formats are a standard part of the Direct3D API and are available for the OpenGL API through the ARB_texture_compression and GL_EXT_texture_compression_s3tc extensions. S3TC because it was S3 graphics that created ito show off their awesome Savage3D cards. (they actually werent that bad, I had one but Nvidia/ATI has since dominated the market) |
| ||
I don't get it... Isn't *.png a compressed format as well. Whats the new thing with .dds then? Is it faster? |
| ||
.png .jpg etc are compressed image formats. .dds is a compressed texture. this means that your video Card is handling the decompression/displaying of it. |
| ||
png & jpg textures will be decompressed in your video cards ram. DDS won't. |
| ||
@mark: will readpixel&writepixel be possible with DDS textures? |
| ||
In which way Blitz3D can use DDS textures? |
| ||
In which way Blitz3D can use DDS textures? Like you would use any other textures for your models - Fredborg even made a tool that can replace .TGA references inside old (before .DDS support made) .B3D models to .DDS so that when you load a model it automatically uses compressed textures instead of .TGA. .DDS isn't the best choice for everything, like smooth gradients and menu background images and such. But I'd recommended using it for game model/enviroment textures. |
| ||
..same as JPG, PNG...load and apply them on to model.. |
| ||
thanks guys. That clears things up |
| ||
You cannot use Writepixel etc with dds textures since TextureBuffer(dds_texhandle) will always return zero. IMHO the most fantastic use of the new DDS textures are masked textures. Unlike the blocky contours of masked BMP etc. masked DDS will use a bezier curve for the mask outline. In short: it looks much better. All you have to do is save it as DXT3 or DXT5 with alpha information (for photoshop users: alpha not on an additional channel, but as "unpainted" pixels on the standard RGB channels, aka checkerboard-nothing shine trough). Then simply load it with the mask flag. This also fixes the "fade to black" outline artefacts seen with black masked BMPs aso. |
| ||
"You cannot use Writepixel etc with dds textures since TextureBuffer(dds_texhandle) will always return zero." this would be awesome if mark could enable this... |
| ||
Remember they are hanging around in compressed format in the Vram... |
| ||
Yup, you'd have to uncompress it, do the pixelstuff and then re-compress it... that would be slow. If you need textures with WritePixel capabilities just don't use compressed format. |
| ||
but thats bad, cause i have several big lightmaps (1024x1024, nearly 10 of it) - and they are eating up loooots of vram. as DDS this is no problem. at least readpixel should work. then i could access the lightmaps for proper lighting of my characters. |
| ||
t3K|Mac, you can always make half-size (actually 1/4) duplicates (512*512), load them as non-compressed, and use them for reading the light info. Together with compressed 1K maps you still save 75% VRAM compared to your current situation / non-compressed 1K lightmaps. [if my calculations are correct: big lightmaps DXTCd are 1/8 of original size, and 512 "dummy" lightmaps are 1/4 of the original size) |
| ||
this is a good point. never thought of this.... sometimes its just too simple to check it out by myself ;). thanks man. |
| ||
is it me but is the DSS textures making the 3D world render quicker too?? im gaining a few extra FPS out of my written games just by converting my jpg bmp to DDS alone! |
| ||
Its faster as the upload time from RAM to VRAM is shorter due to the lower size. (or because they don't need any uploading at all because the VRAM isn't used to the same amount as with uncompressed) |
| ||
well i guess im going straight too DSS then!! no mucking about! lol... the other textures work as normal too dont they? providing i dont need to write to them in anyway |
| ||
Maybe dds is not the best choice for lightmaps. Cause (not sure if that is possible at all) you need to save a lightmap dds as a lossless compressed texture. This way it won't be that much smaller than a bmp in Vram. When you use lossy textures for the lightmap (eg. the photoshop plugin default settings for dxt1) then there will be artefacts of bleeding edges and/or wrong colors on edges, as well as the common jpg-ish compression artefacts that are interrupting smooth gradients. |
| ||
thats ok for me. considering the little amount of ram used, i can live with those artefacts. |