Texture formats - why tga?

Texture formats - why tga?

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Texture formats - why tga?

Post 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...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

aside from all that TGA's do get compressed when you put them in the sdz/7.

But yah DDS.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

I went from like a 15kb tex (tga) to a 4kb one with DDS, DDS ftw!
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Yah png's rock
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

DDS are really ideal for many reasons. They are an image format specifically designed for 3D uses.
User avatar
Wolf-In-Exile
Posts: 497
Joined: 21 Nov 2005, 13:40

Post 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.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

I could swear GIMP had some sort of DDS plug-in, I think it would be useful...
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post 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 ;)
User avatar
Weaver
Posts: 644
Joined: 07 Jul 2005, 21:15

Post 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.
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post 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
zorbawic
Posts: 107
Joined: 07 May 2006, 15:09

Post 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 ?
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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...
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post 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.
User avatar
LathanStanley
Posts: 1429
Joined: 20 Jun 2005, 05:16

Post 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?
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post 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.
Post Reply

Return to “Art & Modelling”