06 Character Animation Discussion

download 06 Character Animation Discussion

If you can't read please download the document

description

Discussion of Character Animation

Transcript of 06 Character Animation Discussion

Chapter 6: Character Animation: DiscussionBy Roland HessCharacter Animation is an enormous topic that can take years to master. This chapter will not teach you how to be a successful character animator. What it will do, though, is give you the basic knowledge of Blender's character animation tools so you can begin to learn how to animate. Once you are comfortable working with Blender's tools, we encourage you to check out some of the great work in the Blender Summer of Documentation "Introduction to the Principles of Animation" by Willian Padovani Germano. Much like painting, character animation is a skill that requires going "outside" of Blender to supplement the learning process.When producing character animation, you will most often work with a skeleton called an "armature." The bones of the armature can be linked to each other in different ways, and, if done properly, can build a fully controllable, intuitively movable character rig (rigging is covered in Chapter 7). Each bone in an armature can be transformed individually, as though an armature was a collection of smaller, connected objects.Although certain armature modes can look almost like blocky character meshes, armatures themselves will never show up in a render. Armatures need to be attached to meshes, so the animation of the armature moves the mesh in turn, producing an animated character. Keyframed armature animation is organized into Actions in the Action Editor. For more complex animation tasks, those Actions can be combined and manipulated in the NLA Editor.Creating Poses and Setting Key FramesThe bones of an armature are transformed and keyframed in much the same way as normal objects. In order to pose an armature and record the poses as keyframes, an armature must be in Pose Mode, which is accessible from the 3D header, and by pressing Ctrl-Tab.Figure CAD.01: Selecting Pose Mode on the 3D Header.Callout: Armatures are animated in Pose Mode, which is accessed with Ctrl-Tab.Once in pose mode, bones may be selected with the RMB, B-key border select, or the Ctrl-LMB lasso.If a selected bone is attached to other bones as part of a chain, it will only be able to rotate. Bones that form the base of a chain, or that are unattached, are free to move, as well as rotate.Figure CAD.02: The bones in the middle of the arm can only rotate. The selected bone, which forms the "look-at" target for the character's eyes, is not part of a chain and can be both translated and rotated.The G, S and R-keys perform their standard functions when working with bones. For your convenience, using the G-key on a bone that is part of a chain and unable to translate acts as though it was a Rotation command.When posing part of an armature that has great freedom of movement, like a head on top of a neck, try pressing the R-key twice to put the bone into Trackball rotation mode. You may find it more intuitive than the standard rotation modes.ManipulatorsEven if you don't use the Transformation Manipulators when working in other portions of Blender, it's worth it to try them out when doing character animation. Use either Ctrl-Spacebar or the buttons on the 3D header to enable the manipulator and set it to Rotate mode. Once the manipulator is enabled, set the Alternative Transformation Space to "Normal." This will align the manipulator to whichever bone is selected. One thing to watch out for when working with bones is to make sure that the transformation pivot point is set to Median Point (comma-key) and not Cursor, as the latter will give you puzzling results if you are not expecting it.Figure CAD.03: The manipulator enabled in Rotate mode, with the ATS set to Normal. The manipulator is currently applied to the lower left arm bone.The advantage of using the rotation manipulator for posing is that it provides one-click access to rolling bones, and excellent visual feedback in what can sometimes be a crowded environment.Callout: G, S and R-keys, as well as mouse gestures, the manipulators and the standard selection methods all function with bones.Setting KeysWhen you translate and rotate bones to create the poses and motion of your armature, you need to set key frames. Pressing the I-key in the 3D view functions exactly like it does everywhere else in Blender. A list of key types appears, allowing you to choose exactly which transformations to key. It is highly recommended, though, that you turn on Automatic Keyframing when working with armatures. Sometimes, you will put several minutes into perfecting a single pose, and it would be a shame to lose your hard work by absentmindedly changing the frame.Enable Automatic Keyframing by pressing the Record button in a Timeline view.Callout: Automatic Keyframing should be enabled for character animation.Figure CAD.06: The Timeline view and the Record button.Posing with IKIK stands for a way of calculating poses called Inverse Kinematics. With IK, you grab and move the end of a chain, say, the foot of a character, and the rest of the leg follows along. Although the foot bone is a part of a chain which would normally limit its movement to only rotation, with IK applied to it, it regains its freedom of movement. You can learn more about setting up IK chains in Chapter 7.When using a rig with IK enabled, only the target bone of the IK chain needs to be keyframed. The rest of the bones calculate and interpolate their positions on the fly.Figure CAD.04, .05: With only a foot bone selected, the entire leg moves to follow.AutoIKAutoIK is another posing tool. By enabling "AutoIK" in the Armature panel of the Edit buttons, any bone that is selected and moved becomes the target of a temporary IK chain. In this way, you can start to create poses for non-IK portions of an armature, like the arms and hands, using the convenience of IK, then turn it off and finely adjust each bone's rotation individually.Figure CAD.07: The AutoIK button on the Armature panel.As AutoIK is only a posing tool, the bones that it moves will not retain those positions unless each and every one of them receives a keyframe. This is directly opposed to a standard IK chain in which only the target bone receives a keyframe. Of course, if you have Automatic Keyframing enabled as we suggested earlier, keys are set for all necessary bones without you having to worry about it.The Action EditorWhen keyframing object-level motion in Chapter 3, you worked with an Ipo window, which helped you to visualize what was going on with the animation. When working with armatures, though, you may be setting keys for several different bones, in different combinations, at different frames. The Ipo view can only show the curves and keys for one object at a time, so how should you proceed?The Action Editor shows a high level view of an object's animation.Figure CAD.08: An Action Editor and Ipo window view of the same animation.In the above illustration, both the Action Editor and Ipo view are focused on the same piece of object animation. Notice how there is a single diamond along the Action Editor's timeline for each key position in the Ipo window.This sort of information compression allows you to view animation data from many bones at once.Figure CAD.09: The Action Editor showing many bone channels.Each diamond represents some sort of keyframe for the bone that is named at the left of the row. Which kind of keyframe? It could be location, rotation or scale. There is no way to tell short of opening an Ipo window, but in practice it usually does not matter.The Action Editor is where you keep track of which bones have keys on which frames. Callout: The Action Editor shows keys for many bones at once.Commands and FunctionsWorking with the diamond key frames shares a lot of functionality with the objects in the 3D view. Keys can be selected with the RMB, or with the B-key border technique. Keys are moved by pressing the G-key. Holding down the Ctrl-key while moving keys in Grab mode will cause the keys to move in even increments of one frame. When more than one key is selected, using the S-key will scale the selected key positions relative to the current frame marker.Keys can be duplicated by selecting them and pressing Shift-D. Duplicated keys, like other Blender objects, begin their life in grab mode, and their positions are finalized by LMB clicking. If you want a bone to hold its position for several frames in the middle of an animation, duplicate the key for the held position and move it several frames to the side.Figure CAD.17: The key in the middle was created by duplicating the key on the left. The yellow bar between them shows you that the position is "held" for those frames.Sometimes, moving and scaling keys in the Action Editor will result in keys not sitting on exact frame numbers. If you are attempting to line your keys up exactly, this can be a problem. Pressing Shift-S brings up a snapping menu, and allows you to snap any selected keys to the nearest whole frame.Callout: Action Editor keys are handled with the same commands as other Blender objects. Shift-S brings up the key Snap menu.Selecting Action Editor Channels and BonesIf you are working with an armature that has dozens of bones, and you are finding it difficult to select the correct bone in the 3D view, try clicking on the bone's channel name in the Action Editor. Doing so selects both the channel in the Action Editor, and the associated bone in the 3D view.Sidebar: Adjusting the Timing of a MotionHere's an example of how the Action Editor can help you to refine your animation.Figure CAD.10, 11, 12: Three frames of a character walking. Note the left arm as it swings back.The Action Editor looks like this, with the two key markers for each of the left arm bones selected:Figure CAD.13: [no text]Let's say that you wanted the first part of that motion to proceed very slowly, and drastically speed up near the end. You could go into an Ipo window and start messing directly with curves and bezier handles, once for each curve on each bone. But there is a simpler way.Place the timeline marker halfway between the two keyframes whose timing you would like to adjust. Make sure that the keyed bones are selected. In the 3D view, use the I-key to insert new keys on this frame, using the "Avail" option from the pop-up menu. This will set keys only for Ipos that already have keyframes.In the Action Editor, two new keyframes spring to life:Figure CAD.14: The new keyframes, which represent the pose at the middle of the motion.The new keyframes become the active selection in the Action Editor. Using the G-key, move them very near to the set of keys to their right. What this does is to set the midpoint of that motion very near to the end of the motion. The net effect is that the first "half" of the motion takes a long time, while the second "half" happens very quickly.The same technique can give a little life to held positions, too. In this case, though, a set of keys is created very close to one of the endpoints of the motion, then moved to the middle.End SidebarManaging ActionsAn armature can have many Actions. Actions are created, selected, and destroyed on the Action Editor's header, using the standard Blender data block controls.Figure CAD.18: The Action block controls on the Action Editor header.Working with the Action Editor ViewThe Action Editor window is manipulated exactly like an Ipo or other 2D window. All available content can be shown by pressing the Home-key. The view can be zoomed with the scroll wheel and panned by MMB dragging within it. Also, pressing the C-key will center the view on the current frame.The NLA EditorWhat is NLA, and when should you use it?NLA stands for Non-Linear Animation. The NLA Editor allows you to take different Actions that were created in the Action Editor, and stretch, combine and order them into a single piece of animation. Where the Action Editor lets you work in detail on a single Action, the NLA Editor lets you see and work with many Actions at once.Figure CAD.19: The NLA EditorThe names of the objects that are eligible for NLA appear in the left column of the view. As in the Action Editor, clicking on any of these object names selects that object in the 3D view. NLA information will only display for objects that are on visible layers, so if you know you've used NLA on an object but it doesn't appear in the Editor, the object may be on a hidden layer. Sometimes, objects that should be able to have NLA, like an armature, may not show in the NLA at all. While this can be confusing, it is easily fixed by selecting the object in the 3D view, then using Shift-A to add an Action in the NLA Editor, even though the object doesn't appear there yet. Adding the Action will make the object show up in NLA.To the right of the object's name and below it are the different strips that represent the Actions. These are called Action strips. Action strips for a particular object can be shown or hidden by clicking on the triangular "collapse" icon to the left of the object's name.When using NLA, Blender generates animation based on where along the NLA timeline the Action strips fall. If you have an Action for waving with keys on Frames 1 through 25, but wanted your character to actually wave on Frames 65 through 89, you could select all of the keyframe markers in the Action Editor and move them 64 frames forward. Then, any character that used that Action would have to use that same frame range.However, if you were using NLA, you could simply move the wave Action's strip 64 frames forward on the timeline, and the NLA would produce the animation you wanted, leaving the Action itself in its original condition for easy re-use.In addition to simply changing locations along the timeline, NLA can be used to cause Actions to occur more quickly or slowly. Making an Action Strip larger causes it to cover more of the timeline, making the original Action play back more slowly. Shrinking a strip will cause the Action to execute more quickly.Adding and Removing NLA StripsAction Strips are added to the NLA Editor by selecting the object in the 3D view or the left column of the Editor and pressing Shift-A. A menu pops up with all of the Actions that are available to add to the selected object. Action Strips are added with their first frame wherever the current frame counter is located in the Editor.Selected Action Strips can be removed with the X-key.Transforming Action StripsWe mentioned earlier that Action Strips can be moved and resized. The standard Blender methods work in the NLA Editor as you would expect. Pressing the G-key enters Grab mode so you can move selected Strips along their timelines. Strips can be scaled with the S-key. Like collections of key markers in the Action Editor, scaling occurs relative to the current frame bar in the Editor's timeline.Toggling NLA Mode and Action Editor ModeThe icon to the left of an object's name in the NLA Editor is actually a toggle button, changeable by LMB clicking on it. The two states are:Figure CAD.21: NLA modeFigure CAD.22: Action modeWhen in NLA mode, an armature's animation will be generated by the Strips and settings as configured in the NLA Editor. In Action mode, NLA is ignored, and animation will be generated by whatever Action is set in the Action Editor. If your character seems to be ignoring your NLA setup, this is the most likely culprit.Layering and Blending Action StripsAs you add more Action Strips to an object, new ones appear below existing Strips. Strips that appear lower in the NLA stack take precedence over Strips that are higher in the stack. If a Strip for walking contains animation keys for legs, feet, arms and hands, and a lower strip contains animation keys for arms and hands, the arm and hand keys from the lower strip will be used in place of the keys from the upper strip.This is the way that NLA blends animation.If the stacking of the Strips in the NLA Editor is not working the way you would like, it can be rearranged by selecting a Strip and pressing Ctrl-PageUp and Ctrl-PageDown to move the Strip up and down, respectively.Strip PropertiesAction Strips can do more for your animation than simply changing an Action's location along the timeline and altering its speed. The N-key Transform Properties panel for the NLA Editor lets you set additional options.Figure CAD.20: The NLA Editor Transform Properties panel.Strip Start/Strip End: A Strip's location on the timeline and size can be adjusted from the Properties panel with the "Strip Start" and "Strip End" controls. Using the panel, you can enter values directly for the selected Strip's starting and ending points along the timeline, allowing you to perfectly synchronize actions with other events.Repeat: An Action can be set to repeat by increasing the Repeat value past 1.0. Action Strips that have a Repeat value higher than 1.0 will show small vertical lines wherever the repeats will occur along the timeline. Be aware that using Repeat will not automatically result in a smooth repetition of the Action. If your Action was not created with its beginning and ending pose in the same position, you will see your armature "skip" as it begins each repetition.Blendin/Blendout: If you layer several Action Strips and scrub over the timeline, you will see that animation for one Strip begins and ends immediately and completely at the start and end of the Strip. This can cause the keyed bones to jump at transition points.Figure CAD.24: No Blendin/Blendout values on the bottom Strip.Figure CAD.23: Blendin/Blendout values have been set.To fix this, you can set the Blendin/Blendout values to tell the NLA over how many frames to blend the animation. In the second illustration, the animation for the lower Strip will begin and end its effect more gradually, following the ramp shown on the ends of the Strip. Lower values create a quicker transition, while higher values will take longer.With the posing and keyframing tools, the Action Editor and the NLA Editor to play with, you'll be busy for a long time learning to make your characters come to life.BLENDER OPEN CONTENT LICENSE Terms and Conditions for Copying, Distributing, and Modifying Items other than copying, distributing, and modifying the Content with which this license was distributed (such as using, etc.) are outside the scope of this license. 1. You may copy and distribute exact replicas of the OpenContent (OC) as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the OC a copy of this License along with the OC. You may at your option charge a fee for the media and/or handling involved in creating a unique copy of the OC for use offline, you may at your option offer instructional support for the OC in exchange for a fee, or you may at your option offer warranty in exchange for a fee. You may not charge a fee for the OC itself. You may not charge a fee for the sole service of providing access to and/or use of the OC via a network (e.g. the Internet), whether it be via the world wide web, FTP, or any other method. 2. You may modify your copy or copies of the OpenContent or any portion of it, thus forming works based on the Content, and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified content to carry prominent notices stating that you changed it, the exact nature and content of the changes, and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the OC or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License, unless otherwise permitted under applicable Fair Use law. c) The name of the Copyright Holder or contributors to the OC may not be used to endorse or promote products derived from this software without specific prior written permission. These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the OC, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the OC, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Exceptions are made to this requirement to release modified works free of charge under this license only in compliance with Fair Use law where applicable. 3. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to copy, distribute or modify the OC. These actions are prohibited by law if you do not accept this License. Therefore, by distributing or translating the OC, or by deriving works herefrom, you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or translating the OC. NO WARRANTY 4. BECAUSE THE OPENCONTENT (OC) IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE OC, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE OC "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK OF USE OF THE OC IS WITH YOU. SHOULD THE OC PROVE FAULTY, INACCURATE, OR OTHERWISE UNACCEPTABLE YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION. 5. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MIRROR AND/OR REDISTRIBUTE THE OC AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE OC, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.