[TIP] Batch compiling custom textures

Discussion in 'Mapping Questions & Discussion' started by VelvetFistIronGlove, Mar 22, 2008.

  1. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Positive Ratings:
    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":
    "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.
    • Thanks Thanks x 2
    Last edited: Mar 22, 2008