Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Realizing 3D Animation in Blender

You're reading from   Realizing 3D Animation in Blender Master the fundamentals of 3D animation in Blender, from keyframing to character movement

Arrow left icon
Product type Paperback
Published in Jul 2024
Publisher Packt
ISBN-13 9781801077217
Length 456 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Sam Brubaker Sam Brubaker
Author Profile Icon Sam Brubaker
Sam Brubaker
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Introduction to Blender and the Fundamentals of Animation
2. Chapter 1: Basic Keyframes in the Timeline FREE CHAPTER 3. Chapter 2: The Graph Editor 4. Chapter 3: Bezier Keyframes 5. Chapter 4: Looking into Object Relationships 6. Chapter 5: Rendering an Animation 7. Part 2: Character Animation
8. Chapter 6: Linking and Posing a Character 9. Chapter 7: Basic Character Animation 10. Chapter 8: The Walk Cycle 11. Chapter 9: Sound and Lip-Syncing 12. Chapter 10: Prop Interaction with Dynamic Constraints 13. Part 3: Advanced Tools and Techniques
14. Chapter 11: F-Curve Modifiers 15. Chapter 12: Rigid Body Physics 16. Chapter 13: Animating with Multiple Cameras 17. Chapter 14: Nonlinear Animation 18. Index 19. Other Books You May Enjoy

Creating simple movement with keyframes

In the first act, our hero Cube will stride fearlessly from west to east. We’ll achieve this using keyframes, a technique inherited from the traditional hand-drawn animation process.

In hand-drawn animation, a lead animator draws the most important frames in a shot, or “keyframes,” which determine the positions and expressions of characters and objects in the shot at key points in time. These keyframes are then passed to the “in-betweener,” who draws the rest of the frames in between to create a smooth appearance of movement.

In Blender and other animation apps, keyframes play a similar, though much simpler role: determining what the value of a property will be at a given frame. It’s easier to see for yourself than read about it, so let’s jump right in!

Keying the initial location

To begin, we’ll give our main character, Cube, a suitable starting position:

  1. Go to frame 10.
  2. Select the Cube.
  3. Move the Cube up 1 unit on the Z axis so that it rests on the “floor” in the 3D Viewport.
  4. Move the Cube -5 units leftward on the X axis.
  5. Now, let’s insert our first keyframe! With the Cube still selected and your mouse cursor in the 3D Viewport, press the I key.

    This brings up the Insert Keyframe menu, one of several ways to insert a location keyframe:

Figure 1.7: The Insert Keyframe menu

Figure 1.7: The Insert Keyframe menu

What you see here is a list of some (but not all) of the selected object’s properties that can be keyed. Click Location to insert a location keyframe.

Important note

From this point onward, always be aware of what you have selected and what frame you are on, especially when inserting keyframes.

The keyed property

We have just inserted a keyframe for the location of the Cube on frame 10. This is huge! In the future, we will insert and edit dozens of these things at once, but for the moment, let’s dwell on what has changed.

Firstly, a small diamond shape has appeared in the Timeline. If you don’t see it at first, scroll up or press Home; it might be hiding:

Figure 1.8: New keyframe on frame 10

Figure 1.8: New keyframe on frame 10

That’s our keyframe, insofar as it exists in the Timeline. Its horizontal position marks the frame on which you have “keyed” a property of the Cube. Although you can’t see it yet in the Timeline, it also contains the X, Y, and Z values of the cube’s Location property when it was keyed.

Tip

By default, the Timeline only displays the keyframes of selected objects; they will hide when you select a different object. In later chapters, we’ll examine other editors better suited for displaying the keyframes of multiple objects at once.

Secondly, take a look at the cube’s Transform properties:

Figure 1.9: The keyed Location property

Figure 1.9: The keyed Location property

The Location values are now highlighted and distinguished by a small set of keyframe-shaped icons to the right. This indicates that they are “keyed.”

Tip

Animated properties are highlighted yellow when there is a keyframe for that property on the current frame, green on every other frame, and orange when manually changed.

Try moving the Cube again, and then change frames. The Cube will immediately “snap” back to its keyed location. The property has been “taken over” by its keyframes. From now on, any manual change you make to the cube’s location can only be temporary unless you insert another keyframe for it.

Important note

A single property cannot have two keyframes on the same frame. If you insert a keyframe where one already exists, the new keyframe will simply replace the old one.

Keying the second location

Play the animation and look closely at what happens to the Cube. Nothing! Now, play the animation backward. What happens then? Again, nothing – but now it’s happening backward.

Our one keyframe simply determines that the Cube must be at a certain location on frame 10, but one keyframe isn’t enough to create movement. Until we add a second location keyframe, our Cube will remain at just one location – not only on frame 10 but on every other frame as well.

Let’s add that second keyframe:

  1. Go to frame 40.
  2. Move the Cube 10 units rightward on the X axis.
  3. Press I and insert another Location keyframe:
Figure 1.10: The Cube on frames 10 and 40

Figure 1.10: The Cube on frames 10 and 40

Now, play the animation. The Cube moves! Two keyframes were all we needed to create motion. Now let’s take a closer look at what happens between those two keyframes.

Principles of keying

Note that we never issued any “commands” to the Cube in order to make it move. We did not, for instance, encode any events like “begin moving at frame 10,” or “stop moving after frame 40.” This is a misapprehension that novice animators often have. By inserting these keyframes, we simply declared that on frame 10, the Cube shall be in one specific place, and on frame 40, it shall be in another.

Also, watch what happens to the X Location value of the Cube as you change frames:

Figure 1.11: The Location property on frame 20

Figure 1.11: The Location property on frame 20

Although we might say we have “animated the Cube”, it is more accurate to say that we have animated just one property of the Cube (Location), and even then, only one of the three components of that property actually changes (the X Location). For now, everything else about the Cube (for example, its Rotation and Scale) remains unaffected.

Finally, note that we didn’t need to interfere in the 29 other frames between frame 10 and frame 40 in order to make the Cube move smoothly from one place to another. Blender handled that automatically, playing the role of in-betweener for us. This is arguably the greatest advantage that digital animation offers over traditional animation.

Tip

The method by which one value transitions to another is called interpolation. We’ll explore some different interpolation modes in the next chapter.

Keying rotation

In the second act of our epic 120-frame animation, the Cube gets homesick and turns around, in preparation for the long journey back to its birthplace. We’ll animate this part by keying not the Location property but the Rotation property.

As you might expect, we can follow the same process as before, using the Insert Keyframe (I) menu. Since you’ve already had some practice, we can cover this part more quickly:

  1. Go to frame 45.
  2. Ensure the Cube is still selected.
  3. Press I to bring up the Insert Keyframe menu and click Rotation.
  4. Go to frame 55.
  5. Rotate the Cube 180 degrees on the Z axis (clockwise or counterclockwise – your choice).
  6. Repeat step 3 to insert the second rotation keyframe.

There should now appear to be four keyframes in the Timeline: two for the cube’s location and two for its rotation. For the moment, we cannot tell just from looking at the Timeline which are which but rest assured that they are distinct. We will learn how to look at their contents more closely in the next chapter.

When you playback your animation now, the Cube will move from west to east, wait 5 frames, then briskly spin around for 10 frames to face the opposite direction.

You have been reading a chapter from
Realizing 3D Animation in Blender
Published in: Jul 2024
Publisher: Packt
ISBN-13: 9781801077217
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image