IntroductiontoDigitalModellingandAnimationin*...
-
Upload
phungkhuong -
Category
Documents
-
view
218 -
download
1
Transcript of IntroductiontoDigitalModellingandAnimationin*...
Introduction to Digital Modelling and Animation in Design – week 6 Introduction to Animation Thaleia Deniozou -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐
Basic Key Frames
We now know how to model and apply materials and textures, so it’s time to figure out how to move meshes around in the scene. The main window types we will need to use in this version of Blender are the Timeline, the Dope Sheet and the Graph Editor. Basically, The Dope Sheet shows your animation keys as points that can be easily copied or moved on a line. The Graph Editor shows your animations as graph curves, where different things can be done to control them. Animation is a big area with lots of things to do or discuss about, while new features are constantly added in later Blender versions. For this reason, we will deal with the basics.
The first thing to do is go to the Render Buttons in the Properties Panel.
There, after you set up your scene and set the Frames/Second (FPS) in the render button area (Dimensions Panel > Presets), consider what you want your ‘actors’ (moving models) to do and how long they should take to do it. One of the problems that beginner animators experience is making the motions occur in an appropriate time. Remember to look at your frames/second (FPS) when animating and relate it to time. For example, if you want something to take 3 seconds to get from point A to point B and you are running at 24 fps (Blender default), you need to complete the animation in a total of 72 frames (3 sec x 24 fps =72 total).
While in the Rendering Buttons > Dimensions Panel note also the Frame Range. As you can see the animation will begin in frame 1 and end in frame 250. This is the default animation duration and so Blender will only playback and render until frame 250 is reached. Assuming you keep the 24 FPS those 250 frames translate to around 10 sec of animation. If your animation will last longer you will need to increase this default value.
In the picture below, you can see the main controls of the Timeline window (bottom of the 3D viewport):
Moving, Rotating and Scaling are the three main animation types you can use on an object. Key-‐frames can be created for all of them respectively. When you create the moving, rotating and scaling key-‐frames you only do it for the start and end position while Blender will figure out all the in between locations on the other frames.
So lets make our first simple animation. Add a primitive in your scene, or use the default cube and place it in the position you’d like your animation to begin from. Start from frame 1 (to initialize the starting position). Now to insert a key-‐frame for the object, press the I key to Insert Key. Make sure your cursor is in the 3D window when you push the I key. The menu on the right image pops up. You have 3 main options Location, Rotation and Scaling and combinations between them. Select the key option that corresponds to the type of motion you want to do. Now advance to the next frame where you want to put a key (i.e. frame 25 if you want a movement to occur after 1 second), move, rotate or size the object, then press I again to insert another key. Remember, you can change in-‐between frames quickly with the arrow keys.
Continue advancing the frames and placing keys along your timeline to create your animation. For the most part, location and size keys work flawlessly, but often care needs to be given to rotation keys. If you try to rotate an object too far in one set of keys, the object may not rotate in the exact direction you want it to. It may rotate oddly. Try small angular steps while animating rotation keys.
Once you are done you can playback your animation to see it. Go back to frame 1, hover over the 3D viewport and hit Alt+A (to stop the animation hit ESC). You can also use the Playback Controls on the Timeline.
Automatic Key framing is another feature of the timeline designed to make the process of inserting keys easier. Typing I to insert keys is the traditional way of entering key frames, but it can become time consuming when you have a lot of items to insert key frames for (especially in later stages on animation when using bones in a skeleton). This is where automatic key framing becomes a useful feature. To turn on automatic key framing, press the small red circle button in the playback buttons on the Timeline window. This will record any motion you do on a given frame and insert the necessary key frames needed. Don't forget to set a key on your initial frame (frame 1) to initialize your starting point. Auto key framing won't do that unless you change something on that frame.
Now, with the auto key framing on and your initial frame set you can work similarly as before, progress between frames and make changes to your object. The difference in that you don’t need to remember to add the key, they will be added for you.
Don't forget to turn off automatic key framing when not needed, otherwise you may end up animating things accidentally when you don't want to!
The Graph Editor and Dope Sheet
To better control our animations we need to have some basic control over the Graph Editor and Dope Sheet. Those are window types and can be accessed by splitting your screen and loading them or for more convenience you can change the screen layout from Default (where we have been working so far) to Animation (premade animation friendly layout with all windows opened) by the Info header of the program.
Now you must be able to see those two windows on the left of the layout. They will display the actions of your actor and your key frames on the timeline in a graphical form and allow refinement and modification of the animation.
All objects that have animation keys on them will be displayed in the windows and their data will be displayed as diamonds (Dope Sheet) or curves (Graph Editor). You can zoom in/out and pan in this window with the center mouse wheel. Like actual objects, the curves can be edited in an edit and object mode.
At first glance, it can be rather confusing. To simplify your view, you can check/uncheck objects to hide/show their curves. By opening the triangle under an object (lower white arrow on green Cube bar), you can select individual curves for that object and edit them. Those individual curves are called action channels and relate to the selected actor (here the cube). Each colored box represents the key frame values on the corresponding axis (X, Y, Z) for Location, Rotation and Scaling respectively and how this is progressing over time.
About the Dope Sheet:
The Dope Sheet shows your animation keys as small diamonds along the timeline. This can be very useful when you want to copy keys to other points along the timeline or select multiple keys and scale them to slow down an animation. You can select keys the same way you select other objects in Blender (Shift+RMB or B key to box select). You will notice that when you select a key in the Dope Sheet, the same key is selected in the Graph Editor.
About the Graph Editor:
Every object that has key frames will be displayed in the Graph Editor, but trying to look at everything at one time is confusing, so try to select and deselect objects so to only have the ones you are working on visible at anytime. Below is a short description of the Graph Editor window:
If we take a closer look at each Bezier Curve on the Graph Editor we will see that each yellow line attached to it, has a dot at the center and a dot at each end. The yellow lines are called control handles or key frame points. The control handles are used to change the shape of the curve.
The vertical green line is the indicator and its location represents the current 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 drag it through the animation the same way as you can in the Timeline Window.
At the left hand side of the Graphical Display is a vertical bar with positive and negative numbers representing displacement from the mid point of the 3D Window. On the bottom, the vertical bar represents the frames of the animation (default: 0 to 250).
As mentioned before, when you create an animation for an object, Blender automatically tries to smooth the path of animation through your key frames. You have ways of controlling the results of the path. One way is to click on the path (curve) you want to modify in the Graph Editor window and, with the cursor in the Editor window, type Shift-‐T and get the Interpolation Modes (you can also go to the Key menu and select Interpolation Mode).
You have 3 options:
Constant: Gives a square waveform, like turning it on and off. No smooth flow. Linear: Takes a straight path from point A to point B. Solves problems of animations swinging way out of where you want them to go, but motion can be jerky motion at some points Bezier: The default type which tries to make the motion through the points smooth.
The choice of these types of graphs and hence motions depends on how you want your actor to behave in the animation. Every application may require a different type and you may need some practice before your animation behaves the way you want. You can see a simple example below on how different Interpolation Modes affect a cyclic animation:
Using the Interpolation modes is quite helpful to affect the animation path through its overall duration. If on the other hand you will to be able to control the flow in different sections of the path the best thing to do is work in each path individually using the curve handles.
Blender Interpolates to add frames between the key frames according to which of the above options were selected. Blender also figures out what to do with the frames of the animation before the first key frame and what to do after the last key frame. Figuring this out is called Extrapolation.
Similarly with Interpolation Modes, the Extrapolation Modes are often helpful when it comes to controlling the curves. Let's look at an example of making something spin at a constant speed using Extrapolation. You first need to set 2 key frames defining the motion. One at frame 1 and one at something like frame 25. Rotate the object 90
REMEMBER…
If you ever need to start over with an animation, you can erase all the animation tracks in the Graph Editor window and start over. To select all tracks, hit A and then Delete key. Be careful that you only have the keys for the selected object!
degrees between the 2 keys. If you are running at 25 FPS, this would give you a full revolution in 4 seconds, but right now, your animation would stop after 1 second
and only spin 90 degrees. In the Graph Editor window, find the rotation track that shows the rotation curve and select it (in this case I rotated along the Z axis). Now go into the Channel menu and select Extrapolation Mode and then Linear Extrapolation.
The curve will extend infinitely.
To change the speed, move the key on frame 30 or a later frame if you want it to move slower, by grabbing the diamond frames in the Dope Sheet and moving them. To stop it from spinning indefinitely and finish the rotation at a later frame, move to that frame (say, frame 100) and hit I to insert a key-‐frame on the graph. Then go back into the Extrapolation Mode menu and choose Constant Extrapolation. The curve will level out after the later frame (here 100) and eventually stop.
Simplifying Animation Curves
There will be times, especially as your animation grows that your curves will become rather noisy or clattered. In this case you are able to use one of Blender’s excellent add-‐ons to smooth out the curves in the Graph Editor. To demonstrate this, an example will be used where various key frames have been added for the default cube to randomly move it in the 3D viewport:
As you can see the curves are made up from various control points and it is kind of hand to edit them without confusion. To fix this we will use the Simplify Curves add-‐on. Go to File > User Preferences and then Add-‐ons. Go to the Add Curve category and then find the Add Curve: Simplify Curves add-‐on and enable it using the tick box.
Now close the User Preferences Window, go back to the 3D viewport and with the cube still selected hit Space. In the search menu that comes up type: simplify curves to access the add-‐on. It now should be visible on your Tool Shelf on the left of the 3D viewport (if you can’t see the Tool Shelf hit T).
Hover over the Error field and increase the default value of 0. The more you increase it the more you simplify your curves, reducing the control points and making them easier to handle.
Animating Materials
Having an understanding of animation basics allows us to look at some of the other things that can be animated in Blender besides movement, rotation and size of an object. It is also possible to animate among other things Materials, Textures, Lamps and World settings.
Let's start by animating the material of an object.
Open up a new scene in Blender. We are again going to insert key frames on the Timeline similarly as before, making the color of our cube object change between frames.
For the first frame we will use the default gray color so no need to change it. Make sure you are in frame 1 and then hover over the diffuse color button on the Materials tab and click the right mouse button! From the menu that comes up select Add keyframes. Change to frame 50 on the timeline and change the color of the material to red. Then hover over the diffuse button again and right mouse button > Add keyframes. You can keep adding frames then same way…
If you now go back to frame one and play the animation (Alt+A) you will see the color changing as the frames progress.
Note that there are other material settings you can animate like the Alpha, Specular, Halo size etc. but some of them may not be visible in the 3D viewport and you may need to render out the animation to see how they affect the scene.
Finally notice the Graph Editor on the right. Now a Material graph is being displayed for the cube, which you can open and see all the settings you applied as well as manipulate the curves.
If you can’t see this you will need to set the buttons at the bottom of the graph editor window header to display material keys. Given all the keys are activated you should be able to see the animation data visualization for all types of properties:
Animating the Camera Lens
Similarly as before we will also animate the camera lens and position to demonstrate how other properties than the object’s location, rotation and scaling can be animated in Blender.
Again we will start a new .blend and select the camera. Then go to Camera View (0 on the NumPad) to make sure we see from the camera angle and control this animation better. With the camera selected hover over the camera Object Data on the Properties.
We are interested in the Focal Length (zoom of the camera lens) and the X, Y Shift values (to position the lens on the X and Y axis).
For the first frame we will leave the defaults. Make sure you are on frame 1 hover over Focal Length and right mouse button > Add Keyframes. Then hover over the X Shift and again right mouse button > Add Keyframe.
Then progress to the next frame of the animation, e.g. 50, hover over the Focal Length and increase the value. You will see the camera zooming in the object. When happy right mouse button over it and > Add
Keyframes. Similarly, still on frame 50, hover over the X Shift and change the value to reposition the camera and when happy right mouse button and Add Keyframe. Continue for the length of frames you want…
Finally note the camera graphs that have been added to the Graph Editor for the camera properties’ animation:
Remember that in Blender a variety of objects and data can be animated. We have seen two examples for materials and the camera but there are other exciting thins you can do to make your animations reach and interesting, among which to animate the Spot (Energy, Spot Size, Angle), the World (Zenith, Horizon, Stars), Textures etc. Keep experimenting and practicing!
Camera Tracking
Blender Constraints are provided to help with animation.
There are times during an animation you want to constrain or follow a certain object in your scene. In this case you need to keep the camera focused on an object and therefore use the Track To constraint. The tracking constraint is useful in animating by saving you a lot of time and frustration trying to place location and rotation keys on the camera in an effort to try to keep your target centered. When used in conjunction with Paths (discussed below), you can create very smooth animation paths.
To set up a simple camera tracking constraint, select the camera first, then the target while holding down Shift. Press Ctrl-‐T and select Track To Constraint.
[…Sometimes it’s convenient to target an Empty object. This allows you to move your target around in your scene so the camera can focus on one object for a while, then move to something else by moving the target in that direction…]
Follow Path
Sometimes you need to have an object flow along a smooth path in an animation. Paths are found in the same Add menu as Meshes and Curves and can be used to create animation paths for your models or camera to follow.
Your first step is to create a path. Any type of Curve in the Add menu can be used as a path, but let’s use the Path option. Hit the Shift-‐A, select Add > Curve, then Path. You will then get a path on your screen. Enter Edit mode and you will see several points and arrows pointing the direction of the path. You will
also see some options in the Tool Shelf related to the path, including Switch Direction, which is useful if you shape the path in the wrong direction and find out after you place the camera on it. Shape the path as desired, add more vertices through Subdivide if necessary and exit Edit mode. You can also select an end point and use E to Extrude.
To get the camera, object or lamp to follow the path we’ll create a Child-‐Parent relationship between them. Select the object first, then the path (the parent). With both objects selected, press Ctrl-‐P to make a parent. You’ll see several options-‐ select the Follow Path option. You will see a dashed line between the 2 objects.
Press Alt-‐A to see the animation along the path. In order to get the object exactly placed on the line, move the object and place it. Rotate the object to point in the correct direction as well. Right now the object’s animation is exactly 100 frames long. To change this (and thus affect the speed of the motion), make sure the path is selected and go to the Object Data buttons. Here’s what you see:
Frames: Adjust the time it takes to traverse the path.
Follow: If selected, the object will rotate as it follows the path. If not selected, the object will follow, but not curve.
Sometimes you don’t want the camera to follow along the path, but look at an object as it flows along the path. This is where you would want to use the Path, but not the Follow option. Instead, you would put a Track To constraint on the camera so it looks toward an object (empty) as it moves along the path.
REMEMBER…
You can close a path to make it a continuous loop. While in Edit mode, select the 2 end point and press F to fill the object. The path will now be closed.