Animated GIF to VTF Spray Maker
Drop an animated GIF and get an animated .vtf spray (plus its .vmt) that stays under the 512 KB spray limit. The tool keeps as many frames and pixels as fit, drops or shrinks only when it must, and shows the final file size before you download. It runs in your browser, so the GIF is never uploaded.
How to make an animated spray from a GIF
- 1
Drop your GIF
Pick any animated GIF. Every frame is decoded on your device with its own delay, transparency and disposal, exactly as a browser plays it.
- 2
Choose size and format
Pick the spray size (512, 256, 128, 64 or 32 px) and DXT5 for transparency, DXT1 for the most frames, or BGRA8888 for lossless colour.
- 3
Let it fit under 512 KB
With the limit on, the tool picks frames and size so the VTF is at most 524,288 bytes. The final size and a bar against the limit show before you save.
- 4
Download and install
Save the spray ZIP and unzip it into your game folder (it has materials/vgui/logos already), or import the .vtf in the game's spray menu.
How many frames fit in a 512 KB spray
A VTF stores every frame at full size, so the frame count depends on the size and the format. These are the most frames that fit with mipmaps off (an 80-byte header and a tiny thumbnail included).
| 512 x 512, DXT5 | 1 frame (256 KB each). Big sprays are still images; for animation go smaller. |
|---|---|
| 512 x 512, DXT1 | 3 frames (128 KB each), no transparency. |
| 256 x 256, DXT5 | 7 frames (64 KB each), with smooth transparency. |
| 256 x 256, DXT1 | 15 frames (32 KB each), no transparency or 1-bit only. |
| 128 x 128, DXT5 | 31 frames (16 KB each). |
| 128 x 128, DXT1 | 63 frames (8 KB each): the choice for long GIFs. |
| BGRA8888 | Lossless, 4 bytes per pixel: 256 x 256 fits 1 frame, 128 x 128 fits 7. |
| Output | A multi-frame VTF 7.2 with clamp and no-LOD flags, an UnlitGeneric VMT with the AnimatedTexture proxy, and a menu VMT, in one ZIP. |
Why animated sprays have a 512 KB limit
Source games send your spray to every player on the server, so they refuse spray files over 512 KB. A GIF compresses frames against each other, but a VTF cannot: each frame is stored whole. A 40-frame GIF of a few hundred kilobytes can turn into many megabytes as a VTF, which is why most spray makers ask you to cut frames by hand.
This tool does the maths for you. In Auto mode it keeps at least half the frames (all of them for short GIFs) and picks the largest size that fits. Keep the size drops frames evenly across the loop, so the motion stays smooth; Keep every frame shrinks the spray instead. You can also turn the limit off for a texture that is not a spray.
Keeping the speed of the GIF
When frames are dropped, the remaining frames are spaced out across the same loop, and the frame rate written to the VMT is lowered to match, so one loop takes as long as it did in the GIF. You can also set a fixed rate. Some games play sprays at their own speed for other players, so check it in game.
Installing the spray
In Team Fortress 2 and most Source games, open Options, then Multiplayer, and import the .vtf as your spray. To install it by hand, unzip the spray ZIP into the game folder (for example tf/ or garrysmod/): the VTF and VMT go to materials/vgui/logos and the small VMT in UI/ lets the menu show it. Pick it in the spray list and set your spray key in the keyboard options.
Need a new model or texture for your mod?
Make a 3D model from a photo or a short text prompt with AI, or generate a seamless texture, then bring it into your Source or GoldSrc project with these free converters.
More free Source texture tools
GIF to VTF spray questions
Valve, Source, Garry's Mod, Team Fortress 2 and Counter-Strike are trademarks of Valve Corporation, named only to describe file compatibility; The3DAI is not affiliated with or endorsed by Valve.