From Valve Developer Community
Revision as of 08:52, 5 February 2008 by OlomoNalro (talk | contribs)
Jump to: navigation, search

meaning of lucy in the sky with diamonds harcourt notebook bell ladyboy video yahoo greeting ca la via del reiki olio ricino cake ideas tea biscuit receipe smith drill bits another lonely night august stringberg store aggiornato rainbow six 3 per xbox united state world cup team 2006 naked college jocks canzone mp3 scaricare capitol blue causes of leukemia summer camp games grocery liquidation sales store upcoming arcadecontrols forum vacation club mexico vestirsi cinque matti alla riscossa www webasto it website life insurance comparison summerlin real estate listings billy bob spia ramada hotel pudong chapman car alarm california contractors board inhalant drugs wilderness racks nude old grandmas web medrol dosepak clock movements roma verona biglietti aerei betty boop pictures picture phones gardening home hydroponics torcher wayahead careers quickview plus 8 planetford abc7 news chicago final fantasy 7 midis mimics productions baby im back migraine medications during pregnancy conference in usa girls anime world music nota simple music india oops celebs robbs main taormina film festival 2005 toner optra t610 monica cameron flag romanias batteria originale per nokia 6600 above ground pool sand filter firstview tom everhart art topsider pixies hey tab merer and frank kitchen mixers when the walls fell oh promise me that someday you and i alt fuel refineries nforce 4 ultra spinner dolphins newsies images singapore airline a380 book cook field marshall buddypic port vanuatu vila track time driving schools math graphic organizer union correctional institute page california state bar association optical illusion picture steelcase furniture cornish rex sad quote and saying lusitania ss long grove confectionary co south australia population 2004 accountant charge does hour much per long market pedraza spain seeley, sir john robert wet t shirt competition bmxxx 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.

The format stores the basic RGB (red, green, blue) channels with 8 bit precision (0-255) each, for a total of 24 bits/pixel, with an optional additional 8 bit alpha channel, for a total of 32 bits/pixel. The extra channel contains information that the VMF shaders can use for effects such as transparency or specularity.

Targa for Vtex

Valid format

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 dimensions (height and width) must have a pixel size equal to a power of 2. (i.e. 2^4=16, 2^5=32, 2^6=64, 2^7=128, 2^8=256, 2^9=512, etc.)
  • Its dimensions 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 occasional conversion troubles.


The default texture scale in Hammer is .25. This means that 4 pixels (in an image) = 1 Hammer unit = 1 inch (in game) or (4x4=) 16 pixels for every square inch.

For textures that appear on large surfaces a good scale is 512 pixels for 128 Hammer-units. This is the default scale at which Hammer will apply textures and equals about 10 feet or about 3 meters in the game.

Save location

Remember that Vtex is only able to locate targa images located inside the /materialsrc/ folder of the current game, so you may want to save it there directly to spare you the trouble of having to move it there later.

See also