Extra tips and tricks for optimizing your S2FM animation experience by changing colors, adjusting rigs and changing animation sequence names.
You can get Source 2 Filmmaker by purchasing Half Life Alyx, which will give you full access to its assets inside the S2FM. Software you’ll need is Crowbar, GIMP.
Do you yet not know if S2FM works for YOU – https://inletzone.com/is-s2fm-for-me
You know Source 2 Filmmaker is for you but you don’t have your desired assets – https://inletzone.com/s1fm-to-s2fm/
Get Half Life: Alyx from Steam – https://store.steampowered.com/app/546560/HalfLife_Alyx
If you have noticed that the sequence animations come up with a different name, changing this so they all have the different name is fairly simple. The first thing you need is some kind of bulk file renaming thing; we use the Bulk Rename Utility. Simply select all of the files and in the prefix at we can add barn_ to every single smd file here. The smd file is what contains the information for how the animation works. Click rename and now they are all changed.
Secondly, you need to go to the qc file which contains a reference to all of the animations existing here as smd files. This time what we do in the Notepad++ is we search with Ctr+F, we go to Find and Replace, and you want to replace anything that begins its sequence with a space in a quotation mark to have sequence barn_ underscore, and replace all, and this has now given every single reference to an animation, a prefix of barn, so that they align with the new names here.
Last little thing that has to be changed is the secondary reference giving the exact file location. What we do this time is select whatever is directly before the original file name, which would depend on the name of the model itself, copy this into the replace box, and give it a barn_ addition replacing all at once.
Again, leave them all now with a barn_ prefix, keeping them fully linked up with their name as they appear here. We didn’t mention this straight away because it’s kind of an optional feature. It will work either way: isn’t exactly necessary, but I wanted to mention how easily it can be modified, since of course you don’t have to just give it a prefix. You can change the name entirely if you want to, as long as the name you give it here and the references are identical, it will function properly.
Let’s say, for a bit of additional customization, you would like to use the tint function. Now, inside of the Source Filmmaker you have the ability to right click on the model and set a color tint. This allows you to change the color of how the model looks, to some extent at least, but let’s say you want to control which parts you change the color of and which parts you do not change.
To do that you need to go back into the Material Editor. Of course it would take some time to open all of these materials at once, so what you can simply do is: in the Asset Browser, right click on the model you’ve made and click to open 27 related files in the Material Editor; say yes, because it’s going to ask as you’re opening quite a few, and you tell it that yes, you do want to. It will take a little bit of time but pretty soon it’s going to figure out what it’s doing and here we have the materials have now opened.
Now, what all of these have is a tint mask, and a tint mask appears under color in the form of an alpha channel. An alpha channel being from one to zero, from black to white, where black is zero percent change and white is one hundred percent change, with various grey values interpolating between one and zero, so what you can easily do is adjust the tint level of each of these materials so that only these specific parts of the model are changed at one time. For example: just the sleeves, and then the trousers are able to be changed by the tint mask feature in SFM.
Another example: let’s imagine we have an armed Barney with a helmet. Specifically the inner side of the helmet should not be affected, the outer side of the helmet should also not be affected, so, we’ll add a tint mask and a color, and take this down to zero. We now have a more selective tint mask: ignoring the tint on the gun and on the hands and on the face, and only changing the colors on the materials of the body.
But we don’t want to change the tint of the vest or the straps along the boots, or the tie, but to change this the process we need to do is to open up these individual materials, the ones which specifically need to have partially tinted and partially not tinted, and open them inside of a Material Editor.
Of course you can’t open these themselves in a Material Editor, so what you can do is copy the path where the material is kept, although I have to mention that the material might not always be kept here. In this case though it is. Now we can open this .tga and then the process goes to create a new folder.
Select the area where the tint is to be applied and fill it up with white. Invert the selection and fill the other half with black, and that’s the process. We’re actually going to export this with the underscore of mask since that’s what it’s looking for specifically, and we now have the mask layer which we now open, and if we save the material: go back to the SFM we have open and we see now the boots are unchanged by the tint mask.
Now we can quickly do the rest of these, and here we have the model correctly masked. There may be a few places where there could be some improvements, for instance there could be small issues around the boots where the materials cross over, but for the most part and for an explanation of what this does and how it works, this is good enough.
You’re now easily able to change the awful appearance of Barney, including the color of his helmet, giving you the ability to quickly duplicate and have copies of the same model in your scene without them appearing like they are simply clones of the same thing.
Perhaps one of the most useful additions which has hitherto been unmentioned in these tutorials, at least in the capacity of animation, is the ability to have the model create an IK rig. An IK rig gives you the ability to… well, usually animation or the rigs you animate with, are set up where you align the bones; you do whatever you need to do, it’s a slow and usually unintuitive process but you have the ability to apply a rig to the model, allowing you to directly select arms or specifically feet and hands, and adjust the elbows and knees in a far more intuitive way.
You actually have the ability to do this very easily with an imported model, and the process of doing that simply requires you to rename the bones to suit the naming convention of the default model. Nothing else more fancy has to be done. Let’s attach the rig so we can see the original bones that this model comes with: The Half-Life: Alyx default citizen, and we head back over to the Model Doc.
We are going to add/find a rename bone option. Doing this we can take the original name of the bones as shown on the skeleton selection for the legs, hands and so on.
Let’s check it’s working. Compile the model. Re-delete these so it will let us compile and check back in Source. Now, this hasn’t updated but it usually won’t instantly update names like this without reloading the model. Perhaps for pelvis you see the name is updated, so now what do we have? Well, you’ll notice if we go and import another copy of HL1 Barney, opening him up, you’ll see straight away that while the old body has only dots for the bones, this model has an actual bone structure since Source 2 now recognizes it as having the bone structure being the same as the default rig inside of Source 2.
This also means that we are able to right click on the model, just like for the citizen earlier. Now you see Barney is able to be controlled by means of manipulating the control points of the hands and the feet, while the knees are rigged in such a way that’s easier to mess around with and to get used to than simply adjusting the bones.
Now one thing I should mention, one of two things* really, is that you can of course rename the bones inside of Blender, and when you rename them there and re-import the model, it will have the correct name convention there too, but the only problem there is the bones inside of the .smd, the ones you import into Blender, are looking for bones with these names.
So if you rename the bones in Blender and then import the animations, it won’t recognize which bone is which, and the animations won’t work. So, I’d suggest just changing the bones inside of S2FM’s Model Doc, because then you preserve the original bone names.
I will mention that for some models, you will receive an error. For example, an error could be created when the lower legs are too much in a straight line with the upper legs, or if the lower arm is too much in line with the upper arm. The issue is caused because the Source engine doesn’t know which way is forwards and which way is backwards.
All you need to do for this is to select, let’s say, the lower legs and just rotate them forward slightly, and it will then understand ‘well the bend is going this way, so this way must be the way the knee is pointed’. We detach the rig, reattach it, and you’ll see we now have a working IK rig.
I should also mention that the conversion of the names is not a one-to-one scale. There are not the same number of spinal bones, there are not the same number of other bones and this system does take some trial and error to perfect, and even then maybe it won’t work perfectly.
What you can do if you really need to is inside of Blender you can mess around with the weight painting, but I’ll leave you to find your own tutorial on rig weight painting.
What have we been able to achieve with the lessons today? Well, we’ve figured out how we can change the names of the animations to suit whatever requirements you would have. We’ve learned the ability to move certain parts: certain bones you wouldn’t usually be able to move, by way of facial flexes, or morphs as they’re commonly known in Source 2, and we’ve gained the ability to change the color of specific parts of a model to suit our own requirements. Alongside that, we’ve seen how we can change the name of the bones to get the IK working.
Hopefully you’ve learned something today, if you haven’t you should have paid more attention.