Introduction to Animation
What is an animation? In the simplest form an animation is a series of still images each one slightly different to the next, which when viewed in quick succession produces the illusion of motion. This is similar to the early movie films where images or frames were taken with a camera and assembled on a celluloid strip. Animations were created in the same way. In Blender this is accomplished by creating data which displays as a series of still images. Each still image is a single frame of the animation. Each frame (image) is rendered, which means the data you enter in the Blender program are correlated and turned into the digital image; this, by default, is in a PNG format. Finally, all the images are compiled into one video file.
To create an animation you begin by setting up your scene with the object that you wish to animate (the actor). You have to think about what the actor is required to do and how long it should take to do it. Also consider what format you will use in the final render.
The render format determines how many frames per second the animation should run. One of the problems that beginner animators experience is trying to make the motion occur in an appropriate time. Remember to look at the frames per second and relate it to time. For example, if you want a movement to take 3 seconds and you are run ning at 25 frames per second, then the animation has to occur in 75 frames.
In Blender you do not have to create every single frame of the animation. You set up single frames (“Keyframes”) at specific points and the program works out all the in between frames.
Think of a 10-second animation that, when running at 25 frames per second, would consist of 250 frames. If you want your actor to go from points A to B and then to point C in the scene within the 250-frame animation, you first insert a “Keyframe” at frame 1 with the actor at position A. This is giving Blender data that says at the frame 1, locate the actor at location A. Then at another frame, midway in the animation, insert a second “Keyframe” with the actor at location B. Finally, insert a third “Keyframe” at frame 250 with the actor at location C. These are the “Keyframes” for the animation. Blender will work out all the in-between frames. The “Keyframes” will also include the data for other
features such as scale and rotation.
Moving, Rotating, and Scaling
Moving, rotating, and scaling are the three basic modifiers to use in an animation. Besides entering data specifying the position of the actor in a scene at different locations (the “Keyframes”) you also specify any other changes that take place such as rotation and change in size. When you create “Keyframes” in Blender with these changes Blender will work out all the data for the changes at the in-between frames.
Determining the in-between data is called “Interpolation.” There are different meth ods of interpolation. By default, Blender uses “Bezier”-type interpolation, which for motion gives a nice acceleration and deceleration between “Keyframes.” Remember, at
the moment we are only considering the movement of an object. When an object moves from points A to B in a given time, it is said to move at a certain velocity (speed). In theory, the speed could be represented as a straight line graph, but in practice an object at rest (motionless) has to go from being motionless to moving at a certain velocity. The rate at which it attains the velocity is called acceleration. Blender’s “Bezier” interpolation draws curves at the beginning and end of the straight line graph (acceleration and deceleration). You have the options to choose “Constant” or “Linear”-type interpolation if appropriate. Selection of interpolation types will be discussed later in this chapter.
Using the term “Bezier” to describe interpolation is in fact an anomaly. Bezier actually describes a type of line (the line on a graph described in the previous paragraph). A Bezier line or curve in Blender is a line that has control points on it that allow the shape of the line to be altered or edited. In Blender, the control points are located at the position of the “Keyframes.” Interpolation is done according to a mathematical formula that determines the shape of the line. When the data for the frames in the animation are drawn as a line on a graph, the line conforms to that mathematical formula.
For the moment, we will accept the default Bezier-type interpolation and demonstrate the insertion of key frames and the creation of a simple animation. We will use the default Blender screen with the three-dimensional (3D) window containing the default cube object as the actor. The default screen also displays the “Outliner” window and the “Properties” window at the RHS of the screen and the “Timeline” window across the bottom.
To set up our animation, first change the 3D window to top view with “Orthographic” projection (with the cursor in the 3D window press number pad 7—number pad 5). This just keeps the view simple so we can see where we are going.
The first step in an animation is to decide what you want your actor to do in a given time. In this case, the actor is the cube object. How long it takes your actor to do something will depend on how many frames per second your animation is run and this is determined by what format your final render will be in.
Let’s set our animation to run at 25 frames per second, which would be suitable for PAL format. Go to the “Properties” window, “Render” button, “Dimensions” tab—“Frame Rate” (Figure 9.3). Note that in the “Timeline” window the frame range settings are “Start: 1” and “End: 250” (Figure 9.5); this says that our animation will begin at frame 1 and end at frame 250. Running at the rate of 25 frames per second will give an animation time of 10 seconds. If you think about it, 10 seconds is quite a long time for a single action to take place in a video clip. Also in the “Timeline” window, make note of the lighter grayed area beginning at frame 1 and ending at frame 250. Changing the “Start Frame” and “End Frame” values in the header panel will move the end positions of the lighter grayed area.
Note the vertical green line at frame 1. This is the “Timeline Cursor.”
To make things relatively simple, we will only make our actor (the cube) move in a straight line across the screen along the x-axis and at the same time increase in size. Make sure the cube is selected in the 3D window. We will only insert two “Keyframes” to begin with, just to keep it simple.
In the default scene, by default, the actor (the selected object—the cube) is considered to be at frame 1 in the animation. In the lower LH corner of the window, you will see “(1) Cube” in white lettering (Figure 9.4). This indicates that you have the cube selected at frame 1. If you had 10 objects in the scene, all of which were actors with maybe some hidden, it’s nice to know which one is selected.
Before we insert a “Keyframe,” change to frame 25.
Observe the “Timeline” window at the bottom of the screen. The buttons labeled “Start: 1,” “End: 250,” and “1” show the start frame and end frame that was set by default for the animation and the current frame of the animation. Above the header you will see a scale ranging from −40 to +280. Click LMB on the scale hold and drag the mouse re-positions the scale. At either end of the scale there is a gray dot. Clicking on either dot LMB hold and drag the mouse left or right zooms the scale. With the mouse cursor in the “Timeline” window, pressing Num Pad + or − also zooms the scale.
Next to the 0 point on the scale, the vertical green line is the “Timeline” cursor. The cursor is located at frame 1. Click on the cursor with the LMB, hold and drag it across
to frame 25 (Figure 9.5). Note the number change next to the cube at the lower LH side of the window and in the header bar of the “Timeline” window. Other ways to change the frame are to click on the little arrows on either end of the “Start” button in the “Timeline” window header or click LMB on the button, hold and drag to change the frame number or click on the “1,” hit delete, and retype the required frame number.
There is always more than one way to skin a cat.
Now that you are at frame 25 place the mouse cursor in the 3D window and press the I key to insert a “Keyframe.” In the selection list that displays, select (click) “LocRotScale,” which covers moving, rotating, and changing the size of the object (Figure 9.6).
You have just inserted a key frame. You will see a short vertical yellow line at frame 25, which indicates a key frame (Figure 9.7).
So far, we have only inserted one key frame and our actor hasn’t done anything.
If you click on the “Timeline” window cursor (green line), hold and drag the mouse from frame 1 along the timeline the cube remains stationary. Clicking and dragging the green line in the “Timeline” is called scrubbing the animation, which is actually manually playing the animation. You can play the animation by clicking the “Play” button in the “Timeline” window header, but since we haven’t told our actor to do anything yet, nothing happens.
Note that going from frames 1 to 25 at 25 frames per second equals 1 second.
Continue by moving the cursor to frame 75 (drag the green line). In the 3D window, grab and move the cube 4 Blender units to the right along the X-axis and scale it up to twice its original size. With the cursor in the 3D window, press the I key and select “LocRotScale” to insert a second key frame. You will see another yellow key frame line (Figure 9.8).
When you scrub the animation between frames 25 and 75, you will see the cube move and change in size—you are manually playing the animation. Note that the action only takes place between frames 25 and 75, which is the location of our key frames; no action takes place on either side of the key frames.
Viewing Your Animation
To actually play a preview of the animation, move the green line in the “Timeline” to frame 1 then press Alt + the A key with the cursor in the 3D window. Say “one thousand” to yourself slowly (counting 1 second, while the green line in the “Timeline” moves across to frame 25). You will see the cube remain stationary until the green line reaches frame 25, then it will move and increase in size. At frame 75, it stops moving and changing size.
The green line in the “Timeline” continues on to frame 250, then jumps back to frame 1 and the preview of the animation plays again. Press Esc to stop playing. Another way to skin this cat is to press the play button in the “Timeline” window (Figure 9.9). This button is much like the play button on any video or audio player.
You can add more key frames to your animation to move, scale, and rotate your actor around the screen. For the most part, location and size keys work flawlessly but care needs to be taken with rotation keys. If you try to rotate an object too far in one set of keys, the object may not rotate in the direction you want it to and it may rotate oddly. Try small angular movements between keys while rotating. There are ways to control this better and tools to simplify the process, which will all be discussed later. Besides rotation, the movement of your actor may not be exactly as planned. Blender automatically defaults to trying to create a smooth flow through the key frames.
The Graph Editor Window
The “Graph Editor” window shows a graphical display of the animation. The graphs can be edited to refine and control the actions. Split the 3D window vertically and change one part to the “Graph Editor” window. In the “Graph Editor” window two panels open: on the RHS is the graphical display panel and to the LHS is the “Dope Sheet” (Figure 9.10).
Note: in the “Graph Editor” window header that you are in F-Curve mode. The alternative mode is “Drivers” which will be discussed later.
Examine the dope sheet panel (Figure 9.11). In the 3D window, we entered “Keyframes” and selected “LocRotScale” as the type. The dope sheet shows a file tree with headings for “Cube,” “CubeAction,” and “LocRotScale.” At the LHS of each line, there is a small white triangle that, when clicked with the LMB, opens or closes the directory. Click the LMB on the triangle next to “LocRotScale” to display the list of channels (graphs) in the graphical display. Next to the triangle you should see an eye icon. Clicking the eye icon next to “LocRotScale” activates all of the channels. Click again to close the channels. Each line is a channel for an action in the animation. For instance, the top line “X Location” is the channel for the movement of the cube along the X-axis. Clicking the LMB on each of the eye icons will toggle the display on or off. Click all the eye icons except the “X Location” channel. If the name “X Location” turns black and the channel in the graphical display disappears, click the LMB on the name. With only the eye icon for “X Location” active, only the graph for the location of the cube along the X-axis is shown (Figure 9.12). In the “Dope Sheet,” X Location is showing with white text indicating that the channel is selected. All other channels are in black text (deselected). If you click on the black “Y Location,” it turns white and “X Location” turns black. You have selected the “Y Location” channel. The X Location graph remains displayed, but it is a faint red line graph. The Y Location graph will not display until you click the eye icon.
Note the vertical and horizontal green lines in the graphical display; these are cursors.
The vertical green line is the same as the cursor in the “Timeline” window. The horizontal green line cursor provides a visual location for the vertical scale at the LHS. This scale represents the value for the action. For instance, with the “X Location” channel displayed, the values represent the displacement along the X-axis of the 3D window. Examine the “X Location” channel in the graphical display. The red line has two short orange lines attached to it. Each orange line has a dot at the center and a dot at each end; these orange lines are called handles. We are looking at a Bezier curve and the orange lines are called control handles—the control handles are used to change the shape of the curve. I mentioned this type of curve before (Bezier), and will come back to this topic later.
As previously stated, the location of the vertical green line of the cursor represents the frame number of the animation. You will see it aligns with the frame numbers across the bottom of the window, and at the lower end of the line, a green box holds the frame number. You can click on this line and scrub through the animation the same way as you can in the “Timeline” window. Like all windows in Blender, with the cursor located in that panel, pressing the number pad + and − keys will scale the panel up or down.
Let’s get back to the red line (“X Location” channel). The red line shows that from frames 1 to 25, there is no displacement of the actor from the midpoint. From frames 25 to 75, the actor moves from the midpoint of the 3D window to 4 Blender units along the x-axis. From frames 75 to 250, the actor remains displaced from the midpoint by 4 Blender units. This is the movement observed when we play the animation. If you now open the eyeball for any one of the “Scale” channels in the dope sheet, you will see a red, green, and blue line representing the fact that the actor changes from 1 Blender unit in size to 2 Blender units in size between frames 25 and 75. The three lines represent the X-, Y-, and Z-axis, respectively.
Editing the Curve
So far we have introduced “Keyframes” to set up how we want our actor to behave during the animation and we have seen how that action is graphically represented. We will now see how we can alter the behavior of our actor by altering the shape of the curve representing that action. Remember the type of curve being considered is a “Bezier” curve, which is designed to be edited.
Go back to the red line (the X Location channel). With the cursor in the graphical display, press the A key twice to make sure you have the line selected (the control handles turn off and on). If the line shows solid red with the two orange handles, you are in edit mode; if not, press the Tab key. If you are not in edit mode, the line will be a broken red line without handles.
Pressing the A key with the mouse cursor in the graphical display selects and deselects all graphs (the control handles turn on and off). After deselecting all graphs you select an individual graph by clicking the channel in the dope sheet. Remember the graph will not display unless you have clicked the eye icon for that channel. You may also RMB click on one of the control handles in the graphical display to select an individual graph.
It is important to have the line selected (bright red) before additional control points can be added.
Select the X Location graph (red line) with the RMB in the “Dope Sheet” panel and press the A key to deselect the line; you will have a red line with black dots at the location of the handles. Select the handle at frame 75 (click the RMB on the center dot); the handle will be orange and the line will be bright red. Press the G key and drag the mouse and move the handle up 1 unit then click LMB. Now, click on the right-hand dot on the end of the handle with the RMB, and the left-hand half of the handle fades. Then, click on the right-hand dot on the end of the handle with the RMB and, while holding the mouse button pressed, drag the end of the handle down and to the right. The shape of the curve arches up (Figure 9.13). Note: After starting the movement you can release the RMB and continue dragging. Click LMB to finish the action.
Now, if you scrub through your animation between frames 25 and 75, you will see the actor move along the x-axis from zero displacement at frame 25 to something more than 5 Blender units, then return to 5 Blender units (Remember we started at 4 units, moved up to 5 units. The arch takes us beyond 5.) at frame 75. The movement of the actor is being dictated by the shape of the curve. This demonstrates that the shape of the curve can be altered by moving the ends of the control handles or by selecting the center point of the control handle thus affecting the movement of the cube.
Another feature of the “Bezier” curve is that control handles may be added anywhere on the curve. In the graphical editor with your “X Location” graph (red line) selected, place your mouse cursor on the line between frames 25 and 75, hold the Ctrl key, and click on the line with the LMB (Figure 9.14). Another control handle is created; this is actually another “Keyframe” as you will see by the yellow line that has been placed in the “Timeline” window. You can enter a new “Keyframe” this way anywhere on the graph.
Other Types of Curves
By default, Blender selects the “Bezier”-type interpolation to insert frames between “Keyframes.” At this point, it should also be noted that there are two other options. In the “Graph Editor” window, select all the channels in the “Dope Sheet” panel by clicking open the eye icons. All the graphs will display in the graphical editor panel. Now press the A key twice to make sure they are all selected.
Go to the “Graph Editor” window header, “Key” button, “Interpolation Mode” and you will see the option to select “Constant,” “Linear,” or “Bezier” and a variety of additional options. Clicking on “Constant” or “Linear” will change the type of graph and therefore change the action of the actor. “Constant” results in a dramatic quick change from one state to the other at a given frame, while “Linear” produces a change following a straight line graph between points (Figure 9.15). The choice of these types of graphs and motions depends on how you want your actor to behave in the animation. Both of the alternatives to “Bezier” give the option to grab and move points and to add additional points on the graph, but “Bezier” is by far the most flexible of the three.
Blender interpolates to add frames between the “Keyframes” according to which of the previous graph options were selected. Blender can also figure out what to do with the frames of the animation before the first “Keyframe” and after the last “Keyframe,” which is called “Extrapolation.” There are two extrapolation options in Blender: “Constant” and “Linear.” By default, Blender selects “Constant.”
Constant extrapolation can be seen with the “X Location” channel selected in the “Dope Sheet” panel. With “Keyframes” at frames 25 and 75, Blender has interpolated the in-between frames according to the default “Bezier” method. That is, Blender has inserted frames that comply with a “Bezier” curve. On either side of the “Keyframes,” you can see horizontal lines that dictate no further change in status. This is constant extrapolation. If you go to the “Graph Editor” window header, “Channel” button, “Extra polation Mode” and select “Linear Extrapolation,” notice what happens to the curve. Blender takes a look at frames 25 and 26 and from the data plots a straight line coming up at an angle. Blender also looks at frames 74 and 75 and plots a straight line curve leaving the curve. The action of the actor before and after the two “Keyframes” will follow these straight line curves.
Modifying Curves
So far we have discussed creating graphical curves and how to change or modify them, thus changing how our actor behaves in the scene. This has been accomplished by working in the “Graphical Display” panel and the “Dope Sheet” panel. Blender also provides a “Properties” panel which gives precision control over the graphs.
To demonstrate in the “Dope Sheet” panel, deselect all channels. With your mouse cursor in the dope sheet, press the A key until all the channels are grayed out. Click on all the eye icons until they are open. This makes the graph for each channel visible in the graphical display but they are not selected. With the mouse cursor in the graphical display panel press the N key to display the properties panel with a “View Properties” tab (Figure 9.16). Click on the triangle next to the tab name to open the tab. Since all the graphs are deselected the tab is showing properties for the “Graph Editor” window cursors only (vertical and horizontal green lines).
Unchecking the “Show Cursor” button (click to remove the tick) hides the horizontal cursor.
The “Cursor” X and Y values give the coordinates for the intersection point of the cursors (X = Frame number and Y = Blender units). If you RMB click a “Keyframe” (Black dot on a graph) you select the “Keyframe” and the graph. Note the channel for that graph is selected in the “Dope Sheet” (text shows white). Clicking on “Cursor from Selection” button in the “Properties” panel, “View Properties” tab centers the intersection point of the cursors on the selected “Keyframe.”
You will observe that in selecting the “Keyframe,” other tabs display in the “Properties” panel (Figure 9.17).
“Active F-Curve”—display color: shows the color of the selected graph. “Auto XYZ to RGB”—shows Blender’s automatic color selection for the selected graph. You may click on the selection menu and choose “User Defined” to select your own color.
“Active Keyframe”—displays numeric data panels (sliders) with values pertaining to the selected “Keyframe.” You may adjust these values giving very accurate placement of the selected “Keyframe” and therefore precise control. “Modifiers”—a selection of eight modifiers for effecting the selected graph. For example, selecting the “Noise” modifier changes the straight line of the graph to a jiggled line which in turn jiggles the movement of the object in the 3D window.
At this point, we are interested in modifying our curve, not changing its color. Note the “Modifiers” tab with its “Add Modifier” button. Clicking on this button produces a drop down menu with eight options. We will not attempt to demonstrate all of these options at this time, but several are of particular interest.
Other modifiers of particular interest are demonstrated as follows: Have the “X Location” channel curve selected in the graph editor panel. Now click on “Add Modifier” and select “Cycles” (Figure 9.18). The graph changes rather dramatically. The curve between frames 25 and 75 is the same, but instead of straight lines on either side, Blender has duplicated this curve. By selecting “Cycles,” we have made the movement of the curve cycle in 25-frame increments on either side of the 25-to-75 frame block.
We are starting to get into the complexity of Blender and its multiple options. Look at the little “Cycles” panel that has displayed under the “Add Modifier” button. Note the “Before” and “After” options. Each of these has drop down menu buttons that give options for how the cycles are to be repeated before and after the frame block. Click on the “After” button and select “Repeat Mirrored” (Figure 9.19).
Let’s have another demonstration. Click on the “X” at the top right-hand corner of the “Cycles” panel to delete the modifier. Click on “Add Modifier” again and this time select the “Noise” modifier we began with (Figure 9.20). This produced a graph with the jitters, and if you scrub your animation, you will see that’s exactly what you get in the movement of the actor. Of course, it doesn’t stop there; the “Noise” modifier contains a drop down to select suboptions and buttons to alter values for the options. You now have plenty to play with.
For another demonstration, delete the “Noise” modifier and select the “Built In Function” modifier. This produces a straight sinusoidal graph. Check out the drop down menu in this modifier panel for the selection of graphs based on various mathematical functions. All selections have buttons to control values that are introduced, which provides more stuff to play with.
To get more experienced, try adding multiple modifiers to your curve. Just click on the “Add Modifier” button without deleting what you already have.
Automatic Key Framing
Previously, “Keyframes” have been inserted in our animation by having our cursor in the 3D window, moving the timeline to a particular frame, changing the status of our object, and then pressing the I key and selecting a “Keyframe” option. Besides this method, after the frame has been selected and the object status changed, we can press the “Insert Keyframe” button in the “Animation” tab of the toolbar at the LHS of the 3D window. (The T key toggles between hiding and showing this panel.)
There is another method that makes life a lot easier when multiple key frames are required. In the “Timeline” window header, you will see a red button to the right of the play control buttons. Clicking on this button toggles automatic key framing on and off (Figure 9.21). With auto on, whenever you move, scale, or rotate your actor object in the 3D window, a key frame will be inserted at whatever frame you have selected. Remember to turn this off after you’re finished using it.
Rotation Explained
The simple idea of animating an object to rotate about its center requires a little investigation to understand the concept. Once again an example is the best way to demonstrate what happens in the process.
Rotation Animation Set-Up
Start with the default Blender scene with the “Cube” object at the center of the world. Place the 3D window in top orthographic view (press Num Pad 7, then Num Pad 5).
Deform the cube as shown in Figure 9.22 to make a pointer for rotation.
In the “Timeline” window with the timeline cursor (the green vertical line) at frame 1 and the mouse cursor in the 3D window, press I key and select “Rotation” to insert a “Keyframe.” Move the timeline cursor (the vertical green line) to frame 60 (Figure 9.23).
Press the N key to display the “Transform” properties panel at the RHS of the 3D window (Figure 9.24).
Enter 120 in the Z rotation value slider.
In the 3D window, press I key again to enter a second “Keyframe” (Figure 9.25).
Repeat the process for frame 120 with a Z rotation value of 240 (Figure 9.26).
For frame 180, enter Z rotation value 360 (Figure 9.27).
This has set up a 360° rotation of the deformed cube. Change the animation end frame in the timeline to 180. Press the play button in the “Timeline” window to see the result (Figure 9.28).
Note that the animated rotation is not a smooth constant motion.
Examine the F Curve
Divide the 3D window in two and make one half the “Graph Editor” window. Having performed the animation set-up, you will see a graph displayed in this window. It is probably difficult to see since the window requires scaling and positioning.
Use the Num Pad + (Plus) and − (Minus) keys or the MMB to zoom the window. Shift key + click and hold MMB to drag and center the graph. Ctrl key + MMB drag right and left to scale the graph on the timeline. Scale and position the graph as shown in the diagram (Figure 9.29).
When inserting “Keyframes,” Blender draws “Bezier”-type graphs between the location of the “Keyframes” on the timeline. The graphs represent the motion in the translation. The graphs are curved at the beginning and end of each segment which is indicating an acceleration and deceleration and this is exactly what is observed when playing the animation. There is speeding up and slowing down during the rotation.
Correct the Motion
The rotation animation was set up using multiple “Keyframes,” since in the past Blender tended to be somewhat erratic in producing a nice smooth rotation when setting one “Keyframe” at frame 1 and another at the last frame for 360°. This however appears to have been corrected in later versions of the program. We can therefore set up an animation by simply inserting two “Keyframes,” one at the beginning and one at the end of the rotation. Create the animation as before using only two “Keyframes” (Figure 9.30).
Play the animation and look at the F Curve in the “Graph Editor” window. The motion is smoother but not constant. We still have acceleration and deceleration at the beginning and end of the cycle.
In the “Graph Editor” window header, click on “Key” and select “Interpolation Mode,” type “Linear” to produce a straight line “F Curve” graph, that is, constant rotation. Having done this, we have produced a single 360° rotation only (Figure 9.31).
Since we set the total animation to rotate 360° in 180 frames, and the animation repeats itself it appears that we have perpetual rotation.
To truly produce perpetual motion in the “Graph Editor” window header, click on “Channel,” select “Extrapolation Mode,” “Make Cyclic (F Modifier).” This duplicates the F Curve along the timeline to infinity (Figure 9.32). Having done this we have produced a single 360° rotation only. Change the animation end frame to something like 1000 and play the animation to see a smooth constant rotation (Figure 9.32).
Rotation Using F Curves
In this demonstration we will manipulate “F Curves” to produce a rotation animation.
In Section 9.9, we set an animation to produce a rotation of an object about an axis at its center. In this demonstration, we will have the object rotate about an external center.
Note: By default no “F Curve Graph” exists in the “Graph Editor” window. An animation has to be created to produce an “F Curve.”
The objective of this demonstration is to have a “Cube” object rotate about a center as shown in Figure 9.33.
Create an F Curve
The first step is to create an animation which produces an “F Curve” which we can modify.
With a new Blender scene showing the default “Cube” object, change the 3D view to “Top Orthographic” view (Num Pad 7 + Num Pad 5). Set up a translation animation of the cube to move on the x-axis from –5 Blender units at frame 1 to +5 Blender units at frame 180. It is best to enter the translation values in the “Translation” properties panel in the 3D window (press N key to display the panel).
Having created the animation an “F Curve Graph” is displayed in the “Graph Editor” window. The graph shows a “Bezier”-type curve (Figure 9.34).
X-Axis Channel: Add Conversion Modifier
Perform the operations as listed in the figure.
The “Graph Editor” window may require some adjustment for the graphs to display properly. Here are some tips: with the mouse cursor in the graph editor window, press Ctrl + MMB and drag right or left to scale the curve. Press Shift + MMB and drag the mouse to pan the view.
Having performed the operations noted in Figure 9.35, the “Bezier” curve will display as a sine curve as shown in Figure 9.36. Note the amplitude of the sine curve −1 to +1. If you play the animation, the cube simply oscillates to the left and right of the center in the 3D window.
Y-Axis Channel: Add Conversion Modifier
In the “Graph Editor” window, select the Y-axis translation channel. In the “Graph Editor Properties Panel,” click “Add Modifier,” select “Built in Function.” With the modifier displayed change type “Sine” to “Cosine” (Figure 9.37).
In both cases, the translation graphs (F Curves) have been converted from the original “Bezier”-type curves to type sine and cosine curves, respectively. Note: The Y-axis curve was a horizontal straight line since we only set up an X-axis translation animation.
Adjust Modifier Values
If you play the animation at this point, the cube will madly spin in a very tight circle.
In the modifier, adjusting the “Amplitude” varies the radius of the rotation. Having different values for the x-axis sine amplitude and the y-axis cos amplitude will result in an elliptical orbit for the rotation. Adjusting “Phase Multiplier” varies the speed of rotation. A suggested value for starters is 0.181 (Figures 9.38 and 9.39).
Animating Other Features
Having an understanding of animation basics allows us to look at some of the other things that can be animated in Blender besides the movement, rotation, and size of an object. For example, it is also possible to animate materials, textures, lamps, and world settings.
The following is a list of some of the features that can be animated:
Material animation options
Material RGB values. Color can be animated to change.
Alpha. The transparency of an object can be animated.
Halo size. A halo can grow or shrink in an animation. Setting a halo to zero will make it disappear.
Texture offset. Texture applied to an object can be animated. It can move across the face or change in size.
Lamp animation options
Lamp RGB values. The color of light can be animated to change.
Energy. The intensity of light can vary.
Spotlight size. The angle of the beam can be animated to change.
Texture. Texture can be applied to a lamp and animated.
World animation options
Zenith RGB. Color of the zenith (top) can be animated. This is great for sunsets or sunrises.
Horizon RGB. Color of the horizon (bottom) can be animated.
Mist. Fog can be animated for interesting effects.
Stars. Stars can be made to move.
Texture offset and size. Texture applied to a world can be made to move.
Camera animation
The camera may be animated to follow a path.
The list above contains only some of the features that can be animated in Blender. To give you an idea how this is possible, we will take a closer look at the following two examples.
Example 1: Color
Let’s start with the color of an object. Open up a new scene in Blender (the default scene with the “Cube” object will do). With the “Cube” selected in the 3D window, go to the “Properties window” and click on the “Material” button.
The properties window with the “Material” button activated shows a whole bunch of tabs for controlling how the surface of the object displays in the 3D window. To begin, note the “Preview” tab showing a dull gray sphere and below that the “Diffuse” tab with a button showing the same dull gray color.
Look at the “Timeline” window across the bottom of the screen. The green line cursor is located at frame 1 of a 250-frame animation (the light gray area of the window relating to the scale ranging from 0 to 250 along the bottom of the window above the header). We are going to insert “Keyframes” on the timeline so that we can make the color of our cube object change from gray to red over 50 frames of the animation. You could change the starting color of the cube by clicking on the diffuse color button with the LMB to display a color picker, and click anywhere in the colored circle to change the color, but let’s just leave things alone for the time being and stick with dull old gray.
Instead of clicking with the LMB on the diffuse color button, click with the RMB and in the menu that displays click on “Insert Keyframes.” You have inserted a “Keyframe” at frame 1 on the timeline. Change to frame 50 (scrub the green line in the “Timeline” window). Now click with the LMB on the diffuse color button and in the color picker that displays, click on the red part of the colored circle. This changes the color of the cube to red. Click on the diffuse color button again, this time with the RMB and then click on “Insert Keyframes” to insert a key frame at frame 50. Now when you scrub the timeline, you will see the color of the cube change from gray to red over the 50 frames. Hitting Alt + the A key will play this animation. If you open the graphical editor window, you will see the graphical representation of this animation.
Example 2: Spotlight Size
To show how the spotlight may be animated, we first need to put a spotlight into the Blender scene. Let’s start again with the default Blender scene with the cube. Change the 3D window to show the front-side view and deselect the cube with the A key. With the cursor in the 3D window, hit number pad 1, hit Shift + the A key, then select “Add”— “Lamp”—“Spot.” You will see some orange lines appear in the 3D window. Hit the G key (grab) then the Z key and move the mouse up. The G key lets you grab the spotlight so you can move it and the Z key confines the movement to the z-axis. You could also have clicked with the LMB on the blue arrow of the 3D manipulator widget and moved the spotlight up the Z-axis. You will see that you have actually moved a cone in the screen. Hit the S key and move the cursor toward the apex of the cone to scale the spotlight down a bit. The light is at the apex of the cone and the circle at the bottom represents the circle of light it would generate.
Now go to the “Properties” window and press the “Object Data” button to display all the buttons that control the properties of the spotlight. Look for the “Spot Shape” tab and you’ll notice the button with “Size: 45” in it, which indicates that the angle of the cone is 45°. The “Timeline” window is again across the bottom of the screen and the green line indicates that we are at frame number 1.
Right click on the “Spot Shape Size” button and select “Insert Keyframes” from the menu that displays. The “Size” button will turn yellow indicating that you have inserted a key frame in the timeline. Scrub the green line in the timeline to frame 50. The “Size” button turns green because there is no key frame at frame 50 yet. Left click on the “Size” button and, while holding the mouse button, move the mouse to the left, decreasing the value of the cone angle. The angle of the cone in the 3D window will decrease accordingly. Right click on the “Size” button and select “Insert Keyframes” again, and the button turns yellow. We now have a “Keyframe” at frame 50. Scrub the green line in the “Timeline” window between frames 1 and 50 to see the angle of the cone change. You have animated the spotlight size.
Note: Many properties can be animated this way by inserting “Keyframes” and changing property values. You have lots of experimenting to do.
Keying Sets
You can add multiple properties to a group called a “Keying Set,” which allows you to animate a whole bunch of stuff at one time. You do this by first defining a “Keying Set.” We will again look at our cube actor in the default Blender window. Let’s say you want to have the cube move along the x-axis and change color at the same time. Not too difficult—just add a bunch of “Keyframes.” But consider if you had a lot of property changes. Adding all those key frames one by one could become tedious. It would be nice if you could do the property changes, then hit a button to add all the key frames in one go. Let’s do it.
With the cube selected in the 3D window, go to the “Properties” window. We will consider the movement part of the exercise first. Click on the “Object” button in the header and find the “Transform” tab and the “Location” buttons. You will see the values X: 0.000, Y: 0.000, and Z: 0.000. This shows that the cube is at the center of the 3D window in all planes. So, we are concerned with the movement on the X-axis. Right click on “X: 0.000” and in the panel that displays, click “Add Single to Keying Set.” If you look at the “Timeline” window header, you will see a button labeled “Buttons Keying Set” and two little key icons next to it. One of them has a red line across it. Note in the timeline that you are at frame 1. You have just entered the information into a “Keying Set,” telling Blender that at frame 1 the cube is located on the X-axis at position 0.000.
Now let’s consider the color part of the exercise. In the “Properties” window, click on the “Material” button. Right click on the “Diffuse Color” button then click on “Add to Keying Set.” The information for the color has been added to the keying set.
In the “Timeline” window header, click on the first of the little key icons (not the one with the red line). You have entered a key frame for the location and color of the cube. You can see this in the graph editor window by opening up all the headings in the dope sheet. Now move to frame 40 or wherever you wish on the “Timeline.” Change the value for the “Transform”—“Location”—“X axis” in the “Properties” window, “Object” tab. Right click the new value and click “Add Single to Keying Set.” Do the same thing for the “Material”—“Diffuse color” value. Click on “Add to Keying Set.” Now click on the first of the key icons again to add the new “Keyframe” at frame 40. Scrub the “Timeline” or play the animation to see the cube move and change color.
Vertex Animation
Up to now we have considered the animation of an object but no doubt you will, at some stage, want to animate the shape of an object. This entails animating the mesh vertices on the surface of the object. You can select individual vertices or groups of vertices in “Edit” mode and move them about but you will find that you are unable to insert “Keyframes” for this movement in “Edit” mode. Do not despair, there is a way.
We introduced Blender’s hidden features, “Add-ons” in Chapter 1 (Section 1.15) and this as an example. In the “User Preferences” window, “Add-ons” tab. In the “Animation” category you will see the “Add-on” named “AnimAll.” This tool allows the animation of several features one of them being “Point.” Consider “Point” as referring to a vertex or group of vertices.
In the “Users Preferences” window activate “AnimAll” by ticking the little box at the right-hand end of the Add-on line. Close the “User Preferences” window (Figure 9.40).
In the 3D window “Tools Panel” (T key toggles display and hide), click on the “Animation” tab at the left-hand side and you will see that the “AnimAll” tab has been added to the panel. Check (tick) “Point” (Figure 9.41).
To demonstrate how “Point” is used replace the default “Cube” with a “UV Sphere.” Tab into “Edit” mode, deselect all vertices on the sphere (press the A key) and select a single vertex. Enable “Proportional Editing” in the 3D window header (Figure 9.42). With the “Timeline” window cursor at frame 1, click on the “Insert” button in the “AnimAll” tab in the “Tools Panel” (Figure 9.43). This inserts a “Keyframe” for the location of the selected vertex at frame 1.
Move the timeline cursor to frame 50. Grab and move the selected vertex (Figure 9.44) and again press the “Insert” button in the “Tools Panel.” This inserts a second “Keyframe” at frame 50 (Figure 9.45).
Tab to “Object” mode. Move the timeline cursor to frame 1 and click. Scrub the timeline cursor or play the animation to see the shape of the cube change (Figure 9.46).
Animation Following Curves
Animating the movement of objects in a scene by inserting “Keyframes” can be very tedious when the movement is complex. To animate the movement of an object that twists and turns in the scene over many frames, you have to insert many “Keyframes.” Editing the movement at a later stage after executing this method can be difficult, but there is an easier way.
Actually, there are at least two ways, both of which involve having an object follow a predetermined path. One method requires you to set a child/parent relationship between the object and the path; the other method requires that you place a “Follow Path” constraint on the object.
Following a Path: The Child/Parent Relationship Method
Open Blender with the default scene containing the cube object. The scene will be displayed in “User Perspective” view. Change to “Top Orthographic” view (number pad 7 for top perspective view then number pad 5 for top orthographic view). By default, the cube is selected in object mode. Deselect the cube by pressing the A key.
We want the cube to move in the scene following a predetermined path. The path will be a curve path (Shift + the A Key—“Add”—“Curve”—“Path”) (Figure 9.47). You can use any of the “Curve” options for your path, but for the time being we will use the “Path” option since it is the simplest.
Adding a curve path places a straight line on your screen in “Object” mode. Do not be confused. In Blender, this particular straight line is considered to be a curve and it is also a path. Scale the line to make it five times as long (S key + number pad 5 and click the LMB). If the line runs off the edge of the window, press the number pad − key to zoom out of the scene. The number pad + key will zoom in.
To start, we will make the cube move along the straight line of the curve path. This isn’t very exciting, but it will show you the principles of the operation. Deselect the path with the A key and select the cube (click the RMB with the mouse cursor on the cube). Hold the Shift key and click the RMB on the curve path. The cube and the path will both be selected at the same time. The outline of the cube turns red. Make sure the cube is selected first followed by the path; it’s as if you are pointing to the cube and saying “Cube, follow the path.”
We will now apply a specific child/parent relationship. In a normal case, selecting the cube then shift selecting the path and applying an “Object” child/parent relationship would simply make the cube the child of the path. If the path moved, the cube would follow. However, we want the cube to move along the path. With both the cube and the path selected, press Ctrl + the P key and select “Follow Path” from the options displayed (Figure 9.48, the cube has been moved off the path). Remember that in the selection process, the cube must be selected first, followed by the path.
Deselect both the cube and the path with the A key and select only the cube. Move the cube along the Y-axis of the scene (the G key + the Y key and move the mouse). You will see a dotted line drawn from the cube to one end of the path. The line indicates that the child/parent relationship is in place. Move the cube to the end of the path where the dotted line is attached (Figure 9.49). Press Alt + the A key on the keyboard or click on the “Play” arrow in the “Timeline” window—either method will play an animation showing the cube moving along the path.
Blender has created a 100-frame animation. With the path selected, the details of the animation can be seen in the “Properties” window, “Object Data” button, “Path Animation” tab (Figure 9.50). You can also see a graphical display in the graph editor window (Figure 9.51).
Note: In the “Graph Editor” window, the movement of the cube is drawn as a red line inclined rather steeply. Since the line is straight, it shows that the cube moves with constant velocity (speed) along the path.
The scale along the bottom of the window shows frames of the animation and the vertical scale on the LHS shows displacement (how far the object moves). The displacement from one frame to the next is always the same, hence constant velocity. There is no acceleration or deceleration, as would be the case if you had used key frames.
Now, if you decide that you want to move in something other than a straight line, the speed, acceleration, and direction of movement may have to be modified. The direction of movement is modified by altering the shape of the path in the 3D window. The variation in velocity and acceleration is altered in the “Graph Editor” window. We will first alter the direction of movement by reshaping the curve path.
In the 3D window, select the path by right clicking on it, and then tab to put the path into “Edit” mode. Remember, in the beginning of this section, we scaled the path to make it longer while it was in object mode. You can do the same thing in “Edit” mode. Just press the S key and drag the mouse or, if you know how many times longer you want the path to be, press the S key followed by a number key (use the number key at the top of the keyboard not a number pad key).
Note that increasing the length of the path does not increase the length of the animation. You still have 100 frames in the animation; therefore, when running the animation at 25 frames per second, your object will move along the path in 4 seconds. If you made the path twice as long, the object would move on the screen twice as fast. Another way to change the speed is to alter the number of frames in the animation in the “Properties” window, “Object Data” button, “Path Animation” tab.
If you increase the number of frames to 200, it will take the object twice as long to move along the same path length. Controlling the speed of the object can also be done in the “Graph Editor” window, but we will come back to that in a moment.
Note: With the path selected in edit mode, there are black chevrons along the path and several orange dots (Figure 9.52). The chevrons indicate the direction of motion and velocity. In this case, they are evenly spaced, indicating constant velocity. The direction may be reversed by pressing the W key for the “Specials” menu and selecting “Change Direction.” The orange dots are control handles for shaping the path— there is one at each end and others in between the ends. By default, when you enter edit mode, all the control points are selected. Press the A key to deselect them, then right click on one point to select it alone.
If you have the manipulation widget turned on, the widget will be located at the selected control point. If you click on the widget handles (with the widget in translate manipulator mode) and drag the mouse, the control point will be moved and the shape of the path will be altered (Figure 9.53). You can select any of the control points and reshape the path in this way. Selecting an end control point and pressing the E key, then dragging the mouse will extrude the end of the path. You can go into front side view or end view and reshape the path in three dimensions, creating any shape you wish.
After reshaping the path, press Alt + the A key to see the cube move along the path. For the cube to follow the path with its axis aligned to the path, you must have “Follow” ticked in the “Properties” window, “Path Animation” tab. Shaping the path gets the cube moving around in the scene, but it moves along the path at a constant speed. In real life, if the cube came to a sharp corner without slowing down, it undoubtedly would suffer an accident. To create a realistic movement, we need to vary the speed.
Varying the speed is performed in the “Graph Editor” window. It helps at this stage if you have both the “Graph Editor” window and the 3D window displayed at the same time. Divide the 3D window in two horizontally and change one half to the “Graph Editor” window. You will probably have to zoom in on the “Graph Editor” window and pan the window into position. At this point, all we have is the red line showing a constant velocity and unfortunately the line is uneditable. The horizontal and vertical green lines are cursor lines; the vertical line is a cursor for positioning along the horizontal timeline measured in frames of the animation, and the horizontal line positions on the vertical displacement scale measured in Blender units.
On the LHS of the “Graph Editor,” you will see the “Dope Sheet” panel. With the path selected in the 3D window, the dope sheet shows information associated with the path. Click on the lower white arrow at the LHS of the panel and a channel will display labeled “Evaluation Time.” Clicking on the eyeball at the LHS of the channel toggles the display of the red line on and off. Clicking on the little speaker icon at the RHS of the channel toggles between selection and deselection of the channel.
The channel in the “Dope Sheet” panel is a graphical representation of information associated with the display in the “Evaluation Time” button in the “Properties” window, “Object Data” button, “Path Animation” tab (the green bar). The same information is displayed as the red line in the graph editor window.
So what is this “Evaluation Time” business? Let’s evaluate what we have at this stage. In the 3D window, we have a cube object parented to a curve path. Blender has set the cube to traverse the path in 100 frames of the animation—this happens to be the first 100 frames of the animation. In the “Timeline” window at the bottom of the screen, the total animation is set at 250 frames starting at frame number 1 and ending at frame 250 (Figure 9.54). Playing the animation shows the cube moving along the path starting at frame 1 and reaching the end of the path at frame 100. The animation continues to play on to frame 250.
In the “Properties” window, “Object Data” button, “Path Animation” tab (with the path selected in the 3D window) “Frames: 100” is the number of frames to traverse the path. “Evaluation Time: 1.000” is where the cube is located on the path at frame 1. Increasing the “Evaluation Time” value moves the cube along the path, and increasing the value to 100 places the cube at the end of the path.
Note: At frame 1, the cube is not located exactly at the end of the path. It is in fact positioned 0.01 of the path length from the end (Figure 9.55). The animation starts at frame 1, not from 0. This is evident where the dotted line between the cube and the path is attached. Obviously you can’t have zero frames or you wouldn’t have an animation.
You may deduce that the “Evaluation Time” is saying, “This is what our cube is doing at this position.” We are only considering location here, but if the cube was animated to change scale, rotate, or change color, its state would be evaluated at whatever position was selected. The “Evaluation Time” value is a percentage of the path length. However, we were considering how to change the velocity of the cube as it moved along the path— let’s get back to it.
We have established that the “Evaluation Time” data cannot be modified. We will therefore remove it. With the “Evaluation Time” channel selected (highlighted in white) in the “Dope Sheet” panel of the graph editor, place the mouse cursor in the panel and press the X key. The “Nurbs Path” data are deleted (Figure 9.56). If the animation is played, the cube does not move; the cube remains parented to the path but there is no longer an animation associated with it.
We will now set up a new animation. In the “Timeline” window make sure the cursor (green line) is located at frame 1 and that the cube is at the start of the path in the 3D window. With the path selected in the 3D window, go to the “Properties” window, “Object Data” button, “Path Animation” tab and set the “Evaluation Time” button value to 0.000. Right click on the “Evaluation Time” button and select “Insert Keyframe” from the drop down menu that displays (Figure 9.57).
The “Evaluation Time” button becomes shaded yellow and a “NurbsPath—Evaluation Time” channel is entered in the dope sheet panel (Figure 9.58). An orange dot displays at the intersection of the cursors (Green lines) in the “Graph Editor” window. The cursors are located at frame 1.
In the “Timeline” window, move the cursor to frame 150. We will make the cube move along the path in 150 frames. Change the “Evaluation Time” value to 100 to place the cube at the end of the path—we now have the cube at the end of the path at frame 150 (Figure 9.59). Right click on the “Evaluation Time” button and insert another “Keyframe.”
Zoom in on the “Graph Editor” window and you will see a second “Keyframe” entered above the first at frame 150. The “Keyframes” now have handles attached showing that the animation curve is a “Bezier” type curve, which means it is editable (Figure 9.60). In the “Timeline” window, return to frame 1 and press Alt + the A Key or press the “Play” button to play the animation (Figure 9.61). When the cube moves along the path, there is acceleration at the start and deceleration at the end.
Let’s play with the movement of the cube as it traverses the path. To alter the movement of the cube, we will edit the animation curve in the graph editor window. To start, we will make the cube take longer to traverse the length of the path in the 3D window. With the mouse cursor in the “Graph Editor” window, press the A key to deselect the animation curve then right click on the key frame handle at frame 150 (the upper handle). Press the G key and move the mouse, dragging the handle to the right to frame 400 (Figure 9.62). We have told the cube to move along the path in 400 frames instead of 150 frames. Play the animation to see the cube crawl along.
Whoops, the cube doesn’t reach the end of the path! In the “Timeline” window, the end frame of the animation is still set at 250, so the animation replays after 250 frames and the cube never reaches the end of the path. In the timeline window, change the “End” value to 400 and replay (Figure 9.63). Now we’re right!
Since the animation curve in the graph editor window is a “Bezier”-type curve, we can add handles to it to further refine movement. Press Ctrl and click the LMB on the curve to add a handle. Add another handle and then press the G key (grab) and position the handles approximately as shown in Figure 9.64. When the animation is replayed, the cube moves along the path then reverses before continuing on to the end. If the animation curve were horizontal between the two intermediate handles, the cube would simply stop for a rest along the way. By playing with the animation curve in the graph editor and changing the shape of the path in the 3D window, you have full control over the movement of the cube in the 3D window.
Following a Path: The Follow Path Constraint Method
The foregoing tutorial involving the child/parent relationship is akin to following the long and winding road. Now we can take the shortcut, but remember that shortcuts miss out on the detail of the journey.
We will now have the same cube object follow the same path but immediately have an editable “Bezier” curve instated in the “Graph Editor” window. Start with the default scene with the default cube object and leave the 3D window in “User Perspective” view (the default view when Blender opens). Deselect the cube and add a curve path as previously described. Scale the length of the path five times. With the path selected, tab into “Edit” mode and use the handles on the curve to shape the path as shown in Figure 9.65. Tab to “Object” mode; deselect the path and select the cube.
In the “Properties” window, “Object Constraints” button, click on “Add Constraint” and select “Follow Path” from the selection menu (Figure 9.66). In the “Object Constraints” tab that opens, enter the target as “Nurbs Path” and tick “Follow Curve” (Figure 9.67). The cube is now positioned at the start of the path.
Deselect the cube and select the path. In the “Properties” window, “Object Data” button, “Path Animation” tab, note that “Frames: 100” and “Evaluation Time: 0.000” (Figure 9.68).
This says that there is a 100-frame animation with 0.000 as the start position. Right click on the “Evaluation Time” button and select “Insert Keyframe.” Note that in the timeline window, the “Start: 1” and “End: 250” values indicate the animation duration (i.e., 250 frames).
Click on the “Go to End” button in the “Timeline” window to locate the timeline cursor at frame 250 (recall Figure 9.61). In the “Path Animation” tab, change the “Evaluation Time”
value to 100 (Figure 9.69), which positions the cube at the end of the path in the 3D window. Right click on the “Evaluation Time” button and select “Insert Keyframe” again. In the “Timeline” window, click on the “Return to Start” button to go to the start of the animation and click “Play” to see the cube move in the 3D window following the path (Figure 9.70).
In the “Graph Editor” window, you now have an animation curve that is the editable “Bezier” type as discussed in the previous method.
Displacement Sound Animation Control
A sound file (Music) can be used to affect the movement of vertices producing an interesting display effect.
To demonstrate we will set up a plane object with displacement modifier and a texture controlling the displacement as we did in Chapter 5. To make a colorful display we will use the texture image (Figure 9.71).
Add a Sound File
Having completed the setup of the plane object open the “Video Sequence Editor” window and in the header left click on “Add” and select “Sound.” Navigate to your sound file, click it to select and in the upper RHS of the window click on “Add Sound Strip.” (I am using Windows 7 which comes with the file “Kalimba.mp3” in the Users/Public/Music/Sample Music directory.) Make sure you move the sound file strip to frame 1.
Create an F Curve
With the plane selected in the “Displacement” modifier, set the “Strength” vale to 0.000.
In the “Timeline” window, set the cursor at frame 1. Right click on the “Strength” value slider and select “Insert Keyframe” (Figure 9.72).
We now have to declare the sound file to affect the “Strength” value, that is, control the deformation of the plane object.
Divide the 3D window in two and change one half to the “Graph Editor” window in “F Curve” mode. In the window header, click on “Key” and select “Bake Sound to F Curve” (Figure 9.73).
Select your sound file again. In the upper RHS of the window click “Bake Sound to F Curve.” The sound file will be inserted and a graph displays in the window (Figure 9.74).
Play the Animation
In the “Timeline” window, play the animation to see the sound file deforming the plane.
To really see the colorful display you will have to render the animation to a movie file (Figure 9.75).
Modify the F Curve
The amplitude of the sound file “F Curve” may be tweaked to adjust the deformation affect.
In the “Graph Editor” window click on “Key” in the header and select “Add F Curve Modifier” then select “Envelope” (Figure 9.76).
Move the cursor in the “Timeline” window to, say, frame 100.
In the “Graph Editor” window, press N key to display the “Envelope” modifier, then in “Control Point” click “Add a Point.” Values can be adjusted to effect the amplitude of the sound controls the displacement of the plane’s surface (Figure 9.77).
Sound Affect and Cast Modifier
The foregoing has used a sound file to affect the “Strength” value of a “Displacement” modifier then “Baked” the sound to an “F Curve” then tweaked the amplitude of the curve. This has been to control the displacement of the plane object’s surface.
We can combine a sound file “F Curve” and a “Cast” modifier with an “Empty” control object to produce an animation of the “Plane” surface deformation.
The procedure is as follows:
Combine F Curve and Modifier
Set up the “Plane” object with a “Cast” modifier and an “Empty” control object (Figure 9.78).
Add your sound file to the “Video Sequence Editor” window.
F Curve Factor Value
Create an “F Curve” for the “Factor” value of the “Cast” modifier (Figure 9.79).
In the “Timeline” window, set the cursor at frame 1. With the plane selected in the 3D window, go to the “Properties” window, “Modifier” buttons. In the modifier, set the “Factor” value to 0.000. Right click on the “Factor” slider and select “Insert Keyframe” (Figure 9.80).
In the “Graph Editor” window, add “Baked Sound F-Curve” as before. Note: It takes a while to Bake.
You can of course add the modifier envelope and tweak the amplitude at this point.
In the “Graph Editor” window, add “Baked Sound F-Curve” as before. Note: It takes a while to Bake.
You can of course add the modifier envelope and tweak the amplitude at this point.
Automatic Keyframes
We will now select and translate the “Empty” object and automatically insert “Keyframes” in the timeline.
With the “Empty” object selected in the 3D window (it is easier to select in the “Outliner” window), in the “Timeline” window header turn on “Auto Keyframing” (Figure 9.81).
Play the animation and at the same time, press G key in the 3D window and move the “Empty” object about. “Keyframes” are added to the timeline. Stop the animation and replay to see the effect (Figures 9.82 through 9.84).