|Title||Creating a dancing character|
TUTORIAL AS QUOTED FROM SOURCE
(blend file located at bottom of page)
This is a little tutorial to show to new Blender users, the great character animation capabilities of the 2.40 version.
At the current state, Blender almost reaches the "ideal level" that combines automated tasks of the non-technicians software and the power of the professional ones.
The little animation above was completely ( Armature creation, Vertex Groups, IK constraints, Vertex painting, Pose) made in a short time ( few hours) with no planification, and, without the traditional ( to most of us, most of the time) stress of the animation work. Really!
It was a pleasure to make it, with almost no "pain spots".
Of course, it's a poor quality animation, but for many people it's quite enough.
One can allready express many things with only this "quality level".
Let's start. Add a model to the scene ( or use my Flor model- click in the image above to download it).
It's better to work with a fairly low poly model ( mine have 1477 vertices). We'll add a "Subsurf" Modifier later to smooth the model. If you use a model of yours, place the center at the...center ( Centre New button) and then "clean the mesh" ( Ctrl-A keys). Place the model at the center of the scene.
Add the "Subsurf" Modifier. In the Editing window, F9, press the "Add Modifier" button in the Modifiers panel and choose "Subsurf" in the popup list.
A new block of controls appear.
These little icons let you control the display of the modifier in the 3D window ( useful if you have a low performance system or a heavy charged scene). Place the mouse cursor over each item in the block, a little help ballon will appear with useful information ( for more detailed help, please check the manual at the Blender official web site).
Set "Levels" and "Render Levels" to 1 ( like my tutorial), or maybe 2.
Now, we'll start to "build" our skeleton ( Armature).
Place the cursor at the center, and add an Armature.
A little bone wil appear ( image above) with the "Tip" already selected ( yellow sphere). If you do G key and move the mouse you can deplace it. You can select the other sphere, "Root", all the bone, "Body", and move them too.
Withe the "Tip" selected, do E key to extrude a new bone. Move the mouse upward, click middle mouse button to get Z constrain and when the tip is at the middle of the body click the left mouse button. Repeat these actions three more times ( chest area, neck and head, like in the image above). Rename your bones meaningful; select the desired bone ( or all) enable the Draw Names button in the Armature panel, and in the Armature Bone panel enter the desired name in the "BO:" field.
We have our spine column done.
Here, we'll use one nice new tool of Blender: the "X-Axis Mirror Edit". Enable it in the Armature panel ( image above).
Why? Well, as we'll start to "build" a symmetrical part of the skeleton, arms and legs, with this tool, we only need to make one half skeleton, Blender will do the other one for us.
Select the tip of the chest area bone, do Shift-E keys and move the mouse. Two symmetrical bones appear. Place the tips at the shoulder and click the left mouse button. Now, just do E key to create the rest of the arm and the hand too ( in my tutorial I've one bone for the hand and one for the fingers, of course, to do nice hand animations you must creat a complete hand skeleton).
Do the same steps as before to make the legs; select the root of the lower bone, do Shift-E keys and continue to create the necessary bones. When done, select the "horizontal" bones ( shoulders and pelvis) and delete them, we'll not use them.
Rename the new bones. The old .L and .R naming method is still useful, but now it's more easy to use it.
Select the two upper left arms, rename the left one as "uparm_L" or "uparm.L" or "uparm.left", put the cursor above the name field, do Ctrl-C to copy the name, put the cursor above the right upperarm name field and do Ctrl-V to paste the name.
Now in the 3D window select the right upperarm bone and do W key to flip the extension name. Easy!
Here's the complete Armature setup ( image above).
It's time to "glue" the body ( mesh) with the skeleton ( armature). But...
The old system of Mesh parenting with the Armature and the creation of Vertex Groups it's only available for backward compatibility. The new way of working with 2.40 version is with "Envelopes".
Unfortunately, with the little knowlegde I have about the subject, I couldn't get them to work efficiently. So I'll continue to use the old Vertex Groupx method, but in a new fashion.
But maybe you want to try the new "Envelopes" technique, so I'll explain it a bit.
First thing, no more the need to parent the Mesh to the Armature. It's the job of the new Armature Modifier. So select the model and add one Armature Modifier. In the "OB:" field enter the name of the Armature that will deform the model.
Enable the "Envelopes" button too. Now, select the armature, enter Edit mode and in the Armature panel enable the X-Ray and the Envelope buttons. A grey area surrounding the bones will appear. It's the "influence zone" that will control who's vertices will be deformed by the current selected bone. You can edit the "influence" in two ways: selecting the "Tip", the "Root" or the complete bone and scale them to fit the desired area with S key, or edit the "grey area" only with Alt-S keys. Now, in Pose mode, if you select a bone and rotate it, the mesh should follow.
A way to create Vertex Groups quite fast, is to select the mesh, enter Paint mode, Ctrl-Tab keys, select a bone with right mouse button click and paint a bit over the bone's area. Blender will create a Vertex Group automatically. Do the same with the other bones.
Now, we'll continue with our old fashion Groups method.
You probably know the technique. Select the model then the Armature and do Ctrl-P keys. Popup windows will appear. Choose "Make Parent To" -> "Armature" in the first one and "Create Vertex Groups?" -> "Create from The Closest Bones" in the second one.
Now select the Armature, enter Pose mode, Ctrl-Tab keys, select a bone and rotate it, the "good" mesh zone must follow. Do the same with ALL bones! Quite surely, many wrong deformations will survey.
To correct the problems, select the model, enter Edit mode and in the editing window, in the Links and Materials panel, a Vertex Groups buttons zone appear. Choose a bone with the double arrow button, press the "Select" one, and check in the 3D window, the undesired vertices. Deselect the "good" ones and press the "Remove" button. Repeat these steps for all the ( necessary) bones.
Yes, painfull work.
Check and recheck the model deformation. No errors must remain. Don't skip this step, it's very important.
Now we must control the way that the Armature will move.
The classic Inverse Kinematic method is now very easy to use in Blender. As easy as to select a bone ( whatever ) and press the Automatic IK button in the Armature panel. Now, all the bones that are linked to this bone wil follow the movement. Nice. We can do great things with only this tool.
But Blender have now another easy tool that gives us some more control, the "IK Solver" constraint. Select ( always in Pose mode) one bone that will control the IK chain ( usually the hand or the foot), and in the 3D window do Ctrl-I keys. A popup window will appear with two items: " To new Empty object" ( more powerful?! the official way?!) and "Without target". Choose this one. The bone turns orange, and a doted line appear, showing the lenght of the IK chain ( image above).
Sometimes the lenght of the IK cahin it's not correct, but you can tune it precisely in the "Chain Len:" field. Choose the desired lenght with the arrow little icons ( watch the orange doted line in the 3D window).
Ok, add IK Solvers to the hands, feet, and the head bone too ( to control the spine). For each solver set the "Influence" value to 0.5. This way we canstill rotate each bone in the IK chain ( useful for more precise poses).
More great functions. Blender can now lock bone rotation in the X, Y and Z axis. And Limit it too. There's an example in the image above. You enable the Limit function with the Limit X, Y and Z buttons in the Armature panel ( only available when an IK Sover it's applied to a bones's chain). Then in the "Min:" and the "Max:" fields you set the desired values. Blender will display a nice graphical aid in the 3D window; a grey sphere with a red and a blue axis. Change some values, the sphere will change to show the bone's new allowed movement area defined by the intersection of the two axis ( image above). The bone at his maximal movement amplitude will follow the dark line that surrounds the grey zone.
Now, go ahead, select each bone of the armature and define "movement zones". Z values will control the blue line, X values the red one and the Y ones, the roll of the bone around it's own axis. When used to this it's quite easy and fast to set.
In the image above you can see the complete armature Limits of the Flor model.
Finally the last step ( it was time). The "Weight Paint".
Unfortunately, when animating mesh models, it's almost sure that some deformation problems will occur. Lool at the image above ( 1), please. As you can notice, the elbow area presents some disgracious deformations. The good news is that Blender now have a nice tool to repair this ( well it already have one, but this one is much more useful).
Select the mesh model, do Ctrl-Tab keys to enter Weight Paint mode, place the cursor over the desired bone ( arm) and left mouse click while pressing Shift key. A popup window will appear ( 2), with one or more bones names. Select the desired one, in the Paint panel select the 1/2 button "Weight" button and start to paint near the elbow area ( carefuly, don't paint over other bones) until the zone near the elbow becames green ( 3).
Now select the other bone ( uparm) and repeat the previous steps, you'll notice that the mesh will deform in real time ( 4). Magic ( 5)!
You can do this each time you notice mesh deformation problems ( but take care, this can damage the mesh modelling and it's hard to recover).
Finally, it's time to animate our model. It's quite simple. Place the frame counter at 1 and select the armature, enter Pose mode, Ctrl-Tab keys, select all bones, press I key and in the popup window choose the "LocRot item". Check the Action window, there's now a little yellow dots column ( keys).
Now, change the frame number location to 20 ( very important, do this before each bone manipulation) with Up and Forward Arrow keys, select one of the IK Solvers, let's say the hand, and move it a little. Again select all bones, and insert LocRot keys. It's done! Your first character animation. Congratulations!
To watch it, return the "player" to 1 ( Down and Reward Arrow keys) and do Alt-A keys to play the aination in the 3D window ( check in the Anim panel the Sta: and End: values, they must be at least 1 to 20).
While in Pose mode if you set the "Ghost" value to at least 1 or higher in the Armature panel, Blender will draw the different interpolations of the armature ( image above).
There's many ways to animate a model. With this tutorial I've tried to show one, that was quite easy and fast to set. Of course, it's a limited way, but with practice, you'll start to develop your own, more sophisticated ways. I hope so. Here's the .b file of the animation.