Skip to content
Home » Panda3D Part 17 – Rigging the Slug

Panda3D Part 17 – Rigging the Slug

Spread the love

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.

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:

armature

Now we can add the armature. Go to front view (Num 1) and hit Shift + A. Select Armature:

armature

This will add the first bone at the location of the 3D cursor:

armature

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):

armature

Click on the middle part of the bone to select it all and hit S 0.15 to resize it:

armature

Next hit G Z and move the bone just below the 3D cursor:

armature

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):

armature

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):

Extruding Bones

Now hit G and move the end of the bone to the end of the last segment of the slug body:

Extruding Bones

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:

Extruding Bones

Now go to top view (Num 7) and extrude two more bones:

Extruding 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:

Extruding Bones

You are now still in edit mode. If you now hit Shift + A, a new bone will be added:

Extruding Bones

Go to front view (Num 1):

Extruding Bones

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):

Extruding Bones

Now we must position the bone. Go to right view (Num 3):

Extruding Bones

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:

Extruding Bones

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:

Extruding Bones

Now go to top view (Num 7). You will probably see something like this:

Extruding Bones

Just move the end of the bone to the end of the second segment:

Extruding Bones

Extrude two more bones, each two segments long:

Extruding Bones

Now go to right view (Num 3) and make sure they are aligned like this:

Extruding Bones

They should be, but if they aren’t just align them.

Your Panda3D Magazine

Make Awesome Games and Other 3D Apps

with Panda3D and Blender using Python.

Cool stuff, easy to follow articles.

Get the magazine here (PDF).

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:

Naming the Bones

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’:

Naming the Bones

Python Jumpstart Course

Learn the basics of Python, including OOP.

with lots of exercises, easy to follow

The course is available on Udemy.

Pose Mode

Now you can switch to solid shading. You will still see the bones in front of the mesh:

Pose Mode

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.

Pose Mode

Now select another bone and rotate it:

Pose Mode

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:

Pose Mode

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:

Pose Mode

Now, to parent the tentacle bone hit Ctrl + P and then select Keep Offset:

Pose Mode

Now you can see a dotted line connecting the two bones, meaning that they are in a parent-child relationship:

Pose Mode

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):

Pose Mode

Hit Ctrl + Z to undo the last rotation and deselect all.

Blender Jumpstart Course

Learn the basics of 3D modeling in Blender.

step-by-step, easy to follow, visually rich

The course is available on Udemy and on Skillshare.

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:

Mirroring Bones

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:

Mirroring Bones

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:

Mirroring Bones

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):

Mirroring Bones

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:

Mirroring Bones

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:

Mirroring Bones

Now in the Armature menu select Symmetrize:

Mirroring Bones

This will duplicate the selected bones and mirror them on the X axis:

Mirroring Bones

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):

Mirroring Bones

Now you can set the Pivot Point back to Median Point:

Mirroring Bones

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.


Spread the love

Leave a Reply