Search
Username:
Password:

Register or Reset Password

SUBMISSIONS
Counter Strike
   New Maps
   New Tutorials
   New Skins
   New GUI's
   New Sounds
   New Threads
Other
   Media
   Gamers
   Clans
   Studios
Creating animated sprites and textures
Difficulty: Intermediate
Category: CS:S > Sprites & GUIsAuthor(s):
Did you create this? Request ownership



To create an animated sprite or texture you must first create a tga for each frame of the animation. Name these images image001.tga, image002.tga, image003.tga, etc, etc.

Now create a text file with the following format and name it the same as the images (e.g. for the above example use image.txt):

"startframe" "1"
"endframe" "3"

Run the vtex command just as if you where creating a single texture, but instead of putting the tga on the command line use the .txt file, e.g.

vtex -mkdir -shader sprite materialsrc/mymaterials/image.txt

This will create a vmt and vtf file in materials/mymaterials

For a an animated sprite edit the vmt file to look like the following :

"Sprite"
{
"$spriteorientation" "parallel_upright"
"$spriteorigin" "[ 0.50 0.50 ]"
"$basetexture" "mymaterials/image"
}

NOTE: The frame rate and scale of the sprite are specified in the env_sprite entity

For an animated texture which can be used on walls or skyboxes you need a different vmt as follows

"LightMappedGeneric"
{
"$baseTexture" "mymaterials/image"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "2"
}
}
}

If you are creating a texture for a model, then change the shader from LightMappedGeneric to VertexLitGeneric. For animated textures the framerate is specified in the vmt file (In the above example it is 2 frame/sec)

NOTE: Setting framerate of a spraypaint's vmt-file doesn't seem to work!

Tutorial by CannonFodder, brought to CSB by [Xero].

Added: 3 years agoTags: creating, animated, sprites, textures
Feedback (6)
NeonWarrior .
wanna-be skinnerY2M
Posted 4 days ago
Nvm i worked it out

good tut
AYO Ionic .
Phong ftw!Y2M
Posted 2 months ago
Is it possible to make a non-looping texture? Like a decal? I'm just wondering.

And if so, how do you do it?
.
The Devil HimselfY2M
Posted 2 years ago
Posted by maxdamage68

Is it possible to make an animated sprite for a muzel flash?


Nah I think the mozzle flash is only a single frame sprite, because valve thought it would be a nice idea...NOT!
maxdamage68 .
BananiteY2M
Posted 2 years ago
Is it possible to make an animated sprite for a muzel flash?
//.exe .
//.executionerY2M
Posted 2 years ago
Share... Enlighten us.
Apez .
~The Ape Needs Banana~Y2M
Posted 2 years ago
: D I use Somtin Else : D
Add Feedback
Provide constructive feedback. What is "constructive"?
You cannot post yet!
Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop.

To post in this submission register or login.
Assessment
The community's verdict.
User Rating [+]
9.5/10
bScore
9.5/10
You cannot assess yet!
Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this submission register or login.
Stamps
This Tutorial in a nutshell...
Confusing & Helpful
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.
None found
Added by...
::
Admin Bananite
:: Admin, Skin Critic and UT3 Supervisor

[+] Donate
Related Tutorials