Left 4 Dead 2

Left 4 Dead 2

View Stats:
animated textures on vending machines
Hi There Just Wondering If It Is Possible To Modify The Vmt To Add An Animated Texture To A Vending Machine Skin And If So What Would I Add To The Vmt
< >
Showing 1-7 of 7 comments
Evil Sep 24, 2022 @ 5:02pm 
That depends on what you mean by animated.
just say i wanted to take the material file add frames change the color for each frame then load them into vtfedit that way the texture on the vendng machine plays frames like an animated gif
i am just not sure how to get the vmt code to work right with it last time i tried the animation did not play
Evil Sep 24, 2022 @ 5:38pm 
With certain things you can get away with using multiple images to create a single vmf but that doesn't seem to be doing the trick in this case. I do think it's possible to do this with a prop with enough testing, I didn't run the gambit with shaders when testing.

I think you could get away with using a work around with this to achieve the same effect. You could give the prop extra skins and use a timer to cycle through them in the order you wanted it to appear.

If you're really motivated you could add skin sets (4 skins with dr pepper, 4 with cola, and so on), then trigger their cycle effect with a relay. Then use a logic_case to pick which skin relay becomes active, with the timer triggering all relays each time it fires (which will only actually trigger the active one).
well yea there has to be a way
because you can turn a volume texture into animated using the same technique
Evil Sep 25, 2022 @ 9:37am 
Alright after a little more testing I've made some progress with this. This is very basic and will definitely need to be fine-tuned.

This is the exact vmt I used:
VertexLitGeneric { "$basetexture" "models/#####" "$bumpmap" "models/#####" "$surfaceprop" "stone" "$model" "1" "$phong" "1" "$phongboost" "5" "$phongfresnelranges" "[0.1 .5 1]" "$phongexponent" 30 "Proxies" { "AnimatedTexture" { "animatedTextureVar" "$basetexture" "animatedTextureFrameNumVar" "$frame" "animatedTextureFrameRate" "1" } } }
I doubt the bumpmap does anything here but I didn't bother to remove that. Anyways, this changes the base texture's frames once a second.

To create the vmf, you need to name all framers sequentially. So image01, image02, etc. Then import them to vtfedit as a group instead of a single image.
sweet ty i will give this a try
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Sep 24, 2022 @ 4:20pm
Posts: 7