How to import gif texture ?

Crowbar

Spiritual preprocessor
aa
Dec 19, 2015
1,455
1,297
You'll need to animate it through vmt, and probably have a vmf for each frame.
 

nickybakes

You should've played Rumbleverse
aa
Jul 28, 2015
911
1,739
You might want to check this out for creative sprite cards (Start at 26:00):
View: https://youtu.be/70GhO6z5aKM?t=26m1s



In order to do this, you will need to split your gif into separate frames as .tga's. You can do that by using an online tool like:
http://ezgif.com/split

I did this method for some of the meme particles in Meme Machine, like the rainbow frog and the duane. However I did have issues when gifs had too many frames, so after you split them up, you can delete a couple frames to try and keep it under something like 20.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
You'll need to animate it through vmt, and probably have a vmf for each frame.
Nope! Animated textures are just that, animated textures. They literally have multiple frames right in the VTF file, although you do still need to add a material proxy in your material file so the engine knows to actually animate them. Here's the relevant code:

Code:
"Proxies"
{
    "AnimatedTexture"
    {
         "animatedtexturevar" "$basetexture"
         "animatedtextureframenumvar" "$frame"
         "animatedtextureframerate" 30 (or whatever you want it to be)
    }
}

Just slap that on the end of your VMT and you're golden.

To make the actual texture, you'll need to actually have VTFEdit because the various export plugins (Photoshop, etc.) don't support animation. Save each frame as a separate file — don't forget to pad the dimensions out to a power of 2 first — differentiated by their frame number. Then launch VTFEdit, go to File > Import, and import all of your files at once. Make sure the texture type is set to "Animated Texture", which it should be by default. And that's all you really need to know.