Advertisement
  1. 3D & Motion Graphics
  2. Blender
Cgi

How to Rig a 2D Character in Blender for Cutout Animation or Explainer Videos: Part 2

by
Difficulty:IntermediateLength:LongLanguages:
Final product image
What You'll Be Creating

Creating the Texture Map

Step 1

Ensure the original character texture image don't have the mouth and eyes, as they will be a part of a separate texture map, which will then be animated and controlled separately.

Delete facial expressions
Delete facial expressions

Step 2

Create a new square image, with various mouth shapes and eye variations. Place them all in equal grids. Set the background and the grid lines in separate layers so that they can be easily turned off to export transparent png. 

The grid can be of any shape but the whole image should be square in proportion. For mouth shapes arrange them in groups of expressions , for example smile, laugh, crying and so forth. And phonemes such as a, aa, o, ee, f, v, m b, l.

Mouth and eyes expression library
Creating mouth and eyes expression library

Face Object and Texture Setup

Step 1

In Blender, open the file in which you made the character. Secondary-click on the character object to select it and press Tab on the keyboard to enter edit mode. 

Ensure you're in front view. Press 1 on the numpad to get into front view.

Editing the mesh
Editing the mesh

Step 2

Press Shift-A and add a plane. In the bottom part of the toolshelf, tick the Align to View checkbox so that it face the viewer.

Adding a new plane
Adding a new plane

Step 3

Move the new plane forward to bring it in front of the face.

Placing the plane in front
Placing the plane in front

Step 4

You'll notice that the plane appears to be circular. This is because the subsurf modifier was already applied to the character. 

Hold Shift and secondary-click on all vertices of the plane. Press Shift-E and type 1. The edges of the plane will become sharp and will be marked in purple. 

With the plane selected, press S on the keyboard to scale the plane according to the size and shape of the mouth.

Reshaping the plane
Reshaping the plane

Step 5

With the mouth plane selected, press Shift-D to make a duplicate for the eyes. Move and place it appropriately. Use G key to move.  Press S and then X key to scale along the X-axis.

Duplicating the plane for eyes
Duplicating the plane for eyes

Step 6

Split the 3D view into two. Click on the window type button and select UV/Image Editor.

Open UV Editor
Open UV Editor

In the 3D view port, select both planes you just created for eyes and mouth. Hold Shift and then right click on the vertex to multiple select. Make sure no other vertex is selected. Press U key to bring the UV Mapping menu. Select Unwrap.

Unwraping the new planes
Unwraping the new planes

Step 7

In the UV Editor, click on the Open button and browse for the mouth/eye shape image. 

I've turned on the grid and background layer in the 2D program while exporting as I need the grid as reference to align the UVs of the planes.

Open the expression sheet as texture
Open the expression sheet as texture

Step 8

In the UV Editor, select the unwrapped vertices of the mouth plane. Scale it down and place it on the first box. This will be the default expression.

Rearranging the UVs
Rearranging the UVs

Step 9

Similarly do the same for the eyes. Select the vertices and scale it down and place it over the first grid.

Rearranging the UVs
Rearranging the UVs

Step 10

Now in a 2D program, turn off the background and grid layer. Export it on overwrite the png file. In the UV Editor press Alt-R to refresh the image or you can re-open the image.

Exporting library as transparent png image
Exporting library as transparent png image

The texture now has transparent background and it blends seamlessly with the character.

Preview the expression in 3D view
Preview the expression in 3D view

Setting Up the Material

Step 1

With the two planes selected, click on the materials button in the properties window. Press the + button to add another material slot.

Adding new material
Adding new material

Click on the New button to add another material. Rename the material face or feature or anything else you want. 

In the Shading panel, tick the Shadeless checkbox. Turn on the Transparency and reduce the Alpha to 0.0.

Material settings
Material settings

Step 2

Click on the texture button on the Properties window. Click on the New button.

Adding new texture
Adding new texture

Step 3

In the Image panel, press Open button and browse for the transparent mouth texture image. Tick the Use Alpha checkbox. In the Influence panel, tick Alpha checkbox.

Texture settings
Texture settings

Parenting to the Bone

Step 1

With the planes selected, click on the Vertex Data button in the properties window. In the Vertex Groups panel, click on Head and then click the Assign button. The planes will now follow the head bone along with other vertices of the head vertex group.

Assigning vertex groups to facial features
Assigning vertex groups to facial features

You can test it by right clicking on the armature object. Pres Ctrl-Tab to enter pose mode if you are not in pose mode. Right click on the head bone and press R to rotate it. Press Alt-R to reset the rotation.

Testing the head bone
Testing the head bone

Creating Reference object and Control Bones

Step 1

Right click on the character object and press Tab to enter edit mode. In the Vertex Groups panel, click on the + button to add a new group. Rename it eyes.

Creating new vertex group for eyes
Creating new vertex group for eyes

Press A to deselect all vertices. Now select only the vertices of the eye plane. 

Click on the Eyes and click the Assign button to assign the selected vertices to the Eyes vertex group.

Assigning vertices to vertex group
Assigning vertices to vertex group

Step 2

Next, click on the + button the in Vertex Group panel to add another group. Rename it Mouth.

Creating new vertex group for mouth
Creating new vertex group for mouth

Select the vertices of the mouth. In the Vertex Groups panel, click on the Mouth and click on the Assign button. This will assign the selected vertices to the Mouth vertex group.

Assigning mouth plane to mouth vertex group
Assigning mouth plane to mouth vertex group

Step 3

Press Tab to exit edit mode. You need to have a reference image and bones setup to control facial animation. First click on the File menu and select User Preferences.

Open User preferences
Open User preferences

Click on Add-ons tab. Type image in the search box and tick the Import as Planes checkbox to enable the add on. 

Close the User Preference window.

Addon settings
Addon settings

Step 4

In the 3D view, press Shift-A to bring out the Add menu. Click on Mesh > Images as Planes.

Importing image as planes
Importing image as planes

Browse for the image you exported with grid and background layer turned on. While importing, in the Material Settings panel. Tick the Shadeless checkbox.

Import settings
Import settings

Step 5

Secondary-click to select the plane and press Tab to enter edit mode. Ensure you're in front view; press 1 on numpad to get into front view. 

Select all vertices by pressing A key. Press R and then X and then type 90 to rotate the plane 90 degrees on the X axis so that it faces the viewer. Press Enter. Don't resize the plane.

Editing the geometry
Editing the geometry

Step 6

Press A to deselect all vertices. Secondary-click on the corner point to select it. Press Shift-D to make a copy. Move the mouse and place the point in the middle of the first grid. Click to confirm. This will be helpful while snapping the bone to the centre of the grid.

Adding new vertex
Adding new vertex

Duplicate and place more vertices on the center of each grid.

Editing the geometry
Editing the geometry

Step 7

Secondary-click on the first vertex which is at the centre of the first grid. Press Shift-S to bring out the snap menu and select Cursor to Selected. This will bring the 3D cursor to the selected vertex.

Placing the cursor
Placing the cursor

Step 8

Press Tab on the keyboard to exit edit mode. Press Shift-A and add an Armature.

Adding new armature object
Adding new armature object

Step 9

Secondary-click to select the bone and then press Tab to enter edit mode. Select the tip of the bone and move it down. 

You can use either G key or the arrow manipulators to move the selection.

Editing the bone
Editing the bone

Step 10

Press Shift-A again to add another bone at the same point. Move the tip down a bit but it should a bit bigger than the previous bone. Press Z key to toggle on wireframe view.

Adding another bone
Adding another bone

Step 11

Press B and drag select both bones. Press Shift-D to make a duplicate set and move them down at the center of eye grid. You may turn on snapping by clicking on the magnet button in the header. select vertex in snapping mode.

Duplicating the bones
Duplicating the bones

Step 12

Press Shift-A and add another bone. Place it on either side of the image. This will be the parent bone.

Adding a new parent bone
Adding a new parent bone

Step 13

Press A to deselect any selected bone. Right click on the first bone to select it. Click on the Bone button in the Properties window and rename it mouth-base.

Renaming the bones
Renaming the bones

Secondary-click on the second bone and rename it Mouth-Control

Renaming the bones
Renaming the bones

Similarly rename the other two bones as eye-base and bigger one as eye-control. Rename the last bone as main or parent.

Renaming all bones
Renaming all bones

Step 14

Press A to deselect any selected bone. Hold Shift and then right click on the mouth and eye bones and then the main bone at last. Press Ctrl-P to make it parent bone. In the menu select Keep Offset.

Making the main bone parent
Making the main bone parent

Step 15

Press A to deselect the bones. Select only the smaller bones, i.e. mouth-base and eye-base bones. Press M to move them to another layer. 

Click on the second layer in the Change Bone layer popup. I'm moving them away as they are not supposed to be moved or touched.

Moving base bones to another layer
Moving base bones to another layer

Step 16

With the object selected, click on the Object button in the Properties window and rename it to Armature-Face.

Renaming the object
Renaming the object

Step 17

Press Ctrl-Tab to enter pose mode. Secondary-click on the main bone to select it. 

Secondary-click on the reference plane. Hold Shift and right click on the main bone to select it. Press Ctrl-P and in the Set Parent To popup, select Bone. The reference plane is now rigged to the main bone.

Linking the plane to the bone
Linking the plane to the bone

Setting up Bone Controls with UV Warp Modifier

Step 1

Secondary-click on the Character object to select it. Click on the modifiers button in the properties window. 

Click Add Modifier button and select UV Warp.

Adding UV Warp modifier to character object
Adding UV Warp modifier to character object

Step 2

In the UVWarp modifier panel,

  • set the From object to Armature-Face and From Bone to Mouth-Control
  • Set To object to Armature-Face and Bone to mouth-base
  • In the Vertex Group select Mouth

This means that when the Mouth Control bone is moved in relation with the mouth-base bone, the texture map will also move and warp, and it will affect only the vertices assigned to Mouth vertex group that is the mouth plane.

Modifier settings
Modifier settings

Step 3

When you will move the mouth-control bone in pose mode, you will see that the texture map is also warping but only in the mouth plane. 

Split the 3D view into two. Zoom in to the reference object in one view.

Testing the modifier by moving the bone
Testing the modifier by moving the bone

Step 4

Select the character object. In the modifiers panel, add another UV Warp modifier. This will be for the eyes.

Adding another UV Warp modifier
Adding another UV Warp modifier

Step 5

Set From object to Armature-Face and Bone to eye-control. Set the To object to Armature-Face and Bone to eye-base. In the Vertex Group select eyes.

UV Warp modifier settings
UV Warp modifier settings

Move the eye-control bone and see the texture moving and warping.

Testing the modifier by moving the bone
Testing the modifier by moving the bone

Pose Library

Step 1

In the pose mode, select all bone with A key and press Alt-R and then Alt-G to reset the location and rotation of the bones.

Reset the location and rotation of all bones
Reset the location and rotation of all bones

Step 2

Click on the Armature button in the properties window. In the Pose Library panel press the New button.

Add new pose library
Add new pose library

Step 3

Secondary-click on the mouth-controller bone to select it. In the Pose Library panel, press the + button to add a new pose.

Adding new pose
Adding new pose

Rename the pose Smile.

Renaming the pose
Renaming the pose

Step 4

Move the mouth-controller bone to center of the next grid. You can turn on the snapping option so that the bone will snap to the vertex you created in the middle of the grid. 

Press Shift-L to add a new pose. In the pop up menu click Add New.

Adding another pose
Adding another pose

In the Pose Library panel, rename the new pose Sad or frown.

Renaming the pose
Renaming the pose

Step 5

Similarly add all pose and rename according to the image.

Creating pose library for mouth bone
Creating pose library for mouth bone

Step 6

Select the eye-controller bone. press Shift-L and add a new pose.

Add new pose for eye bone
Add new pose for eye bone

In the Pose Library, rename the pose Eye-Normal.

Renaming the pose
Renaming the pose

Step 7

Just like the mouth, create library of poses for the eyes and rename them according the the expression.

Creating pose library for eye bone
Creating pose library for eye bone

Step 8

The setup is now ready. Whenever you want to see a pose in action or insert into keyframe, just left click on that pose in the Pose Library panel, and click on the button with magnifying glass. 

Now you don't need to move the controller bone each time while animating.

Previewing a pose
Previewing a pose

Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.