Table of Contents

Chapter 4: Animation

Written in collaboration with Moraes Júnior – Mango Jambo for friends [ mendelevium ] known for his work as the independent character animator in the Blender Foundation outdoors game undertaking Yo Frankie .
liveliness is the breath of life. It ’ s the person of your characters. And we swear we ’ rhenium not making that up. Take a look at the etymological lineage of the discussion, and you will find that animation comes from anima, which means soul in Latin. Try to remember that. If for nothing else, it can help you to sound smart for the following person who wonders why you are paid to play television games. figure 4.1 highlights what animation can be .
This chapter is about what? Hmmm? I can't see!

Reading: GameEngineBook

binding on the right track, in this chapter you will note a unlike structure than the previous chapters .
We will first talk about the main liveliness tools and available techniques. This part will be naturally dense, focusing on when and why to use specific vivification features. even for those feel Blender animators, there are significant aspects of the game engine system that you will need to learn because not all the resources available in Blender translate immediately to the game locomotive .
The irregular partially is organized as a tutorial. I worked with artist Moraes Júnior to expose his liveliness work flow. In this part, we will revisit the game engine liveliness features and learn how an artist integrates them into a output environment. For this part, it ’ mho particularly authoritative that you follow along with the steps in the ledger files .

Keyframing a Keyframe
Keyframe is used both as a verb and a noun in this chapter. The latter ( noun ) refers to the animation frames that you will manually create. The first ( verb ) is the natural process of creating those frames ( through the “ I ” keystone shortcut or the Auto Recording system ) .

In club to use the animation system by rights, it will help if you know how to produce amaze animations. For that there is a fortune of well literature available, whether it is Blender specific or not. This book will not teach you how to do courteous animations. however, we want you, the artist, to understand how to animate for the game locomotive .

Before You Start
If this is your first time working with animation in Blender, make certain that you haven ’ metric ton skipped the first chapter. The game engine uses the animations created in Blender with Keyframes, F-Curves, interpolations, and then on. To learn how to master liveliness, you will have a better time consulting a Blender-specific book. however, it doesn ’ t hurt to refresh your mind regarding basic concepts and interface navigation topics covered in chapter 1 .

Every Pot Has a Cover

Every animated pot has an F-Curve .
Where do we use animations in a bet on ? The most obvious place is for character liveliness ; for example, whenever the player walks, jumps, or flies, you ’ ll see game animations running. That is not the only clock time, though, when you ’ ll see animations. You will besides see them in cut scenes, background elements, the drug user interface, and sol on [ doctor of medicine ] the list is endless. In order to cover such a wide variety of usages, there are three mechanisms that the plot engine provides to animate your game elements : object transformations, armature poses, and supreme headquarters allied powers europe keys .

  • Object transformations enable you to change object transformations such as size, rotation, and localization .
  • Armatures let you work with a bone structure, deformed enmesh, and bone special settings, such as bone constraint and bone rear .
  • Shape keys give you complete mesh transformation manipulate .

These are different systems, but there is a batch of overlap among them. More importantly, you frequently will use them in concert. In the future pages, we will talk about these mechanisms individually and besides see how they complement each other. In the practical aspects of how to use them effectively, we will focus on character vivification, which is the most complex kind of animation you can have in your game. once you understand the concepts of quality animation, you will have no difficulty in bringing life to your menu elements, shake your environments, and direct your cut scenes .
Rousing reading awaits you. Let the fun begin. First, let ’ s spirit at one fundamental concept for game liveliness [ doctor ] the animation cycle .

Animation Cycles

An vivification bicycle is normally a curtly action that when repeated produces the magic trick of a continuous long movement. A classical example is the walking animation of a character. You don ’ t need to animate the bequeath footfall, then the right footstep, then left, then right … ad infinitum. An military action with a left and veracious step can produce the lapp result. Just make indisputable the action starts and ends in the like present, and you can keep playing it in a cringle .
animation cycles are at the kernel of the character animation in a game. A library of multiple animations can provide a diverse and rich demeanor for your game character. As a reference, in a game project such as Yo Frankie, the independent characters [ mendelevium ] Frankie and Momo [ maryland ] have 87 and 70 individual unique actions, respectively. A few of the actions you can find there are : walk, Walk Back, Walk Faster, Turn Left, Turn Right, Jump, Pick, Thrown, Jump, Idle Sleep, Idle, Idle Show Off, and many others .

Moving Animation Cycles

A batch of the basic actions of a crippled can be expressed as moving liveliness cycles : to walk, to run, to spin, to fly, to roll, and to swim. You may have noticed that all these exemplar actions express the estimate of motion in space adenine well. however, an animation cycle does not have any influence in the displacement of the enliven object. Rather, you get the final vivification look and feel through a combination of external gesture control ( for case, a Motion Actuator ) and playback of an animation cycle. indeed, if you play back lone the animation legal action alone, you will see that it looks more like a treadmill exercise .

Still Not Convinced?
What we are doing here is splitting the bone pose animation from the object animation. We could indeed make the character move forward by moving all the bones in that guidance. Although this would make the object mesh topology display in the right home, it wouldn ’ t move the object ’ randomness focus on, which would result in errors for the physics computations and finally for the display of the object itself. The physics bounding box is calculated around the object ’ mho center, as does the camera culling test [ mendelevium ] the act that makes sure that objects outside the camera compass are not rendered .

Still Animation Cycles

There are cases where you don ’ t need to displace your object while playing its animations, and we call them still liveliness cycles. An animation cycle without the displacement component is like a chase chasing its own tail. And if this is what you want to animate, you need the animation cycle and nothing more. In fact, any idle or secondary animations can be used directly without the indigence of a Motion actuator. For model, if you are doing a breath liveliness cycle or making your character tap his feet while waiting impatiently for you to make a motivate, all the animation is controlled by the armature poses. even if your character has to move around a snatch, you would not use a apparent motion actuator here. In these cases, make certain that the final put is in the like put as the initial one .

Actions and F-Curves

An action in Blender is something particular for vivification. By its definition, an action is a collection of channels of F-Curves. It allows a property ( object size, bone position, etc. ) to have a unlike measure along different frames .
But what are F-Curves ? functional Curves are curves created by control points ( the keyframed positions ) and interpolated to fill the evacuate. As in Blender, in the crippled engine you don ’ t need to define a keyframe for every single frame of reference of your liveliness. The parts of the arch between keyframes will be calculated based on the interjection settings and the handlers of each of the keyframes .
When we talk about the action of an aim, we are referring to the current legal action linked to it. This is the animation that will be played when you play second the animation in the viewport, or if you render the liveliness from Blender. This is besides the action the keyframes are stored in. To play this legal action in the game locomotive, you need to get the action identify to use in the Action actuator [ doctor ] select the object, and you will find the action in the Dope Sheet when hardening to Action Editor .

Don’t Lose Your Action
If you want to play different actions for the same object during a game, you need to create them in Blender. An legal action is a datablock that can be named, removed, imported, and linked as any early Blender datablock. It is authoritative to set the Fake User choice ( in the header of the Dope Sheet set to Action Editor ) if you plan to unlink an action from an object and create a new one. otherwise, the software will assume you no longer need that action and will remove it the next time you save and reopen your file. besides, you can use an action created by one object into another object, proven that they are compatible. For most objects all they need is to be of the lapp type. For armatures, they besides should have the same sum of bones with the lapp names. For meshes with condition key actions, the shape key channels need to have the same mention .

At beginning we don ’ thyroxine edit a curvature directly in the F-Curve editor program. The common work flow is to first keyframe some parameters ( for example, placement and rotation ) in the 3D horizon. After the block of your key and in-between poses, you may want to do bantam adjustments in the swerve. This is the time when you can go to the F-Curve editor program and make changes directly in the curves. With some practice you may even look at the chaos as in Figure 4.2 and see bouncing balls and smooth fade-ins and fade-outs .
F-Curve chaos
even when you are using the Action actuator, you will be internally manipulating F-Curves ( through the Dope Sheet or fortunately the 3D view ). The only actions that will change your object geometry are the cram pose action and the condition key actions. The erstwhile will play the bone put action for your armature, while the latter plays a determine key action affecting the whole engagement .
other actions can be used to animate your object as a whole without affecting its home geometry. You can move the object, change its size, rotate it, and animate its specific type parameters. For example, you can animate a television camera to follow a predetermine path or animate a lamp to flicker a dimly colored active light. Does your television camera want to change the lens during the game ? An action can easily do that for you .

Armature and Poses

The Bone vivification organization works in the game locomotive very closely to the manner it does in Blender. You will create a Mesh object and an armature object to deform the inaugural .

Mesh and Armature
Both the armature and the Mesh objects need to be introduce in the game for them to work. In fact, if you are adding the animated object dynamically ( for case, through an Add Object actuator ), you will refer to the Armature object to bring in the animated conjunct. As in Blender, the Armature object is the parent of the Mesh object. Therefore the armature will be the game object running most of the animation sensors and actuators. thus you may a well dump all the Logic Bricks of your object in the armature. An exception is the Replace Mesh option in the Edit Object Actuator. In that shell you need to run the Actuator in the Mesh object itself .

The work flow for Armature and Bones resembles the NLA ( Non-Linear Animation ) Editor in Blender. You create person animation actions that you want to be played at a certain prison term. Those are the actions we referred to when talking about the animation cycles, early in this chapter .
The first difference is that you don ’ t need to predefine the ordain and duration of all the action you want to play. For example, in the NLA Editor if you want to animate a shark turn, you will create an natural process for “ Straight Swimming ” and another for “ Turning. ” You will alternate between them based on your script : possibly the shark turns at the lapp time you throw bait close by .

Speaking of NLA
even though NLA animation is not supported in the game engine, you can inactive use the NLA Editor to make your animation sequences. Cut scenes or complex dialogue scenes can benefit a bunch from a NLA based work flow. For exercise, you can combine dialogue actions from a MoCap ( motion get ) organization with pregenerated dead body animation cycles. Once the animation edit is done you need to combine the actions into a single action with the Bake Action operator, available via the Search Menu ( spacebar ) .

Unlike in the NLA Editor, we have a find to play actions based on the player decisions or AI predesigned interactions. In our shark example, we can have the player controlling the shark and turning it when it gets tired of swimming in a square line. possibly this shark likes to chase its chase restlessly. Either manner, we can play and stop playing the person animations ( “ Straight_Swimming ” and “ Turning ” ) anytime. human body 4.3 illustrates this .
Shark stuck in the Turning Action
The second remainder is regarding the bone constraints. We will cover it in more detail former. It ’ s important to know that not all the Bone Constraints that work in Blender will work in the game locomotive. Most of them do, so it shouldn ’ deoxythymidine monophosphate be a lot of a fuss. besides, the constrained cram and the aim bone should be part of the same armature .
The third base deviation is the general simplicity of the armature and cram organization. In general, games have simpler rig ( as the armature and bone system are known ) than in animate movies. For AAA games, this is not therefore true [ doctor ] their rigs are closer to film than to traditional plot rigs. In the end, the complexity of the rig is besides directly related to the come of polygons your mesh has. consequently, as game objects naturally have fewer faces than their animated film counterparts, the rig reflects that .
A good model is Frankie the Flying Squirrel in the animated short Big Buck Bunny and in the Yo Frankie ! game. As you can see in Figure 4.4, the original model had 11,777 faces and 388 bones, while the mannequin remake for the game has lone 2,509 faces and 52 bones. even though the function of Frankie was pumped up from a side film character to the bet on chief character, the complexity of the game file is much childlike. ( The film-file face count goes to 128,404 when you apply the Subdivision Surface modifiers. )
_Big Buck Bunny_ (left) and _Yo Frankie_ (right) rigging comparison

When to Use Pose Actions

constantly ! The main custom of put actions is the one explained earlier when talking about animation cycles. Full animation cycles will not be the only ones in your character repertoire .
You don ’ t need to have all the bones posed in all the actions you want to play. Imagine you want to have a unconstipated walk-to animation and allow the character to look back while walking. For this kind of site, you can animate the upper-body bones in a different action than the leg and the hip. If the animations are in freestanding actions, you can turn the single actions ( walk, look back ) on and off individually. This will spare you from making an vivification action for every possible combination of individual movements ( blink, rise, walk of life, scratch the head, and so on ). It besides makes it simpler to control those actions. They don ’ t need to have the lapp length or be called from the like actuator .
animated characters are not the alone game objects that can use the armature animation organization, though. You can use armatures anytime you need more control than the Motion Actuator can provide. even a childlike object like a door can use an armature to help open and close it. The problem with a door is that you much need to use the door as a collide object [ doctor ] to keep the three little pigs dependable from the wolf. That leads us to our future topic .

Graphic Mesh vs. Physic Shape

To animate a mesh with bones is a relatively expensive task for the calculator. therefore, when you set an object to play a perplex action, you are changing only the graphic mesh of the object [ doctor ] the enmesh used for the crippled supply. All the physics computations, however, are done in another example of this mesh, and are not updated with the animation. In figure 4.5 you can see the screen door when Show Physics Visualization is on and the bet on has an aim armature animated. The master rest affectation of the armature is used for the physics/collision engagement. This is the mesh topology with the arms lying however. Although we can see the correct pose on top of that, this is not the one used for the physics computations .
Physic mesh not updated for armatures meshes

Bone Constraints

The constraints are a handy set of tools to facilitate the liveliness procedure. They are more conversant to riggers than to animators, since they are used to build easier-to-animate armatures. Thanks to bone constraints, we can build bone controllers to ease the work with building complex game armatures. Because of constraints such as the IK ( Inverse Kinematics ), we can create poses in very simplified ways. In a nutshell, bone constraints will spare you from animating all the bones individually by setting relations between them .
The way bone constraints work in the game engine is quite similar to Blender itself. There are a few differences, though. When you define a bone restraint [ maryland ] for example, the copy rotation [ maryland ] you set one bone to be constrained to another bone, the target bone. In this case, the constrained bone will copy the rotation of the prey cram for every model, every frame. Unlike Blender, in the game engine, the aim bone and the constrained bone want to be part of the same armature .
In Blender, cram constraints can be used in two ways. The beginning and simple way is to use them to help with sitting. For exercise, the Track To bone constraint helps you indirectly animate the eyes ’ rotations by animating the target the eyes are looking at. In this casing, even though you are not directly animating the eye bones, the animation process is much more intuitive. This is how you do it in Blender, and this is how you will do it for the bet on engine. Another manner of using them is by setting up the constraints and animating their determine values. Each bone restraint has an influence that ranges from zero to one .

Bone Constraint Influence
When you start a game, the stream influence of the bone constraints will determine the initial armature demeanor. If you need to change it during the bet on, you can use an Armature actuator with the Set Influence option .

Bone Constraints Not Supported

Because the constrained cram and the target bone necessitate to be in the same armature, some constraints that rely on external curves, hinges, and objects are ill-sorted with the game engine. In the current version of Blender, the nonsupported bone constraints are : Spline IK, Follow Path, Rigid Body Joint, Script, Shrinkwrap, and, partially, the ChildOf .

Rigid Body Joint Partly Supported
inflexible Body Joint is supported as an object constraint, but not as a bone constraint. You will learn how to use it in the chapter 6 Physics .

Bone Constraints Supported

All the Transform, Tracking, and Relationship cram constraints that were not mentioned previously can be used as you would in Blender .
In Figure 4.6, you can see the menu with all the bone constraints compatible with the game engine highlighted .
Supported bone constraints
If you ’ re not familiar with bone constraints, following is a brief overview of them and their functionalities. As with about every other sport of the game engine, the suggest custom illustrate but do not limit their potential lotion .


The Transformation bone constraints help you build a bone control system. This control armature is a high-level armature, with lone a few bones directly affecting the real armature .

Copy Location, Rotation, Scale

These allow you to copy part of the transformation and to set an offset for the replicate. The bone doesn ’ thyroxine become locked, allowing for far adjustments of the bone transformation ( see Figures 4.7a-c ) .
A simple use would be building manipulate armatures with bones duplicated between the armatures. Those bone constraints allow for synchronize of the cram chains .
An artistic exemplar of its use would be clothes or armor. The external cram chains ( for clothes ) can copy the base bone chain ( for the body ) to use as a base transformation. Since there is no interlock, you can animate the external bones independently of the torso animation. The cancel can be used to match the substantial legal separation between the soundbox and fabric geometries .
Copy Location bone constraint
Copy Rotation, bone constraint
Copy Scale bone constraint

Copy Transforms

Unlike the former bone constraints, you can not set the cram offset in this restraint, sol with influence 1.0, the constrained bone and the target cram will be precisely in the same stead ( see Figure 4.8 ) .
As a rule of thumb, an influence unlike than 1.0 produces more interesting behaviors .
Copy Transforms bone constraint

Limit Distance, Limit Rotation, Limit Scale

When you use a cram transformation to influence another bone ( for example, bone control sliders or bone drivers ), you are mapping a roll of transformation ( the position from [ 0,0,0 ] to [ 0,1,0 ] into the constrained bone [ doctor ] see the Transformation cram restraint ). Limit bone constraints restrict the bone to transformations inside the expected roll they are being mapped from ( see Figures 4.9a-c ) .
They can besides be used to complement Copy Location/Rotation/Scale bone constraints by copying the transformation but limiting some of the parameters ( for example, copy location but not allow Z to be below zero [ mendelevium ] under the bone used as a ground reference ) .
Limit Distance bone constraint
Limit Rotation bone constraint
Limi Scale bone constraint

Maintain Volume

This bone restraint does not use a target ( see Figure 4.10 ). The transformation happens alone dependent on the cram itself ( and within the axis opposite to the selected Free bloc ) .
It ’ s used for squash and stretch, the classic cartoon effect for squeezing bouncing balls .
Maintain Volume bone constraint


This is the best bone constraint for sliders. It allows you to map the transformation from the target bone into a wholly different transformation of the constrained bone. For model, you can map the location stove of a target ( slider ) bone from [ 0, -1,0 ] to [ 0,1,0 ] onto the rotation of the constrained bone from -90 degrees to 90 degrees ( see Figure 4.11 ) .
In the book files, you can see this exemplar of a bone slider where we are using Limit Location, Transformation, Copy Rotation, and a Limit Rotation Bone Constraint to set up a elementary arm. It ’ s not the optimum manipulation of those Bone Constraints, but it shows how they can be set up together .
Transformation bone constraint
You can find the file in \Book\Chapter04\1_constraints_transform.blend ( see Figure 4.12 ) .
Bone slider


A traverse bone constraint can be part of your independent armature or your see bones. For case, it ’ south common to have the Inverse Kinematics bone restraint in one cram that is separate of the chain. At the like time, the Track To much uses a cram not connected to the chain and not deforming any enmesh directly .

Clamp To

The Clamp To bone constraint forces the bone along a curve aim ( see Figure 4.13 ). The bone needs to be disconnected from the bone chain to properly constrain its location into the curvature .
It ’ s quite handy for cyclic environment liveliness of assets from your game. For example, you can make birds flying in the flip by having a predefined swerve for the bones to follow along. Cars driving or even people walking in the setting besides can be accomplished with this technique .
Clamp To bone constraint

Damped Track, Locked Track, and Track To

Those three bone constraints work in a exchangeable way. You select a target cram [ doctor of medicine ] where the constrained bone will be facing [ doctor of medicine ] and an axis indicating the internal steering to point to that prey. The remainder is how much manual control condition over the bone rotation you need after setting up the cram restraint. While the Track To wholly locks the stiffen bone rotation, the Damped Track keeps it completely loose for transformations on peak of the bone restraint influence .
The Damped Track gives you the most freedom between them, and it ’ s the simplest to set up. You only have to select the axis to lock, and it allows you to adjust the rotation of any axis of the constrained cram ( see Figure 4.14 ). You can see an exercise of this used in robotic eyes. The basic effect is to track a target object. But you can still spin the eye around for a bum, I mean, classical “ droid target locked ” impression .
Damped Track bone constraint
Locked Track will work as a compromise between the early two trackers. It allows you to adjust the rotation of the non-tracked bloc ( see Figure 4.15 ). A security television camera can be simulated with this bone constraint. A main axis is tracked by the camera ( for case, doing a horizontal spin-around routine ), while the other axes are independently controlled/animated .
Locked Track bone constraint
traverse To locks the stiffen bone for any rotation adaptation, leaving its rotation to be controlled entirely by the bone restraint ( see Figure 4.16 ). By nonpayment, it rotates alone one axis. however, you can track the early axis of the bone by setting Target Z in this Bone Constraint jury. The classical function of this is for eyes. alternatively of rotating the eye bones directly, you can set them to track a target bone at which the eyes will be staring .
Track To bone constraint

Inverse Kinematics

The IK ( Inverse Kinematics ) bone constraint helps you bypass the FK ( Forward Kinematics ) architecture of the armature bones. FK is designed for individual changes of rotation over the bone chain ( from the parent to the children ). In order to change a bone location, you need to rotate all the bones that lead to it and make certain the result rotation places the bone into the desired placement ( see Figure 4.17 ) .
It ’ sulfur very easy to lose yourself in going back and forth to fine-tune the position of your bones. Let ’ s look at an arm outfit as an case. A dim-witted armature would have a shoulder bone as the parent, and the arm, forearm, and hand as children. If you want to put the hand in a particular invest, you need to rotate the shoulder, rotate sleeve, and ultimately rotate the hand. If you miscalculated the extension of the arm and its radius of annex, you need to go back and rotate the pass again, fine-tune it .
With IK, you lone need to move the hand to the target position. The rotation of the forearm, weapon, and shoulder will be automatically calculated by Blender .
Inverse Kinematics bone constraint
The target bone can ’ thyroxine be a rear or child of any bone constrained by this bone restraint [ doctor of medicine ] this produces cyclic unpredictable effects. This includes not entirely the bone where you added the IK, but besides as many bones as you set in your chain length. ( Leaving it as zero influences the whole bone chain. )

Legacy Solver

By default option, Blender uses the Legacy problem solver for the Inverse Kinematics calculations. This is how most of the vivification software works and how animators are used to work .
When a bone is under the charm of an IK Bone Constraint, you can set specific IK settings in the Bone panel, as you can see in Figure 4.18 .
Inverse Kinematics Bone panel
Those parameters allow you to add some control over the otherwise automatic IK computations .

  • Limit : In the branch, you need to make certain that the bones behave as real bones would. For example, in real life you can ’ metric ton braid the elbow above certain limits. In ordain to mimic this behavior you can force the rotation of a bone to be inside a given rate. In our sheath, the limits would be set : adam : 5 degrees to 180 degrees ; Y : -90 degrees to 90 degrees ; Z : 0 degrees to 0 degrees .
  • Stiffness: This parameter sets how difficult it is to rotate the cram. high values make a cram rotates less. roast awkwardness can be one of the earliest symptoms of arthritis. So attend after your characters .
  • Stretch: Cartoon arms often need to stretch beyond their master sizes. The Stretch factor has to be set per cram. ( Stretch needs to be enabled in the Bone Constraint a well, but it ’ s on by default. )

Unlike the Stretch To bone restraint, the volume of the bone is not entirely preserved when using the IK stretch. In rate words, the arm seems fatty when stretched. To use IK elongate and the Stretch To bone constraint, you need to set up two bone chains individually : one for the IK, and the other [ doctor of medicine ] with Stretch To [ mendelevium ] to deform the engage. The elongate To is what preserves the correct volume for the bones. You can see a sample file in the Stretch To section late in this chapter .

Target-less Bone Constraint
If you don ’ metric ton select a target for the bone constraint, you can still use the IK in a special way. In this encase, the constrained bone is the self-target, and as such it ’ south detached to be placed anywhere. This technique, known as juke IK, is very fall in terms of calculation. In the traditional IK, you keyframe only the prey bone, thus the IK calculation has to run every clock you play the animation. With talk through one’s hat IK, the calculation is valid during the transformation ( when you are moving the target bone about ). You have to keyframe all the individual constrained bones for this to work. ( This is mechanically done when AutoKey is enabled from the Timeline editor. ) Since there is no IK happening when you play the animation, the calculation of juke IK is army for the liberation of rwanda superscript to real IK .

iTaSC Solver

additionally, you can change the IK problem solver in the Armature control panel to use iTaSC. This name stands for Instantaneous Task Specification using Constraints. This IK problem solver was developed specially for robotics, but can be used as a more advance substitution for the old IK ( Legacy ) problem solver .
The calculation or the armature social organization is calculated on the flee, based on predefined constraints and a moral force aim. It ’ s a very powerful organization, but not immediately related to the more traditional armature, bones, pose liveliness substitution class. No keyframes are required here .
The iTaSC problem solver is faster than the Legacy one and definitively better at handling real dynamic constraints ( see Figure 4.19 ) .
iTaSC Bone panel
The early bone constraints are great to help you animate your armature, but they are not as effective in dealing with the real-time changes in the armature to produce dynamically plausible motion. If you are into robotics or simply want to explore more advance settings in this problem solver, please consult to the official software documentation :
hypertext transfer protocol : // : Source/GameEngine/RobotIKSolver

Stretch To

A stretched bone allows you to produce cartoon soundbox transformations ( see Figure 4.20 ). different from a scale bone, a stretch one maintains its bulk. The target bone needs to be completely isolated from and not connected at all to the constrained bone. It can ’ metric ton be either a child or a parent .
In the book files, you can find an example of a more advanced proficiency that integrates Stretch To, IK, and Copy Rotation bone constraints. Study it carefully ; promote instructions are inside the file \Book\Chapter04\2_cartoon_arm.blend .
Stretch To bone constraint


The follow are the bone constraints that are supported the least. ironically, apart from the class name, there is not a lot relationship between them .
A bone restraint worth mention is the Action bone restraint. With it, you can play complete actions in the armature by moving one single bone round. Given the complexity of this restraint, the exercise part of this text evolved as a pseudo-tutorial. I say pseudo-tutorial because we are working on crown of no file, although you should be able to follow the instructions and reproduce the effect yourself .


With the Action bone restraint, you can play binding an integral natural process by controlling one single cram ( see Figure 4.21 ). Make sure that the target bone is not animated in the action you are playing ; otherwise, this will produce irregular results. Since this is a more complicated bone constraint, the best way to show potential usages is by a pseudo-mini-tutorial as you see adjacent .
Action bone constraint
An exemplar of using this is for Transformers-like animations. Let ’ s say you need to create a character like to Optimus Prime. The armature has two very distinct base poses : a regular car and a bad-ass automaton. Some of your animation cycles will happen in the car shape and others in the automaton .
You beginning create a branch natural process with two extremes [ mendelevium ] the car and the automaton bones ’ shape. The action itself contains the transformation between those two shapes .
now you create a bone [ doctor of medicine ] disconnected from the chief range [ mendelevium ] to control the charm of this action over the bone ’ s put. This cram will be used as a target in the Action bone constraints you need to create for all the bones ( and by that I mean create one bone constraint, set it properly, and copy over to the other bones ) .

Slider-like Controllers
This is indeed a classical usage of a bone accountant as a slider. Since only one of the transformations of the bone ( Location X ) will be used to influence the play military action, you can evening lock the other pose transformations ( Location YZ, Rotation XYZ, Scale XYZ ) and create a specify location bone constraint for this cram. In figure 4.22 you can see an model of this apparatus .

Bone constraint slider
After all the setup is done, you only need to worry about the prey bone when you need to switch between the poses. Move the cram to the leftover, and you have a car. Move it to the right, and you have a automaton. Animate the bone going from left to right, and you can integrate the “ Transformers ” vivification as share of any early legal action .
Another consumption for this bone constraint is to play two actions influencing the same bones at the lapp time. This is a work-around for the bet on engine ’ s limitation of only being able to play one action that influences a bone at a time. In the koran files, you can see a sample distribution of this in \Book\Chapter04\3_action_constraint.blend. note in the file that each Action actuator is set to its own layer, so they can be stacked together for the same object .

Child Of

It ’ s only partially supported .
The ability to dynamically set rear relations for bones during the crippled is necessity for some animations. Imagine that you are building a samurai game. In the nonfight moments, the sword will be inside a scabbard, and therefore it should be parented to it. During combat, the sword will move from the scabbard to the samurai ’ s hands. From that degree on, the sword should be parented to the hands so that it follows their stead and rotation during the slicing-heads animation .
The bone to be active parented ( for example, the sword bone ) needs to have no transformation in Pose mode ( it needs to be in its local origin [ 0,0,0 ] and with zero rotation ). It besides can ’ t have a parent, other than the ones dynamically defined by the restraint .
In Blender, you can have multiple Child Of cram constraints and alternate between the current parent for a bone. In the bet on engine, however, since you can ’ thymine animate the Influence of cram constraint, the use is not so compromising. In the end, you will be using it as if it were the Copy Transformations bone constraints. The remainder is that the Child Of allows you to select which transformations to copy over ( for exercise, Location and Rotation ), and its Set Inverse option is exchangeable to the Offset option of the Copy Location, Rotation, and Scale bone constrains ( see Figure 4.23 ) .
Child Of bone constraint
Another option for this type of animation is to use cram rear. With that, the sword can even be a Physics object and interact with other elements of the game. This is covered in the survive tutorial of this chapter, titled “ Hats off for Momo and vice-versa. ”

Not Supported Yet Useful
As with the early bone constraints not by rights supported in the game engine, you can placid use it in full to help animating in Blender. however, you will need to bake the restrain bone transformations in holy order to see the changes in the game engine. This subject is covered subsequently in Chapter 8, “ Workflow and Optimization Chapter 8. ”


The floor allows you to create an fanciful airplane to constraint your bone transformations to. It creates the equivalent of a floor, a ceiling, or a wall that can not be transposed. The present placement from the constrained cram must be cleaned for the clamp to the plane to work ( Alt+G ). See figure 4.24 .
Floor bone constraint


This bone constraint helps rotate bones around a particular bone. An exemplar would be to create a screwdriver liveliness. The screw position would be represented by a cram used as a pivot ( the target bone in this bone constraint ). The hand with the screwdriver would have its rotation locked to the pivot. To make the influence propagate through the bone chain, you would need the hand bone to have an IK bone constraint ( see Figure 4.25 ) .
Given that often the screw will not be region of the net directly deformed by the armature ( unless you are animating Frankenstein preparing himself for an IQ test ), the Pivot bone can be the parent of an external object you use as a proxy for the screw. More on that in the next section .
Pivot bone constraint

Bone Parenting

It ’ s not Vegas, but what happens in the armature does stay in the armature. so, how do you make your animation affect other objects ? The armature affects the deform mesh topology, but that ’ s not all .
Bone rear allows you to sync external events with the internal animation. It ’ s a very childlike feature, similar to object-to-object rear. The dispute hera is that you parent one aim to a bone. Whenever you animate the armature, the bone position will be copied over to the child object. This child object actually acts as a parent for other objects. It works as an desegregate extension of the armature into the game world .
Earlier, when talking about armature and poses, we mentioned that the Physic engage of your deform engage is not deformed. however, you calm can use bone parenting to interact physically with your world .
Let ’ s look at an example. Imagine that you need to pick up an chemical element ( a key, a coin ) in your game with your character ’ s hand. You start by animating your arm armature and arm meshes as you would do normally. You then need an empty aim parented to your hand bone and placed properly on exceed of it. This evacuate will be your object. It will automatically move with your hand and can be used with any Logic Brick you want .
After your hand takes the key, you need to make certain the key doesn ’ deoxythymidine monophosphate fall to the labor or drop into a drain and meet its end next to corrode pennies, cockroaches, and my old yoyo .
equally soon as the Collision aim ( our parented evacuate ) touches the aim object, you can set this object to be temporarily parented to this vacate ( which is then parented to the hired hand bone ). now, if you keep playing your “ picking up key ” animation, you will have the target element constantly “ at hand. ” For more details and instructions please refer to the “ Hats off for Momo and vice-versa ” tutorial .
In the Yo Frankie ! plot, they use this feature in a similar way. Both main characters [ mendelevium ] Frankie and Momo [ doctor ] have an empty parented to the wrist bone. When the player tries to catch some nuts or sheep, the bet on calls a Python script to control that interaction. Internally, a collision detector checks to see if the pick object is close to the player, and it parents the clean object to the “ Throw Place Carry, ” the bone-parented empty. In Figure 4.26, you can see Momo ’ s “ Throw Place Carry ” empty in the center of the throwing animation .
Momo bone-parenting system

Shape Keys

sometimes cram animation may not give you enough control over the interlock contortion. In those cases, you can animate the mesh directly via Shape Keys. As in Blender, you can define multiple shape keys representing different poses for your quality. Each airs holds the situation of all the vertices of your mesh .
The work flow with shape keys is different from armature animations. You start defining your foundation present, and on crown of that, you create affectation variations. If you change your geometry by and by on, it will be a irritating process to merge the exchange back to all the previously created poses, so form sure your mesh is ready before you create your shapes .

Shape Keys Performance
The level of control that you get from Shape Keys comes with a price. The performance required for the per-vertex calculation is well heavier than even armature control. thus, you should not abuse this proficiency .

When to Use Shape Keys

Use shape keys whenever the animation is besides complex for armature animations. That ’ s not the whole history, though. Shape key animations are frequently integrated with the traditional armature animations, not as something freestanding. They can work as stand-alone animations, of course ; there is indeed an actuator dedicated entirely to that. however, the greatest lotion of form keys is not to replace the bone liveliness but to complement it .
The most democratic use is for character facial animation. You can create a confront pose for every extreme position of your expressions and rely on basic interpolations between the poses to simulate the animation. This can be used for particular applications, such as lip-synch, to general vivification, such as formula of moods ( happiness, gloominess, Monday-ness ) .
In the game Yo Frankie, both of the main characters used shape key animations together with armatures. Momo used six shape poses to help its animations. The childlike ones help oneself with center bally. What would our cute tamper be if it couldn ’ triiodothyronine blink at its mates ? In trope 4.27, you can see the Momo foundation pose and variations of it created by changing only the determine of the four eye poses [ maryland ] eye lids up, eye lids down, eye brows up, and eye brow down .
Momo blinking shape key poses

Isn’t This Overkill?
You may be wondering if those poses could have been created with even bone poses. You bet they could. however, the Yo Frankie project has an authoritative educational mission. One of the goals of the stick out was to demonstrate the multiple features of the game engine. actually, the support for shape keys in the game engine was implemented specifically for this project. frankincense, those files are the foremost reference that animators studied on how to use them .

The poses left [ mendelevium ] Smile and Ooh [ mendelevium ] are a bit more building complex. They are face-to-face extremes of the like human body identify liveliness with the Natural present in between them. Momo can be smiling, natural, or ooh ’ ing. Since the latter is not a substantial verb, take a look at Figure 4.28 to better appreciate all the tamper sexual activity entreaty. It would be hard to get those results without adding lots of bones, which would create a system hard to animate. So determine keys are a far more elegant solution .
Momo shape keys poses: ooh, basis, and smile
Frankie, the flying squirrel, besides uses shape keys for some facial expressions and to control its wings. Like Momo, it would be excessively hard to control the wings ’ distortion using alone bones. therefore, a form pose was created to show how the enmesh should be when the wing is tucked in. In Figure 4.29, you can see Frankie in a natural present and with wings active .
Frankie - Ready to fly (left) and a natural pose (right)
Those condition keys are not used isolated as an action. alternatively, they are used as separate of an armature perplex, driven by a bone, like all the other vivification bones. This bone is used as a driver for the form action it is intended to control. Like the other bone-over-bone controls with constraints ( which we will see following ), the driver bone itself is unaware of its function as the condition key restrainer. name 4.30 shows the even arrange of the shape legal action to a control cram. You will learn more about this late in the tutorial section .
Shape key driven by a control bone

Action Actuator
Shape keys can besides be used directly by the Action actuator. This is utilitarian when you need to animate your whole mesh entirely through the vertex manipulation. Although you will credibly not use it for your main character, you can make dainty groundbreaking effects with this .


No keyframes were hurt in the draw of those tutorials .
In the come pages, we are going to make a character walk, interact with objects, and have some nice facial expressions for you to play with. For the model, we will be using the putter, Momo ( see Figure 4.31 ). I cleaned up the original charge, removing the shape key and the animation cycles previously created. You can get Momo in his fresh state in \Book\Chapter04\tutorials__tutorials_momobase.blend .
Dear Momo, get ready for rock 'n' roll!
In this short pre-tutorial, we will the animate the television camera rotation and the television camera focal duration as an hatchway effect for the game .
The unharmed tutorial is based on using the Action actuators to control the Momo animations. As we explained previously, there are different action types that can be used. Regardless of the action type, the way to use the actuator is the same. So we will start with a very simpleton action, and increasingly go over more complex topics such as bone and form key animations .
Open the base file from the \Book\Chapter04\tutorials\tutorials_momobase.blend .

  1. Change the current ensnare to 1 .
  2. Select the television camera object .
  3. In the Camera jury in the Properties Editor, set focal length to 10.0 .
  4. With the mouse over the value, press I to keyframe it for frame 1 .
  5. Go to the inning 30 .
  6. Change the focal length to 100.0 .
  7. Keyframe the newly value for this frame of reference .

What we did was set an initial focal length for the television camera to animate over a specific range ( 90mm over 30 frames ~ 1 second ). If you play back the animation in Blender ( Alt + A ), you can see the camera soar changing quickly over the initial frames
however, if you enter the game engine, the television camera is not animated. We still need to hook this liveliness with the logic bricks. so with the camera still selected, we need to do the following :

  1. Create an Always detector. Leave the default options so it runs alone once .
  2. Create an Action actuator. Change the frame range from 1 to 30 .
  3. Set CameraAction as the actuator Action. ( This is the action we created by keyframing the camera lens ; it ’ south automatic named by Blender ) .
  4. Connect both bricks. ( This will create an And accountant. )

The logic brick can be seen in Figure 4.32. There is in truth not much to it other than to make surely that the animation plays once after you run the game .
Setting up an Action actuator
If the fast zoom of the lens hush doesn ’ t make everyone dizzy, it ’ s time to animate the television camera rotation. It ’ s good to remember that while the rotation is a property of the television camera object, the focal length is part of the camera datablock. As such, these transformations are stored in autonomous actions. frankincense, we will need to create a modern natural process ( through keyframing the camera rotation ) and set up a newfangled Action actuator .

  1. Change the current frame of reference to 1 .
  2. Select the camera object .
  3. With the mouse over the 3D viewport, invoke the Keyframe menu ( I key ) and blue-ribbon Rotation .
  4. advance 5 frames .
  5. Change television camera rotation along its local Z axis by 60 degrees so it keeps looking ahead but spinning ( weigh R + Z + Z + 60 ) .
  6. Keyframe the rotation again .
  7. Repeat the previous steps until you get ( and keyframe ) frame 30, which will complete a entire loop of 360 degrees .
  8. Create an Action actuator. Change skeletal system range from 1 to 30 .
  9. Set CameraAction.001 as the actuator Action. ( This is the raw natural process we created. )
  10. Link the And accountant with this Action actuator .

You can get this final file on \Book\Chapter04\tutorials\pretutorial_camera_actions.blend .
This effect is a bit annoying if you play the file multiple times to test the liveliness ( as you will soon ). So this spin television camera is not included in the base file you will use for the actual tutorial. If, however, you want to bring the camera along, you can append it into your other files. All the logic bricks and actions linked to the camera object and television camera datablock will follow the Blender object .

Animation Cycle Tutorial

To start, let ’ s exposed the Momo file and look at the armature. Open the bible file \Book\Chapter4\tutorial_walk_1.begin.blend .
We will create a walk motorbike for Momo, following these steps :

  1. armature frame-up
  2. extreme poses
  3. Moving ahead
  4. between poses
  5. play time

In this tutorial, we will not cover animation extensively. This topic alone could fill a hale book. rather, we will focus on the work flow of integrating your animation skills with the game engine tools. You ’ ll get some tips you can apply to both Blender and the game engine animations. Both platforms work in a similar fashion .

Armature Setup

The armature is already created, but not yet ready to animate the character. If you go to the Pose Mode, you can move the individual bones, as shown in Figure 4.33. As you might already know, bones constraints are useful in posing the armature, so let ’ s create some .
Select and move individual bones
For Momo, there are two sets of bone constraints that will help your sitting. The Inverse Kinematics, IK, for controlling the bone chains from their extreme bones, and Track To for the eyes .

Inverse Kinematics Bone Constraints

first, let ’ s take a look at the IK bone constraints. IK can be used to pose arms and legs by moving only the hands and feet. The status of the weapon and leg bones will be mechanically calculated to accommodate the hand/feet position. not only Momo ’ s human counterparts ( arms, legs, etc. ) benefit from it, but besides Momo ’ mho chase is perfect to demonstrate the usage of IK, so let ’ s begin with it. With the file open, follow these steps to get to the configuration shown in Figure 4.34 .
Set an IK bone constraint in Momo's tail

  1. Select the armature object .
  2. change to Pose modality.

  3. Select the last fag end bone ( RigMomo.tail.001 ) .
  4. Select Bone Constraints in the Property Editor .
  5. Add an Inverse Kinematics bone constraint .

immediately the frame-up is about done. Before we finish, try to move the dock bone round. This results in all sorts of twists and revolving poses just by moving entirely a single control bone. You can see this early iteration in Figure 4.35, which went a sting excessively far, however. All you need is to control the chain of bones that this bone belongs to ; in this case, all six bones from the tail bone group .
IK bone constraint with no limit
In rate to constraint the influence of the bone control, you need to set the chain length in the IK Bone Constraint panel. The default prize, zero, makes the chain of determine bones vitamin a long as potential. For the stern, you can set the chain length to be five bones .
There are other IK bone constraints that we want to set. thus far we have been seeing alone the bones from the first base bone layer. Bone layers work like the object layers in Blender. A bone can be in more than one layer, and you can choose which layer to set at a meter. The bone layers can be found in the armature Object Data control panel in the Property Editor, as seen in Figure 4.36 .
Bone layers
If you can turn on the second bone layer, you will see alone the hand, foot, and tail bones. They all need IK cram constraints as well. Try copying the steps for the tail bone. To mimic the original file, you need to set the chain distance to be two bones for the forearm and the tibia bones, and three bones for the feet. These numbers correspond to how many bones are left in the chain of bones. At this luff, your file should be like the one on \Book\Chapter4\tutorial_walk_2.ik.blend .

Targetless Constraints
Those IK bone constraints are targetless. As explain previously in the bone constraints section, they are a talk through one’s hat IK. They are used merely to help in posing and can be removed from the final file once the animation is done .

Track To Bone Constraints

well, if you haven ’ thyroxine looked at the obscure third cram layer, nowadays is a good clock time to do so. As you see in Figure 4.37, in this level, we have the eye bones and two other bones to be used as trackers. sure, you could move the eye bones directly, but again, this is not the ideal work flow .
Track To bone system
The two bones in front of the eyes are the tracker bones. Each eye bone will need a Track To bone constraint with those bones set as the targets. Think of the bone trackers as the direction in which Momo is looking. For exemplar, if there is a banana on the floor, you can place the trackers right on the fruit. This will make the eyes converge there .
Setting the Track To bone restraint is not much different than setting the other bone constraints. If you follow the steps in the tilt below, you should see the settings shown in figure 4.38 :

  1. Select the armature aim .
  2. change to Pose mode .
  3. Select the impart eye bone .
  4. Select Bone Constraints in the Property Editor .
  5. Add a track To bone constraint .

Track To Bone Constraint panel
To finish the apparatus, select the RigMomo as the target aim and as the aim bone. Do the same for the correct center, and you are ready to move the aim bones around. The armature is now quick for the first animation. If you equitable want to have fun animating the character, you can check the stream file condition at \Book\Chapter4\tutorial_walk_3.trackto.blend .

Extreme Poses

The foremost thing you need for your vivification is the startle position of the walk motorbike. A good cycle shouldn ’ thymine have a clear begin or end, so we ’ ll start with the extreme poses. In cosmopolitan, an extreme pose shows a moment when the animation hits a top out, before it changes management. For the walk cycle, an extreme airs is when one stage is in its maximal stretch and the other is slenderly flex, waiting to transfer its weight to the branch in front of it. We will start from there .
It helps to be able to view images and videos when animating. If you want to spare yourself from a visit to the nearest circus, a draw or video recording of a person walking will do precisely fine .
On the book files, you can find an effigy of Momo walking in \Book\Chapter4\ ExtremePoseSide.png and ExtremePoseFront.png .
In Figure 4.39, you can see those images being used as backdrop in a file ready for posing. This Blender file is the like one we built in the former section with extra reference images as backdrop. Find it in \Book\Chapter4\tutorial_walk_4.extreme_reference.blend .
Reference image as background

Reference Images
The reference images are used here in the background. If you prefer to see them on top of the view, you have two options. You can use the “ Front ” option in the Background Images dialog box. Or you can use empties alternatively. Add empties with the Display type set to Image. Place them in the desire placement and lock their survival in the Outliner .

Try to match your armature to the character prototype. In the Pose mood, go and rotate the bones around. ( You don ’ t want to change the armature in Edit mode. ) Pay particular attention to the feet bones to make sure they are well planted in the grind .
After you are done with the initial put, you can go for a piece of tamper see-monkey do. Follow the steps below. The explanation follows .

  1. Change current inning to 1 .
  2. Select all bones .
  3. Keyframe Loc/Sca/Rot ( I key )
  4. exchange frame to 41 [ doctor of medicine ] this will be the end skeletal system of our animation .
  5. Keyframe Loc/Sca/Rot again ( with the bones hush selected ) .
  6. change frame to 21 [ doctor of medicine ] the half of the vivification where the second footstep begins .
  7. Copy all the bone transformations ( Ctrl + C or the picture in the 3D View header ) .
  8. Paste them mirrored ( Shift + Ctrl + V or the last icon in the 3D View header ) .
  9. Keyframe Loc/Sca/Rot even again .
  10. In the F-Curve Editor, select all bones and change Extrapolation Mode to Constant ( Shift + E or Channel Menu > Extrapolation Mode ) .

What we good did was first gear specify the liveliness length for 40 frames ( 1.3 seconds at 30 federal protective service for one complete typeset of two strides ). The first base and survive frames need to match ; so we copied the transformation of the bones over frame 1 to 41. ( You can copy them in the Dopesheet Editor as well. ) We copied to frame 41 and not to frame 40 because we don ’ thymine want a double ensnare in the vivification. We want the transition from the death human body ( 40 ) to the inaugural frame ( 1 ) to be the lapp as from the last frame ( 40 ) to the adjacent skeletal system ( 41 ), which is outside the coil image .
The extreme poses for the leave and the right strides are flip copies of each other. If you named your bones by rights ( as we did, using .L and .R for symmetrical leave and right bones respectively ), you can mirror copy/paste them. consequently, in the middle of our animation ( frame 20 ), we place a copy of the poses .
last, the change in the Extrapolation modality ensures that the frames behave as if they were copied over and over in the Dopesheet. The handlers of the initial keyframes change with the handlers of the final frames and vice versa .
In the Render panel in the Properties Editor, you can set the accelerate ( 30fps ). The playback compass ( 1 to 40 ) can be changed in the Timeline Editor or in the lapp Render jury If you switch the render engine to Blender Render. With this set, you can play back ( Alt + A ) your file to see the two extreme poses alternating over time. Before eat up, go to the Dopesheet Editor, trade from Dopesheet to Action Editor and rename the previously created military action from ArmatureAction to Walking. You can see the gore in Figure 4.40 .
The final file can be found in \Book\Chapter4\tutorial_walk_5.extremeposes.blend .
Action Editor - first poses ready

Moving Forward

The concluding walk hertz will have no real forward campaign : the quality stays in the lapp place. It ’ second alike to those old Looney Tunes cartoons when the coyote runs past the cliff and keeps running without going anywhere. then he falls. Nevertheless, you distillery need to set up a system where you can see the character walk as if you had a Motion Actuator attached to it. To help with this, we will look at two methods : using the central bone or moving the environment .

Root Bone

The simplest room to make Momo move is by keyframing the root bone along the way. The root bone is the parent of all the bones. therefore, if it moves, the rest of the armature will follow it. To set the solution bone to move, go to Pose manner and do the follow :

  1. Select the bone. In RigMomo you will find the Bone.main on the floor grade .
  2. Insert a Location keyframe. This will be the initial stead of the bone and armature .
  3. progress from frame 1 to 41 .
  4. Move the bone forward the distance of one stride [ mendelevium ] 0.23 ( see the note below ) .
  5. Keyframe the raw bone position .
  6. Change the Channel Extrapolation modality of the root bone to Linear Extrapolation .

In the book files, you can see Momo frame-up with the ancestor bone steps at \Book\Chapter4\tutorial_walk_6.rootbone.blend .

How Big Is a Stride?
If your character is walking, finally you will need to find where its feet will land after each stride. This varies from person to person, and is a function of the stage ’ second size, the amphetamine of the bowel movement ( walking, running, jumping ), and other factors such as the environment ( for exemplar, snow ). For this walk cycle, you can use 23cm ( or 0.23 Blender units ) for the complete two strides .

After you are done with all the animation ( past the polish stage ), you then can clean the bone location F-Curve. During the production of your game, you may need to come back for tweaks in your animation cycle. consequently, rather of cleaning the cram wind you can simply disable the root bone channel in the Graph Editor. In Figure 4.41, you can see the speaker icon you use for that .
Graph Editor - disabling individual bone channels
The downside of this method acting comes when you need to change the rout cram as part of your liveliness. For case, sometimes you don ’ triiodothyronine want your animation bicycle to be uniformly moving forward. even for Momo ’ mho walk, it ’ sulfur well if there is a pause every time he rests one of the feet as he gets ready for the following step. As you know, the movement of the character will be decoupled from the animation motorbike. And, no, we don ’ metric ton draw tired of repeating that. so, in this lawsuit, if you look at the character from a constantly moving indicate of character, it will seem as if Momo is moving forward, then back, and then forward again to the original position. To move all the bones at once, nothing is better than the root bone. It ’ s not a effective idea to rely on a bone that you plan to disable though .
A work-around for that is to have one root bone to control the external stead, and another bone ( parented to the root bone ) to control the inner put, relative to the object placement. To avoid this excess of ball-shaped master bones, let ’ s count at our irregular method .

If Mohamed Won’t Go to the Mountain…

…he goes to the beach. Our lamb putter, however, is suntanned adequate and might ampere well stay frame. In other words, in this method acting, Momo never moves. We will rather animate the environment around him .
This method acting is based on the principle that perception is always relative. For example, on your calculator sieve, there is no way to distinguish between moving the television camera away from the character and moving the quality away from the camera. The result will be precisely the same. We will be adding moving placeholders that you can use as a scout to side the feet. calculate 4.42 shows the apparatus .
Animation feet place holders
This file is on \Book\Chapter4\tutorial_walk_7.placehold.blend. You can ’ t assure from the visualize, but if you play back the animation, you will see the placeholders moving against Momo ( or would it be the other way around ? ). In fact, the television camera is inactive sol Momo doesn ’ triiodothyronine actually move .

  1. Create a simpleton, easy-to-spot object .
  2. Create an Array changer [ doctor ] set the changeless cancel to be equivalent to one stride and set adequate copies to fill the screen .
  3. Move the Array object to be aligned with Momo. The feet from your extreme pose should match the position of the range elements .
  4. Insert a location keyframe .
  5. advance from frames 1 to 41 .
  6. Move the array aim ahead the distance of two strides [ doctor of medicine ] 0.46. ( See the note on root bone. )
  7. Keyframe the new range object position .
  8. In the Graph Editor, change the array object Extrapolation mode to linear extrapolation .

This method requires a morsel more frame-up than the previous one, but it has a big advantage. To work in the between poses ( the future step of this tutorial ), you will need to keep track of the animal foot military position while the fictional character moves forth. While the body is constantly moving, the feet are planted on the ground until it ’ s their time to get up and get smashed on the floor again. This will prevent the undesirable effect known as sliding feet. This trouble will be revisited adjacent when we create the poses between the extremes. name 4.43 shows the arrant walk cycle in different moments ; note that the feet are always in the same place relative to the placeholders .
Animation feet placeholders

Between Poses

sol far we have entirely two poses, the extreme point left and the extreme proper stride poses. By default, Blender interpolates the keyframed poses, creating a smooth transition between them. This mathematic interpolation is of no habit for the concluding animation. That leaves us with 20 frames to fill between those extreme poses .
From traditional animation literature, you can use two main techniques to create those in-between frames : straight-ahead military action and pose-to-pose .
careless of the advantages of one or another method ( you can learn more about them in the material in the reference section of this chapter ), we should attend to the differences in their workflows. In straight-ahead action, you animate frame one-by-one as you go. In pose-to-pose, you create sub-extreme poses and fill in the intervals systematically .
In both cases, you need to ensure that the feet are not sliding while you pose them. Use the proficiency presented in the former section to prevent this. Sliding feet and feet going under the prime are hallmarks of not enough frames and automatic interpolation. Avoid them at all costs .
besides, although you can create the animation by posing and keyframing the bones in the 3D view, you might want to tweak them in the Graph Editor. That can spare you from creating excessively many frames and using the handlers for fine-tune your transitions. The fewer frames you have, the easier it is to change your animation. In Figure 4.44, you can see the current F-Curves edited for this walk-to cycle .
F-Curve tweaks
This is no different from the traditional work flow of liveliness in Blender. It ’ s not evening much different from the animation work flow in early 3D software. From the huge total of techniques and tools available, I used the following for this bicycle :

  • IK bone constraints: Use the IK constrained bones as guides, but remember to keyframe the affect bones ampere well .
  • AutoKey: Automatic keyframe interpolation in the Timeline Editor heading, specially for the straight-ahead action will spare you from a lot of manual keyframing .
  • Show/Hide Handlers (Ctrl+H): My personal front-runner shortcut in the Graph Editor .
  • UV grid: In the floor to spot feet sliding .

In Figure 4.45, you can see the final leave of our lead on this. This file is in \Book\Chapter4\tutorial_walk_8.pose_to_pose.blend. Play it back to see it animize. From here, you can either keep working out of your file, take it from the ledger file, or merge both in concert. An action, as any other data block in Blender, can be imported and saved over different files ( ampere long as the armature bones don ’ triiodothyronine change their names ) .
Walking cycle complete

Play Time

immediately that the liveliness cycle is done, it ’ s time to bring it from Blender into the game. You need to set an Action actuator to play the walking action and a Motion Actuator to make it move consequently .
Let ’ s beginning by creating the Logic Bricks for the armature. With RigMomo selected, follow the steps in orderliness. In Figure 4.46, you can see how the Logic Editor will look .

  1. Add an Always detector and set Positive Pulse on .
  2. Add an Action actuator. Set the action created ( for exercise, Walk ), the Play mood to Loop End, and the Start and End Frames to 1 and 40 respectively .
  3. Link the Action actuator with the Always detector ; this will automatically create an And accountant .
  4. Add a Motion actuator and leave the values blank for nowadays .
  5. Link the Motion actuator with the same And restrainer .

Logic Bricks for animation playback
To set the rate in the Motion actuator, you need to calculate the aim accelerate in Blender and convert it to the game locomotive. The calculation is simple and is going to give you the accurate speed. If, however, you don ’ metric ton feel like doing mathematics nowadays, let trial and mistake be your template .
The speed-in Blender units by seconds-is equal to two strides ( 0.23 adam 2 ) divided by the number of cycles per second – the frame range of your liveliness cycle ( 40 ) divided by the Blender federal protective service playback value. The game engine uses the same frame of reference rate as Blender, to be set in the Render panel to 30fps. therefore for Momo, the speed we are working with is 0.35 Blender units per second : 0.46 / ( 40/30 ) .
The value to use in the Motion actuator is the object focal ratio times the frequency on which the Motion actuator is activated. Since we are using an Always detector triggering every logic tic, the frequency is 1/60 or 0.017. If you change your game to run at 30 logic tics per moment, the frequency would be double ( 2/60 or 0.033 ). The multiplication of the amphetamine times the frequency is the value you will add to the part of the actuator. The final Loc is [ 0, -0.0059, 0 ] X, Y, and Z respectively ( see Figure 4.47 ) .
Walking Momo
In the end, you might want to set the television camera to track Momo during the walk. In the sample file, you will see the television camera is parented to an empty with an Edit Object > Track To Actuator to follow Momo. besides, the zoom and rotate television camera presentation impression was brought rear from the pretutorial. A checkerboard pattern on the floor will besides help to follow the footstep of his progress. The final file is shown in Figure 4.47 and can be found on \Book\Chapter4\tutorial_walk_9.playtime.blend .

Idle Animation

In the latest file, we set up Momo to walk. We never set it up for him to stop walk, though [ doctor ] the Always detector will play the vivification in an space loop until you quit the crippled. To push our animation exercises foster, let ’ s create an idle animation for Momo. We will then set up Momo to walk, stop, and walk again. idle animations are played when the character is waiting for you to make a decision ( whether to keep walk, to run, to turn, etc. ). So adenine soon as we stop walking, we will set the character to act accordingly .
Start off by opening the file \Book\Chapter4\tutorial_idle_1.begin.blend. This is the lapp file we made in the previous tutorial, duplicated here for appliance ( the spin camera effect was removed again ). choice RigMomo and create a new legal action in the Action Editor inside the Dopesheet. You actually have two options hera : you can either create a raw blank action or use the Walk action as reference ( duplicate it and make changes on top of it ). To duplicate the existing action into a new one, you have to click in the total by the military action name, as shown in Figure 4.48. This is useful when you are creating variations of the same natural process ( different walk styles, different jumps, and so on ) .
Insert a new action
In this case, since the actions are very different, there is not much to recycle from the walking cycle to the idle animation. You want to keep entirely the first and concluding frames to guarantee a smoother passage between the two animations. If you don ’ thyroxine want to bother deleting keyframes, you can create a new carry through from scratch, maintaining the initial pose by following these steps :

  1. Go to frame 1 .
  2. Unlink the Walk action from the armature ( click the X button ) .
  3. Create a new action ( snap in the + or New button ) .
  4. Rename your new action “ Idle. ”
  5. Select all the bones of the armature and keyframe them .
  6. Go to a subsequently skeletal system, which will be the final frame for your idle liveliness. For case, to make an baseless animation of 4 seconds, go to frame 121 .
  7. Set a keyframe for all the bones again .

now you have a fresh, blank action to play with. The only rule you need to follow is to avoid animations that require Momo to move around. The reason is that you may need to interrupt the idle animation at any moment a soon as you get rear to walk .
The passage between the walking animation and the idle one can be seamless. In the Logic Brick section future, we will explain how to make the walk finish its complete cycle before starting the idle animation. besides, this will have to rely on the blend between poses from both actions for a few frames. This will work only if the model in the current frame of the idle animation is not very distinct from the model at the initial frame of the walking action. If the poses are highly different ( for exercise, Momo is facing opposite directions ), the automatic rifle calculated in-between poses will be mathematically correct but artistically nasty. This is like to our reasons for making the between poses in the previous tutorial .
ampere long as your poses are inside the scope of the initial and concluding frames, the idle animation will play fine. Since you want to avoid moving Momo around, it ’ s a good clock time to learn how to enhance his facial expressions .
Before you finish the idle animation, you need to set up drivers for your form keys. You can find the stream snapshot file at the end of the following segment .

Making a Face

Do you know the deviation between television and a know operation ? In television the director has fully control of the frame of the shots. It ’ second coarse to use and abuse close-ups and firm facial expressions as a substitute for expressive body linguistic process. In the bouncy theater, the consultation may be sitting close or army for the liberation of rwanda away from the stage, and they all need to be pleased. ( certain, people fight over a front seat, but the show still has to make sense to everyone. )
good artists do fine in both mediums. But a pretty face on your HD television screen can be a very bore, disappoint I-want-my-ticket-back experience in a live field ( been there, done that, and sleep ) .
In a game, we have the best and the worst of both worlds. You still can use lead framing for cut scenes. But for most of the game, you must be prepared to produce dependable, effective animations for close and far distances .
In the previous tutorial, we covered the techniques for a beneficial, wide body-language pose. Add some more classical animation techniques ( for exercise, strong silhouettes, lines of action, and exaggeration ), and you are good to go. For facial expression, however, we will look at something new. If you have not been reading these chapters in order, immediately is a well time to go back and read about the human body key .

Shape Keys and Bone Drivers

A shape key is like an individual part of grammar. You need to build a library of poses to use in your animation. Momo already has a few poses previously created. We will use them in our animation posing with the bone-driven proficiency .
Open the file \Book\Chapter4\tutorial_idle_2.shapekeys_ui.blend. This is the initial file with the UI rearranged to work well with the condition key .
In Figure 4.49, you can see all the poses in the Mesh data jury in the Property Editor for the MeshMomo object. The different poses were created in pairs : smile and ooh ; eyebrowsUP and eyebrowsDOWN ; eyelidUP and eyelidDOWN. They are all relative to the footing determine. To see the poses change the prize by their names in the shape key slot [ doctor ] set the influence value to 1.0 and all the other poses to 0.0. If you want to tweak any of the poses, you need to select the human body and go to the Edit mode. You will no longer be working in the basis shape, so any changes will only be applied to this particular determine .
Shape smile - Edit mode
The shapes are not single. Often, you will have more than one pose active voice at the like time. therefore, each shape has very sequester changes. For Momo, you could have a individual affectation with both the eyelid up and the eyebrow up shapes. however, this would give you no way to play with their influence individually in different actions. Unlike armatures, you have no way to mask out the shapes by using entirely a few “ bones ” ( or character of the mesh ) .
now you can integrate the supreme headquarters allied powers europe keys into your idle animation. The first thing you need to do is to set bones to drive the shapes. The idea is to use form keys as “ airs libraries ” inside your armature animation work flow. therefore, you will be using dominance bones from RigMomo to control the influence of each individual shape .
Select RigMomo and switch to the Pose mode. In the walk tutorial, we looked at the bones in the bone layers 1 to 3. now you can last turn on level 4 to see the last bones of Momo ’ s armature. The bones in this level are all detached from the chief armature, as you can see in Figure 4.50 .
Shape key control bones
To hook up the control bones with the shape key, you need to follow the steps. The final driver in the Graph Editor will look like Figure 4.51 .

  1. Select the MeshMomo object .
  2. Select a human body key ( for example, smile ) .
  3. Click with the right mouse button in the Influence value .
  4. Select Add Driver .
  5. Open the Graph Editor .
  6. Switch the Edit manner from F-Curve Editor to Drivers .
  7. Inside the “ Key ” channel, select the curvature to edit ( for model, Value ( smile ) ) .
  8. Open the Property jury ( N ) .
  9. Change Type from Script Expression into Averaged Value .
  10. Delete the F-Curve modifier ( created by nonpayment ) .
  11. In the Object/Bone dialog box, set RigMomo and the bone to use as restrainer ( for exercise, Mouth ) .

Shape key driver
By default, Blender sets the global X coordinate of the bone to drive the shape influence. In the Pose mode, you can move the sass bone sideways to see the shape influence increasing and decreasing respectively. As with any other bone, you can keyframe the military position of this bone restrainer ( mouth ) to animate this shape key influence over time .
This is not an effective apparatus, though. First, it ’ s more intuitive to use the vertical stead of the bone to drive this especial supreme headquarters allied powers europe. Second, it ’ second better if you don ’ t need to move the bone equally much as you do now to have significant changes. certain, these are not deal breakers, but we are here to learn, aren ’ metric ton we ?
first, in the Driver panel, change the Transform channel influence from X Location to Z Location and change Space to Local Space. optionally, you can lock the transformation of X, Y and rotation of the bone [ maryland ] we will be using only its Z movements .
second, you need to map the bone transformations to shape influence. To keep the bone positions not far away for the rest of the armature, we will use the short distance of a tenth Blender unit to control all the form influences. That creates a curvature with two points, [ 0.0, 0.0 ] and [ 0.1, 1.0 ]. This will map the shape influence to 0.0 when the bone Z present location is 0.0, and 1.0 when the location is 0.1 .
To move the bone improving and down will immediately drive the condition influence as you want. Your file immediately should match the book charge : \Book\Chapter4\tutorial_idle_3.smile_shapekeydriver.blend .
For the moment pose, “ ooh, ” you will use the lapp bone control but with a different function. We want to set the “ ooh ” affectation when the bone is in -0.1 and “ smile ” when it ’ south 0.1, as we have. This will allow a polish conversion between those two extreme poses. Repeat the former steps all the way to the initiation of the F-Curve .
This fourth dimension the swerve will be the reverse of the smile, with two points : [ -0.1, 1.0 ] and [ 0.0, 0.0 ]. name 4.52 illustrates the final examination arrangement .
F-Curves of shape driver influence
additionally, you can add a bone constraint to make surely the bone control is moving only vertically and that it ’ mho always inside the range you are using ( -0.1 to 0.1 ) .
ultimately, you need to set up the remaining poses [ maryland ] eyelid up and down and eyebrow up and down. The frame-up is the same as for the match ooh and smile. This fourth dimension, we will leave them for you, but you can check the final setup file in \Book\Chapter4\tutorial_idle_4.shapekeysdriver.blend .

Get Your Hands Dirty

With the armature fix to pose, you can complete the dead animation. Once things are set, there is no need to worry about anything but the armature poses. Take the former charge and create the complete hertz .
Our undertake of a fun idle liveliness can be seen on the bible charge \Book\Chapter4\tutorial_idle_5.action.blend. The liveliness is not ( so far ) set to play in the game engine, but you can play it back in the 3D view. besides remember to change the end human body in your hand over gore to match the playback of your animation bicycle. This will not affect the game locomotive, but it will help you preview your work in Blender .
After the tutorial section, you can check out the idle and walking animation made by Moraes Júnior particularly for this book. In the meanwhile, enjoy our carry on Momo, the happiest monkey in the populace ( see Figure 4.53 ) .
Momo idle animation

Wiring Up the Logic Bricks

There is only one thing missing. We need to alternate between the two animations : the walk and the idle matchless. With the latest file open, choice RigMomo and in the Logic Editor, make the watch changes :

  1. Change the Always detector to a Keyboard detector with Key set to W .
  2. Add a Property Sensor to check whether the frame place is between 39 and 40. Set Invert and turn on Positive and Negative Pulse modes .
  3. Connect the Property Sensor to the Motion actuator ( Move Forward ) .

These changes can be seen in Figure 4.54. What you are doing here first is to set the action to play when the W key is pressed. Since the Action Actuator is set to Loop End, the vivification will still play for a few more frames. In order to make Momo keep moving ahead, you need to keep the Motion Actuator active voice until the skeleton played is not the final examination ( 40 ). That way when you release the key, you ensure that the Momo liveliness is in the begin of its liveliness cycle, ready to blend with the idle action .
Logic Brick, Part 1 - keep walking
now all that is left to be done is to play the idle action when Momo is not walking. Add a Nor Controller connected to the Keyboard and the Property and connect it to a new Action Actuator. The Nor Controller will play this actuator only when both sensors are false. The Action Actuator and the final logic bricks can be seen in Figure 4.55. The explanation for the parameters follows .
Logic Brick, Part 2 - idle

  • Playback type : Loop Stop will make the natural process iteration until the Keyboard Sensor is active. It will stop immediately after .
  • Priority : 2 [ maryland ] it has to be higher than the walking Action Actuator. Lower precedence actions have priority over higher ones .
  • Start/End Frame : 1 and 160 [ doctor of medicine ] the range of your animation .
  • Blendin : 11 [ mendelevium ] If the present of the initial frame of reference of the idle vivification is the lapp as the walk, you don ’ t need to blend them ( Blendin = 0 ). otherwise, this parameter will make the transition politic .
  • Continue : false [ doctor of medicine ] ye want the animation to start over from human body 1 every time you stop walking .

The final examination file is on \Book\Chapter4\tutorial_idle_6.idlewalkforward.blend .

How Many Bricks Does It Take to Turn Momo?

Momo can walk and stop. now, if entirely we had a jump, we would be set for a side-scroller platform game ( due to copyright restrictions, you will not see a trope of Momo running after a spinning-spiked porcupine ). For a 3D game, however, you need to be able to freely navigate into the levels. And there is no better manner than allowing the character to turn around .
The simplest way to make Momo turn is by adding new Motion Actuators responding to a raw set of Keyboard Sensors. Let ’ s use the key A to turn left and D to turn right. To make it turn left, follow these instructions :

  1. Add Keyboard detector [ doctor ] key A .
  2. Add Motion actuator with Rot Z 2.5 degrees .
  3. Connect Sensor with Actuator, which creates a newly And control .
  4. Change the original cWalk control from And to Or .
  5. Connect the new detector to this restrainer american samoa good .
  6. Connect the new detector to the Nor restrainer .

now do the same for the properly rotation, and you will have the logic bricks shown in Figure 4.56. You may notice that I ’ m using three States for the controllers here. They are constantly turned on, thus the main function is strictly for organization .
Logic Brick, Part 3 turning
source : Blender Foundation .
The concluding file is on \Book\Chapter4\tutorial_idle_7.turning.blend .

**The Dilemma of the Sweet Miso Soup
once when I was young, my pass slipped while seasoning the miso soup and, brilliantly, I thought it was a dependable idea to compensate for the salt by sweetening it. Guess what, it didn ’ metric ton work ( and yes, I had to eat it all ). The same goes for animation. No one needs to turn right and left the same room. It can be because of a soccer injury, a inadequate leg, you name it. sol sometimes ( not constantly, not now ), you need more control over the turn. For the Yo Frankie project, they had specific animations for each side Momo would be turning. Those subanimations make for both adept transitions between actions and for more aesthetic control. It ’ randomness constantly a matter of compromising between what you can afford to do and what you can ’ metric ton, which is addressed between the technical and aesthetic teams. Thus, even though a programmer may insist it is so, an animation for “ getting up ” is not the lapp as a “ sitting down ” liveliness played backward. For our childlike walk cycle, this will do. Bottomline : a miso soup with sugar is not a break-even [ maryland ] it ’ s bad cook .

Hats Off to Momo and Vice-Versa

Momo is a classy imp, much seen at parties of the animal kingdom ’ mho high society. however, when with his inner traffic circle of friends, Momo is actually a very casual imp [ doctor of medicine ] not much to show, nothing to hide. One character [ maryland ] two quite distinct moments. This is the theme of our animation .
In this tutorial, we will show how to make Momo switch between two kinds of hats : a bounce hat and a hat that fits tight on its head. We will not only use two unlike Blender objects, but besides animate them differently when wear. To make an object external to the armature follow it, we need two things : a cram and a rear empty .
The bone, which can be animated as any other cram, will indicate Momo ’ mho head location and rotation for every frame. The empty, external to the armature, is parented to the bone, and copies the bone transformations automatically during the plot. In this tutorial, this empty, working as a proxy, will be used to place the hat Momo will be wearing .
Start by opening a variation of the latest walk Momo on the book file \Book\Chapter4\tutorial_hat_1.begin.blend .
If you want to carry these changes to your own work charge, you need to append the Hats group into your local anesthetic file. This besides includes the television camera object and an empty where we are running the handwriting to control the hat switch over. You can see the hats in Figure 4.57 .
Hats for Momo
source : Blender Foundation .
This is a childlike tutorial, focusing on illustrating the bone rear proficiency. therefore, most of the components are quick for you to hook up with your file ( for exercise, the scripts ). Let ’ s first set up one of the hats .

  1. Select the armature and go to Edit manner .
  2. Create one bone in the middle of the head named Head.Hat.Steady .
  3. parent the cram to the mind cram .
  4. Change Armature manner to Pose mode .
  5. Go to Object mood and create an empty with the same position/rotation as the Head.Hat.Steady bone. Name the empty Head.PH.Hat.Steady .
  6. With the empty selected, select the cram you just created and make it the rear of the evacuate ( Ctrl+P  Set Parent To  Bone ) .

With those changes, you can already animate the cram Head.Hat.Steady, and the empty placeholder will follow along. The hat will be placed precisely where the empty is. In the current file, both hats are parented to empties/placeholders stopping point to the television camera. In club to animate the hat bones, you need to temporarily bring the hat to the position it will be during the game. For that to work with the Head.Hat.Steady bone, you need to bring the Hat.Cap Blender object to the same position/rotation as the empty placeholder and rear the hat object to it ( select the hat, select the empty, in the Transform panel in the 3D watch, right-mouse cluck in the values to “ Copy To Selected, ” Ctrl+P to parent ). immediately you can go to the armature Edit mode and move the bone to make the hat fit the head by rights. visualize 4.58 shows the arrangement of Bone + Empty + Hat. The stream snapshot can be found in \Book\Chapter4\tutorial_hat_2.capsetup.blend .
Hat + empty placeholder + hat bone
once the bone is in the mighty place, you can go over the walk and the idle animations and do some tweaks on its position/rotation over time. For this hat, you don ’ t need to move much. In our case, we only tilted it a moment in the middle of the idle liveliness to follow the eyebrow lift and some subtle bounce during the walk. When you nowadays run the game, you will see the hat constantly in the veracious place during the animations. To make sure you can follow close, the file with the animize Hat.Cap can be seen in Figure 4.59 and the bible file \Book\Chapter4\tutorial_hat_3.animatedcap.blend .
Momo walking in the game with the cap on his head
then far so good. Let ’ s now set up the second hat. For this one, you will create a fresh bone and a new proxy. The rationality is that you will make a different animation for this hat. The classy top hat will be a bite loose, so it should bounce more during the animations .
begin by moving/rotating the Hat.Cap back to its original proxy by the camera and re-parent it to the empty ( Camera.PH.Hat.Cap ). now repeat the lapp steps you did for the other hat. This time name the bone Head.Hat.Bouncy and the empty Head.PH.Hat.Bouncy. For the animation, make it more overdo, with the hat slipping during the walk and the dead actions. figure 4.60 illustrates one of the moments the hat about fell off. After moving the Hat.Top object back to its original proxy ( Camera.PH.Hat.Top ), your file should be quick for the final adjustments .
Classy top hat is too big for Momo's head

Copy Menu Attributes Add-on
american samoa soon as you start parenting your objects, you will see that it ’ sulfur not so easy to copy over transformations. Blender built-in copy tools work lone on top of the local transformations, and this is not enough when you want to copy the ocular or universe transformations. The deviation is that the ocular transformations ( what you see ) are an accumulate leave from the unlike local transformations of the chain of parents. Blender comes with an addition that allows you to do all sorts of advanced replicate operations. Go to the User Preferences, Add-Ons and enable the Copy Attributes Menu addition. This addition was in the first place intended entirely to bring over the copy menu ( Ctrl+C ) from Blender 2.49. Bassam Kurdali, its original developer and upholder, was kind adequate to expand it to help with this tutorial. Kudos to him. If you don ’ triiodothyronine want to use add-ons, you can go honest-to-god school with Blender 2.49 work-arounds. Duplicate your empty and do a clear Parent  Clear and Keep Transformation in the new empty. now you can use this object to copy the transformations from, delete it, and parent the hat to the original vacate .

nowadays that the animations are done and the armature set up, we can move on to look to the implementation of hats switching on the fly .
Take the concluding file \Book\Chapter4\tutorial_hat_4.animatedhats.blend .
The interaction is elementary : snap on a hat to switch to it ; click anywhere else to bring it second close to the television camera. When you pick a hat, the game engine will have to do as you did to tweak the animations : take the selected hat, move it to the head placeholder put, match their rotations, and rear it to this placeholder .
This is done by a script that is already hooked up for the camera. This Python script is very elementary, and you should be able to understand it after the chapter 7, “ Python Scripting. ” The script accesses the objects [ mendelevium ] hats and empty placeholders [ maryland ] by their names. consequently, for your local changes, it ’ south significant to follow the names as presented here or tweak the script consequently .

Mango Jambo Special Animation

The walk cycle you ’ ve seen so army for the liberation of rwanda is technically correct, and it follows the work flow you can count on, regardless of your animation skills. The bottom line is : with a good method acting and the reason of the techniques, although you may not be brilliant, you can ’ t go wrong either .
immediately, as the icing on the coat, I ’ ve asked the animator Moraes Júnior to do the lapp thing we did together [ doctor of medicine ] a modern walk cycle and idle vivification using the same base file. For reference, he created Momo for the Yo Frankie project and its master animations. After our using and abusing of Momo in the previous pages, it ’ s only fair to see what his “ forefather ” would have done rather. here you can see and study his work and the concluding contribution : \Book\Chapter4\mangojambo.blend

To Learn More

ultimately, dedicate the proper time to mastering the ways of animation. Learning how to make animation work in Blender is silent not the like thing as knowing what to do. here is a number of authoritative materials for learning animation [ doctor of medicine ] modern references for animation and character control condition in games and Blender-specific understand .

  • Drawn to Life by Walt Stanchfield
  • The Animator ’ s Survival__Kit by Richard Williams
  • Cartoon Animation by Preston Blair
  • 3rd Person Action Platformer Hero Animation Graph by Rune Vendler

  • hypertext transfer protocol : //
  • Character Animation DVD by William Reynish
  • Blender 2.5 Character Animation Cookbook by Virgilio Vasconcelos
source :
Category : Finance

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *