Difference between revisions of "Vtex compile parameters"

From Valve Developer Community
Jump to: navigation, search
(using .psd 'file info' parameters)
m (Cleaned up, updated)
Line 1: Line 1:
 
[[Vtex]] can accept a list of additional compile parameters during its execution. These parameters are optional, but sometimes necessary to get a good result.
 
[[Vtex]] can accept a list of additional compile parameters during its execution. These parameters are optional, but sometimes necessary to get a good result.
  
The list is written in the form of a simple text (.txt) document with the same name as the [[TGA|targa (.tga)]] image to compile, and it should be put in the same folder asit, namely 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>).
+
The list is written in the form of a simple text (.txt) document with the same name as the [[TGA|targa (.tga)]] image to compile, and it should be put in the same folder as it, namely in the <code>SteamApps/common/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>).
  
 
Example usage from one of the files for the console background:
 
Example usage from one of the files for the console background:
Line 17: Line 17:
 
: Use Anisotropic filtering on the compiled texture.
 
: Use Anisotropic filtering on the compiled texture.
 
; bumpscale
 
; bumpscale
: {{TODO|Something to do with [[heightmap]]s, and possibly [[Normal Maps|normal maps]].
+
: How Vtex should convert a [[heightmap]] into a [[Normal Maps|normal map]] and how much to exaggerate/intensify it.
More specifically how it should convert a [[heightmap]] into a [[Normal Maps|normal map]] and how much to exaggerate/intensify it.}}
 
 
; clamps
 
; clamps
 
; clampt
 
; clampt
Line 34: Line 33:
 
; normal
 
; normal
 
: For normal maps and possibly DuDv maps. Used to prevent compression artifacts caused by [[VTF#Choosing_an_image_format|DXTn]] compression which distort the smooth gradients on most normal maps. Leaves texture uncompressed and sets Trilinear flag to force Trilinear filtering. Furthermore, all normals will be kept normalized during mipmap generation.
 
: For normal maps and possibly DuDv maps. Used to prevent compression artifacts caused by [[VTF#Choosing_an_image_format|DXTn]] compression which distort the smooth gradients on most normal maps. Leaves texture uncompressed and sets Trilinear flag to force Trilinear filtering. Furthermore, all normals will be kept normalized during mipmap generation.
{{note|Automatically applies when the texture name ends with ''_normal''}}
+
{{note|Automatically applies when the texture name ends with <code>_normal</code>}}
 
; skybox
 
; skybox
 
: Used for compiling [[skybox]]es. This assures the edges match between each facet.
 
: Used for compiling [[skybox]]es. This assures the edges match between each facet.
 
; ssbump
 
; ssbump
 
: Used for [[$ssbump|self-shadowing bump maps]].
 
: Used for [[$ssbump|self-shadowing bump maps]].
{{note|Automatically applies when the texture name ends with ''height-ssbump''}}
+
{{note|Automatically applies when the texture name ends with <code>_height-ssbump</code>}}
 
; startframe (integer)
 
; startframe (integer)
 
; endframe (integer)
 
; endframe (integer)
: Used for animated textures. Textures must be named as ''texture000'', ''texture001'', ''texture002'', etc. The ''startframe'' defines the beginning frame and the ''endframe'' defines the ending frame. Maximum frames allowed: 1000.
+
: Used for animated textures. Textures must be named as ''texture000'', ''texture001'', ''texture002'', etc. The ''startframe'' defines the beginning frame and the ''endframe'' defines the ending frame. Up to 1,000 frames are allowed.
  
 
== using .psd 'file info' parameters ==
 
== using .psd 'file info' parameters ==
  
textures compiled from .psd files can have command line parameters saved into the .psd directly. To do this, use the 'file info' menu in photoshop and add your vtex commands into the "description" text field.  These parameters will get evaluated by vtex when the .psd file is compiled.   
+
Textures compiled from .psd files can have command line parameters saved into the .psd directly. To do this, use the 'File Info' menu in Photoshop and add your Vtex commands into the "description" text field.  These parameters will get evaluated by Vtex when the .psd file is compiled.   
  
Here's example usage for creating a gobo for an SFM flashlight that won't tile:
+
Here's an example of usage for creating a flashlight that won't tile:
  
 
<pre>
 
<pre>
Line 61: Line 60:
 
* [[Vtex CLI use]]
 
* [[Vtex CLI use]]
 
* [[Material Creation]]
 
* [[Material Creation]]
* [[Shader Types and Parameters]]
 
 
 
  
 
[[Category: Tools]]
 
[[Category: Tools]]
 
[[Category: Material System]]
 
[[Category: Material System]]

Revision as of 08:44, 17 December 2013

Vtex can accept a list of additional compile parameters during its execution. These parameters are optional, but sometimes necessary to get a good result.

The list is written in the form of a simple text (.txt) document with the same name as the targa (.tga) image to compile, and it should be put in the same folder as it, namely in the SteamApps/common/gamefolder/materialsrc/ folder, where gamefolder is the game folder of the current game (cstrike/dod/hl2/hl2mp).

Example usage from one of the files for the console background:

nonice 1
nolod 1
nomip 1


Parameters

anisotropic
Use Anisotropic filtering on the compiled texture.
bumpscale
How Vtex should convert a heightmap into a normal map and how much to exaggerate/intensify it.
clamps
clampt
Do not allow the texture to wrap in the S or T coordinate space, respectively. This is most often used for sprites that are not tiled.
Tip.png Tip: When a texel is requested that is outside of the texture, one of two techniques is used: Clamping limits the texel to the texture size, moving it to the nearest if it is more than the texture size. Wrapping makes the texel move back into the texture by increments (each to size of the texture). Wrapping causes a texture to be repeated; clamping causes it to be in one spot only.
dxt5
Use DXT5 compression instead of full compression.
nocompress
Do not use compression on this texture. Useful for textures with fine gradation (like light halos).
nolod
Do not use lower quality versions of this texture in lower DirectX versions. Used for non-world graphics such as HUD art.
nomip
Do not use mip-levels for this texture. Used for materials like skyboxes and menu backgrounds.
Bug.png Bug: The MIPs are still generated and loaded! Use VTFEdit to reduce texture footprint.
nonice
Do not use NICE filtering on this texture’s lower mip-levels.
normal
For normal maps and possibly DuDv maps. Used to prevent compression artifacts caused by DXTn compression which distort the smooth gradients on most normal maps. Leaves texture uncompressed and sets Trilinear flag to force Trilinear filtering. Furthermore, all normals will be kept normalized during mipmap generation.
Note.png Note: Automatically applies when the texture name ends with _normal
skybox
Used for compiling skyboxes. This assures the edges match between each facet.
ssbump
Used for self-shadowing bump maps.
Note.png Note: Automatically applies when the texture name ends with _height-ssbump
startframe (integer)
endframe (integer)
Used for animated textures. Textures must be named as texture000, texture001, texture002, etc. The startframe defines the beginning frame and the endframe defines the ending frame. Up to 1,000 frames are allowed.

using .psd 'file info' parameters

Textures compiled from .psd files can have command line parameters saved into the .psd directly. To do this, use the 'File Info' menu in Photoshop and add your Vtex commands into the "description" text field. These parameters will get evaluated by Vtex when the .psd file is compiled.

Here's an example of usage for creating a flashlight that won't tile:

clamps 1;
clampt 1;
border 0;

See also