TGA: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Corrected.)
(Inserted valid specs for Vtex. This should be ''the only'' page to consult for these specs from now on.)
Line 1: Line 1:
Truevision Graphics Adapter (TGA), commonly referred to as "targa" (Truevision Advanced Raster Graphics Adapter), is a non-proprietary image format from Truevision that is favoured by [[Valve]]. ''.tga'' is also the file extension of that format. It is the base format for [[VTF|Valve Texture Files (.vtf)]], and used to store images used by the [[:Category:Steam|Steam client]].
Truevision Graphics Adapter (TGA), commonly referred to as "targa" (Truevision Advanced Raster Graphics Adapter), is a non-proprietary image format from Truevision that is favoured by [[Valve]]. ''.tga'' is also the file extension of that format. It is the base format for [[VTF|Valve Texture Files (.vtf)]], and used to store images used by the [[:Category:Steam|Steam client]].


[[TGA]] files can be saved with a fourth channel, called the [[Alpha channel]], which usually defines the transparency. (The three basic channels define red, blue, and green content of the image.)  However, [[VMF]] shaders can use the [[alpha channel]] for other information.
[[TGA]] files can be saved with a fourth channel, called the [[Alpha channel]], which usually defines the transparency. (The three basic channels define red, blue, and green content of the image.)  However, [[VMF]] shaders can use the [[alpha channel]] for other information.




==See also==
 
* [[Wikipedia:Truevision_TGA|The Wikipedia entry]]
== Valid targa format for [[Vtex]] ==
 
For a targa image to be recognized as valid by Vtex, it must meet the following criteria:
 
* It must be 24 or 32 bits/pixel in depth. (16 bits/pixel is not recognized.)
* Its sides (height and width) must have a pixel size equal to a power of 2. (i.e. 16, 32, 64, 128, 256, 512, etc.)
* Its sides can not be bigger than 2048 pixels.
* The height and width doesn't need to be the same - 64x128, 256x512 works fine - but square images are preferred by the Source engine, so use them whenever possible, even when it doesn't seem like the best way to go.
* RLE compression is optional, but should be avoided due to occational convertion troubles.
 
 
 
== See also ==
 
* [[Wikipedia:Truevision_TGA|The Wikipedia entry for TGA]]
* [http://astronomy.swin.edu.au/~pbourke/dataformats/tga/ TGA Format Specification]
* [http://astronomy.swin.edu.au/~pbourke/dataformats/tga/ TGA Format Specification]
* [http://www.irfanview.com/ Irfanview, a popular TGA viewer]
* [http://www.irfanview.com/ Irfanview, a popular TGA viewer]


* [http://www.snarkpit.net/editing.php?page=tutorials&game=HL2&id=141 Texture file formats from The SnarkPit site]


[[Category:Glossary]] [[Category:Material System]]
[[Category:Glossary]] [[Category:Material System]]

Revision as of 08:21, 29 August 2007

Truevision Graphics Adapter (TGA), commonly referred to as "targa" (Truevision Advanced Raster Graphics Adapter), is a non-proprietary image format from Truevision that is favoured by Valve. .tga is also the file extension of that format. It is the base format for Valve Texture Files (.vtf), and used to store images used by the Steam client.

TGA files can be saved with a fourth channel, called the Alpha channel, which usually defines the transparency. (The three basic channels define red, blue, and green content of the image.) However, VMF shaders can use the alpha channel for other information.


Valid targa format for Vtex

For a targa image to be recognized as valid by Vtex, it must meet the following criteria:

  • It must be 24 or 32 bits/pixel in depth. (16 bits/pixel is not recognized.)
  • Its sides (height and width) must have a pixel size equal to a power of 2. (i.e. 16, 32, 64, 128, 256, 512, etc.)
  • Its sides can not be bigger than 2048 pixels.
  • The height and width doesn't need to be the same - 64x128, 256x512 works fine - but square images are preferred by the Source engine, so use them whenever possible, even when it doesn't seem like the best way to go.
  • RLE compression is optional, but should be avoided due to occational convertion troubles.


See also