animated GIF to spray

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.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • ASF's Levels
    • P1: Beggar
      Points: 740
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 19 days ago

    Isn't there a limited amount of frames you can add to the spray?

    Advance Special Forces
  • Doktor Haus's Levels
    • P3: Peasant
      Points: 7,638
    • E1: Helper
      EF: 5
    • C2: Treehouse Member
    • A4: Graduate
      Account Age: 2 years
    Posted 3 months ago

    Posted by haj325

    Pros:

    • i cant find a way to make this stupid fucking thing into that if u have a heart can any of u do this image http://dash.ponychan.net/chan/files/src/132839330161.gif

    Nope, none of us have a heart, so you'll actually have to read the tutorial and do a little work. :3

    User Title
    model hacker, compiler
  • haj325's Levels
    • P1: Beggar
      Points: 1
    • C1: Member
    • A1: Lollipop
      Account Age: 3 months
    Posted 3 months ago

    Pros:

    • i cant find a way to make this stupid fucking thing into that if u have a heart can any of u do this image http://dash.ponychan.net/chan/files/src/132839330161.gif
    Bananite
  • ZeiZei1's Levels
    • P1: Beggar
      Points: 672
    • C1: Member
    • A4: Graduate
      Account Age: 3 years
    Posted 4 months ago

    how to change the time between frames?

    Mapper
  • mayosia's Levels
    • P2: Drudge
      Points: 1,509
    • C1: Member
    • A3: Apprentice
      Account Age: 1 year
    Posted 8 months ago

    Is Celestia no?

    User Title
    The AppleDash
  • Sound of the Lyre's Levels
    • P1: Beggar
      Points: 635
    • C1: Member
    • A3: Apprentice
      Account Age: 2 years
    Posted 9 months ago

    Posted by Dpx008

    Nice tutorial! But i'm trying to do a Spray with this GIF: http://postimage.org/image/99nv286kx/ and i'm not able to do it. Could you try to do it for me please?

    This tutorial was made for people like you, so you can do it yourself and not go running to others to do it for you. You're not even saying what went wrong in creating the spray yourself. If you gave us some sort of error message, we might be able to help you.

    User Title
    I'm a secret agent man!
  • ASTFA's Levels
    • P2: Drudge
      Points: 3,423
    • E2: Guide
      EF: 38
    • C1: Member
    • A4: Graduate
      Account Age: 2 years
    Posted 11 months ago

    Nice and simple tutorial. Do you know what size the resulting spray would be in-game and if there's a way to make it larger than usually permitted?

    Ima noob n I help other noobs
  • Zombie_hell's Levels
    • P2: Drudge
      Points: 2,740
    • C1: Member
    • A3: Apprentice
      Account Age: 2 years
    Posted 11 months ago

    I gues it works the same way for GIMP

    User Title
    I'l SEE you there...
  • Dpx008's Levels
    • P1: Beggar
      Points: 12
    • C1: Member
    • A2: Tenderfoot
      Account Age: 11 months
    Posted 11 months ago

    Nice tutorial! But i'm trying to do a Spray with this GIF: http://postimage.org/image/99nv286kx/ and i'm not able to do it. Could you try to do it for me please?

    Bananite

Credits

Submitter
Doktor Haus's Levels
  • P3: Peasant
    Points: 7,638
  • E1: Helper
    EF: 5
  • C2: Treehouse Member
  • A4: Graduate
    Account Age: 2 years
Username
Doktor Haus
(Creator/Co-creator)
Key Authors
Doktor haus
tutorial

Rating

10.0/10
Based off 3 rating(s)

Additional Info

Genre
Motion Graphics, Other/Misc, Texturing
Difficulty Level
Beginner

Stats

Post Count
9
ViewCount
4,436
Date Added
11 months ago
Date Modified
5 months ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share