This question will be composed of 3 somewhat separate questions regarding the creation of animated assets in Source. The documentation is quite poor and I am having a hard time understanding the errors that the model compiler throws.

1. Parent bones

I was trying to modify the collision mesh of an existing animated asset. I was able to make it work OK when animated in Blender but when compiled it throws something along the lines of "joint1 and joint2 have no parents, there can't be two root bones".

In the model viewer I can see two collision boxes, one static and another that is animated but which doesn't behave as I expected (it moves like the original collision mesh of the asset).

The problem disappears when I make all the vertices of the collision mesh have the same parent bone. See https://developer.valvesoftware.com/wiki/Studiomdl_Data#Triangles , it would be the field (first column).

So the question is: does source allow you to have a collision mesh where all vertices don't share the same parent bone ? if not, how could I go around making a collision box that could be deformed (not only translated with the common parent bone) ?

2. Conflicting bone names?

Sometimes, when creating certain skeletons the compiler throws the following error:

<Sergiy> Conflicting bone names: root vs root vs aaaa, try deleting one of the bones.
This is an old bug in studiomdl code that is about to be deprecated, so it may not be worthwhile fixing it

and the compilation is totally stopped. I tried renaming the bones, and changing the bones hierarchy to no avail. It should be noted that there are no two "root" named bones as the error might suggest. Even more, sometimes it shows three different named bones.

I don't understand what could be the cause of the error.

3. bone_followers

Finally, I noticed that the .qc of the decompiled model of some asset has a part like this:

        "bone" "joint15"

what does this (bone_followers) do?

  • 1
    \$\begingroup\$ Although all of your questions are related, you might want to split this question into three different questions, this will focus the question and you'll receive 'more concentrated' answers instead of an answer that only covers one of the topics (you can only accept one answer). \$\endgroup\$
    – Vaillancourt
    Commented Sep 26, 2016 at 14:20
  • \$\begingroup\$ @AlexandreVaillancourt I added an answer to the first two points. So I will leave the question open for the third point only. \$\endgroup\$
    – 4nt
    Commented Oct 1, 2016 at 6:11

1 Answer 1


Regarding point 1, I think that it is just a limitation of the engine.

Regarding point 2, I decompiled Coach's model (from Left 4 Dead 2) and I started adding parts of his .qc to mine. In the end, I was able to solve the issue by adding this to my .qc (before $CBox although I don't think this matters):

$Attachment "eyes" "newroot" 2.92 -2.8 0 rotate 0 -89.37 -90
$Attachment "mouth" "newLeft" 0.84 -6.09 -0.16 rotate 0 -80 -90
$Attachment "survivor_light" "floorLeft" 6.3 25.2 0 rotate 0 0 0
$Attachment "forward" "newRight" 0 0 0 rotate 0 0 0
$Attachment "pistol" "floorRight" -3.48 2.17 -5.47 rotate -3.66 -0.47 96.14
$Attachment "weapon_bone" "colLL" 0 0 0 rotate 0 0 0
$Attachment "medkit" "barLeft" -1.34 -5.84 -1.37 rotate 5.03 77.16 0
$Attachment "primary" "colRR" 3.21 -5.16 -2.75 rotate -13.7 170.19 174.29
$Attachment "attach_R_shoulderBladeAim" "barRight" -11.07 -1.46 -5.33 rotate -90 -102.85 0
$Attachment "attach_L_shoulderBladeAim" "colLLg" -11.07 -1.46 3.69 rotate -90 -102.85 0
$Attachment "melee" "ledgeLeft" 2.87 -5.56 5.47 rotate 24.08 175.37 97.14
$Attachment "molotov" "colRRg" -3.78 -2.89 8.29 rotate -63.44 -74.67 -101.41
$Attachment "grenade" "ledgeRight" -0.8 1.38 9.33 rotate -90 -175.23 0
$Attachment "pills" "colRL" -3.1 0.74 -8.47 rotate -41.18 -88.48 -87.05
$Attachment "lfoot" "colLR" 0 5.25 0 rotate 0 0 0

You can read about what Attachment does here. The first string inside quotes is an identifier, so in principle the values shouldn't matter. I just copied them from Coach's decompiled .qc. Same with the numbers, I don't think their values matter.

The second string inside quotes is the name of one of my bones (of course, in Coach's .qc it was one of Coach's bones). In my case, I created an Attachment for every bone in my skeleton. I don't know if just adding an Attachment for the "conflicting" bones would have been enough.

Considering all this, I think the problem was indeed a bug and somehow doing this is sidestepping it. After adding those attachments the animated collision box is compiled correctly, and works as intended in game.

I haven't found an answer to point 3, so I will leave the question open.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .