Page 1 of 2

Texture formats - why tga?

Posted: 22 Aug 2006, 00:04
by jcnossen
I know this caused a lot of problems already, but I have to add some facts to the discussion, because I wouldn't like to see a lot of bandwidth and HD space wasted because of this.

SJ already said in another thread that DDS would be the best format because it is smaller in game, but if you really insist on not using it for some reason, don't use TGA!

TGA is uncompressed and about the biggest it can get. Better choose PNG if you don't want DDS, or JPG so you can set compression ratio like you want. PNG is lossless, so you are guaranteed to have the same quality as TGA, but with much smaller filesize.

The DDS artifacts are usually very small too (also depending on which DDS compression you choose), so there are usually no arguments not to choose it. If the differences are really huge, there has to be a bug involved somewhere, and it should be fixed...

Posted: 22 Aug 2006, 00:10
by AF
aside from all that TGA's do get compressed when you put them in the sdz/7.

But yah DDS.

Posted: 22 Aug 2006, 01:06
by Snipawolf
I went from like a 15kb tex (tga) to a 4kb one with DDS, DDS ftw!

Posted: 22 Aug 2006, 01:09
by HAARP
AF wrote:aside from all that TGA's do get compressed when you put them in the sdz/7.
That's nothing compared to the image-specific compression PNG does

Posted: 22 Aug 2006, 03:20
by AF
Yah png's rock

Posted: 22 Aug 2006, 03:28
by Argh
I was never able to get PNGs to render correctly in Spring, but that was awhile ago, and the library support may now be working well enough that they'll work just fine. Only DDS and TGAs passed all my tests, but as I said, this may be outdated information now.

Posted: 22 Aug 2006, 04:00
by SwiftSpear
DDS are really ideal for many reasons. They are an image format specifically designed for 3D uses.

Posted: 22 Aug 2006, 04:10
by Wolf-In-Exile
DDS for me as well. Simply because of neatness, if nothing else.

One DDS file can mcontain the texture, teamcolor, and reflect map while other formats require more files and for that alone, it wins.

Posted: 22 Aug 2006, 04:11
by Snipawolf
I could swear GIMP had some sort of DDS plug-in, I think it would be useful...

Posted: 22 Aug 2006, 06:29
by Das Bruce
AF wrote:Yah png's rock
Not for complex images. I'd use them for smoths gundam or arghs nano blobs textures perhaps due the their design of being limited in colours. However in mods where camo and such are used extensively I'd go with low compression jpg's or so I'm hearing dds but I can't say on dds due to lack of experience.

Posted: 22 Aug 2006, 08:54
by KDR_11k
PNGs are decompressed upon loading. DDS is loaded as a compressed texture. That's the difference, the compression in a DDS file will remain in place even when it's loaded into texture memory. A 4096x4096x24bit texture will take 48 MB texture memory as a TGA, PNG, BMP, etc. As a DDS (assuming DXT1) that would be reduced to roughly 8 MB (assuming a 6:1 compression ratio which I think is what DXT1 gives you). Granted, you may not use any texture that large but if you add all your textures together you can end up with the same size. Many Spring mods are made with ancient graphics specs so they'll run well on a modern machine even with uncompressed textures. However, if you were to approach modern specs for your textures (e.g. 512x512 or 1024x1024 per unit) you can easily hit the texture memory limit and that means your framerate dies.

Posted: 22 Aug 2006, 11:17
by Zenka
If DDS is specially made for texturing 3D units, then there is little reason not to use it.
Actually the only thing that kept me using TGA is that I never got DDS to work. I could try again of course ;)

Posted: 22 Aug 2006, 12:01
by Weaver
Das Bruce wrote:
AF wrote:Yah png's rock
Not for complex images. I'd use them for smoths gundam or arghs nano blobs textures perhaps due the their design of being limited in colours. However in mods where camo and such are used extensively I'd go with low compression jpg's or so I'm hearing dds but I can't say on dds due to lack of experience.
PNG supports 8bits per colour ie 24bit or 16.7million colours, plus an 8bit alpha channel. That is as much as any other format you could use. If you were talking about GIFs I'd understand your point.

Posted: 22 Aug 2006, 14:27
by HAARP
Weaver wrote:
Das Bruce wrote:Not for complex images. I'd use them for smoths gundam or arghs nano blobs textures perhaps due the their design of being limited in colours. However in mods where camo and such are used extensively I'd go with low compression jpg's or so I'm hearing dds but I can't say on dds due to lack of experience.
PNG supports 8bits per colour ie 24bit or 16.7million colours, plus an 8bit alpha channel. That is as much as any other format you could use. If you were talking about GIFs I'd understand your point.
I think he's talking about the fact that PNG has difficulties compressing complex images, which is understandable since you can't really compress complex stuff losslessly

Posted: 22 Aug 2006, 14:35
by jcnossen
I think he's talking about the fact that PNG has difficulties compressing complex images, which is understandable since you can't really compress complex stuff losslessly
PNG is lossless. A complex image will end up a little bigger yes. But still smaller than TGA and with no loss of quality

Posted: 22 Aug 2006, 14:53
by zorbawic
Snipawolf wrote:I could swear GIMP had some sort of DDS plug-in, I think it would be useful...
http://registry.gimp.org/plugin?id=4816

You obviously didnt search for it did You ?

Posted: 22 Aug 2006, 15:11
by HAARP
jcnossen wrote:
I think he's talking about the fact that PNG has difficulties compressing complex images, which is understandable since you can't really compress complex stuff losslessly
PNG is lossless. A complex image will end up a little bigger yes. But still smaller than TGA and with no loss of quality
Yup. There's still compression.

btw. I recommened using pngout to get the last bit of compression out of PNGs. Use PNGGauntlet if you need a GUI for this tool.
It tries to compress PNG even more without decompressing being slower. However, compression may take a while...

Posted: 23 Aug 2006, 08:47
by Das Bruce
jcnossen wrote:
I think he's talking about the fact that PNG has difficulties compressing complex images, which is understandable since you can't really compress complex stuff losslessly
PNG is lossless. A complex image will end up a little bigger yes. But still smaller than TGA and with no loss of quality
Yes but I'm comparing it with low loss jpg.

Posted: 23 Aug 2006, 09:05
by LathanStanley
I'll look into DDS again... but I'm still gonna hold off if it impacts quality too much...

but I like the PNG idea... maybe someone needs to look into that??

volunteers?

Posted: 23 Aug 2006, 10:00
by Maelstrom
Ive looked into PNGs before, and they work in Spring, I had no trouble with them when I was testing. Just save your image as a .png and reference to it in your model, just like any other texture.