forked from ValveSoftware/source-sdk-2013
-
Notifications
You must be signed in to change notification settings - Fork 0
Materials
Gustav Tiger edited this page Aug 11, 2013
·
1 revision
- Download and compile https://github.com/impiaaa/vtflib-posix
- Use VTFCmd to convert images into .vtf (Valve Texture Format) files
For simple static files, such as backgrounds or logos. Note that the input image must be a power of two size (such as 256x512)
./vtfcmd -file input.png -format "RGB888" -alphaformat "RGBA8888" -nomipmaps -nothumbnail -noreflectivity
See https://developer.valvesoftware.com/wiki/VTFCmd https://developer.valvesoftware.com/wiki/Valve_Texture_Format for more info.
Then place the resulting .vtf file in the mp/game/mod_hl2mp/materials
folder together with an .vmt (Valve Material Type) file containing:
"UnlitGeneric"
{
"$basetexture" "path/to/vpk/file/relative/to/the/materials/folder/without/file/ending"
"$vertexcolor" 1
"$vertexalpha" 1
"$ignorez" 1
"$no_fullbright" "1"
"$nolod" "1"
}
See https://developer.valvesoftware.com/wiki/Material for more information