Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TGA vs. PNG vs DDS for transparent textures #404943
07/19/12 15:34
07/19/12 15:34
Joined: Feb 2008
Posts: 85
Germany
Schloder87 Offline OP
Junior Member
Schloder87  Offline OP
Junior Member

Joined: Feb 2008
Posts: 85
Germany
Hey guys,

i have an important question to you. What is better for transparent textures (with alpha-parts in it)

What is to prefer? TGA, PNG or DDS? Is there a difference between sorting? I know that DDS is the most efficient regarding to memory.

Regards

Markus


Visit IGRAVISION at: http://www.igravision.com
_________________________
Re: TGA vs. PNG vs DDS for transparent textures [Re: Schloder87] #404945
07/19/12 16:01
07/19/12 16:01
Joined: Jan 2012
Posts: 108
G
gamers Offline
Member
gamers  Offline
Member
G

Joined: Jan 2012
Posts: 108
DDS is the best solution with alpha-parts...

Re: TGA vs. PNG vs DDS for transparent textures [Re: gamers] #404946
07/19/12 16:34
07/19/12 16:34
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I never used PNG, but one feature of it is, that it can save alpha masked parts without a needed background, which makes them easier to create, or better said, the quality is better without manual postprocessing of the texture.

Otherwise, I would always prefer TGA because it is more common for game engines, but maybe that oppinion is driven because I am used to it.

TGA and PNG have the huge advantage, that they are losless. DDS has huge artifacts when it comes to smooth color transitions, like abstract gradients (e.g. from white to grey on big textures). They are best suited for structured texture with lots of detail and colors, but suck in special cases like gradients.

Alpha is treated seperately from RGB channels in the DDS compression process, but the alpha mask sucks as well on huge transitions, like going from 100% to 0% alpha over a long distance. Another thing is that blocks of 4x4 pixels are compressed, could produce artifacts in border cases.

So, in cases where dds compression sucks, you should always use lossless formats like tga or png.

But in the end it highly depends on your textures and how they "are" and how you --preceive-- the compression artifacts. If you dont like them - use tga/png.

Another case is cutout alpha, in that case I would always advise to use DXT1 (DDS) compression, unless the RGB compression sucks again wink

Re: TGA vs. PNG vs DDS for transparent textures [Re: HeelX] #404948
07/19/12 16:51
07/19/12 16:51
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I fully approve of HeelX's response, only a little additional information:

Originally Posted By: Manual
PNG-Bilder verhalten sich wie 32-Bit-TGA-Bilder mit Alphakanal (auch wenn der Kanal im Paintprogramm nicht explizit erstellt wurde. Sie werden aber, da sie nicht von der Engine, sondern von der DirectX-Bibliothek geladen werden, nicht empfohlen. Es gibt keine Garantie dafür, dass sie automatisch wiederhergestellt werden, wenn das Videogerät verloren geht. Das bedeutet, sie können ihren Inhalt verlieren wenn z. B. eine Vollbildanwendung minimiert wird.
------
PNG images behave like 32 bit TGA images with alpha channel (even if the channel was not explicitly created in the pain program). They are not recommended because they are loaded not by the engine, but by the DirectX library, and are not guaranteed to be automatically restored when the video device gets lost. This means that they can lose their content f.i. when a fullscreen application is minimized.



"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: TGA vs. PNG vs DDS for transparent textures [Re: Superku] #404967
07/20/12 08:08
07/20/12 08:08
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
in case of DXT5 compression dds alpha is not too bad, in contrary with DXT3. but yes, I use tga too when quality is needed. but use as much dds as you can, it has good effect on performance.
moreover, a better png engine support would be fine because those are usually much smaller in size than tga beside good quality.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: TGA vs. PNG vs DDS for transparent textures [Re: sivan] #404973
07/20/12 10:33
07/20/12 10:33
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: sivan
moreover, a better png engine support would be fine because those are usually much smaller in size than tga


On the hard disc - yes. But not in memory, because they are extracted to raw bitmaps and converted to the same DX format.

Re: TGA vs. PNG vs DDS for transparent textures [Re: HeelX] #404978
07/20/12 11:45
07/20/12 11:45
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
yes I thought of file size only


Free world editor for 3D Gamestudio: MapBuilder Editor

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1