Tweaking the actions in Graph Editor
In the previous recipe, we built Actions by setting position, rotation, and/or scaling keys, which Blender interpolates through F-Curves to create the character's animation. In this recipe, we are going to see the Graph Editor window, a tool to modify these F-Curves to fix errors or fine-tune the movements of the animated character.
Open the Gidiosaurus_walkcycle.blend
file.
- If it's not already loaded, in the Action Editor window, load the Gidiosaurus_walkcycle action.
- Go to the top main window header and click on the two little arrows to the left side of the button labeled as Default. In the pop-up menu, select the Animation item to change the screen layout:
- Press the Ctrl key and left-click on the top right corner of the Dope Sheet window, then drag the mouse towards the Graph Editor window below to switch the two windows.
- Go to the 3D viewport and zoom to the character to select the foot_ik.L bone; the F-Curves for the selected bone appear in the Graph Editor window:
- Expand the foot_ik.L item in the Graph Editor list-tree by clicking on the little arrow to the side of the item itself, then click on the View item in the toolbar and select the View All item to better visualize the curves inside the Curve Editor area:
- Hide (by clicking on the eye icon) and/or delete (select using left-click and the X key) the unnecessary curve items such as (at least in this case) X Scale, Y Scale, Z Scale or ikfk_switch (foot_ik.L), and so on. Join the unnecessary windows together and adjust the size of the Edit Area (the part with the keyframes) in the Dope Sheet to make them more easily readable. Optionally, enable the Normalize item in the Graph Editor toolbar to show all the F-Curves in a normalized -1 to 1 range.
- Save the file as
Gidiosaurus_F-Curves.blend
:
By selecting a curve name item and/or hiding the others in the Graph Editor list-tree, we can concentrate on one curve at a time. For example, what if we want to change the position of the right foot at frame 27 on the global x axis, when it's high off the ground?
- Just left-click on the X Location (foot_ik.L) item in the list to highlight it and/or simply hide the others. Right-click on the curve keyframe/control point at frame 27 to reveal the handles, then press G | Y to move the keyframe handles on the vertical axis and see the foot move accordingly in the viewport on the global x axis:
- Or else, right-click only on one of the handles of the keyframe to move it and change the curve's envelope:
- By Shift-selecting two or more keyframes of an F-Curve and pressing the T key, it is possible to set the interpolation type through the Set Keyframe Interpolation pop-up menu; by default the F-Curves are Bezier, but they can be switched to Linear or Constant. There are also Easing and pre-made Dynamic effects:
- Finally, the handles' type can also be set through the Set Keyframe Handle Type menu by pressing the V key; by default the handles are Aligned, but they can be set as Free, Vector, Automatic, and Auto Clamped too: