Spray Generation Tutorial

Step-by-step:

  1. Download and install the latest version of GIMP editor.
  2. Put the script prepare-spray-frames.scm into Script-Fu scripts directory (C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts\).
  3. Run the GIMP (or if it's already running refresh Script-Fu by clicking "Xtns > Script-Fu > Refresh").
  4. Open the source image you'd like to make a Spray (any image, with transparency, alpha channel, animation) and click "[lepra] TF2 > Prepare Spray Frames".
  5. If you have several images opened select the correct one. Don't uncheck the PNG/GIF checkbox (VTFEdit doesn't understand transparency of GIF).
  6. Press [OK] and wait for a while. New image window appears (this is an intermediate image, it's not saved, just for you to check correctness).
  7. After all the frames saved into separate PNG-images (several images with suffix _frameXXX near the source image) you'll see the dialog with work results.
  8. Download and install VTFEdit.
  9. Run the program and click "File > Import".
  10. Select generated frame sequence files (use Ctrl and Shift keys to select several files at once, NOTE: don't try to import file by file, VTFEdit treats this as discarding previous import) and open them.
  11. Uncheck "Resize" (the frames already have correct size), select "DXT1" / "DXT5" / "Animated Texture" in general options, check or uncheck "Generate Mipmaps" at will (remember that image without mipmaps looks uglier at distance but requires 25% less space) and press [OK].
  12. Check texture transparency ("View > Mask") and animation correctness (button [Play] on tab "Image" on left pane). Note that you can't control animation speed or specific frame delay (though you may duplicate frames to emulate this).
  13. If everything is OK, check "Options > Auto Create VMT file" and save the texture VTF file into your game spray directory (i.e. C:\Program Files\Steam\SteamApps\<profile>\team fortress 2\tf\materials\VGUI\logos\). Note that spray texture shouldn't exceed ~120 kilobytes.
  14. Run the game, go to "Options > Multiplayer", select your spray image in the combo-box (it should automatically appear there) and enjoy!

Links:

Nikolay Yurchenko (aka UNV)
Hosted by uCoz