Vtex compile parameters
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 asit, namely in the
SteamApps/username/sourcesdk_content/gamefolder/materialsrc/ folder, where gamefolder is the game folder of the current game (
Example usage from one of the files for the console background:
nonice 1 nolod 1 nomip 1
- Use Anisotropic filtering on the compiled texture.
- To do: Something to do with heightmaps, and possibly normal maps.
- 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: 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.
- Use DXT5 compression instead of full compression.
- Do not use compression on this texture. Useful for textures with fine gradation (like light halos).
- 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 mip-levels for this texture. Used for materials like skyboxes and menu backgrounds. Bug: The MIPs are still generated and loaded! Use VTFEdit to reduce texture footprint.
- Do not use NICE filtering on this texture’s lower mip-levels.
- 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.
- Used for compiling skyboxes. This assures the edges match between each facet.
- Used for self-shadowing bump maps.
- 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. Maximum frames allowed: 1000.
using .psd 'file info' parameters
textures compiled from .psd files can have command line parameters saved into the .psd directly by using the 'file info' menu in photoshop. any vtex command line parameters added to the "description" text field 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:
clamps 1 clampt 1 border 0