[TUT]Convert a GIF to a in-game Spray!

Discussion in 'TTT Discussion' started by Zikeji, Nov 10, 2013.

  1. Zikeji

    Zikeji Repoleved VIP Emerald

    Welcome to my tutorial on converting a GIF of your choice to a spray! To start off, this may be a little to complicated for some, if so - sorry.

    A suggestion before we get started, make sure your GIF of choice isn't overly long. And the more square the GIF is, the better(say no to rectangles, they come out small!).

    You'll need a bit of software called "GifSplitter". What this does is splits your GIF into each individual frame which helps turn it into a animated spray in our next step. You'll be happy to know this software is free, there are other non-associated versions, but this is the version I use:
    http://www.xoyosoft.com/gs/

    Once you have that downloaded and a GIF selected, we'll move to the next step.

    For the purpose of this thread, I'll be using this GIF:
    [​IMG]

    Once you have your .gif downloaded and GifSplitter downloaded, open up GifSplitter. I highly suggest you click the "Auto fill and create the output directory" checkbox as that makes it much easier.
    It should look like this:
    [​IMG]

    Now press the "..." next to the "Gif animation file" field, navigate to your GIF and select it. At this point you just click "Split Now". It might take a while to go through each individual frame.

    If you notice now, you should have a folder in the directory GifSplitter is in named after the file you just split. Navigate to that directory. If you used my example GIF, it should look like this:
    [​IMG]

    Ignore the framelist.gsf file, delete it if you want. It doesn't matter.

    For the next step you want "VTFEdit", this is a tool that allows you to make the .vtf animated spray. Here is the link:
    http://nemesis.thewavelength.net/index.php?c=178

    Once you've downloaded and installed this you're ready for the next step. Open up VTFEdit. Click "File" and then "Import". Navigate to your directory with your GIF frames(from the step above), select all the images and click "Open".

    Next you'll get a complicated looking window. Thankfully it's rather simple, nothing in this Window should be touched except the "maximum width" and "maximum height" field. I'd highly suggest you don't go over 256 pixels for either field, if you're GIF is square, do the same values, if it's rectangular, make the height half the width. Then press "OK". You might have to wait a while.

    It should look like this after you're done(or similar):
    [​IMG]

    Don't worry that it looks boxed, there's nothing you can do about that. Try and find a square GIF or a rectangular one (I'd suggest square, bigger ingame). Or you can edit the individual files yourself to crop it to a square(lengthy).

    Now you can preview the animation by clicking "Play". As far as I'm aware there's no way to change the speed at which the animation changes. But the speed shown in the window is faster then ingame, you might have to edit it later on.

    Once you're done reviewing it, press "Options" and then "Auto Create .VMT File". Now hit "File" and then "Save" and give it a name, by default it'll be saved in the directory with all the gif frames.

    At this point review the .vtf file. If it's over 500kb, it's to big. You can either make the resolution smaller in the first step or remove some frames that are unnecessary(you might do this anyway to increase fluidity and speed ingame). If it isn't over 500kb, you're almost done!

    Now navigate to this directory:
    Code:
    C:\Program Files (x86)\Steam\SteamApps\<your username>\garrysmod\garrysmod\materials\vgui\logos
    That's where all your sprays end up, you can't import this type in garrysmod mod successfully, so you need to copy both of the generated files(the .vtf and the .vmt) to the above directory. Once you've done that, open up garry's mod and look for it in the spray list!

    I hope you've enjoyed learning how to make your own custom animated gif spray! If you have any trouble feel free to leave a reply.
     
    • Informative Informative x 1
  2. Amazing

    Amazing Veteran Member

    That was a weird movie...
     
  3. Zikeji

    Zikeji Repoleved VIP Emerald

    Really? Isn't it "The Mask" or something? I've never seen it.
     
  4. DieKasta

    DieKasta :Blackalien: Forever VIP

    Very informative post. You fellas from NACTS sure know what's up! Lol
     
  5. Zikeji

    Zikeji Repoleved VIP Emerald

    Hmmm... It's easier to write up a tut than it is to convert everyone's GIFs for them xD.
     
  6. Amazing

    Amazing Veteran Member

    Yeah, it is, and it's a weird movie
     
  7. How can i make the frame rate faster in game?
     
  8. Zikeji

    Zikeji Repoleved VIP Emerald

    Cutting frames is the only option.
     
  9. HarambeServesFrieza

    HarambeServesFrieza New Member

    What if the play button is grayed out?
     
    • Old Old x 11