Final Product What You'll Be Creating
In our latest Blender tutorial from Karan Shah, you’ll learn how to generate a character rig using Blender’s Rigify add-on, and how to skin the character using weight painting for precise control over mesh deformation. Finally Karan will walk you through the process of creating an animation walk cycle using keyframing and the dopesheet.
Open a new file and import the base model (File > Import). You can use any other biped model as well. With the model selected, press Alt+G to clear its location, so that it’s placed at the center. Make sure the center of the model (orange dot) is at the bottom of the mesh. If not, Press TAB to get into edit mode and select all vertices with the A key and then Press G and move the vertices up, so that the center point is at the base of the mesh. Press TAB to get out of edit mode.
Next we will enable the Rigify add-on. In the File menu select User Preferences.
Select the Add-on Tab and in the search box type Rigify and check the
tick box to enable it. You may press the "Save as default" button, so that Blender remembers the setting. You can now close the User Preferences Window.
Make sure the 3D cursor is at the center point (bottom) of the mesh. If not, then select the object and press Shift+C and then select cursor to selected. Press Shift+A and select Armature, and now you will notice that there is a new item called Human Meta-Rig. Click on it and you will have a Human Rig.
With the Human Rig selected, go to the Armature Properties and in the Display Panel, check X-Ray. This will enable us to see the armature through the mesh.
With the Meta-Rig selected, press TAB to enter into edit mode. Scale the rig to match the mesh. Press . (period) to make the 3D cursor the pivot point for rotation and scale, and then Scale the bones. Press , (comma) to make the Median Point the center of rotations / scale.
Press T to bring out the Tool Shelf and in the Armature Options, check "X axis mirror". This way any editing done on one side will be mirrored to the other.
Select and move the bone tips to match the mesh.
Check from the Top view as well.
Adjust the leg bones
Match the bones from the side view. Make sure to keep the knee bone a bit bent forward, i.e.
don’t make the leg bones in a straight line. Once done, Save the file.
Press TAB to get out of edit mode. In the Armature Properties, under Rigify buttons, click on Generate to build the Rig.
After a few seconds the new Rig setup is generated.
Now we don’t need the previous meta-rig, so move it to another layer. Select the meta-rig and press M and then select the layer in which you want to dump that meta-rig.
Now we will skin the mesh to the Armature. Select the Mesh first, and then the Generated Rig and press Ctrl+P and select Automatic weight. The mesh is now skinned to the new Armature Setup.
Press Ctrl+Tab or switch to Pose mode and play with the controllers.
You can find the deforming bones in the third to last Bone layer (see image). SHIFT+Left click to select it along with other layers. Shift+Left click again to make the bones under this layer invisible.
Make sure you are in Pose mode. Now select the Mesh object and Press Ctrl+Tab to enter into weight paint mode. Select the bones you would like to adjust the weight for by Right-clicking. Press T to bring out the tool shelf and under the Options panel, check X Mirror. This will mirror the weight painting for the left/right bones.
You can adjust the weight amount with the slider in the Tool Shelf. You can also adjust the other brush settings.
Select the bones and adjust the weight. Do this for any bone you find if the deformation is wrong. To rotate and move, use the controller bones and to adjust the weight paint, select the deforming bones. Check the weight painting for all major bones including the fingers. Painting with a higher weight value means that the vertices will be affected more with the movement of the bone. Similarly painting with a lower value means vertices with be less affected by the bone. Save the file.
Press Ctrl+TAB to exit Weight painting mode. Select the Armature and then Hold Shift+Left Mouse Button on the deforming bones layer to hide them.
In Pose mode, select any leg control. Press N to open up the properties shelf. In the Rig Main Properties, Slide up the FK/IK to full. This will enable IK controls for the legs. Do that same for the other leg too.
You can also toggle on/off the display of the bones layers with the shortcut on the Rig Layer Panel. Hide the bones you are not using. See my settings for an example. You can also
turn off X-ray. We can now start animating.
Step 15 – Animation
In the Screen Layout Menu, choose Animation. These are presets made for different layouts, best suited for a particular task.
You will see that the screen has an extra window for the Dope sheet (Top Left). This is where we can see and manipulate the keyframes. In the Dopesheet window, choose Action Editor Mode. Dope sheet mode will show the keyframes of all objects and Armature bones, where as the Action editor shows keyframes of a particular action of the armature.
Click on the Record Button. This will automatically add keyframe to the selected object whenever it is Moved, Rotated or Scaled.
Move the mouse over the 3D view and press 3 on the numpad to get into the side view. Make sure you are in Ortho view mode and not in Perspective. Press 5 on the numpad to toggle off/on perspective view. Also make sure you are at the First Frame. Press Shift+Left Arrow to get to the first frame. Select the Left Foot bone controller and move it forward. You will notice that a keyframe is automatically created in the Dopesheet/ Action Editor at the first frame mark.
Achieve the following pose at the first frame. To move a bone, select it and then press G, and R to rotate. To move the whole torso, use the Torso bone.
Now pose the arms. The arms swing oppose to the legs. i.e. if right legs is forwards, then left hand will be forward. Remember we are still at frame 1.
Twist the hip bone with the flow of the legs.
Rotate the shoulders with the flow of arms. The shoulder and hips will rotate opposite to each other. We have completed the First Keyframe for the walkcycle.
Select the head and in the Bone Properties, Uncheck “Inherit Rotation”. This will prevent the head from inheriting the rotation from the lower bones. Move the torso or chest and you will get the idea.
Press A to select all bones. Although the keyframes are added to the bones which are changed, you can also add a key frame to all bones. Select all the bones with the A key and then Press I and select LocRot.
Click on the Copy Pose button on the header of the 3D view.
Drag the Timeline marker to frame number 21. You can see all the places in the image, where you can see the current frame number. You can also Press Shift+Up arrow to jump 10 frames at a time. Save the file.
On the 21st frame click on the Last button – Flip Paste. This will flip-paste or invert-paste the pose we copied, and will also insert the keyframes to the selected bones (all). Go to first frame (shift+Left arrow) and then press the play button to preview the animation. The keyboard shortcut to play the animation is Alt+A. To stop, press the Stop button or Alt+A again.
Go to frame 11. Pull up the torso, move the foot up. In short, have a pose similar to the one in the image. Now go to frame 1 and press play or press Alt+A to preview the animation. We now have a half step completed.
Now go to frame 11 where we have a keyframe. Select all bones with the A key and click on the Copy pose button.
Drag the timeline to frame 31 and click on the flip-paste button, as we want the pose to be inverted.
Now the cycle will end with the pose the same as the first pose, so we will copy that from frame one and then paste as is on frame 41. So go to frame one and select all the bones and copy the pose and paste it on frame 41. OR you can select the 1st keyframe in the dopesheet summery, and the press Shift+D to make a duplicate. Go to frame 41 and Left-click to confirm its position.
Press Play and preview the complete walk cycle.
To preview the animation in a loop, Type ’40′ in the End frame limit box. We are having the last keyframe on frame number 41, and this one is the same as the First frame. So in order to see a perfect loop, we will end the cycle at the 40th frame. So that it will go to frame one right after frame 40.
Now we will tweak the motion just a little bit in between the main key frames. Go to frame 4 and rotate the foot so that it rests completely on the ground. Also pull down the main torso bone a bit. Do the same for the other foot and torso on frame 24. You can copy and Flip-Paste the pose from frame 4.
To make it walk faster, you can move the key frames closer to each other. Alternatively, go to frame 1, with the timeline on frame 1, in the dopesheet editor. Press A to select all keyframes. Press S to Scale, move the mouse towards the left and then Left-click to confirm. I have reduced the walk cycle from 41 to 28 frames, and so the End Frame to preview the animation is 27. The walk cycle is now ready for export. Of course you can add more details.
In the Dopesheet editor, You can name this action as Walk, or anything you like. Drag the header of the dopesheet window, with the middle mouse button if you don’t see the name box. And finally Save the file.
- Building A Basic Low Poly Character Rig In Blender
- Creating A Low Poly Ninja Game Character Using Blender
- Rigging A Voodoo Doll Character In Maya Using Setup Machine & Face Machine
- Building A Complete Human Facial Rig In Maya – Tuts+ Premium
- Building A Complete Human Character Rig In Maya – Tuts+ Premium