Quake3World.com
https://www.quake3world.com/forum/

jpg textures pros and cons
https://www.quake3world.com/forum/viewtopic.php?f=16&t=50976
Page 1 of 1

Author:  Captaintoottoot [ 04-06-2015 02:39 PM ]
Post subject:  jpg textures pros and cons

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.

Author:  D-Meat [ 04-13-2015 01:58 AM ]
Post subject:  Re: jpg textures pros and cons

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.

Author:  CZghost [ 04-13-2015 06:08 AM ]
Post subject:  Re: jpg textures pros and cons

@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?

Author:  Eraser [ 04-13-2015 12:21 PM ]
Post subject:  Re: jpg textures pros and cons

Nope. No alpha channels with jpg images.

Author:  D-Meat [ 04-18-2015 12:48 PM ]
Post subject:  Re: jpg textures pros and cons

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 !

Author:  obsidian [ 10-26-2015 09:06 AM ]
Post subject:  Re: jpg textures pros and cons

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.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/