Texture animations
BERSERK3R
09-20-2006, 11:02 AM
I was wondering if it was possible to get animations to work on skins.
I know it is possible for sprites cause you can have animted sprays.
And I think the engine should be able to handle "shaders , but I can't recall seeing it in HL2, or DOD on any skin.
Watevaman
09-20-2006, 07:31 PM
Yeah, it's possible, I just don't remember the stuff you add to the .vmt to get it animated. It's pretty simple as long as you have a .gif, just search for animated .vmt's.
MeleeMe!
09-20-2006, 07:46 PM
I know Source will accept animated textures but I dont think anyone has ever tried putting them on models before. Do a search for animated VMTs like he said and try it out I would be curious as to how the engine handles it.
BERSERK3R
09-21-2006, 09:07 AM
Well, I'm not sure if it's a good idea to have a 2048x2048 as a animation ;)
So the best would be that you give a weapon for example a alpha mask on the base texture and then put the animation behind it, just like shaders for Quake 3 engine for example.
For example if you want a radar on your gun, then it's a small part which needs to be animated, so you don't want to animate your whole texture.
Also I was a bit of a shock to notice that there weren't any use of shaders on models like my example on the gun.
If you see what the engine can handle, but not these kind of animations?
BERSERK3R
09-21-2006, 01:00 PM
Ok I have tried it.
What I did was the following.
- I made about 9 "frames" (seperate tga files) from a weaponskin.
So I had 9 TGA files.
- Then I used VTEX to make it into one VTF file.
Ok so far so good.
The file was about 12mb, but that is logical cause he kinda puts all 9 tga's together.
- Then I just put the VTF file in the replacement folder of the weaponskin and ran the game.
But no animation......
So does it only work as decal, so somehow models can't seem to handle it?
Hope we can sort this out, so it gives us lot more of modding posibillities.
MeleeMe!
09-21-2006, 02:40 PM
You set up your VMT file for animation?
BERSERK3R
09-21-2006, 02:54 PM
Originally posted by MeleeMe!
You set up your VMT file for animation?
No I don't know what to put in the VMT file.
Also the generated spray didn't have anything in it also, so it thought it was ok.
But now you mention it I do recall some codes.
But if you know please tell me ;)
EDIT: I downloaded a animated spray and when i open it its just a VMT with only basetexture and decalschale, and a VTF file, nothing more.
Trp. Jed
09-21-2006, 03:45 PM
What exactly do you want it to do? Animate like a gif or just scroll the one texture?
BERSERK3R
09-21-2006, 03:53 PM
Well lets have this example:
I want to have a part on a weapon which shows some lights that go on and of or something "moving" from front to back on a display.
It's not realistic but just to be clear.
So that is animations on a weaponskin itself just like spays.
Now what about having a part of your gun transparant and see some plasma moving behind it or whatever.
So you got different layers and the plasma is constantly animating beneath the basetexture instead of the first example which is the same over and over again cause it's just frames that are in a loop.
Well to make it a bit more clearer how do I get animations on a skin just like a spray but then not as a decal but have your weapon have some animations on it.
EDIT:
It animates in VTF edit (based on frames like spray) but not in modelviewer, and possibly ingame.
So do I need to have something else other than "VertexLitGeneric" in the VMT?
And what about the flags on the VTF file.
MeleeMe!
09-21-2006, 04:28 PM
Originally posted by HL2world Wiki
Animating the Texture
First, you will need to creat the VTF from several TGAs. Follow the instructions here.
Then, you will need to add a variable named "$frame" to the VMT specifying how many frames long the VTF is.
Next, you will need to add a Proxy by the name of "AnimatedTexture" to the .VMT file.
Here is an example VMT file for an animated Texture.
"UnlitGeneric"
{
"$basetexture" "mytexture"
"$frame" "3"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "1" //this is the FPS that the texture will animate at
}
}
}
http://www.hl2world.com/wiki/index.php/Texture_Introduction
You definately need to have something in the VMT to let the engine know its an animated texture. Thats about all the help I could give you without testing and trying it out myself.
BERSERK3R
09-21-2006, 04:55 PM
Thanks!
Although this gives me more info but it still doesn't work.
In model viewer when I keep "UnlitGeneric" the skinned model doesn't show but when I put "Vertexlitgeneric" back then it does show.
Trp. Jed
09-21-2006, 05:06 PM
Models need VertexLitGeneric and you'll only see the animation in game.
BERSERK3R
09-21-2006, 05:08 PM
Originally posted by Trp. Jed
Models need VertexLitGeneric and you'll only see the animation in game.
Yes I already figured it out but thanks anyway!
Day of Defeat Forum Archive created by
Neil Jedrzejewski.
This in an partial archive of the old Day of Defeat forums orignally hosted by
Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.