Png vs tga

General discussion and questions about XNALara go here.

Moderators: Runa, ObscureMemories, Love2Raid

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

Png vs tga

Postby rballad » Sun Jan 29, 2017 6:09 pm

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

Site Admin
User avatar
Posts: 7676
Joined: Sat Aug 04, 2012 7:38 pm
Location: Torrance, CA
Custom Rank: Kitty pu tu tu lay!

Re: Png vs tga

Postby semory » Sun Jan 29, 2017 7:42 pm

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.

Site Admin
User avatar
Posts: 10352
Joined: Sat Aug 18, 2012 3:15 am
Location: With Grant Gustin :ggl:
Custom Rank: WestAllen best ship.

Re: Png vs tga

Postby Dazzy » Mon Jan 30, 2017 12:46 am

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
Posts: 323
Joined: Sat Dec 08, 2012 5:35 am
Custom Rank: Om Donal

Re: Png vs tga

Postby rballad » Mon Jan 30, 2017 2:14 am

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.

Porter
User avatar
Posts: 137
Joined: Tue May 19, 2015 11:16 pm
Custom Rank: Stashing stuff I like.

Re: Png vs tga

Postby Ems » Mon Jan 30, 2017 3:11 am

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.

User avatar
Posts: 1068
Joined: Wed Oct 17, 2012 5:09 am
Location: Idk where am i?
Custom Rank: Baebsae

Re: Png vs tga

Postby PoophairJones » Tue Jan 31, 2017 4:50 pm

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

Porter
User avatar
Posts: 3511
Joined: Mon Nov 26, 2012 12:13 pm
Location: Cyberspace
Custom Rank: Skynet Status

Re: Png vs tga

Postby ProtocolX27 » Fri Feb 03, 2017 1:14 pm

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.
Image

User avatar
Posts: 107
Joined: Wed Aug 22, 2012 2:52 am
Location: Gravlex Med

Re: Png vs tga

Postby Anx » Tue Feb 07, 2017 12:15 am

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

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests