• Moving vmf Doesn't Work with render.DrawBeam
    13 replies, posted
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: [u]- "I've made my own material .. but it won't animate"[/u]. You might need to add: [code] "AnimatedTexture" { "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame" "animatedtextureframerate" "5" } [/code] Under "Proxies". If it doesn't work, post the VTF file between a [code ][/code ] tag. [u]- "When I try to use the :SetMaterial() with a material from a game, the model refuse to change its texture"[/u]. 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: [CODE]"AnimatedTexture" { "animatedtexturevar" "sprites/trails/bluelightning" "animatedtextureframenumvar" "2" "animatedtextureframerate" "5" }[/CODE] 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.
[url]https://www.dropbox.com/s/6l24q3j7dvs9km5/bluelightning.vtf?dl=0[/url]
Sorry meant VMT. I keep messing those two up.
[url]https://www.dropbox.com/s/nmor9ldu1nr2lpn/bluelightning.vmt?dl=0[/url]
I said you should put it under "Proxies" .. not replacing the whole file. [code] "LightmappedGeneric" { "$basetexture" "foldername/filename" "Proxies" { "AnimatedTexture" { "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame" "animatedtextureframerate" "5" } } }[/code] [url=https://facepunch.com/showthread.php?t=547582]Original Thread[/url] Hint: You can learn a great deal at: [url=https://developer.valvesoftware.com/wiki/Material_Proxy]https://developer.valvesoftware.com/wiki/Material_Proxy[/url]
So I don't edit "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame"
[QUOTE=FiBzY;48997582]So I don't edit "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame"[/QUOTE] 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.
[QUOTE=Nak;48997612]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.[/QUOTE] [url]http://prntscr.com/8w4m0y[/url] Hmmm. It doesn't move too
[QUOTE=FiBzY;48997658][url]http://prntscr.com/8w4m0y[/url] Hmmm. It doesn't move too[/QUOTE] You might want to add "$vertexalpha" so it doesn't show a black background. [code]"LightmappedGeneric" { "$basetexture" "foldername/filename" "$vertexcolor" 1 "$vertexalpha" 1 "Proxies" { "AnimatedTexture" { "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame" "animatedtextureframerate" "5" } } }[/code] 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) [url]http://source.gamebanana.com/tuts/9544[/url]
[QUOTE=Nak;48999524]You might want to add "$vertexalpha" so it doesn't show a black background. [code]"LightmappedGeneric" { "$basetexture" "foldername/filename" "$vertexcolor" 1 "$vertexalpha" 1 "Proxies" { "AnimatedTexture" { "animatedtexturevar" "$basetexture" "animatedtextureframenumvar" "$frame" "animatedtextureframerate" "5" } } }[/code] 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) [url]http://source.gamebanana.com/tuts/9544[/url][/QUOTE] OOooh thanks I see I also looked up other things and found TextureScroll. Thanks for you're help.
Sorry, you need to Log In to post a reply to this thread.