Quake3World.com Forums
     Programming Discussion
        jpg textures pros and cons


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: jpg textures pros and cons

Grunt
Grunt
Joined: 28 Mar 2014
Posts: 59
PostPosted: 04-06-2015 02:39 PM           Profile Send private message  E-mail  Edit post Reply with quote


My two main concerns about using jpg files instead of TGA files is performance and legal issues. Please do not respond unless you are absolutely certain about the answer. Are there any legal restrictions to distributing a game that uses jpg images instead of tga? Are there any performance issues using jpg instead of tga, like, does the game decompress the jpg image to a tga format each frame or something? Slower load times? etc.




Top
                 

Veteran
Veteran
Joined: 17 May 2011
Posts: 159
PostPosted: 04-13-2015 01:58 AM           Profile Send private message  E-mail  Edit post Reply with quote


People use Jpg all over the web, so I don't think there are legal issues about using this format. Same with Targa, I think.

Tga is a lossless format and it can include an alpha channel. Using Jpg can make you save disk space, but you'll have to have your alpha / transparency channels in a separate image. Also, Heavily compressed JPG images have "glitches" that can be easily seen. This page explains it all : http://www.karbosguide.com/books/photobook/chapter11.htm

If you're not constrained by disk space, I advice to use the TGA format. Once in the graphics card RAM, jpg images take as much space as TGA anyway.



_________________
My blog - My portfolio
---------------------
MJDM2 - DmeatSP01 - DmeatSP02


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 04-13-2015 06:08 AM           Profile   Send private message  E-mail  Edit post Reply with quote


@D-Meat: How can I make separate alpha channel to be used in shader? I always tought that to use transparency I need always TGA as the JPG otherwise doesn't allow transparency support. Is there any way to bypass that restriction?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
PostPosted: 04-13-2015 12:21 PM           Profile   Send private message  E-mail  Edit post Reply with quote


Nope. No alpha channels with jpg images.




Top
                 

Veteran
Veteran
Joined: 17 May 2011
Posts: 159
PostPosted: 04-18-2015 12:48 PM           Profile Send private message  E-mail  Edit post Reply with quote


Arf, sorry, I always used TGA images to get an alpha channel, but I thought it was possible to specify a different image for the alpha in a shader. Sorry !



_________________
My blog - My portfolio
---------------------
MJDM2 - DmeatSP01 - DmeatSP02


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 10-26-2015 09:06 AM           Profile Send private message  E-mail  Edit post Reply with quote


TGA images compress well in .zip/.pk3, JPG images are already compressed and do not compress any further. I've often found that TGA images compressed in .zip/.pk3 format is on par (and in some cases smaller) than the same image in JPG.

There is no licensing issues with distributing images in JPG or TGA format. Software companies may need to license the JPG format to be able to open/save in JPG format, but there is no fees for end users.

I'm not sure of any performance drawbacks between using JPG vs. TGA. If anything, it's probably negligible on load times. There should be no in-game performance difference.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.