Png vs tga

General discussion and questions about XNALara go here.

Moderators: ObscureMemories, Runa, Love2Raid

Post Reply
User avatar
rballad
Posts: 323
Joined: Sat Dec 08, 2012 5:35 am
Custom Rank: Om Donal

Png vs tga

Post by rballad »

a stupid question. png is much smaller than tga, but why porters like crofty and Trdaz prefer tga images? is there any con of using png
User avatar
semory
Site Admin
Posts: 7755
Joined: Sat Aug 04, 2012 7:38 pm
Custom Rank: Kitty pu tu tu lay!
Location: Torrance, CA

Re: Png vs tga

Post by semory »

I personally prefer it when people use TGA instead of PNG. PNG was meant to replace GIF as the image format of the web, and it did officially in the W3C long ago. PNG is a compressed web format that uses the free and open zlib compression for fast downloading. PNG wasn't originally meant for 3D graphics, but porters use it for small file sizes and faster upload/download. TGA was created for graphics. TGA technically loads faster though since it isn't compressed (some porters use the TGA RLE option for lightmaps though) but what's a few milliseconds right? There's another reason I hate PNG but I forget what it was... something about how the alpha channel is stored in the file I think.

Funny though... just recently Marv and I were talking about this how he likes PNG but I don't hahaha.
User avatar
Dazzy
Site Admin
Posts: 10369
Joined: Sat Aug 18, 2012 3:15 am
Custom Rank: WestAllen best ship.
Location: With Grant Gustin :ggl:
Contact:

Re: Png vs tga

Post by Dazzy »

I used to use png but when I got further into porting I realised I wasn't able to edit the alpha channel when I needed to. dds is a good option other than tga but blender doesn't like dds so I tend to use tga all the time lol.
Image
All I wanna do, is come runnin' home to you, come runnin' home to you.
And all my life I promise to, keep runnin' home to you, keep runnin' home to you.
User avatar
rballad
Posts: 323
Joined: Sat Dec 08, 2012 5:35 am
Custom Rank: Om Donal

Re: Png vs tga

Post by rballad »

so if i get it correctly, it's not because tga looks better on better on models. It's because tga is faster and more editable.

One last question, is there a risk of data loss if we convert tga to png ? i am extracting a lot of unreal games now, and tga images are really taking up spaces.
User avatar
Ems
Porter
Posts: 172
Joined: Tue May 19, 2015 11:16 pm
Custom Rank: Stashing stuff I like.

Re: Png vs tga

Post by Ems »

rballad wrote:so if i get it correctly, it's not because tga looks better on better on models. It's because tga is faster and more editable.

One last question, is there a risk of data loss if we convert tga to png ? i am extracting a lot of unreal games now, and tga images are really taking up spaces.
A thing: more editable, because Photoshop, and lots of ppl use it, has no PNG alpha support, you need to use additional tools (I have SuperPNG) to restore alpha for editing. I noticed some porters don't even bother looking into their channels and sometimes specular maps or other additional data gets "written in" in a process, which gives wacky results.

PNG is supposed to be lossless even with its compression options, so you shouldn't be worried about quality.

I looked around for threads comparing those two formats, but it's all 2+ years old information. Both get used, but TGA seems to be preferred. There are mentions of TIFF (I used TIFF instead of PSD for drawing back in the days, I honestly don't remember how it behaves, IDK if XPS can even use it?), and of course DDS. Worked with DDS around 2010 (with Windows DirectX Texture Tools), while making texmods for games. This is probably the best solution storage space-wise, but converting was a pain, since tools allow you to open and save only one texture at a time, you still need to use some in-between format (TGA) and there's so many compression types it's frustrating to work with, each is good for different texture types (As far as I remember ME3 accepted only U8V8 for normal maps which absolutely destroyed their quality <_<. Also I hated Nvidia legacy tools, faulty, unstable, same compression types gave different results for both tools ?__?).

PS: Like Semory said, TGA has additional RLE compression option, which cuts some space, but I noticed I always need to export the map properly to use it. A quicksave saves map with no compression.
PoophairJones
Posts: 1068
Joined: Wed Oct 17, 2012 5:09 am
Custom Rank: Baebsae
Location: Idk where am i?
Contact:

Re: Png vs tga

Post by PoophairJones »

Yeah much like dazzy i mostly use tga because it's easier to edit, saves fast and actually works in a wide range of programs. I generally use photoshop to edit textures and higher resolution pngs tend to take forever to save, which gets on my nerves when i do texture edits that require many re-saves etc. DDS for XPS purposes works good with the nvidia photoshop plugins aswell.

I think there isn't any actual quality loss that you can see with bare eyes when converting to either png or dds. Just stay away from stuff like .jpg lol
ProtocolX27
Porter
Posts: 3518
Joined: Mon Nov 26, 2012 12:13 pm
Custom Rank: Skynet Status
Location: Cyberspace
Contact:

Re: Png vs tga

Post by ProtocolX27 »

Ems wrote: A thing: more editable, because Photoshop, and lots of ppl use it, has no PNG alpha support, you need to use additional tools (I have SuperPNG) to restore alpha for editing. I noticed some porters don't even bother looking into their channels and sometimes specular maps or other additional data gets "written in" in a process, which gives wacky results.
:XD: I just learned something. After all this time, I thought my PS installation was broken in how it was handling PNG's.... I've been using GIMP to craft all of my DDS to PNG's for renders just to deal with it.
User avatar
Anx
Posts: 146
Joined: Wed Aug 22, 2012 2:52 am
Location: Gravlex Med

Re: Png vs tga

Post by Anx »

I use PNG ... because I use XNA

And the XNA Docs mentioned http://protogame.readthedocs.io/en/late ... d.gen.html

Code: Select all

public Texture2D FromStream(GraphicsDevice graphicsDevice, System.IO.Stream stream)
"Creates a Texture2D from a stream, supported formats bmp, gif, jpg, png, tif and dds (only for simple textures). May work with other formats, but will not work with tga files."

- PNG use lossless data compression
- My "DAZ Studio" (Poser) can handle PNG .. but not TGA
- "Windows Explorer" (W7) can handle PNG .. but not TGA
- "Windows Photo Viewer" can handle PNG .. but not TGA
- XNA don't supports TGA ... http://www.tombraiderforums.com/showthr ... ost3823551 "Dusan: .tga is not natively supported by the XNA framework so I'd have to write the format exporter manually. "
- XPS supports PNG .. but not always TGA (nor using the "Material Editor preview" X ... nor using "Drag and Drop") http://xnalaraitalia.deviantart.com/art ... -569158442
- XNALara don't supports TGA http://www.tombraiderforums.com/showpos ... stcount=16 "Dusan: XNALara doesn't support TGA textures, you have to convert them to PNG format."
- All characters by Dusan has used PNG

In my opinion, you'll be doomed and you'll be damned, if you use TGA for XNA.
there none con of using png ... and there are non pro for using tga
Post Reply