Delta_135 Posted January 24, 2017 Posted January 24, 2017 I think this was once asked on the old filefront forums but i couldn't find anything on google or here. So basically i just want some infomation on the pros and cons on the different texture formats supported by the game (.jpg, .png, .tga). Stuff like, whats best to use on transparent texture (png or tga) and a normal texture (jpg or tga).I seem to remember something about png being smaller file size on disk but taking longer to load compared to tga and jpg,but is there other infomation worth mentioning?
minilogoguy18 Posted January 25, 2017 Posted January 25, 2017 The .JPG format is widely used for anything that doesn't use transparency because it's a smaller file size and uncompressed. The differences with .PNG and .TGA is that .PNG is a compressed format which leads to smaller file size but possibly increasing the load times as the game takes more time to read if I remember right. These formats support an alpha channel which is needed to achieve certain effects with certain shader types. @@eezstreet would know more. I think I remember him going over the pros and cons of using PNG versus TGA, I always thought that PNG was nice because it could do all the same things as TGA but had a much smaller file size but in the days of TB hard drives it probably doesn't matter much. eezstreet likes this
Delta_135 Posted January 25, 2017 Author Posted January 25, 2017 Does the progressive jpg option have anything to say?
eezstreet Posted January 25, 2017 Posted January 25, 2017 TGA and PNG are the same filesize when inside a PK3; they're both being compressed via zlib in some form or another. The difference is that PNG loads slower than TGA because PNG needs to be decompressed twice - once when pulling it out of the PK3 and once when reading the actual file. The flipside is that PNGs are easier to work with in Photoshop. You should always use TGA over PNG. Delta_135 and Archangel35757 like this
minilogoguy18 Posted January 25, 2017 Posted January 25, 2017 I thought that's what you said but I think the file size thing depends, on 1024x1024 maps with alpha channels and such PNG does come out to a much smaller file size but it probably is due to compression or possibly a setting I was using. Best to use what loads fastest and since we're not counting Mb anymore with how large HDD's are the size is a non issue. @@eezstreet what about the progressive option question above? I don't ever remember using it or seeing what difference it made. I just used standard jpg for anything that didn't use transparency.
Xycaleth Posted January 25, 2017 Posted January 25, 2017 Progressive jpegs aren't supported afaik. AshuraDX and Psyk0Sith like this
ent Posted January 26, 2017 Posted January 26, 2017 And you forgot to mention that sizes(width/height) of textures must be power of 2 so 128x512px etc. eezstreet likes this
Delta_135 Posted January 26, 2017 Author Posted January 26, 2017 So the optimal thing to do would be to have all non-transparent textures as jpg's and transparent textures as tga's? any other fun facts about how the game handels textures?
Circa Posted January 26, 2017 Posted January 26, 2017 TGA transparency is harder to deal with because it uses the black/white alpha channel method. I avoid TGA and go with PNG whenever possible. Load time won't be that much different on modern machines anyway. And JPG is compressed. Someone said it was uncompressed above, but that's the opposite. JPGs can look like garbage if compressed too much.
minilogoguy18 Posted January 27, 2017 Posted January 27, 2017 ^This is true, I never noticed a slow down.
Xycaleth Posted January 27, 2017 Posted January 27, 2017 The difference between jpg compression and png compression is lossy vs lossless compression. In the former you'll lose some image quality whereas in the latter you will not lose any quality from the source image. eezstreet likes this
The Punisher Posted January 27, 2017 Posted January 27, 2017 Sorry to interlude in the tread but since you are already talking about differences between TGAs and PNGs, I have a problem with TGAs. Whenever I save a TGA, even without doing any changes (just open the file and save it back without doing anything to it), JKA crashes, so I have to save it as PNG (or JPG). I normally use Photofiltre free edition, but I tired in a friend's computer with different apps he (even photoshop, I think) has and still have the same problem. Any ideas why?
Delta_135 Posted January 27, 2017 Author Posted January 27, 2017 Sorry to interlude in the tread but since you are already talking about differences between TGAs and PNGs, I have a problem with TGAs. Whenever I save a TGA, even without doing any changes (just open the file and save it back without doing anything to it), JKA crashes, so I have to save it as PNG (or JPG). I normally use Photofiltre free edition, but I tired in a friend's computer with different apps he (even photoshop, I think) has and still have the same problem. Any ideas why? What do you use to save the tga's with?And does jka show an error?
The Punisher Posted January 27, 2017 Posted January 27, 2017 What do you use to save the tga's with?And does jka show an error? - "I normally use Photofiltre free edition, but I tired in a friend's computer with different apps he (even photoshop, I think)"- JKA (openJK) just crashes. If it shows a message, it happens too fast to see.
Delta_135 Posted January 27, 2017 Author Posted January 27, 2017 - "I normally use Photofiltre free edition, but I tired in a friend's computer with different apps he (even photoshop, I think)"- JKA (openJK) just crashes. If it shows a message, it happens too fast to see. Hmmm i use gimp myself and that has an option to RLE compress a tga image that i always disable, try do the same thing in photofiltre or play around with some other save settings.
The Punisher Posted January 27, 2017 Posted January 27, 2017 Thanks. Photofiltre (since is a free edition) practically has no options. I was able to capture one of the errors and it says something about "RLE-RGB Images (type 10) must be in bottom-to-top format [name of TGA File]". I did nothing to the file but opening and saving it.
minilogoguy18 Posted January 27, 2017 Posted January 27, 2017 This is hugely off topic but you should probably switch softwares and you might wanna see if the size of the file changes because the software may be doing something when saving. You should open the source file, choose save as and save it under a different name. Open the files and compare their properties, you'll probably find something has changed.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now