Monday, September 30, 2013

How to Animate Shape Keys (in Blender 2.68)

Shape keys can be used in Blender to create facial expressions and movements in order to animate a 3D character talking, smiling, laughing, showing anger, etc. It is best to begin practicing before animating your final character using the pre-made monkey head.

They can be found under the Object Data tab denoted by an upside down triangle, under the subheading "Shape Keys." Make sure to keep a base key for the original face, and make a keyframe of the base key at the start of the animation timeline!

You can form different shape keys in edit mode by simply having the shape key highlighted in object mode and making sure that all the other shape key sliders are at 0. The vertices can be manipulated to create different emotions and forming different sounds with the mouth in order to appear as though the character is speaking. Remember to always set your shape keys to 0 when they are not in use!

New shape keys should be created for every new shape the mouth must make to form each sound in a phrase. For example, the word "balloon" should ideally have five shape keys to make the sounds of "b," "a," "ll," "oo," and "n."

Shape keys can be made into keyframes in a similar way to objects under the template "Animation" at the top of the screen. The dopesheet summary will list all the shape keys you have created, and you can move the slider at each frame for each face you wish your character to make at each moment. This will take listening to the sounds over and over and over again and may involve deleting keyframes entirely or moving them to a different frame by right-clicking on the keyframes in the dopesheet and using "e" to move them.

Voices and sounds can be imported into Blender by changing the template to "Video Editing," and choosing the option "Add>Sound" in the toolbar at the bottom of the image sequencing timeline. Make doubly sure that the sound and animation begin at the first frame, and repeatedly listen to the sound to check that the animations and sounds align. Additionally, you may want to leave a few extra neutral frames (possibly even up to a couple seconds) after the animation has ended, to avoid abrupt endings or cut-offs.

In rendering, it is always best to render pngs of each frame and join them together in image sequencing afterwards. To add sound to the png sequence, simply have both the sound and the sequence in the video sequence editing box, and change the settings of the rendering (preferably to Dimensions>HDTV 1080p, or another preferred dimension, choosing a new location for output, Output>Quicktime if you have a Mac, and changing the settings in Output>Sound to ACC, or whatever sound file you want to use). Then just click Render>Animation and watch as the pngs are joined together with your added sound.

And now you can make your character talk!

~Rhiannon Enright

My Shape Key Monkey Animation

Sunday, September 22, 2013

How to Rig a Mesh (of a Hand) in Blender 2.68

You rig a mesh in Blender by deforming it either with armatures of with vertex keys. I will only discuss the technique using armatures.

The first step, obviously, is to create a mesh. Extrude or subdivide the section that you want to bend (the joint). For the finger, extrude and scale the mesh three times (to create four lines) for the joint.

Place the cursor at the bottom of the mesh you just made, and add an armature (single bone). In Edit Mode, use g to grab the top of the bone and resize it, positioning the top at the middle of the joint. Press e to extrude another bone out of the top of the last one, and make it extend to the end of the mesh.

Next, in Normal Mode, click the MESH first, then shift-click the armature, and press ctrl-p to make the armature a parent for the child mesh.  Select "armature deform" and "with automatic weights" for now. (You can now ctrl-d and move and resize the duplicated things to create multiple fingers, and possibly use a UV sphere to create a palm. Make sure to use ctrl-j to join all the meshes together. RENAME THE NEW BONES.) You can also set X-Ray to on and Names to see the names of each bone and through the mesh.

You can move the bone in Pose Mode to test it. *Use alt-r to reset the bone to its original position*

You probably see issues with the mesh deforming in a random way while moving some of the bones. This is because Automatic Weights has much difficulty choosing which vertices to connect to the bone. This can be fixed in Edit Mode by using the assign and remove buttons to (surprise, surprise) assign and remove different vertices to the highlighted bone. Continue to work with this until the bone moves (slightly) realistically.

To move the finger as a whole instead of posing each individual bone (an exhausting process), use Inverse Kinematics (IK) and Constraints. Select the bone, go to "Bone Constraints" and set "IK Constraint." Change the Chain Length setting to the amount of connected bones you want to move together, and mess with some of the other settings if you're an experienced Blender user. If not, these settings are fine for what you are attempting.

You can now use keyframes to manipulate the bones and make a simple hand animation. Congratulations!

~ Rhiannon Enright

Link to the Video of My Animation