Direct Draw Surface (DDS)?

Direct Draw Surface (DDS)?

Requests for features in the spring code.

Moderator: Moderators

User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Direct Draw Surface (DDS)?

Post by Agon »

I don´t know if this is supported. I don´t know if it is usefully for us. Many commercial games are using .dds.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

It is.
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Post by Agon »

Thanks for answer and are mipimap supported? And all formates?
And why is no one using this? They uses .png and .tga and some .jpeg "shit".

Edit:
Found out that ca is using .dds for the buildpics and some over things. But not for all.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

iirc Spring doesn't use the mipmaps...and some of the subformats (dx2 dx3 etc) don't work quite right.
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Post by Agon »

Peet wrote:iirc Spring doesn't use the mipmaps...and some of the subformats (dx2 dx3 etc) don't work quite right.
This means .dds for Spring has no feature and .tga or .png are better for Spring?
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

.dds works fine for the most part, and has the advantage of remaining compressed in the vram.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

I use DDS, some people just don't like it or that it's actually slower than using TGAs or some other format.

Personal preference, I guess.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

I have not seen any evidence to steer me from png.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Actually Spring uses mipmaps. Sorry, that wasn't apparently ever made clear... as for what file format is best, DDS is the fastest, TGA is the most accurate, and PNG is a close match with TGA, but with a smaller initial filesize.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'd argue png is also the easiest for the average joe to get their hands on and edit.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

DDS is also used for skyboxes in maps.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Agon wrote:Thanks for answer and are mipimap supported? And all formates?
And why is no one using this? They uses .png and .tga and some .jpeg "shit".

Edit:
Found out that ca is using .dds for the buildpics and some over things. But not for all.
Good DDS exporters are rare.
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Post by Agon »

I´m using Gimp + a .dds exporter that I found in the Internet. But the plugin is not really good. Saving is available for all formates and auto generation of mipmaps. But loading does not work correctly in Gimp.
If someone knows a good .dds plugin for gimp, please let me know.

To make it clear, which formates and compression can I use in .dds?
User avatar
LathanStanley
Posts: 1429
Joined: 20 Jun 2005, 05:16

Post by LathanStanley »

I did a big test on this way back when, posted screenies and everything..

maybe it was shear luck, maybe it was my hardware, hell, maybe it was god... I dunno,

but I got about 3% more FPS with TGA textures mapped on >300 on screen features, than I did with the exact same map, and features, mapped with exactly same x,y sized maps that were .dds ....

frankly, I believe that the TGA maps are more efficient with spring, until someone in the coding part of the game, figure out what line they are missing to get the .dds to work right...

and the TGA has far superior clarity on graphics...

the PNG, meh, its really not much of a tradeoff in any direction from TGA.

all in all, the greatest difference was about 3% and well, thats basically negligable.. take your pick on whatever you decide to use...

Facet count, and overall texturesize are what kill the engine on spring, not the image format.... :wink:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Facet count, and overall texturesize are what kill the engine on spring, not the image format....
DDS occupies far less memory than TGA, that is sort of the whole point of DDS, allowing you to fit more textures into the space that 1 single TGA texture would take up.
User avatar
LathanStanley
Posts: 1429
Joined: 20 Jun 2005, 05:16

Post by LathanStanley »

AF wrote:
Facet count, and overall texturesize are what kill the engine on spring, not the image format....
DDS occupies far less memory than TGA, that is sort of the whole point of DDS, allowing you to fit more textures into the space that 1 single TGA texture would take up.
I stuffed over 300 megs of textures into my videoram and it hardly made a dent in performance, and the dds was actually worse..

again, something with dds is broke, I have yet to find a difference using it... but I do understand your point, it "theoretically and mathematically", SHOULD work that way... I have no idea why it dosen't...

edit: I suppose I should peak the 512mb ram I have on the card, and see if it makes a difference then... :?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

It's possible that, upon load, your card automatically compresses the image. Only way to find out is to load the DXT killer image (which has a different color for each pixel within a palette block). Also keep in mind that depending on the bandwidth of your graphics bus you may need to go some way over the limit, not just right over it.

Generally the difference between DXT and RGB is not visible unless you compress effect images like normal maps or use the wrong DXT on images with alpha. The memory footprint is 1/6th of an uncompressed image.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I think that the main point here is that I need to go look at the mipmap code stuff again, something is seriously wrong here if DDS is not out-performing all other file formats by a wide margin, frankly :?
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Post by Agon »

Would be good to get a full support for .dds.

I did some compression tests and found out that the best compression has .dds with compression type ATI1 and DXT1.
I don´t know what the format ATI* means maybe a compression type from ati.
Could not test DXT2 and 4 because there are not available.

Mipmaps: 10
Size: 512*512
Colors: RGBA

Name size
ATI1 170,8 kb
ATI2 341,5 kb
DXT1 170,8 kb
DXT3 341,5 kb
DXT5 341,5 kb

.png 348,0 kb
.tga 776,3 kb
.xcf 2,7MB

Texture used:
Image
Copyrights goes to me! License: GPL v3.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Look at the right side, you probably see the hard border yourself.

If you want to use DDS I'd use the format with the least loss in color/alpha information (DXT3?).
Post Reply

Return to “Feature Requests”