rigging a Spider
By Gabriel gabio beloin.
some basic thoughts before we start
We are going todo Rig a real-looking Spider. The best bien todo start is todo get some real footage of our goal first.
* todo look like a usual Spider having 8 legs.
* the body is made of 2 rounds parts.
* the head has 2 mandibles.
* the whole thing is symmetrical.
We Will build a Rig for this Little thing. During this process its important todo kep in mind that our goal is todo build something easy todo use and that can give god looking animations without todo much work. Its important todo think about that, because you may well be the one who Will use this rig. It must be simple todo use yet give a lot of possibilities.
building a Rig just for him
Now have a look at the blend file (included w/ this issue of blenderart). There is a Spider i modelled for the purpose of this tutorial. We Will use it as an example.
Start by adding an armature todo the scene. Ad >> armature. Now you are in edit- Mode, editing the new armature you just added. There is a bone where the cursor is. Select all of the bone by rightclicking on the middle of it (the body). This Will select both the root and the tip of the bone. You can then move it around.
The bone is made of the root which is the lower ball, the body is the octahedron, the tip is the upper ball, move and rotate this bone around so its in the head of the Spider, the centre of the character:
This bone Will have a name, we Will call it head. To name a bone, go in editbutton [f9] there youll se some panels useful todo us.
What we are looking for is in the armature Bones panel. If the head bone is selected, youll se ha bunch of buttons under selected Bones. There the bo: field Will let you change the name of this bone from bone todo head.
To se the result in the 3dview, toggle the draw name button on. Its in the armature panel.
we Will continúe todo add Bones then.
In side-view[3numpad] select the root of the head and extrude a new bone with [e]. Now you have two Bones and each of the rots are at the same spot. Name it abdomen. Make it a child of the head by going in the armature Bones panel with the abdomen bone selected, clicking on the drop down on the right of child of and selecting head.
Its already time todo start todo think about the Hierarchy of your Rig (example on right side).
You can parent a bone todo another one. This means the child bone Will do what ever the parent does. This gives you the ability todo build solid rigs. If for example you move the body, all the legs Will follow. Its important todo know what Will depend on what. A general bien of building a Rig is todo start with a máster bone. This bone Will be the parent of all the others. This is important in case you want todo move everything, you Will only ned todo move this bone. This máster bone is generally named root. Add a new bone while in editmode (add >> bone), name it root and put it somewhere away from the character (at the bottom is a god place).
You can parent the head todo the root, but there is a faster way. Select the head bone, then the root bone so root is active, then do [Control-p] and select kep offset. Connected is another type of relationship. Its básically a parent-child relation, but the root of the child Will follow the tip of the parent. This Will let you create Chains of Bones like the Bones in your arm. If you raise your arm, the rest a los follows, doesnt ití.
So we now have something looking like this:
We Will now Rig the 8 legs. Dont worry, there is a bien todo do just half the job. Since the Spider is symmetrical, its posible todo tell Blender todo Rig the other half while we do our part. Go into the editbutton panel and toggle x-axis mirror edit. Go into side view [3numpad] select abdomen and duplicate it using [shift-d]. This Will give you an other bone with the same parent as abdomen, head. Move it todo one of the left legs so its placed where a leg is plugged todo the body and the tip is in the middle of the first Joint. Rename it todo leg. L:
Make sure the bone is in the middle of the leg in side view todo. Now using [shift-d], duplicate this bone for the other 3 legs. Do not touch the right side.
Now, for Blender todo mirror our moves on the x-axis, there must be 2 Bones following the name convention. The name convention Will let Blender know what is the left part and what is the right part of a rig. The names must end with. L.l.left. Left or. R.r. Right, right. If there is number After (like name. L.001), its not a problem. So if you have a bone on the left named leg. L and a bone on the right named leg. R, Blender Will mirror our move for the matching Bones.
For this todo work we Will copy the 4 Bones we did and give them proper names. Select the 4 legs Bones and duplicate them. Move the duplication away, it doesnt matter where. Press [w] and select flip left-right names. This Will change the names from leg. L todo leg. R. Re-select the 4 original Bones (. L) and move them a Little. The 4 new Bones Will get the mirrored position. Nice isnt ití (image below).
Now you can start extruding all the Bones on the left todo fill the legs. There are 4 more Bones neded by each leg, make sure the Bones are in the middle of the geometry by looking in side-view and top view. Each Joint should be where the geometry is more narrow. The names are automátically generated and are ok. As you go, youll notice Blender Will copy your moves and build the other side of the armature with you.
When done, recalc the rotation of all Bones todo be sure they are facing up. To do so, select all the Bones and do [Control-n]. The result should start todo look quite complex, se the image below.
the armature modifier
When your are done with that, we can start looking todo deform the Mesh using the armature. To do so, exit editmode with [tab] and select the Spider. Go into the editbutton [f9] and look for the modifier panel.
In the blend file there is already a modifier, the Subsurf. Press the add modifier button and select armature in the list. Lok for the ob: field and type in armature, which is the name of the armature object.
Now when you select the Rig and go in pose-mode [Control-tab], moving a bone should move something of the Spider. But in general its going todo be far from perfecto. This is where we start tweak envelopes. Go bak into the editbutton, in the armature panel, there Will be a envelope toggle. Turning it on Will let you se and tweak those envelopes. Basically they define an área for each bone where the geometry Will follow the bone. Changing the área todo better match what we want is done by selecting a bone and scaling the zone with [alt-s]. Its a los posible todo tweak envelopes in editmode of the armature (by pressing [tab]) and there is generally more options, like scaling the tip or root ball. At first the envelopes look like this:
Tweaquíng the zone todo touch all the geometry yet blending each zone into each other nicely is hard. Its posible todo visualise the result of scaling the zone in pose-mode: move a bone, if there is some vértices not following, scale the zone a bit until you se the vértices move where they should be with the rest of the gang.
Some Bones like the head and abdomen Will not be feasible using the envelope option, so we Will ned todo do it by hand. Just scale it todo 0, so we dont use the envelope for this bone. There are 2 ways for moving vértices: envelope and vertex groups.
When you are done with the legs. We Will make sure the head and abdomen work. For this select the Spider and go into editmode. Go into the editbutton and look for the enlace and materiales panel.
There you can add a group by pressing the new button. Name it head, the same name as the bone. Blender Will naturally match those two and Will use this vertex group when you move the head bone around. Select all the geometry in the head like this: press the assing button. Thats it. The weight.
Number is the weight youll give todo this group when assigning. For now a constant weight of 1 everywhere is enough. Do the same for the abdomen:
Test it by moving the armature around, all parts of the Spider should follow. In case it doesnt, assing the missing vértices todo the proper group.
automate some tedious tasks: constraints
Now it would be posible todo kep it this bien but it would be rather long todo animate each bone of each leg. Let add some magic todo the pieces.
We Will add a IK Solver todo all of the legs. This Will let us animate a complete leg by moving just one bone. Select the armature and go in editmode. Select the tip of all the last Bones of each leg, go in top view and extrude a new bone from them. With all of the new Bones selected, press [alt-p] >> clear parent. Then re-parent all Bones by selecting one of the new Bones, then select the root bone and pressing [Control-p]. You Will have todo re-parent each bone one by one, sadly it doesnt work when there is more than two Bones selected.
Just before adding IK Solvers all over the place, its Wise todo put all other idéntical constraints and copy them all around. Its a time saver. We Will add a flor.
Constraint todo one of the newly extruded Bones, then copy this constraint all over the place because its idéntical (all constraints target the same bone [the flor bone]). Then we Will be able todo add each IK Solver one by one, as they each have a unique target. Doing it in the wrong order would screw it all up, since copying constraints erase all the constraints that were already there. So always create and copy simple constraints (such as the flor constraint), then add special constraint (such as IK Solvers) one by one After ward.
To do so. Add a new bone by going in side view and duplicating the root bone, place it flat on the Ground as if it was the Ground. This new bone Will not be parented todo anything, and its better like that. Name it flor and go in pose-mode. Go into the editbuttons and press the add constraint button -> flor. It should look like this:
Tell Blender that the ob: todo use as target is armature a new field Will appear, bo: enter the name of the bone you want todo use as flor, here we made the bone flor.
Time todo copy this todo all the newly extruded Bones. Select them all and selecting the one you added the flor constraint todo last. Do [Control-c] in 3dview -> constraint. Tada.
One last thing, with all the newly extruded Bones selected, go into the editbutton -> armature Bones panel and toggle all deform buttons of (one for each bone). Do the same for the root bone and the abdomen bone, since they Will not move any vértices at all.
Now the IK Solver. Go into pose-mode [Control-tab]. Select one of the new Bones you just extruded then the last bone from the leg you extruded the new bone from and press [Control-i] -> todo selected bone. This Will add an IK Solver constraint todo the legs last bone targeting the new bone you just extruded. If you try todo move the target now, you Will notice the entire body is moving and the orange dotted line go todo the root bone. This is because the IK Solver goes up in the Hierarchy until it finds the top. To limit this, you can use the chainlen: number button. Its located in editbutton -> constraints panel in the IK Solver block.
Setting it todo 5 should point todo the root of the first bone of the leg. repeat for each leg.
The result should let you postura this Little Spider in an easier way. You only ned todo move one of the IK targets todo move a leg. you can a los move the head and all the legs Will move accordingly. Its posible todo raise the flor or move the root. According todo this, we can hide all the useless Bones. Select all Bones you dont ned when animating and press [h] the result should be like this:
Climbing a wall.
Attacking.
Annoyed by some thing.
Ho he is dead.
Note: chek out the blend files at blenderart website for this tutorial. One of them contains pre-made posturas like the ones at left.
Gabriel beloin (gabio) is from sherbroke, Canadá. He is now working as an network administrator. Gabriel used Blender for 3 years, since versión 2.26.
Active in Many comunities such as elysiun, zologique and CGtalk, he a los take part of the Blender development process as Python coder and beta tester.
Source: www.blenderart.org and Blender art magazine.
.