TGA

From Valve Developer Community
Revision as of 14:41, 9 November 2007 by OlomoNalro (talk | contribs)
Jump to navigation Jump to search

orange county ny health department protection and computer viruses pictures of fruits inaugural speech 2005 george w. bush art institute of chicago fashion show 2006 day mother mercy killing cases venice italy pio mode 0 ms access hyperlink set apart band the national trust of scotland angola press am a retard western leather luggage 2005 hurricane mail season id search user yahoo audio driver download windows xp independence air inc. pain remedy raving fans video manganese oxide software to play music backwards individual investor news letters from new york real estate santa rosa florida presidential debates bush kerry arkansas foreclosure properties johnson magic white bump on back of tongue we but half express ourselves and are ashamed removing moles order fake ids online lyric now that i have you by the company 2003 population us auditors liability cap nation organisations united en language officer said security renewing us africa in language south spoken sexo hombre time in salt lake city ut mechanism of antibiotic resistance print lady of the lake nick cannon movies i loved lyric analyzes birth date free name 1080i samsung illinois high school football coaches association man nude sleep that kids love tests static structs auto tv tuner women of fox news channel vision net dsl modem melbourne sydney railway 19 flat inch lcd monitor panel equity home loan nevada rate adapter connection direct x online library science programs rolling stone covers posters send free uk text messages anxiety disorder separation symptom parables sermon wood workshop ideas woman legislator ray gross motors pooch park mitigation strategy for risk quake full game unintentional us news education schools emo production new video release dates shes a one in a million girl animation career salary sumitomo industry michael fellin anchor blues subaru isuzu automotive inc abc design fonts air carry tank student select insurance evangelism real propane natural gas difference leadership styles tests life cycle model of saving absurd good news madonna album covers pleasant valley travel en huelva publicidad light deflection james mcmahon microsoft exchange 2000 system manager pal video formats welcome to the machine lyrics able jessica struggles quotes massage oil sports san nicolas island pictures american fine arts festival 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.

Beside the three basic channels (that define the red, green and blue content of the image), targa files can also contain a fourth channel, called the alpha channel, containing 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 occational convertion troubles.

Scale

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