Source Filmmaker

Source Filmmaker

Not enough ratings
Animating the StatTrack Systems in SFM for the CSGO and TF2 StatTracks
By Pte Jack
In this guide I an going to show you how to animate the StatTrack Systems for CSGO and TF2 in SFM.

This process ALSO works on Animated VTF Textures (and I'll give an example of that too)
   
Award
Favorite
Favorited
Unfavorite
The StatTrack Systems Animated in SFM
So, how is this done???
A few simple Override Materials and some Element Viewer trickery is all it takes. So here are the steps....

1. Spawn the Stattrack System of your choice into SFM and attach it to whatever...

2. Right click the model and add an Override Materials to it.

3. Send the Model to the Element Viewer.

Now this is where things get dicy......

4. Expand the Materials and find the materials for the digits.

**Repeat these steps for each of the 6 digits**

5. Right click the material for the digit

6. Select Add Attribute

7. Select a Float Attribute

8. Name the attribute $frame (the dollar sign is reaquire and the word frame must be lowercase)


9. Now that the Attributes are set up, all you have to do is right click on each digit's material and Create an Animation Set For Element.

10. In the popup change the Max value for the $frame entry to 9.

11. This will create an animation set slider for the material in the Animationset Editor.


When the process is complete you will have 6 control sliders, one for each digit. These are what you use to animate the numbers and they can be used in both the Motion or the Graph Editors.

This is a GIF of the sliders in action


And Now for Animated VTFs...
Have you ever wanted to change the skin of your model on the fly??? Well Create an animated VTF and use this method to change on the fly....

Here I have a quick and dirty multi-layered image of the TF2 Ambulance


What I do is create an animated VTF and save it as a new file name in a materials folder SFM knows about.

So here I am saving the VTF as an Animated VTF to my game\test\materials folder as amb_multi.vtf using the GIMP VTF Plug-in.


Now here are the steps...


1. Load your model (my case the Ambulance)
2. Add an Override Materials and send the model to the Element Viewer
3. Expand the materials and find the one you created your Animated VTF for.

Here we go, your going to add 2 attributes to this material
4. Expand that material
5. Right Click on it and add a STRING attribute and name it $basetexture (dollarsign and all lowercase.) As soon as you hit enter that material is going to turn Black and Purple Checkerboarded.
6. In the $basetexture data field add the path and the filename of the new vtf you created. (Because mine is in the root of the material folder SFM knows about, I just have to type the filename.)

Your model should take on the skin of frame0 of the animated VTF.

Now, follow steps 6 - 11 for adding the $frame Float Attribute described above for the StatTrack and Create your new Animationset for the $frame

The Number that goes into the Max box of the $frame Animation Set set up prompt is the number of frames in the animated vtf MINUS 1... So in my case there were 4 frames in the animated VTF and my Max value was set to 3. The reason for this is that the 1st Frame and the MIN value is 0.

So, 0, 1, 2, 3 = 4 with the Min being 0 and the Max being 3.

AND.....



Ta... La.... De... Da

There you have it....





5 Comments
Pte Jack  [author] 22 Aug, 2016 @ 1:37pm 
Yup... and a ton of other stuff as well
Maxwell 22 Aug, 2016 @ 1:13pm 
Well, to honnest I wasn't talking about StatClocks.
I found it usefull for animated material properties, I can use it to control eyes dilation whinch is awesome.
Pte Jack  [author] 22 Aug, 2016 @ 9:16am 
I still haven't found a way to make the CSGO bomb do this though, other than to add overlay models that use the numbers to it. One would think it would be just as simple as this, but it's not.
Maxwell 22 Aug, 2016 @ 9:12am 
It's actually simple and short tutorial. It should have more visits.
Meaper 28 Jan, 2016 @ 11:12pm 
How do you spawn the stat modules?