[TIP] Batch compiling custom textures

  • If you're asking a question make sure to set the thread type to be a question!
Dec 25, 2007
566
439
If you've got a number of custom textures used in your map, I found it very handy to put a batch file in the "sourcesdk_content\tf\materialsrc\MAPNAME" directory. The contents of the batch file, "make_textures.bat":
Code:
"c:\Program Files\Steam\steamapps\STEAM_NAME\sourcesdk\bin\orangebox\bin\vtex" -nop4 *.tga
copy *.vmt "..\..\..\..\team fortress 2\tf\materials\MAPNAME\"
; replace MAPNAME in the line above with your map name
; or the directory where your compiled custom textures go.
; and replace STEAM_NAME with your steam account name
Then for all my custom textures, I would save the .tga and .vmt to the "sourcesdk_content\tf\materialsrc\MAPNAME" directory. No matter how many textures I created or edited between testing the map, a quick double-click on the batch file would compile only those that had changed in a few seconds. This made for a very quick turnaround when tweaking textures to get them just right.
 
Last edited: