Source Filmmaker

Source Filmmaker

Not enough ratings
Getting Unknown Controls into Known Control Groups
By Pte Jack
Have you ever struggled to find a flex control or a bone to animate it only to have to root through the Unknown Control Group to find it?

The video in this guide will show you how to edit the sfm_defaultanimationgroups.txt file to move those unknown controls and flex into know groups and will also show you how to create new control and flex animation groups.

Knowing how to do this will help you organize the controls and flexes of your custom models and allow you to find them faster when animating. By placing them properly in order in the file, you can create chains for connected bones.

The sfm_defaultanimationgroups.txt is found in your
C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\platform\cfg
folder. It is a plain text file and can be edited with any text editor, such as Notepad or Notepad++. (I use Notepad++ in this video.)
Unknown Control Groups??? What are you talking about???
Models can be made up of a skeletal bone structure, flex animations, meshes and materials. Models will report their make up to the program calling them (in our case SFM) and the program will try to make sense of the information being reported and will try to build structures to allow the user the ability to manipulate the model.

Models are unique to themselves and it is not too often that 2 different models will have the same naming conventions for all the bones and flexes contained in the model.

SFM uses a "helper" file to identify bones and flexes and make them known in animation groups. That file is called sfm_defaultanimationgroups.txt. Bones and flex controller listed in that file become Known Animation Groups and they will be shown in the Animation Set Editor in groups based on how they are reported in the sfm_defaultanimationgroups.txt file.

This file is found in the
(on 64bit machines)
C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\platform\cfg
(or on 32bit machines)
C:\Program Files\Steam\steamapps\common\SourceFilmmaker\game\platform\cfg

If the model contains additional bones and flexes that are not identified in the sfm_defaultanimationgroups.txt file, they will fall into the Unknown Group.

This Guide will show you how to edit the sfm_defaultanimationgroups.txt to make these Unknown control appear in already defined groups and will also show you how to create new animation groups.
The sfm_defaultanimationgroups.txt Layout
The sfm_defaultanimationgroups.txt is a plain text file which can be edited with a normal text editor. Window Notepad will work fine, but I prefer to use Notepad++.

The structure of the sfm_defaultanimationgroups.txt is pretty simple. The file is made using a hierarchary structure and when read, SFM will only display the bones the model is reporting. If the bone exists in this file, it will be placed according to the bone/flex group found in the order that it was placed into the file.

In this case the file opens with a group known as "Face". The first subgroup are the controllers for the eyes.

You can see that the eyes are broken into 2 different model groups, the first being what would be normal for a tf2 character, then a group that would be Dota specific. This means that the controllers built into the 2 different model types are named differently and this file will instruct SFM that if a model reports flex controls or bones with these names to put them in the Face/Eyes group in the animation set editor.

Should the model have controllers for the eyes that are not in this list, they will show up under the Unknown Animation Group.

The second subgroup for the "Face" group would be the "Full Face" Group. This group would contain flex controls or bone that affect the characters whole face.

And the list goes on, Upper Face, Lower Face, Body, Arms, Legs, Other... etc.

You can have as many groups (and subgroups within the groups) as you want.
If a model does not have any of these names in it, then the Group is not displayed in the animation set editor.
Now for the layout of the file itself.

The file uses cruly brackets as containers. The picture on the left shows that the first line identifies to SFM that the file is a groupFile. Everything between the { and the } is to be read.
The first level of the hierarchy identifies the Group Name, The order in which they are placed will dictate the order they are displayed in the Animation Set Editor.
The next level in the hierarchy would be SubGroups.
You can see in the picture on the left that each level is contained within a set of curly brackets.

Groups do not require subgroup to be able to declare controls, you will see this in the next section of the guide.
The file continues to grow.
The next level would be controls for the SubGroups or SubSubGroups.

The important thing to remember is that each tier in the hierarchy must be contained between curly brackets.
How do I declare Unknown Controls and Flexes So that that are Known??
1. To declare an unknown control so that it will be displayed in a known group, in the Animation Set Editor open the Unknown controls be clicking on the + beside the Unknown group to expand it.

2. Open the sfm_defaultanimationgroups.txt in a pure text editor like Notepad or Notepad++

3. Locate the Group/SubGroup you want to place the unknown control in the sfm_defaultanimationgroups.txt file.

4. Ensuring that you are within the cruly brackets for that group and determine where you want the unknown control to appear in the list.

5. If your are adding a control, follow the example from the control above your insertion point. The syntax is "control" {spaces or tabs} "{the name of the bone or flex you want to add}".
Ensure that the spelling and underscores, spaces, etc are exactly the same as the unknown entry. Captialization is not important, but the name must be exactly the same as the bone/flex you are trying to declare or it will not work.

6. If you want to add a new group or subgroup for your control,
Identify the Name you want the group/subgroup to display in the animation set editor. (ie "Tail"),
hit enter and move to a new line,
open the group/subgroup with an open curly bracket {,
hit enter,
identify your controls - each on a separate line,
when finished hit enter and
close off the group/subgroup with a closing curly bracket }

Remember, the controls will appear in the animation set editor in the order that you add them to the file.

A control only has to be declared once and once the the sfm_defaultanimationgroups.txt is saved, the bone or flex will be displayed in the group you designated for ANY model that uses that bone or flex name.
The End Result and How to Video!!!
If you've followed the guide correctly and assigned all the unknown flexes and bones to the sfm_defaultanimationgroups.txt file, when you load your model you will not see an Unknown control group for your model. All your controls will be available to you under the control group you assigned them to.

This will happen for ALL models that use those same bone or flex names. (Remember you only have to declare the bone or flex name once in the file.)

Your model Animation Set Editor will change from something like this

to something like this

Now for those who prefer to see how it is done and I have this video on my Youtube channel
< >
-[AOP]- Joki May 1 @ 11:25am 
Helpful guide! Thanks. :D
1,1,2,3,5,8,13,21,34,55,89,144 Apr 2, 2015 @ 2:46pm 
Pte Jack  [author] Apr 2, 2015 @ 2:38pm 
Thanks 1, Fixed...
Looks like they did some behind that scenes changes to the HTML5 code they use here.
1,1,2,3,5,8,13,21,34,55,89,144 Apr 2, 2015 @ 1:50pm 
you put "http" twice into the url.
Recursive Sweatpants Jan 2, 2015 @ 7:52pm 
Thank you very much! This will make animating with custom models much easier!
R234 Aug 15, 2013 @ 12:30am 
Cool, I was wondering what controlled that. I'm sure to give this a try. Thanks.