Dealing with DDS files
Miscellaneous Forums/General Discussion/Dealing with DDS files
They seem to be the same size on the hard-disk as BMP files, the availvidmem() command isnt always reliable.
So how do you tell how much memory the DDS files are taking up in vidmem?
They should take up the same amount of video memory as their filesize, as far as I know.
The thing to remember about DDS textures is that - despite the impression people will give you - they're not a compressed format. DDS is just a format that *can* be compressed. There are probably a dozen ( maybe more ) different formats within that, and only four of those are compressed. So it's entirely possible that you're just saving an A8R8G8B8 DDS, which is naturally going to be pretty comparable in size to a 32bit BMP. If you want the textures compressed ( and be careful, because compression can be bad for some things - normal maps don't always compress well for example ) then you want the DXTC1,DXTC3 or DXTC5 variations on the DDS format.
I use Nvidia's DDS Photoshop plugin, but I don't know what you're using. It probably works with PSP too.
Whats that crap about them using 1/4th the Video memory as a regular texture.
Whats that crap about them using 1/4th the Video memory as a regular texture.
Yup, total crap [sarcasm] - DXT1 can take as low as 1/8 of VRAM compared to the non-DXTC texture:
http://en.wikipedia.org/wiki/S3_Texture_Compression
FOURCC Description Alpha premultiplied? Compression ratio Texture Type
DXT1 Opaque / 1-bit Alpha N/A 8:1 / 6:1 Simple non-alpha
DXT2 Explicit alpha Yes 4:1 Sharp alpha
DXT3 Explicit alpha No 4:1 Sharp alpha
DXT4 Interpolated alpha Yes 4:1 Gradient alpha
DXT5 Interpolated alpha No 4:1 Gradient alpha
oh ok thanks, I was probably saving them in the wrong DDS format. I just found a utility on the net for conversions.
Speaking of problems with DDS, does anyone else have problems with Nvidia's Photoshop plugin? Whenever I start using it to convert heightmaps to Normal maps, it gets stuck on that, and when I save any images without the conversion, the previews are messed up and the saved images come out all wrong too.
I didn't have any problems with the plugin and Photoshop 7 but since upgrading to CS2 I've noticed every now and then the preview has garble. The output files are fine though.
Anyway, with the 1/4th the size texture compression thing, I was wondering if the textures are stored in Video Memory in this 1/4th size, or are they uncompressed into raw data before entering video memory.
Serves me right for upgrading to CS2 then, I guess.
Yes, the textures are stored in video memory in 1/4 size as well. DDS is the format DirectX uses internally, so it doesn't need to uncompress them before putting them in video memory.
I don't know whether B3D will load mipmaps from DDS images ( which is an other useful feature they have) but it will definitely support the loading of them as compressed textures.
So an image library by the likes of DevIL just decompresses the DDS data into raw data, or does it manage the uploading of the compressed texture to video memory in its compressed state?