Some Constraint Tutorials

meklab:

Remember that SFM is an awful program and if you want to really get into animation, you should use something better like blender, c4d, 3dsmax, maya, etc.

That being said, constraints are a nice way to make SFM just a little less garbage and might convince you to postpone switching to something better if you’re an imbecile like I am.

Aim Constraint Basics

image

This is how you apply an aim constraint. Left-click on the parent bone first, then left-click on the child bone. The child bone will rotate to face the parent bone.

image

This is how it looks in practice.

You might notice that when you apply this constraint, a new DAG appears in the list. This is a slider that affects the weight of the constraint, on a scale of 0-100%.

image

Here, I’ve applied an additional aim constraint to the templar’s neck and 3 spine bones, and adjusted the weights to produce this:

image

You can see that the bones with lower slider values don’t rotate as much to follow the bone they’re constrained to.


Aim Constraints for Eye Movement

image
image

Aim constraints can be used to create a viewtarget for non-qc eyes, which makes moving them around a whole lot easier compared to manually positioning them.

This isn’t any different than what I showed above, but you might have to manually position the eyes’ initial position so they’re looking directly at the viewtarget before you apply the constraint.


Parent Constraints for Impromptu Shapekeys

image

Parent constraints are basically locks that can be toggled on & off. By applying a parent constraint to a bone, moving it, and then messing with the weight slider, you can basically create a shapekey from scratch.

This is pretty useful for eyelids and eyebrows, since SFM tends to have trouble interpolating very small position adjustments between keyframes, but has no problem interpolating different slider values.


Using Inheritence to Bypass Aim Constraint Limitations

image

Normally, objects that are under an aim constraint cannot be rotated. There’s a way around this, and it has to do with how objects inherit motion from whatever they’re locked to.

image

Here’s a quick hierarchy of bones on a regular biped in sfm. If you move the neck, the head moves as well. You move spine2, it moves the neck and head as well, and so on.

image

(empty.mdl is what I use for this. It’s essentially just an invisible model with one bone. You can use whatever you like as long as you hide it afterwards.)

Place a new model at the exact same position as the head. Lock the head to this new model, then lock the new model to the neck, creating the hierarchy above.

image

By applying the aim constraint to this intermediary bone instead of the head, and having the head inherit its (constraint-based) movement through a lock, you;’re able to bypass this limitation of aim constraints, allowing you to both rotate the head and have it track something as if it were constrained.

  1. summon-daze reblogged this from marcov4
  2. thetowerofzireael reblogged this from qwertsfm
  3. qwertsfm reblogged this from meklab
  4. kingdwas reblogged this from empathetic-one
  5. 1m4gin4ry-writer-guy reblogged this from meklab
  6. sweet-thrills reblogged this from meklab
  7. xdjins reblogged this from jintsurikisfm