Vtex compile parameters: Difference between revisions
m (Cleaned up, updated) |
(more commands added) |
||
Line 14: | Line 14: | ||
== Parameters == | == Parameters == | ||
{{todo|further explain these}} | |||
; alphatest_hifreq_threshhold | |||
; alphatest_threshhold | |||
; alphatest | |||
: {{todo|What do these do?}} | |||
; anisotropic | ; anisotropic | ||
: | : Force at least Anisotropic filtering on the compiled texture. | ||
; bumpscale | ; bumpscale | ||
: How Vtex should convert a [[heightmap]] into a [[Normal Maps|normal map]] and how much to exaggerate/intensify it. | : How Vtex should convert a [[heightmap]] into a [[Normal Maps|normal map]] and how much to exaggerate/intensify it. | ||
; clamps | ; clamps | ||
; clampt | ; clampt | ||
: Do not allow the texture to wrap in the S or | ; clampu | ||
: Do not allow the texture to wrap in the S, T, or U coordinate space, respectively. This is most often used for sprites that are not tiled. {{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.}} | |||
; dudv | |||
: Texture is a Du/Dv map. | |||
; dxt5 | ; dxt5 | ||
: Use [[DirectX Texture compression 5|DXT5]] compression instead of full compression. | : Use [[DirectX Texture compression 5|DXT5]] compression instead of full compression. | ||
; minmip | |||
: No minimum mipmap. | |||
; nocompress | ; nocompress | ||
: Do not use compression on this texture. Useful for textures with fine gradation (like light halos). | : Do not use compression on this texture. Useful for textures with fine gradation (like light halos). | ||
; nodebug | |||
: No debug override. | |||
; nolod | ; nolod | ||
: Do not use lower quality versions of this texture in lower DirectX versions. Used for non-world graphics such as HUD art. | : Do not use lower quality versions of this texture in lower DirectX versions. Used for non-world graphics such as HUD art. | ||
Line 32: | Line 45: | ||
: Do not use [[NICE filtering]] on this texture’s lower mip-levels. | : Do not use [[NICE filtering]] on this texture’s lower mip-levels. | ||
; normal | ; normal | ||
: For normal | : For normal 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 <code>_normal</code>}} | {{note|Automatically applies when the texture name ends with <code>_normal</code>}} | ||
; normalalphatodudvluminance | |||
: {{todo|Figure out how to make this work}} | |||
; normaltodudv | |||
: Converts the texture to a Du/Dv map. | |||
; oneovermiplevelinalpha | |||
: Alpha channel fades out as mipmaps get smaller. | |||
; pfm | |||
: Source texture is a portable floatmap. Used for HDR. | |||
; pfmscale (float) | |||
: Used to scale floatmap intensity. | |||
; pointsample | |||
: Do not filter this texture in-game. | |||
; premultcolorbyoneovermiplevel | |||
: Color channel fades out as mipmaps get smaller. | |||
; procedural | |||
: Texture is procedural. | |||
; rendertarget | |||
: Texture is a rendertarget. | |||
; singlecopy | |||
: {{todo|What does this do??}} | |||
; 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. | ||
; spheremap_negz | |||
; spheremap_z | |||
; spheremap_negy | |||
; spheremap_y | |||
; spheremap_negx | |||
; spheremap_x | |||
: {{todo|Are these functional?}} | |||
; ssbump | ; ssbump | ||
: Used for [[$ssbump|self-shadowing bump maps]]. | : Used for [[$ssbump|self-shadowing bump maps]]. | ||
Line 42: | Line 82: | ||
; 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. Up to 1,000 frames are allowed. | : 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. | ||
; stripalphachannel | |||
: Used to tell Vtex to ignore the source texture's alpha channel. | |||
; stripcolorchannel | |||
: Used to create a texture with no color data. | |||
; trilinear | |||
: Force at least Trilinear filtering on the compiled texture. | |||
; volumetexture | |||
: Creates a volumetric texture. | |||
== using .psd 'file info' parameters == | == using .psd 'file info' parameters == |
Revision as of 23:51, 5 February 2014
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
- alphatest_hifreq_threshhold
- alphatest_threshhold
- alphatest
- Todo: What do these do?
- anisotropic
- Force at least 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
- clampu
- Do not allow the texture to wrap in the S, T, or U coordinate space, respectively. This is most often used for sprites that are not tiled.
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.
- dudv
- Texture is a Du/Dv map.
- dxt5
- Use DXT5 compression instead of full compression.
- minmip
- No minimum mipmap.
- nocompress
- Do not use compression on this texture. Useful for textures with fine gradation (like light halos).
- nodebug
- No debug override.
- 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.
- nonice
- Do not use NICE filtering on this texture’s lower mip-levels.
- normal
- For normal 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.

_normal
- normalalphatodudvluminance
- Todo: Figure out how to make this work
- normaltodudv
- Converts the texture to a Du/Dv map.
- oneovermiplevelinalpha
- Alpha channel fades out as mipmaps get smaller.
- pfm
- Source texture is a portable floatmap. Used for HDR.
- pfmscale (float)
- Used to scale floatmap intensity.
- pointsample
- Do not filter this texture in-game.
- premultcolorbyoneovermiplevel
- Color channel fades out as mipmaps get smaller.
- procedural
- Texture is procedural.
- rendertarget
- Texture is a rendertarget.
- singlecopy
- Todo: What does this do??
- skybox
- Used for compiling skyboxes. This assures the edges match between each facet.
- spheremap_negz
- spheremap_z
- spheremap_negy
- spheremap_y
- spheremap_negx
- spheremap_x
- Todo: Are these functional?
- ssbump
- Used for self-shadowing bump maps.

_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.
- stripalphachannel
- Used to tell Vtex to ignore the source texture's alpha channel.
- stripcolorchannel
- Used to create a texture with no color data.
- trilinear
- Force at least Trilinear filtering on the compiled texture.
- volumetexture
- Creates a volumetric texture.
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;