ABSTRACT

Once it is activated, also make sure that Auto-Key is activated from the Animation Timeline window. To do this, activate the Auto-Key button from the bottom toolbar of the Animation Timeline. ▶6.4

Now all editable properties for objects will be keyframed automatically when changed. To confirm this, Blender color codes all keyframed fields, turning them yellow. ▶6.5

further. On key frame generation, Blender often keyframes more properties than are truly necessary. For position changes, for example, Blender keyframes all position, rotation, and scale fields by default, rather than just position. This leads to an excess. You can cut down on unnecessary key frames with autokey by enabling the Only Insert Needed option. This is available via the User Preferences dialog. Switch to the Editing tab, and activate the Only Insert Needed check box. On activation, Blender only keyframes the essential properties, keeping key frames to a minimum. This makes animations clearer and tidier. ▶6.6

Now, on changing objects with autokey activated, Blender keyframes only needed properties. Great! ▶6.7

Whether you’re animating people, cars, airplane, bicycles, animals, guided missiles, or something else, you’ll often need objects to travel a path or a trajectory. You could, in theory, keyframe this kind of motion manually and automatically, by simple translating and rotating your object appropriately throughout the animation duration, creating key frames where needed. But in this case, it’s often easier to draw a spline object, representing the path, and have our object follow that. In this section, we’ll see two ways to do that: following and clamping. ▶6.8

First, let’s create a path for an object to follow. You can do this using the Path object. Access the Tools panel, and from the Create tab click the Path button. ▶6.9

Select the Path object in the viewport, and use Edit mode to manipulate the path points, repositioning them to define a travel path. ▶6.10

curve, if needed, by selecting any two points on the curve and clicking the Subdivide button from the Tools menu, from the Curve Tools rollout. This inserts an additional control point midway between the two selected control points. ▶6.11 When you have a path and an object that should follow it, you have two options available. Let’s see the first one: the Follow method. Select your object, and then switch to the Constraints tab from the Properties panel. Then choose Add Object Constraint to add a new constraint to the object. ▶6.12 Select Follow Path to add a Follow Path constraint to the selected object. Then, from the Target field, select the path object to follow. Initially, no change occurs in the viewport. ▶6.13 Now select the path object, and switch to the Spline tab from the Properties panel. The Evaluation field controls the movement of the object along the path. When Evaluation Time is 0, the object is positioned at the start of the path, and when Evaluation Time is at 100, the object is positioned at the end of the path. The values between represent intervening positions. The Evaluation Time field can be keyframed to animate the object along the path. ▶6.14

to align its nose with the path as it moves. To achieve this, select your object, and from the Follow Path constraint, enable the option Follow Curve. ▶6.15

When you do this, the object may immediately rotate to face in the wrong direction. You can easily fix this by using the Forward field. Simply choose the local axis that acts as the forward vector. ▶6.16

A second method to make an object follow a path is the ClampTo method. This method does not turn an object to face forward as it moves, however. It’s especially useful if you need to control your object using a Driver or a physical force but need the object’s motion constrained to the path. To use this method, select your object, and from the Constraints tab, add a ClampTo constraint. ▶6.17

Then choose the Curve object from the Target field. Once it is added, you can move, rotate, and scale your object as usual. When you do this, however, the object’s position in X, Y, and Z will always be constrained (clamped) to fall on the curve. ▶6.18

Splines and paths make useful control objects for animation. They’re used frequently for building motion paths, for acting like bones, and for working with inverse kinematics, among others. For this reason, splines are used widely in animation. However, by default, the visibility of splines in the viewport can be awkward. They can be difficult to see properly when deselected, and they’re all displayed in the same color. You can, however, customize this. ▶6.19

To make a curve thicker and more prominent in the viewport, select the curve, and switch to the Curve tab in the Properties panel. From there, increase the Depth field. This assigns the curve a thickness, generating a mesh along the curve. ▶6.20

Next, from the Shape rollout in the Curve tab of the Properties panel, select Full for the Fill type. This allows the curve faces to render from all angles. ▶6.21

of the curve from the Outliner to prevent the faces and thickness from displaying in renders. To achieve this, simply deactivate the render icon from the Outliner. ▶6.22

It’s helpful to customize the curve appearance by using custom colors. This lets you change how curves look, giving each curve a unique appearance that is meaningful to your animation workflow. To do this, you can assign the curve a material. Using the Blender render engine, just switch to the Materials tab from the Properties panel, and assign the curve a new material. Click the + icon to add a material slot, and then click the New button to create a new material for the selected spline. ▶6.23

Assign the material a color from the Diffuse slot in the Materials tab. This determines the color of the spline in the viewport. ▶6.24

by scene lighting. To make the curve color more vibrant and eye-catching in the viewport, activate the Shadeless option for the material. ▶6.25

Voila! You can now customize curve appearance in the viewport. ▶6.26

Blender supports many types of procedural animation, like motion paths and physical simulations. With motion paths, we can draw a curve and have an object follow it. With physical simulations, we can adjust the initial variables and conditions and then see how objects unfold and behave according to the physical forces. These animation types and others are calculated, sometimes on a per-frame basis and sometimes in batches, based on specific inputs, like splines and formulas. These types of animation allow for parametric flexibility; that is, you can change them and the outcome by adjusting type-in properties directly from the Properties panel. This makes such animations easy to tweak

they are not fundamentally key frame based, insofar as they don’t produce tangible and editable key frames in the Animation Timeline. ▶6.27

Animations lacking definition through key frames are problematic, especially if they are to be exported successfully to other applications, like game engines (e.g., Unity or Unreal). Features and capabilities differ between animation software, and

many applications only support imported animations based on key frames. For this reason, it’s important to be able to convert animations in Blender into key frames where needed, which is known as animation baking. ▶6.28

path animation: an airplane traveling along a spline path, as considered earlier in the chapter, using the Follow Path constraint. It moves from one side of the path to the other over time by keyframing the Evaluation Time field of the curve on the first and last frames, from 0 to 100. This animation produces no key frames for the airplane object that moves, even though it flies across the path throughout the animation. ▶6.29

You can, however, bake the animation of the plane to key frames. This converts the animation into key frames, and it removes the dependency of the plane on the curve object. This is because, after the bake, the key frames define the motion of the plane and not the curve. To do this, select the airplane object (or the object for key frame baking), and then choose Object > Animation > Bake Action from the 3D menu. ▶6.30

Selecting Bake Action displays the Bake menu, offering control and customization of how the bake is saved to key frames. Unfortunately, the Bake menu is not resizable and does not display the full names of all options. The options, from top to bottom, are Only Selected Objects, Visual Keyframe, Clear Constraints, Clear Parents, and Overwrite. ▶6.31

the Start Frame and End Frame fields. The Frame Step field specifies the interval of frames for which a key frame should be made. This value varies depending

on the animation being baked. This value should be lower for animations with rapid change and higher for smoother and longer animations. The default value of 1 means a key frame is generated for every frame. This offers the greatest accuracy and preservation but could result in the production of many unnecessary key frames. This can lead to messy results and poor performance for real-time game engines. ▶6.32

Ideally, Frame Step should be as high as possible while achieving the results you need. On clicking OK, the animation will be baked to key frames. For longer, complex animations, this may take a few minutes or more. Once completed, the results will be evident in the Animation Timeline as new key frames are generated for the selected object. ▶6.33

After generating key frames, you’ll probably want to check out key frame interpolation inside the Graph Editor, to ensure the animation maintains its original pacing. Nothing may need to be done, but in some cases some minor tweaks to the curves may be required. ▶6.34

objects to other applications and game engines, you can choose File > Export. For animation, the DAE and the FBX formats are widely supported options. ▶6.35

“Squash and stretch” is a fundamental principle of animation that describes the elastic characteristic of many objects, making them change shape slightly during motion. And even with solids that don’t change shape, the effect can still be used to emphasize motion, drama, and mood. Blender offers a relatively straightforward method for creating this effect. Select your object, which should squash and stretch, and then add a Maintain Volume constraint, available from the Constraint tab in the Properties window. ▶6.36

The Maintain Volume constraint applies scale compensation to an object automatically along a specified axis to maintain its initial volume. Thus, by scaling the object, Blender automatically adjusts object size in the remaining dimensions to maintain a consistent volume overall. Use the Free setting to specify the axis on which free scaling may occur. For a simple squash-and-stretch ball scenario, this will likely be the Z axis. ▶6.37

Once specified, try scaling the object on the free axis. When you do this, the object changes shape across the remaining dimensions. This can be used to create a squash-and-stretch effect when scale is keyframed over time. ▶6.38

Remember, object hierarchies in Blender are especially important for animation. Objects in a scene exist in a hierarchy where objects relate to one another. An

object can be a parent, sibling, or child based on its relationship to another object. A parent is a top-level object that can have no, one, or more children. A child object is a lower order object to a parent. Siblings refer to multiple child objects with the same parent. ▶6.39

objects defines how they transform. Transformations cascade downward in a hierarchy. This means that when a parent object is moved, rotated, or scaled, all child objects will be transformed too to maintain their relative offset from the parent object. For this reason, if you’re making a car object with passengers inside, you’ll want to make sure the passengers are child objects of the car body. As the car moves, the passengers should move with it. This principle applies to airplanes, trains, ships, or any objects that depend on another. You can encode this relationship with hierarchies-just by dragging and dropping objects onto each inside the Outliner window in Blender. More information on the Outliner window can be found online at https://www.blender.org/manual/ editors/outliner.html. ▶6.40

Some objects consist of complex hierarchies with many levels of nestingchildren within children, and so on. When working with animations on many objects like this, it can be difficult selecting things in the viewport, getting exactly the object you need, as opposed to a parent or child or related object. You can accidentally pick a child object instead of a parent, or vice versa. In addition, you may want to animate the objects but not associate key frames with any particular one. You can solve these problems using Selection Controls: This is about creating a dummy object that stands in for the hierarchy and controls all children automatically. ▶6.41

Consider a scene in which a truck object is the parent of many others, such as the passenger, the wheels, and more. When the truck is transformed, everything associated with it also transforms, via cascading transformations. ▶6.42

Rather than select any specific object in the truck to create an animation, we can use a control object instead. Let’s create a control object by switching to the Create panel and creating an empty object. Simply click the Empty button. ▶6.43

After creating an empty, change its viewport avatar via the Properties window. Switch to the Empty Data tab, and change the Display field from Plain Axes to Sphere. Change the size to something that encompasses your model hierarchy. This makes the empty gizmo easier to see and select. ▶6.44

whatever is appropriate for your object. I use the prefix root to indicate that it’s the ultimate parent object. ▶6.45

Next, use the Outliner panel to drag and drop your object hierarchy (for me, the car object) under the empty, making the empty a parent object. ▶6.46

Now make all objects in the hierarchy, except for the root empty object, nonselectable. You can do this in one operation by holding down the Ctrl key and clicking the selectable icon for the object hierarchy at the root level. This toggles the selectability for objects down the hierarchy. Once this is completed, the only selectable object in the hierarchy should be the empty root object. ▶6.47

Excellent work! Now you can select the complete object by one click in the viewport on the empty gizmo. This transforms all objects in the hierarchy, and you cannot accidentally select any of the child objects. ▶6.48

You’ll often need to animate parts of objects rather than whole objects, like the petals of a flower or the expressions on a character face. In these instances, you

need to animate the vertices within a mesh, instead of the complete mesh with all the vertices. You can do this using armatures, but you can also use hooks, which are simpler to use and can be effective for simple subobject changes-like objects that must bend, twist, or flex. Let’s see how to use hooks in a specific case: for the Suzanne monkey head, to change its expression. Open up a new scene, create a monkey head, and apply a subdivision surface modifier to increase its smoothness. ▶6.49

Next, select the top vertices of the eye section in the model. By raising and lowering these vertices, with falloff, you can create surprised, shocked, tired, or bored facial expressions. ▶6.50

With the vertices selected, choose Mesh > Vertices > Hooks > Hook to New Object from the 3D menu. Choosing this option creates a new, empty object in the scene and applies an auto-configured Hook modifier to the monkey mesh. The newly created empty is a special hook object that’s associated with the selected vertices. ▶6.51

it, and switch to the Empty Data tab. From there, use the Display dropdown to change the visibility, size, and shape of the viewport gizmo to better represent the area it affects within the monkey mesh. In my case, I’ve used a Sphere gizmo with a size of 0.20. ▶6.52

Next, by moving the hook object, you transform the associated vertices in the monkey mesh. What’s great about this is that the hook object can be animated. Therefore, you get animate-able control over an object’s vertices at the object level. ▶6.53

Repeat this process for the vertices over the other eye in the monkey model, which allows you to create symmetrical and asymmetrical effects. Then, name the hook objects appropriately, such as hook_LeftEye and hook_RightEye. ▶6.54

You can also control the falloff effect of a hook over the range of its associated vertices by selecting the original mesh (the monkey head) and tweaking the Radius field for the Hook modifier. Remember, if you add two hooks, there will be two modifiers, one for each hook.