VTEX (Valve Texture Tool): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Linked to compile parameters.)
(Moved info from Material (again).)
Line 7: Line 7:
== Basic Usage ==
== Basic Usage ==


#Start Steam.
#Make sure that [[Steam]] is running.
#If necessary, start Source SDK and set/verify the game that you are converting the texture for in the ''Current Game'' drop-down list located at the bottom of the Source SDK menu.
#If necessary, start Source SDK and set/verify the game that you are converting the texture for in the ''Current Game'' drop-down list (located at the bottom of the Source SDK menu).
#Place the targa image to be converted in the <code>SteamApps/''username''/sourcesdk_content/gamefolder/materialsrc/</code> folder, where ''gamefolder'' is the game folder of the current game (<code>cstrike</code>/<code>dod</code>/<code>hl2</code>/<code>hl2mp</code>).
#Place the targa image to be converted inside the <code>SteamApps/''username''/sourcesdk_content/gamefolder/materialsrc/</code> folder, where ''gamefolder'' is the game folder of the current game (<code>cstrike</code>/<code>dod</code>/<code>hl2</code>/<code>hl2mp</code>). You can also place the image within a subfolder of this folder, to make Vtex compile the texture to the corresponding <code>materials/</code> subfolder. (For instance, placing the image in a <code>materialsrc/metal/</code> subfolder, will make Vtex compile the texture to the <code>materials/metal/</code> subfolder.)
#If necessary, write a list of [[Vtex compile parameters]] and put it in the same folder as the targa image.
#If necessary, write a [[txt|text (.txt) file]] containing a set of [[Vtex compile parameters]]. Give it the same name as the targa image (with the exception of the ''.txt'' extention) and put it in the same folder. If you choose to omit this list, Vtex will create an empty one for you during compilation.
#The Vtex executable (''Vtex.exe'') is located in the <code>/Steam/SteamApps/''username''/sourcesdk/bin/</code> folder. (Steam must run while it is executed.)
#The Vtex executable (''Vtex.exe'') is located in the <code>/Steam/SteamApps/''username''/sourcesdk/bin/</code> folder. It can be executed in one of two ways: Through the easy "drag-and-drop" method in Windows (described below), or the more advanced command prompt method, described [[Vtex CLI use|here]]. Steam must run while it is executed.
#Vtex can be executed in one of two ways: Through the "drag-and-drop" method in Windows (described below), or [[Vtex CLI use|through the command line interface]].
#The resulting Valve Texture File (.vtf) will be compiled to the <code>materials/</code> folder of the current game by default. For instance, if your username would be GordonFreeman, and the current game would be [[Half-Life 2]], the texture file would be compiled to the <code>SteamApps/GordonFreeman/half-life 2/hl2/materials/</code> folder. If the targa image resided within a subfolder, Vtex will compile the texture file to the corresponding <code>materials/</code> subfolder. If that subfolder doesn't exist, Vtex will create it automatically.
#The resulting Valve Texture File (.vtf) will be compiled to the <code>materials/</code> folder of the current game by default. For instance, if your username would be GordonFreeman, and the current game would be [[Half-Life 2]], the texture file would be compiled to the <code>SteamApps/GordonFreeman/half-life 2/hl2/materials/</code> folder.




Line 19: Line 18:
== The drag-and-drop method ==
== The drag-and-drop method ==


The drag-and-drop method is the easy way to use Vtex. Just drag the targa image to be converted from its <code>materialsrc/</code> on top of ''Vtex.exe'' and let go, and that's it.
The drag-and-drop method is the easy way to use Vtex. Just drag the icon of the targa image to be converted (from its <code>materialsrc/</code> folder) on top of the icon of the Vtex executable (''Vtex.exe'') and let go, and Vtex will compile its texture file automatically.
{{todo|More detail? The process is apparently currently described in [[Material]], but should be moved here.}}





Revision as of 10:25, 29 August 2007

Overview

Vtex, or Valve Texture Tool, is the standard application used to convert targa (.tga) image files into Valve Texture Files (.vtf) for use in the Source engine.


Basic Usage

  1. Make sure that Steam is running.
  2. If necessary, start Source SDK and set/verify the game that you are converting the texture for in the Current Game drop-down list (located at the bottom of the Source SDK menu).
  3. Place the targa image to be converted inside the SteamApps/username/sourcesdk_content/gamefolder/materialsrc/ folder, where gamefolder is the game folder of the current game (cstrike/dod/hl2/hl2mp). You can also place the image within a subfolder of this folder, to make Vtex compile the texture to the corresponding materials/ subfolder. (For instance, placing the image in a materialsrc/metal/ subfolder, will make Vtex compile the texture to the materials/metal/ subfolder.)
  4. If necessary, write a text (.txt) file containing a set of Vtex compile parameters. Give it the same name as the targa image (with the exception of the .txt extention) and put it in the same folder. If you choose to omit this list, Vtex will create an empty one for you during compilation.
  5. The Vtex executable (Vtex.exe) is located in the /Steam/SteamApps/username/sourcesdk/bin/ folder. It can be executed in one of two ways: Through the easy "drag-and-drop" method in Windows (described below), or the more advanced command prompt method, described here. Steam must run while it is executed.
  6. The resulting Valve Texture File (.vtf) will be compiled to the materials/ folder of the current game by default. For instance, if your username would be GordonFreeman, and the current game would be Half-Life 2, the texture file would be compiled to the SteamApps/GordonFreeman/half-life 2/hl2/materials/ folder. If the targa image resided within a subfolder, Vtex will compile the texture file to the corresponding materials/ subfolder. If that subfolder doesn't exist, Vtex will create it automatically.


The drag-and-drop method

The drag-and-drop method is the easy way to use Vtex. Just drag the icon of the targa image to be converted (from its materialsrc/ folder) on top of the icon of the Vtex executable (Vtex.exe) and let go, and Vtex will compile its texture file automatically.


See also