Moving vmf Doesn't Work with render.DrawBeam

I don’t see why this isn’t working. My problem is that when I use a moving vmf material it doesn’t move. I’m using render.SetMaterial() and render.DrawBeam(). Does anyone know how to make the textures move? Any help is appreciated.

Anyone know? :\

You need to post more info:

  • “I’ve made my own material … but it won’t animate”.

You might need to add:



"AnimatedTexture"
{
   "animatedtexturevar" "$basetexture"
   "animatedtextureframenumvar" "$frame"
   "animatedtextureframerate" "5"
}


Under “Proxies”.

If it doesn’t work, post the VTF file between a [code ][/code ] tag.

  • “When I try to use the :SetMaterial() with a material from a game, the model refuse to change its texture”.
    The material you’re trying to use, might have a wrong shader.
    For models, the shader have to be “VertexLitGeneric”.

In any case, post the material.

Trying it-

Edit:


"AnimatedTexture"
{
   "animatedtexturevar" "sprites/trails/bluelightning"
   "animatedtextureframenumvar" "2"
   "animatedtextureframerate" "5"
}

The texture when invisible. :\ What did I do wrong

Post the whole .vtf file as I’ll take a look at it tomorrow or someone might be able to help in the meantime.

Sorry meant VMT. I keep messing those two up.

I said you should put it under “Proxies” … not replacing the whole file.



"LightmappedGeneric"
{
   "$basetexture" "foldername/filename"
   "Proxies"
   {
      "AnimatedTexture"
      {
         "animatedtexturevar" "$basetexture"
         "animatedtextureframenumvar" "$frame"
         "animatedtextureframerate" "5"
      }
   }
}

Original Thread

Hint: You can learn a great deal at: https://developer.valvesoftware.com/wiki/Material_Proxy

So I don’t edit “animatedtexturevar” “$basetexture”
“animatedtextureframenumvar” “$frame”

No.
The only thing you should edit is:

  • “$basetexture” “foldername/filename”. The location of the .vtf file (Only whats after the “materials” folder)

  • “animatedtextureframerate” “5”. Its basic frames per second.

Hmmm. It doesn’t move too

You might want to add “$vertexalpha” so it doesn’t show a black background.


"LightmappedGeneric"
{
	"$basetexture" "foldername/filename"
	"$vertexcolor" 1
	"$vertexalpha" 1
	"Proxies"
	{
	"AnimatedTexture"
	{
	"animatedtexturevar" "$basetexture"
	"animatedtextureframenumvar" "$frame"
	"animatedtextureframerate" "5"
	}
	}
}

After a second look at the texture file (VMT), it looks like there is only one frame.

Save all the frames in a folder (tga, png, … ect):

  • texturename000.tga
  • texturename001.tga
  • texturename002.tga
  • ect
    Launch VTFEdit and go to File > Import. Browse to location and select all of the images you just saved, starting with the first in the series (hold the Ctrl key down to select multiple items in order). Once they are all selected click OK, and VTFEdit will throw a bunch of options at you.
    After its don importing, save it again. (It might replace the VTF file. So you need to check that one aswell)

OOooh thanks I see I also looked up other things and found TextureScroll. Thanks for you’re help.