How to convert an animated GIF to a spray using Photoshop and VTFEdit.
1.Open an animated GIF in Photoshop.
2.Resize the image to a power of 2 (512x512, 256x256, 128x128, etc.). I recommend 256x256. If your image doesn't have equal width and height, resize the higher value and then change the canvas size to match it.
3.Export GIF frames to individual image files. File > Export > Render Video. Choose Image Sequence > PNG and hit Render. Each frame from the GIF will appear as a PNG in the export directory.
4.Import in VTFEdit. File > Import.
Now, one thing to keep in mind is the file size of your VTF must be under 512kb. A particularly long animation won't fit under that size. So, what you can do is Ctrl+click and select every odd numbered frame, every 5th, every 10th and so on.
When you hit import, change the Normal and Alpha formats to DXT1. If you're making a transparent spray, they should be DXT5. Change the Texture Type to animated texture and make sure Generate MipMaps is unchecked. Hit Ok. Now, under the flags, check Anisotropic, Clamp S, Clamp T, No Mipmap and No Level of Detail, and choose "none" under the sharpen filter. If your spray is transparent, make sure "eight bit alpha" is checked. Hit the info tab, make sure the "Size" is under 512kb and when you're satisfied, go to File > Save as. This will save the VTF (spray file).
Tip: When exporting a single image direct from Photoshop (using a VTF plugin), these are the settings I use for highest quality sprays. Preset: Spray or Spray with alpha, with flags: anisotropic, no mipmap, no level of detail and sharpen filter set to none.
6.Drop the VTF into materials/vgui/logos.
7.Make the VMT. Make sure the VMT has the same name as your new spray VTF. This is what should be inside:
"UnlitGeneric"
{
"$basetexture" "vgui\logos\VTFNameHere"
"$translucent" "1"
"$ignorez" "1"
"$vertexcolor" "1"
"$vertexalpha" "1"
}
Now, select your new VTF in-game through the options > multiplayer menu.







