Source Filmmaker

Source Filmmaker

Nulexy Apr 25, 2014 @ 2:37am
Vtf texture animation help needed
So long story short, ive seen valve textures that have had animated parts to it, where its actualy changing and not an actual model. Ive done some searching...and this is what i have found (This is for sfm btw not some other game)

"LightMappedGeneric"
{
"$baseTexture" "whatever/texture"
"$surfaceprop" "Default"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "1"
}
}
}


Now ive been trying to get this to work on a custom model, i am unsure if this is outdated but this is the only thing i could find..

Any help would be nice..
Last edited by Nulexy; Apr 25, 2014 @ 2:38am
< >
Showing 1-9 of 9 comments
76561198128290114 Apr 25, 2014 @ 8:25am 
this is the one I used when using an animated gif

"vertexlitgeneric"
{
"$basetexture" "models/texturepanel/0"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "24"
}
}
"$surfaceprop" "metal"
"$frame" "2"

"$alphatest" "1"

//"$detail" "overlays/detail006"
"$detailscale" "1"
"$detailblendmode" "0"
"$detailblendfactor" "1"}

But, you can also do it just by opening vtf edit. selecting your images (assuming it's a sequence and not a gif) and making sure "animated" is checked. it all make the animated texture for you and all the VTF needs is

"vertexlitgeneric"
{
"$basetexture" "models/texturepanel/0"

}
R234 Apr 25, 2014 @ 5:07pm 
The problem is the shader, "LightMappedGeneric". It's the shader used for static world brushes, it doesn't work properly on models. Use "VertexLitGeneric" instead.

"$surfaceprop" doesn't have any use in SFM. Doesn't really hurt to have it there, but you should remove it anyway. Keep things tidy, y'know.

Aside from that, you should ensure "animatedTextureFrameRate" is set to how fast you want the texture to animate. This is in frames per second, so "1" means the frames will only change every second.
Nulexy Apr 26, 2014 @ 1:40pm 
Originally posted by R234:
The problem is the shader, "LightMappedGeneric". It's the shader used for static world brushes, it doesn't work properly on models. Use "VertexLitGeneric" instead.

"$surfaceprop" doesn't have any use in SFM. Doesn't really hurt to have it there, but you should remove it anyway. Keep things tidy, y'know.

Aside from that, you should ensure "animatedTextureFrameRate" is set to how fast you want the texture to animate. This is in frames per second, so "1" means the frames will only change every second.

Thanks for the help, will try this latter today
Nulexy Apr 26, 2014 @ 2:48pm 
Originally posted by R234:
The problem is the shader, "LightMappedGeneric". It's the shader used for static world brushes, it doesn't work properly on models. Use "VertexLitGeneric" instead.

"$surfaceprop" doesn't have any use in SFM. Doesn't really hurt to have it there, but you should remove it anyway. Keep things tidy, y'know.

Aside from that, you should ensure "animatedTextureFrameRate" is set to how fast you want the texture to animate. This is in frames per second, so "1" means the frames will only change every second.


Ok, so ive been editing around, and i finnaly got sfm to start laging (Which in my mind means progress, and no it wasent pc lag, i have plenty of power)

This is the code now:

"VertexLitGeneric"
{
"$baseTexture" "models\someothername\namelol\sometexture"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" 30
}
}
}


This seems to be working but when i load up the model, it just start laging like nothing else, i am unsure if this code is laging cause of something being used too much or what. If you see anything wrong that i could fix to make it stop laging, then this could finnaly start working and i can countiue on my project.
R234 Apr 26, 2014 @ 6:15pm 
The VMT code seems fine, and I don't see how that could be the cause. Have you changed something else in the scene? Added lights, different render settings, etc.?
Nulexy Apr 26, 2014 @ 6:18pm 
Originally posted by R234:
The VMT code seems fine, and I don't see how that could be the cause. Have you changed something else in the scene? Added lights, different render settings, etc.?

Nope, it was simply a test set, on 2fort, no lights, no effects.

(Did a verifiy cache and it found files that were needed to be downloaded, lag stoped after) But the texture still isent changing (Its 35 frames long, and a seemless loop of colors)
R234 Apr 26, 2014 @ 6:22pm 
Oh, so the animation doesn't work? Could be the VTF texture file that's not set up properly then, 'cause as far as I can tell the VMT isn't missing anything.
Nulexy Apr 26, 2014 @ 6:42pm 
Originally posted by R234:
Oh, so the animation doesn't work? Could be the VTF texture file that's not set up properly then, 'cause as far as I can tell the VMT isn't missing anything.


Hmm, well the sequence of colors i exported in a uncompressed bmp format with a gif spliter, then saved it again with photoshop, to tga, then selected all the frames in vtfedit, had auto make vtm on, put in the code i thought was it, into it, and thats when i came here after it obviously wasent working.

Not sure if this may be part of it but this is my settings for vtf importing: http://i62.tinypic.com/250s9c3.jpg
R234 Apr 26, 2014 @ 6:48pm 
Wouldn't know, I don't use VTFEdit to make textures anymore. I can have a look at the VTF if you post it somewhere for me to download though, like on Google Drive or whatever.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Apr 25, 2014 @ 2:37am
Posts: 9