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.)
   
Award
Favorite
Favorited
Unfavorite
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
Folder.

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

http://youtu.be/mMFLqoL8fzk
31 Comments
Anyar 14 Jan, 2024 @ 4:37pm 
This guide saves my life every time I have to work with random model ports from the workshop. Not a single control group is ever categorized, and it's always a mess to sift through a hundred hair and fabric bones to find the head.
TheRedReaper200 24 Oct, 2020 @ 8:08pm 
no the problem i have is the bodygroups like wont work like say if any one nows what FNAF is i would try to make golden freddys eyes big and turns to shadwo freddy and it wont work and when i click on the ndybroup it will still have the check mark there
8Yaron8 24 Jul, 2020 @ 11:51pm 
Yes, it was, I downloaded the model pack that had this file, because of this, a third-party file was used in the work. I removed it and it worked.
Pte Jack  [author] 24 Jul, 2020 @ 1:27pm 
@8yaron8 - it is quite possible that SFM is reading another file, but you would have had to create it (may be by accident). Or you haven't added the new code correctly to the file.

What happens to the controls if you rename the sfm_defaultanimationgroups.txt in the platform\cfg folder and rebuild the controls on the model? See this...

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2176575473
8Yaron8 24 Jul, 2020 @ 12:22am 
So, I tried to use this utility - no effect, but it changes the file, tried to do it manually - zero effect. It seems to me that the SFM is using another text file, which is located in an unknown place.
Pte Jack  [author] 3 Apr, 2020 @ 2:20pm 
It is a backup of the current text file. If you change again, then that will be the backup. If you get into real big trouble, you can rename the current to something else or delete it altogether then validate the cache files to get the original original to fix SFM.
monsantoj 3 Apr, 2020 @ 11:52am 
It makes another sfm_defaultanimationgroups.txt should I keep sfm_defaultanimationgroups_original.txt
Pte Jack  [author] 3 Apr, 2020 @ 9:26am 
I completely forgot about this tool.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=478887095&searchtext=Control

But if this is the tool you're using, go back and read the directions on the workshop sub page and make sure you're not assigning the same name to 2 different controls.

Also, make sure that the tool is saving to the required folder. If it export is not replacing the original sfm_defaultanimationgroups.txtt file then even doing a rebuild will just read the original file (and there won't be a change).
monsantoj 3 Apr, 2020 @ 1:11am 
I use the animation group editor to get the bones that are in the unknown group into the right groups(example: arm bones in the arms group etc.) but when I hit update groups it tells me “you must rebuild the control groups for the changes to take effect” but when I do it doesn’t change anything, is it because I delete the roll and helper bones or am I just doing it wrong,can someone please help?
Pte Jack  [author] 29 Jun, 2019 @ 8:24am 
the defaultsfmanimation.txt file is not in USERMOD.