So, now that we've a character, let's animate it!!
But, how to do it?
Have you ever heard of Soft Bodies, Skinning, Armatures, Skeletons, Weight
Deformation, Forward and Inverse Kinematics, etc, etc, etc.....
I guess not, specially if you're new to computer animation particularities.
The 3D world is the kingdom of barbarisms.
Please, if you want to go deep in those concepts ( useful) do a search in
the Web for documentation.
The important thing here is that we'll control the character's body with
a skeleton composed of bones, almost like in real life!
First thing to do, and very important, we must "clean" the mesh.
Select the model and do Ctrl-A to apply size/rotation
to the mesh, or, in other words, set the size/rotation values of the mesh,
to her "starting points".
If you want to scale the model ( for ex: to match an existing environement),
do it acordingly to your needs, and redo Ctrl-A.
Now in side view place the cursor as in the image above and add an
Armature ( our first bones of the skeleton).
I'll not explain the basics of
Armatures, please, practice a bit, "outside" the tutorial.
Anyway, it's quite simple to make a skeleton. When you choose
Armature in the menu, the first bone will appear at the cursor's
location, a new one will start at
LMB
click, and so on, until you press
Esc
key.
The bones created this way, are automatically linked.
Check the image above.In Side view, I've made four bones in a row in one
time:
"root>pelvis>spine>spinehigh". Check the grey
buttons in the image above at low right side, they're allready linked to
her parent, "child of".
Names are important too, so don't forget to rename your bones with meaningful
names.
We'll continue to make our skeleton. As we've stoped our first bones construction,
we must restart somewhere. Place the
cursor at the end of the last bone ( select the little yellow sphere
- tip- at bone's end with
LMB
or Area selection, B
key, and do
Shift-S
to snap the
cursor
to the bone's sphere).
When done, press E key to Extrude bone segments ( automatically linked too)
or add a new armature ( that you must link manually later), all these operations
in Edit mode, Tab key, of course.
Add two more bones, "neck" and "head".
It's time to parent the eyes and eyelids to the
Armature
( don't forget to apply
Ctrl-A
to those meshes too, before).
When the
Make Parent menu
appear, choose the
Use Bone item, and in the bones list choose the "head"
one.
One leg, now ( as for the character body mesh, we'll only make a half-skeleton
and then copy and mirror it).
In Side
and in Front
view, place the cursor like in the image above ( near the hip area).
Select
the previous made
Armature, enter
Edit mode, and add
4
bones in side view ( use the image as a guide, but the knee
must be slightly bend forward ).
An useful tip: when you rename simetrical bones ( like the arm, for ex.)
apply the standard rule - "nameofthebone.L" or" .R",
for left or right bones, this way, you can use some nice tools later.
To make the arm, same method as above, but now in
Front
view add only
3
bones and place them more or less like in the image above.
A painful task: the hand bones. Here i've choosed to make a complete
hand setup ( hands are very expressive).
If not necessary, avoid this kind of skeleton setup, cause it'll slow your
computer.
Make one complete finger ( with names), select and copy it four times, this
way you only need to make some minor adjustements ( joint placement, bones
renaming).
When a complete side of the armature is finished, it's time to duplicate
it.
Place the cursor at the center of the Armature, press the Target icon in
the Icons bar, or "dot" key, to center the action around the cursor,
enter Edit mode, Select all the simmetrical bones ( arm, hand, leg and foot
) Copy and Mirror them.
Now, for the next task, we must have a thankfully thought to the
Blender coders, that, with the new
2.27 Blender
version, gave us the "auto-skinning" function . Blessed
people!!
They save us lots of time of painfull work.
Let's use it! Select the model and them the
armature, do
Ctrl-P, choose
"Armature"
in the
"Make Parent"
menu, and finally choose
"Create From the Closest Bones" item,
in the
"Create Vertex Groups?"
menu.
Wow! All the vertex groups ( normally, one for each bone ) are automatically
created, named and assigned.
Great function!! Does it work ?? Let's verify!
Now, that the model is parented to the skeleton, the bones must control
the character mesh.
Select the Armature, enter
Pose mode,
Ctrl-Tab, the
Armature
turns blue, and select one bone, let's say, the uparm ( with
RMB click over it).
Now, press
R
to
rotate the bone. The arm mesh must follow the bone, like in the image
above top, but, unfortunatelly, there's some troubles ( notice the distortion
problem in the hand area).
The
Auto-skinning
function works quite well, but, has it's limits. When different bones
are too near, same vertices are assigned to diferent bones and this may
trouble the animation.
But this problem only needs some tweekings to be solved.
Select
your mesh, enter
Edit mode, and in the
Edit window, in
the Vertex
Groups
area, press the little square button ( 1), and choose the "uparm.L"
group, for ex.
Then, press the
Select
button (
2). All the vertices belonging to this group will be selected ( yellow
dots. Look at the image above down).
The ones inside the red area are "good" but those inside the blue
area are not. So, to solve this problem,
deselect
the "good" vertices,
and then press the
Remove
button ( 3). The selected vertices will be retired from the "uparm.L"
group.
Check all the groups, normally each vertex must be assigned to only one
bone ( unless you know what you're doing), and
ALL
the vertices must be assigned to bones.
The next task,
Bone's Weight deformation, it's more a matter of taste or perfectionism.
It's a function that controls how the bones will control the "skin"
mesh deformation.
It's a quite precise and methodic task.
Attention, you can easily screw your previous work ( and mesh). Save frequently,
with a different file name, this way you can return to a previous state
of your work.
When Blender creates a Group ( ex: "uparm.L", 2 in the image above),
he automatically assign a Weight of 1.000 to it, maximum value, 0 being
the minimum.
Select
your character's mesh and press the
Bone
little icon (
1) in the
Icons Bar, to enter
Weight Paint mode.
The mesh turns to a deep flat blue colour.
We can only watch/work one group at a time.
Select the "uparm.L" group ( 2). It becames bright red ( 3) ,
this "tell" us that the all group's vertices have the 1.000 weight
value.
Red means "full" for the weight action, Dark Blue is "no
action" at all.
The Weigh Paint tool works with colours ( and with the Vertex paint tools,
so it's better to bring a little Vertex Paint buttons window to the interface).
Her'e an example ( image above, 1) where "Wheight deformation"
could be useful.
As you can notice, the arm joint presents some troubles when bended.
To solve the problem enter Weight Paint mode and select the "uparm.L"
group in the Edit window ( 2). Set the "Weight:" button value
around 0.500, and in the Paint window choose a little brush "Size"
with an "Opacity" aroun 0.500 too.
Now carefully "paint" the elbow area until she became light green.
Then Select the "arm.L" group and redo the same action. Be very
careful when "painting", don't go out of the group's area ( 3,
red circles) or you'll have troubles when animating the model. If this happens,
"repaint" the problem area with a "Weight:" value of
0, until the zone became dark blue again.
If you can't start to Weigh Paint the mesh, press the Face Select mode icon
twice ( this have worked for me)?!
As you can see in the image above ( 4) there's no more disgracious zones
in the model.