TF2 Custom Spray Image with Transparency

Thursday, October 11th, 2007 at 2236

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:

  • \Steam\steamapps\ \team fortress 2\tf\materials\VGUI\logos\
  • \Steam\steamapps\ \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.

Simple… 😉

Update:
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.

29 Comment for “TF2 Custom Spray Image with Transparency”

  1. Andrew Said this on

    My contribution (Day of Defeat source) http://www.flickr.com/photos/adonaldson/331883522/

  2. Denyerec Said this on

    And mine: http://s80.photobucket.com/albums/j166/denyerec/?action=view&current=cp_gravelpit0000.jpg

  3. zimmer Said this on

    Watch people do not steal your Monkey icon!!! Oh, and is there VTF for Linux?
    GIMP, GIMP, GIMP, GIMP, GIMP, GIMP, GIMP, GIMP, ………

  4. Jason Said this on

    Thank you for the help! I had Photoshop had VTFEdit, but just wasn’t having any luck until I stumbled onto your site. Worked perfectly.

  5. Buh Said this on

    Does this work for the animated sprays as well?
    I’ll have to try tomorrow when i’m less burnt out…Thanks for the tips.

  6. Blagpuss Said this on

    Everything you’ve said above is correct but the path isn’t

    the correct path is

    C:\Program Files\Steam\SteamApps\Account name\team fortress 2\tf_english\materials\VGUI\logos

    C:\Program Files\Steam\Steam\Apps\Account name\team fortress 2\tf_english\materials\VGUI\logos\UI

  7. Denyerec Said this on

    Perhaps on internationalised copies of TF2, but on the default english version the path is as stated.

  8. Mark Said this on

    Does this apply to Photoshop CS3? Because I can’t find the “Create alpha channel from selection” in channels tab.

  9. Denyerec Said this on

    Yes, the instructions are for CS3. If you do a google search for “Create alpha channel from selection” you should find a few tutorials that show you with screenshots what’s going on.

  10. Eros Junior Said this on

    Thx for the aid!
    Loved this. Learned how to make transparent spray!

  11. Hr. Strane Said this on

    A great Tutorial many thanks, works fine for me after adding “_english”.

  12. Anonymous Said this on

    @ Mark: I think CS3 says “Save selection as channel” or something along those lines. It’s in the same spot, 2nd from the left on channels palette.

  13. Voyager I Said this on

    I run with PS 7.0, and it insists that TGA files must be saved as copies, which also denies me the ability to preserve the Alpha Channel. As a result, the gray areas of my image are still there when I try to use it as a spray. I tried saving as a PNG to circumvent this (it’s still recognized by VTFEdit and it allows Alpha Channels), but it didn’t work. I suppose I can just come up with some crap to fill it with, but I’d rather not.

    Thanks for the guide, though. It’s quite helpful.

  14. Jawa Said this on

    i have Adobe Photoshop Elements. i can almost do my spray but one problem is that
    i cant find the Channels tab to turn on “Create alpha channel from selection.” can anyone help me or guide me to it X mark the spot please?

  15. theblahman Said this on

    @Mark,

    In the Channels tab, when you mouse over the buttons, none of them say anything about Alpha. Just do what the tut says and click the second from the left, it will work.

    Thanks for the tut! Has worked a treat.

  16. leth Said this on

    @Voyager: tga support on photoshop 7 is a bit buggy, and has been patched. see here:
    http://nicolaescher.com/journal/article/20/photoshop-7-tga-plug-in-alpha-channel-bug

    and, ultimately, here:
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=1544

    this got targa transparency working for me in PS7

  17. Help make a meat mountain spray - voogru.com - Online Gaming Community Said this on

    […] Re: Help make a meat mountain spray I don’t have the time right now, but here’s a tutorial on how to do it: Make a custom spray with transparency. […]

  18. micky Said this on

    when you say name do you mean your account name or your game name.

  19. Denyerec Said this on

    “name” is in place of your account name.

  20. SteppenHelmut Said this on

    Is there an alpha channel in gimp? If so where?

  21. Coolguy Said this on

    I’m having the same problem that Jawa is. I have Adobe Photoshop Elements 7, and I can’t find any “Channels tab” anywhere. I read help and saw that “Photoshop elements doesn’t have a channels pallete”. Is there anything I can do?

  22. Denyerec Said this on

    I don’t think you can access the Channels directly in Elements, though I’ve never used it so am not sure. It SHOULD support transparency, perhaps just in a different way to Photoshop.
    As for the GIMP I’m afraid I have no idea. I’ve never been comfortable with that software, perhaps someone else in the comments here might lend a hand?

  23. Gastro Said this on

    Could you put up the instructions or
    tell us where we could get the instructions to make a trasparent spray using the free program gimp please?

  24. Gastro Said this on

    And this cant be done with photoshop elements 2.0 can it?

  25. Musings from teh M^onk^K » Blog Archive » Creating custom Team Fortress 2 Sprays for a PC Said this on

    […] "TF2 Custom Spray Image with Transparency" @ […]

  26. skillz4u2nv Said this on

    what do I do if I don’t have the VGUI folder?

  27. Denyerec Said this on

    Just create any folders you don’t have to match the required directory structure.

  28. WonderLlama112 Said this on

    When i try to create the files it says I can’t use a forward slash, help?

  29. Denyerec Said this on

    Create them one at a time, so if you don’t have: tf_english\materials\VGUI\logos you’d go into \tf_english\ and create “material”, then go into the folder you just created called “materials” and create “VGUI” etc… Hope that helps!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>