ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to make (.vtf) Animated Sprays for Source Games

Updated on June 15, 2011

Popular Source Games


Hello, today I'm gonna help you make or convert animations (moving pictures) to sprays that are usable by some of the games based on the Source engine. The games I know that support this are: Portal 2, Left 4 Dead (2), Half Life: Deathmatch and Counter-Strike: Source.
In this article I we will use a program called VTFEdit, you can download it here:
Once you have downloaded - and installed it, we can begin.

While reading this article, I will show my progress in the process of making my own animated spray. I will be making a dancing Rick Ashley!


This article assumes you already have an animation ready that you want to use as spray.
Make sure that you have...

  • ...every frame (of your animation) as a separate image file.
  • ...every frame as a square image. The width and height dimensions must be the same.
  • ...every frame in the same directory.
  • ...every frame's image file's name as the index of the frame within the animation.
    It doesn't matter if your frame starts at index 0 or 1, hell, it can even start at 36. As long as the frames are in the correct numerical order. I haven't tested alphabetical order though.

I have prepared my frames with the steps above and this is my result:

as you can see, I have 13 frames for my animation.

With VTFEdit, we can load our animation, and then export it to our desired file format. (.vtf)
So lets import them into VTFEdit!

Import Animation

Open VTFEdit. When you are ready, go to the "File" menu and choose "Import". Select all the frames of your prepared animation and open them.
You will see the following panel:

You can see that there are 3 tabs, just stay at the "General" tab, we don't need the other tabs.
You can also see that everything is divided into 4 different groups: "General", "Resize", "Mipmaps" and "Normal Map".
If the checkbox "Generate Mipmaps" in group "Mipmaps" is checked, uncheck it. The same goes for "Generate Normal Map" in "Normal Map". Most of you probably don't know what those are for, but we don't need them anyway.
For the "General" group, set everything to how they are in the picture above, if not already.

Don't click on "OK" yet. We first need to know to what dimensions we want to re-size our animation to.
Sprays have to be equal in width and height, but their width and height will also have to be a power of 2. So for example: 1x1, 2x2, 4x4, 8x8, 16x16, 32x32, etc...
I want to re-size my frames to 128x128 pixels. You can choose another size though. Also keep in mind that sizes too big will make your spray unable to use in-game, but if you will have any problems with that, you will be helped a little later.

So if we take a look now at the "Resize" group, you have to make sure the "Resize" checkbox is checked. You can change the options below the "Resize" checkboxif you want, but only do that if you really know what they mean. If not, you can just let those options as they are.
Actually, we do want to change "Maximum Width" and "Maximum Height" to our desired dimensions. Note that we can only choose a set of numbers that is the power of two, as expected. So do that now, as you can see in the image above, I changed it to 128x128.

Ok, so now that we made sure all the options are right, click on "OK".
We've now imported our animation into VTFEdit. You can click on the "Play" button to see your animation play, it is very fast though. When you spray your animation on a wall in-game, it will play a lot slower. The only thing is, we can't set or change it's frame-rate. The least thing you can do is to delete some frames in between so that your animation appears faster.

Export Animation

Now that our animation is loaded and ready in VTFEdit, lets export it. Go the "File" menu again and choose "Save As...", you can then choose were to save the file as a '.vtf' file .

You animation is now exported to the .vtf format! But wait! We are not done yet!
Yes, we have to test it.


Import your spray in your game and spray it on the wall. If it works you should see your spray, if you see nothing then there is something wrong with it.
Sprays won't work if the dimensions (width and height) or the file size are too big.
I've researched for the maximum file sizes for .vtf files to be usable in-game, without success. I think that each game has it's own limits.
The file size limit will probably be around 200kB's for each game, some games less, and games more. The limits might get higher with some updates too.
The maximum width and height should be easier to find because it is more accurate when tested, but if you want to know you'll have to 'google' it your self:

You can also do it the trail/error way. That's what I usually do. Try to remove some frames or re-size it to smaller dimensions (but still square) until it works again.
But when you finally got it working, you may pat yourself on the back, you are ready.

Import your spray and enjoy spray spamming!!!


    0 of 8192 characters used
    Post Comment

    • profile image


      4 years ago

      Totally agree!

    • profile image


      6 years ago


    • profile image


      6 years ago

      tutorials that you find on google that tell you to "google it" are gay shit.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)