Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is Png lower Quality than tga?

VonGklugelstein Alter
Bedah Profeshinal Tekstur
Join date: 22 Dec 2007
Posts: 808
06-19-2008 05:32
It seems that png files are about half the size of tga's. I have been experimenting with trying to import textures that are giving me the tranparency edge problem as png's instead of tga's with alpha. Good news is that png textures show less of a border than tga's

are there any special png features supported with the uploaded images that will increase quality? In Gimp there are a bunch of checkboxes when saving to a png, but that is chinese to me.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-19-2008 05:59
If all the settings are equal and nothing in the graphics software is broken, the two should give you identical results (the PNG is smaller because of lossless compression, all the rgba info will be the same). But graphics software does have a lot of breakage, so use whatever format gives you the results you want =)
_____________________
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
06-19-2008 06:23
Both file types have very predictable compression. PNG is an open-source improvement on file types like TGA and GIF. In the end it doesn't really matter since everything uploaded gets automatically converted to Jpeg2000. (^_^)y
_____________________
Somewhere in this world; there is someone having some good clean fun doing the one thing you hate the most. (^_^)y


http://slurl.com/secondlife/Ferguson/54/237/94
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
06-19-2008 08:50
From: Imnotgoing Sideways
Both file types have very predictable compression.

That would depend on your definition of "predictable", I'd say.

In any case, most of the time, TGA textures are not compressed. TGA utilizes RLE compression, which is ill suited for the photographic quality imagery commonly used in texturing. It only really works well for images that have large areas of homogeneous coloring, such as line drawings, icons, simple signs, etc. For photographic images, RLE compression often results in files that are larger, not smaller, than their uncompressed counterparts.


From: Imnotgoing Sideways
PNG is an open-source improvement on file types like TGA and GIF.

How is PNG an "improvement" on TGA? You're comparing apples and oranges. The two are usually used for very different purposes.

PNG was designed specifically as non-licensed alternative to GIF, as GIF was patented at the time. For still images, PNG does improve upon GIF in many ways (smaller file size, much wider range of color depths, more transparency options). However, the fact that PNG does not allow for embedded animation, and GIF does, helps keep GIF popular.

There's little point in comparing PNG with TGA, since the two are generally used for very different purposes. Both have distinct advantages for the type of work for which they are typically used. PNG, was intended for the Web, and is seldom used professionally for much else. TGA, on the other hand, has been an almost universal standard for texturing, animation, and for video work for decades now.

One big reason that TGA has remained such an industry favorite is that it has process-saving advantages over most other formats, including PNG. When you're rendering thousands of frames of video at a time, or dealing with 3D scenery containing hundrerds of textures, every process counts. First, since TGA is (usually) uncompressed, the extra step of decompressing it to load into memory, or conversely, compressing it after writing it, is eliminated. Second, unlike PNG, TGA puts each piece of image data in exactly the same place within each file, so reading and writing is just about as simple as can be. Third, less crucial, but still somewhat important, TGA's (uncompressed) file size is 100% predictable.

PNG is wonderful format for its intended purpose. It's just not right to say it's "superior" to TGA. If you're a Web designer, you'd never use TGA in the first place, and if you're a 3D or video artist, you'd rarely if ever use PNG. Both formats have their place.




Anyway, VonGklugelstein, as Imnotgoing quite rightly pointed out, all images in SL are converted to JPEG2000 at the time of upload. So, in that sense, the source format doesn't quite matter (as long as the source is lossless, so steer clear of JPEG). There are two reasons I prefer TGA, though. Here they are:

1. Universality - When I make a texture, I want to use it for other things besides just SL. In most other applications, TGA is the standard, so it makes sense to stick with it.

2. Reliability - As Viktoria mentioned, in a perfect world, the JPEG2000 conversion would come out the same whether your source image is PNG or TGA, but the world isn't perfect. PNG offers much greater margin for error in the final bit depth of the texture image. Because PNG supports multiple forms of transparency, if so much as a single pixel is less than 100% opaque, the entire image will come out 32-bit in SL. As a result, accidental 32-bit textures from PNG are common. This leads to sorting problems, and creates files that are 33% larger than they ordinarily would be. So if you use PNG, be very careful.


As I see it, for SL purposes, PNG is at best a nice alternative for those who are unwilling to learn how alpha channels work. Such people can use PNG's simple transparency all day long, without a care in the world for the fact that they're actually making things harder on themselves, since simple transparency (misnomer) is often far more labor-intensive than alpha transparency. But some people will never make the leap out of WYSIWYG mode, no matter what.

If you're not one of those people, use TGA. If you are, use PNG.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.