Jump to content

PNG vs TGA


Recommended Posts

Potentially, TGA loads faster: PNG is a compressed image format, so when it gets extracted from the PK3, a second decompression has to take place to get at the image data. TGA contains the raw image data so it just has to be extracted from the PK3 and it's useable.

 

Whether this is true in practice, I don't know.

Omicron likes this
Link to comment

The polycount thread that comes up in the google search should be a good read on the subject but basically both formats are great as far as detail and alpha channel support but since PNG is a compressed version of TGA loading times increase when using PNG in exchange for a file size that is close to a JPEG but with better quality than a JPEG. TGA is going to be the best format to use in the game, although the file size is larger that only really affects the person downloading the mod or pk3, game loading is unaffected where as if you were loading a map that used nothing but PNG textures loading times would increase because of it being a compressed format.

 

In 3d software it's more noticeable between the load times of PNG and TGA when rendering.

Omicron likes this
Link to comment

Potentially, TGA loads faster: PNG is a compressed image format, so when it gets extracted from the PK3, a second decompression has to take place to get at the image data. TGA contains the raw image data so it just has to be extracted from the PK3 and it's useable.

 

Whether this is true in practice, I don't know.

 

It is absolutely true, and it was proved in the V1 release of MB2.

 

I spent tons of time converting hundreds of .PNG image files to .TGA. The load time for CommTower was reduced by 20-25 seconds out of ~43 overall second load time (I cant seem to find the exact values) on my computer due to that reduction. That is also just a level, and not every asset is loaded immediately when you load into a level either. Just about everyone I talked to (provided they had the same settings) also experienced much quicker load times.

 

Eez is also correct in the fact that when compression happens, TGA does in fact roughly mimic the PNG in size (Sometimes the same, sometimes slightly higher, sometimes slightly lower but it usually ends up being very close in the end).

Link to comment

gogo Bash/Batch script

 

 

Mostly what I did. It wasn't just about converting them straight through though. Everything had to be tested. On the initial run through for example, the RGB model's PNGs didn't convert properly using a simple batch conversion and required a bit of a different process that took slightly longer; then going through the RGB models to make sure everything converted properly without aliasing around the edges. I also had to do the conversion a couple times for some assets because map minimaps were updated in beta, or style changed, or went through a design change. An example of that being originally I just had to convert the mini-maps, but then I went through and removed the BaseJKA backgrounds in the obj screen which required those being converted at a different time. 

therfiles likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...