Spray Generation Tutorial
Step-by-step:
- Download and install the latest version of GIMP editor.
- Put the script prepare-spray-frames.scm into Script-Fu scripts directory (C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts\).
- Run the GIMP (or if it's already running refresh Script-Fu by clicking "Xtns > Script-Fu > Refresh").
- 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".
- If you have several images opened select the correct one. Don't uncheck the PNG/GIF checkbox (VTFEdit doesn't understand transparency of GIF).
- 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).
- 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.
- Download and install VTFEdit.
- Run the program and click "File > Import".
- 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.
- 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].
- 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).
- 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.
- 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)