Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter 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

F-curve extrapolation

Presently, the ball bounces exactly once, which is not very exciting. It also stands still before frame 10 and after frame 90, which is not a good look either. To fix this, we could simply duplicate the bouncing keyframes a few more times and shorten our scene frame range. There’s a better way, though – one that will keep our ball bouncing and rolling... forever. We can accomplish this quite easily using a feature called extrapolation.

To understand extrapolation, imagine that the F-curve has a finite “main” segment between its first and last keyframes. Now, try to look at the rest of it, where it ends. You’ll be zooming out for a long while. The F-curve is eternal; it has no beginning or end. It can’t disappear just because there are no keyframes left! It must always have a definite value, even before the animation begins, and long after it has ended. Extrapolation is our word for what an F-curve should do for the rest of time.

By default, all F-curves have Constant Extrapolation, which simply extends them flatly, causing the value to stop changing. This is fine for most things but not for our present F-curves. After selecting different extrapolation modes for these, you’ll be able to drag out the End Frame value and make the scene last an hour if you like, letting the ball bounce miles and miles off into the horizon.

Linear extrapolation

Let’s address the first two F-curves that make the ball roll – X Location and Y Euler Rotation. Instead of adding the keyframes for these at the start and end frames of the scene, I asked you to add them on frames 10 and 90 so that the issue would be easier to see.

What if we wanted the ball to keep rolling? We’d have to extend these F-curves with keyframes that go further up and out. How much further out? This can get unruly if you’re not sure exactly when the animation should end. Fortunately, those keyframes are fine exactly where they are.

All we need to do is set a different mode of extrapolation:

  1. Select the X Location and Y Euler Rotation animation channels.
  2. Press Shift + E or go to Channel | Extrapolation Mode.
  3. Choose Linear Extrapolation.

Linear Extrapolation makes the F-curve continue on a linear slope, which is derived from the first two and last two keyframes. Since there are only two keyframes on each of these F-curves, and they both already use Linear interpolation, the F-curves will appear as perfectly straight lines when extrapolated this way:

Figure 2.20: Linear extrapolation for the X Location and Y Euler Rotation F-curves

Figure 2.20: Linear extrapolation for the X Location and Y Euler Rotation F-curves

Note what this does to our animation. Not only does the ball keep on rolling, it now always has been rolling.

Cyclic extrapolation

Let’s now turn to the Z Location F-curve. To make the ball bounce repeatedly, we could use what we already know and duplicate the three bouncing keyframes a hundred times or so... but let’s not. There’s another extrapolation mode available that can do all the work for us much more cleanly.

Let’s look at it now:

  1. Select the Z Location animation channel.
  2. Press Shift + E or go to Channel | Extrapolation Mode.
  3. Choose Make Cyclic (F Modifier).

The F-curve now has what’s called cyclic extrapolation. The keyed segment of the F-curve will now repeat indefinitely. Wait, though! Something’s not right:

Figure 2.21: A bounce-and-roll kind of F-curve

Figure 2.21: A bounce-and-roll kind of F-curve

That’s an odd pattern. What’s going on here?

Remember, cyclic extrapolation repeats the entire keyed segment of the F-curve – that is, everything between the first and last keyframes. Where is the last keyframe on this curve? All the way over on frame 90! We added it at the very beginning of this chapter and forgot about it. This sort of thing happens to animators all the time.

We want to repeat a 20-frame bounce, not an 80-frame bounce-and-roll. That pesky keyframe is messing up the cyclic period of our F-curve! Let’s send it to Hell:

  1. Select the Z Location keyframe on frame 90.
  2. Press X to delete it.

Ah, that’s much better.

Figure 2.22: Properly repeating bounces

Figure 2.22: Properly repeating bounces

Now that only our three bouncing keyframes remain, the next bounce happens immediately after the previous one, giving us crisp, clean bounces.

You’re finished with the bouncing ball animation! Continue playing around with it if you like – maybe set your End Frame to 10,000 and watch your creation go out into the world:

Figure 2.23: Come back!

Figure 2.23: Come back!

And we’re done!

lock icon The rest of the chapter is locked
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