I’ve been playing Team Fortress 2 a little lately, and it’s most entertaining. As some of you may know, it being a Valve game, the option to “spraypaint” a tag onto the walls is present as it was in Counterstrike, however, creating these custom images for use can be a bit of a pain.
First of all, you’ll need something like Photoshop. GIMP will do, but these instructions are for Photoshop.
Next you’ll need VTF Edit, which you can get from the bottom of the VTF Edit website. It’s a lot cheaper than Photoshop…
- Now open Photoshop. Create a blank 256×256 RGB 8-bit image.
- Fill this image with mid-grey R 128, G 128, B 128.
- Create a new layer on top of this, and draw / add whatever you want to it. Delete from this layer any bits you want to be transparent in the final spray image
- Press CTRL and click the layer you’re drawing on in the layers pallete, this selects only what you’ve drawn onto the layer
- On the Channels tab, click the second button from the left to “Create alpha channel from selection”
- Go back to the layers tab. Click Layer->Flatten Image
- Now save the image as a TGA file, make sure Alpha Channels is ticked, hit OK and select “32 bit” if a little dialog pops up
- Open VTF Edit, go to File->Import and select your TGA file
- In the dialog that appears, uncheck “Generate Mipmaps” and leave everything else default. Alpha Format should read ‘DXT5′. Hit OK.
- To confirm that yout TGA alpha map worked OK, you can check View->Mask, which should turn on the alpha map preview
- Go to File->Save As and save the file
Once you’ve generated the VTF file you need to place it in two locations:
\team fortress 2\tf\materials\VGUI\logos\
\team fortress 2\tf\materials\VGUI\logos\UI\
If the folders don’t exist, then just create them. As far as I can tell, it is case sensitive, so watch out for that. When you’re all done with that, load TF2 and go to the Advanced tab on the options page and select your spray tag image.
Blagpuss points out that some users might need to add “_english” to the ‘tf’ portion of the path, this might vary for users with other regionalised copies too, so watch out for that.