In the previous part of the Panda3D series you downloaded the slug model. Today we’ll be rigging it, so adding armature that we can then use to animate the model.
Anyway, open the slug.blend file in Blender.
Table of Contents
Adding the Armature
Go to top view, solid shading, object mode. We don’t need the background image anymore, so let’s just hide it by clicking on the little eye icon (A) in the Outliner. Now, we want to add an armature. The bones should start in the tail part of the slug and be extruded toward its head. As you know, whenever you add anything in Blender, it appears at the location of the 3D cursor, so we have to place the cursor on the tail. To do it, hold down Shift and right-click on the tail part of the slug (B). Now the cursor is there:
Now we can add the armature. Go to front view (Num 1) and hit Shift + A. Select Armature:
This will add the first bone at the location of the 3D cursor:
Now go to edit mode. The first thing we want to do is scale the bone. You can select either an end of the bone (A) or the whole bone (B):
Click on the middle part of the bone to select it all and hit S 0.15 to resize it:
Next hit G Z and move the bone just below the 3D cursor:
The problem is that you can’t see the lower end of the bone. So, go to the Object Data tab (A) and under Viewport Display check the In Front box (B). Now you will always see the bone in front of the mesh (C):
Extruding Bones
We will now be extruding bones. Select the upper end of the bone (A). To better see the segments of the slug, switch to wireframe shading (B):
Now hit G and move the end of the bone to the end of the last segment of the slug body:
Now we are ready to extrude the bones. To do that, just hit E and move the end of the new bone to the end of the following segment. Repeat these steps until you get one bone for each segment:
Now go to top view (Num 7) and extrude two more bones:
Now we have to add bones for the tentacle. We can do it for just one tentacle and then mirror the bones for the other one. So, let’s say we’ll rig the right tentacle first (which is the one at the bottom in top view). Let’s start by placing the 3D cursor at the base of the tentacle. To do it hold down Shift at right-click where you want the cursor to be:
You are now still in edit mode. If you now hit Shift + A, a new bone will be added:
Go to front view (Num 1):
As before, the bone is way too big. This time we’re not going to scale it, but rather just move the end of the bone (the one high above the slug model in front view) down (G Z):
Now we must position the bone. Go to right view (Num 3):
Click on the middle part of the bone to select it all and move the bone slightly down (G Z) so that the lower end is in the middle of the tentacle:
Three bones in the tentacle will do. Toggle off the Show X-Ray button for better visibility. Select the upper end of the bone and move it to the end of the second segment of the tentacle:
Now go to top view (Num 7). You will probably see something like this:
Just move the end of the bone to the end of the second segment:
Extrude two more bones, each two segments long:
Now go to right view (Num 3) and make sure they are aligned like this:
They should be, but if they aren’t just align them.
Naming the Bones
Each time we add a new bone, it gets a name like Bone, Bone.001, Bone.002 and so on. The names are not important for us, except for the bones in the tentacles. As we will be mirroring the bones for the other tentacle, we can use a naming convention for them. So, go to top view (Num 7), select the first bone in the tentacle, the one at its base (A) and go to the Bone tab (B). Find the name of the bone and rename it ‘Tentacle1.R’ (C). The last part of the name (.R) stands for RIGHT:
If you use this naming convention, the bones in the left tentacle will automatically get the same names, only differing in the last part of their names being ‘.L’ (for LEFT).
Now, select the other two bones in the tentacle one by one and rename them ‘Tentacle2.R’ and ‘Tentacle3.R’:
Pose Mode
Now you can switch to solid shading. You will still see the bones in front of the mesh:
Bones are parented to one another. To see how it works, we must switch to pose mode. This is another mode, besides object mode and edit mode, that we can use when working with bones. To do that, just select Pose Mode from the drop-down menu (A). Select one of the bones (B), hit R and rotate it. You will see that all the bones to the right of the selected one will move along (C). This is because each bone is parented to its predecessor.
Now select another bone and rotate it:
Again, the bone was rotated along with all its children. Now, in order to reset all the rotations, hit A to select all the bones in pose mode and then hit Alt + R:
As you could see in the examples above, the bones of the tentacle didn’t move along. This is because they are not parented to the body bones. So, let’s fix it.
Go to edit mode. Select the first tentacle bone (A) and then the body bone you want to parent it to (B). By the color you can tell that the bone selected last is the active one:
Now, to parent the tentacle bone hit Ctrl + P and then select Keep Offset:
Now you can see a dotted line connecting the two bones, meaning that they are in a parent-child relationship:
Let’s go back to pose mode and check it out. If you now select one of the body bones (A) and rotate it, the tentacle bones will move along (B):
Hit Ctrl + Z to undo the last rotation and deselect all.
Mirroring Bones
Now it’s time to mirror the bones. The mirroring is on the X axis, so we must rotate the slug model and the armature accordingly. Go to object mode, top view (Num 7) and select just the slug (but not the armature). We want to rotate around the slug’s origin point. First, let’s move the 3D cursor to that point. To do that hit Shift + S and select Cursor to Selected:
Now the 3D cursor is at the slug’s origin point (A) and we can rotate around it. If you hit on the Pivot Point drop-down, you will see that Median Point is selected (B). If we leave it as is, the rotation will be around a median point between the origin points of the selected objects. But we want to rotate around the 3D cursor, so select this option (C) in the drop-down menu:
Now the icon in the Pivot Point drop-down has changed (A). We’re good to go. With the slug still selected, select the armature (B) and hit R 90 to rotate the two:
The objects have been rotated, which you can see if you hit N and open the sidebar (A). To keep things clear, let’s apply the rotation. Go to the Object menu and under Apply select Rotation (B):
Now we can finally mirror the tentacle bones so that the other tentacle is also rigged.
Select just the armature and go to edit mode, top view. Select just the three tentacle bones that we want to mirror:
Now go to front view (Num 1). In the sidebar go to the Tool tab (A) and check the X-Axis Mirror checkbox (B) under Options:
Now in the Armature menu select Symmetrize:
This will duplicate the selected bones and mirror them on the X axis:
Thanks to the naming convention we used before, the new bones have the same names as the ones in the other tentacle, but with the suffix ‘.L’. Go ahead and select one of the new bones (A) and check out its name (B):
Now you can set the Pivot Point back to Median Point:
So, our model is fully rigged. In the next part we’ll be talking about inverse kinematics, which we’re going to use to make the animations even easier.