Sunday, May 6, 2012

Facial Rig


Introduction

Facial rigs are a way to give your character’s face more life. There are multiple ways to design a facial rig, from blend shapes to CV curves. I decided upon a joint structure facial rig, as joints are something I am accustomed to and have worked with before, so I know how they function.

Pre-rig

We will start by doing the same process as with any joint rig: creating clusters. Clusters, as stated before, are used as guidelines for our joints. For a facial rig, I will not be turning my model to wireframe only, for all the joints will be on the front of the face.
                
To begin, We will start with the bottom lip of the mouth. We will create a cluster in the middle of the lip, one on the far right side of the lip, and one in between the middle and far clusters. Repeat this process for the upper lip.

Next, we will create clusters for the cheek. The difficulty of this process can range from easy to hard, depending on your model. If your model has a good cheek definition, then this process will be fairly simple. For my model, the cheek line starts slightly right and above the end of the nose and makes an arc down to the mouth. You should place a cluster at each vertex along that path. My model gave me between 5 and 6 clusters on that path.

For the eyes, we create one for the bottom and one for the upper eyelid. We will then do the same process with the cheek line with the eyebrow line, a cluster at each vertex the eyebrow should be. I had, between 5 and 6 clusters again.

The pre-rig work is now complete.



Joints

We will now switch our model off, make sure our file tabs are set to “Animation,” and go to Skeleton > Joint Tool to start creating our bones.

We will start with the cheek clusters this time, as they are the only joint chain (initially) in the face rig. Starting from the top, hold down “v” and snap joints to the clusters.

We will do the same for the outer clusters of the lips, starting with the half way cluster and moving to the far cluster. This should produce one bone for the upper lip and one bone for the bottom lip.

For the next set of joints, we want all of them to be separate except two. Starting with the lower eyelid: hold “v,” create joint, press “Enter,” and then press “g” (“g” will give you the last tool you used, and in our case that is the joint). Repeat this process for the entire eyebrow and center of both upper and lower lips.

One half of your rig should be complete.



We will now mirror all the joints, except for the two center lip joints. To do this, go to Skeleton > Mirror Joints > Options Box. In the options box, make sure you are mirror across the right planes.

You should now have a full face rig. Before we move on, we will also attach the four outer lip joint chains to the center joints of the lips.



Handles/Constraints

For the handles, I decided to use something different than the normal CV Circles. I will be using poly spheres to visually represent my face.

Begin by creating a sphere by going to Create > Polygon Primitives > Sphere. We want the sphere to be a little bit bigger than the size of our joints. We will be creating a sphere at every joint, so we use the same process as with the clusters and the joints by holding down “v” and snapping the spheres to the joints.



I suggest moving your facial rig a little distance in front of your model so that you will be able to see the changes without the interference of the handles. We will now freeze all the spheres by going to Modify > Freeze Transformations. Like in the basic rig, freeze transformations will make it easier to revert back to the neutral pose.

We will now Parent Constrain all the joints to their respective spheres. Select the sphere and then the joint and go to Constrain > Parent > Options Box. In the options box, make sure maintain offset is selected and click “Apply.” You should now be able to translate and rotate your rig through the spheres.

Weight Painting

Weight painting for a facial rig can become very tedious when trying to get the perfect facial constructions.

To start with, we will bring up the paint weights tool by right-clicking our model and selecting “Paint Skin Weights Tool.” This should turn our model black (representing no influence) and white in certain areas (representing influence). In the paint weights menu, set value to 0, select each face joint separately, and click “Flood.” This will drain all the influence from the face rig and allow us to create our own influences.

For most of the joints, influence will be centered on the joint area. We do not want the face rig to influence a lot of our body.

The exception is the center joint on the bottom lip and the two far outside joints of the upper lip.

For the center joint on the bottom lip, we will set the value back to 1, and paint the entire lower jaw white. This joint will allow our character to speak, so we need the bottom to jaw to move.



For the outside joints on the upper lip, we want our character to be able to smile or grin. We will a good portion of the respective sides, as well as some of the lower jaw.



Our face rig is now complete. 

Dynamic Tail


Introduction

A dynamic tail is a special rig that moves freely during animation, with no need to animate it. This rig can also be used with hair.

Pre-rig

We start this rig like our basic setup, placing clusters in the area of our tail. They will be used as guides for our joints.

We will also be making a curve that follows the cluster path. Go to Create  > CV Curve Tool and draw a curve following the clusters.



Joints

We now hide the mesh and place joints at each cluster holding down “v.”



Hair Dynamics

We will now make our curve dynamic. We start by switching our file tabs to “Dynamics.” From there we select our curve and go to Hair > Make Selected Curves Dynamic. This will duplicated the curve and make the new one dynamic (the one we want).

We will now switch the file tabs back to “Animation” and a special IK Spline Handle. Go to Skeleton > IK Spline Handle Tool > Options Box. We will disable the Auto Create Curve box because we want to select our own dynamic one. Now select the first joint, then the last joint, and finally the dynamic curve (in our Outliner under hairSystemOutputCurves group).

You will end up with a IK Handle running through the joint chain with the dynamic curve as the base.



We now need to select the dynamic curve and open its Attribute Editor. In here we need to go to the follicleShape tab and switch “Point Lock” to “Base.” This will give our curve one base point and allow the other end to flow freely.

Now parent the joint chain and the hairSystemFollicles group to a joint in the main skeleton and it the play button. The tail should flow freely.



Basic Skeleton

 Introduction

This is a guide to build a basic bipedal skeleton for your 3D models. I will cover how to setup your character before you rig, how to build the skeleton of your character, how to create handles to move your character, and how to paint your skin weights on your character.

Pre-rig

To start, we will switch our model to wireframe only. To do this, look to the top of your view window and select the see-thru 3D box.



Next we will setup clusters. Clusters will not be part of the main rig, but will act as a guide for where we place our joints.

To begin, turn your model into vertices and find the hip of your character. Select two vertices, one in front of the model and one in back of the model and relatively in the same height. Next, make sure your files tabs are set to “Animation” and go Create Deformers > Cluster. This should create a “C” in the middle of your model. Repeat this process for the spine, the left arm, and the left leg. The spine should have about six clusters. The arm should have a cluster for the shoulder, the elbow, the wrist, the palm, and three clusters for each finger. The leg should have a cluster at the hip, the knee, the ankle, the base, and the toe. You should have something that resembles a stick figure.



 Joints

The pre-rig work is done and now we can focus on creating the actual skeleton. To start, add your model to a layer and turn that layer off . Go to Skeleton > Joint Tool, hold down “v” (snaps your joints to vertices aka the clusters you made), and slowly click on each cluster on your spine. Hit “Enter” and your spine his created. Repeat this process for your arm clusters and leg clusters.



Now that half of your skeleton is created, select the arm joint chain and Skeleton > Mirror Joint (Options Box if necessary). Repeat that process for the leg joint chain. Now we have a full skeleton and need to combine the arms and legs to the spine. To do this, go to Window > Outliner and middle mouse drag the leg joint chains onto the hip joint and arm joint chains onto the middle spine joint.



Now that we have a full skeleton, we can get rid of the clusters. Go to Edit > Delete All by Type > History.

Handles/Constraints

With a full skeleton, we need a way to control the skeleton. We achieve this through handles, which we create with Nurbs Circle. Go to Create > NURBS Primitives > Circle or click on the Curves tab and select the circle.

Create a circle big enough to fit outside  your model so you can select it later on. Now hold down “v” and move the circle until it is in the center of the hip joint. Repeat this process for all the joints  in the upper half of your model (we will worry about the legs in the next part).  Now select all your handles and go to Modify > Freeze Transformations. This sets all handle values to zero, making it easier to reset all controls while animating.

Now that we have created the handles, we need to constrain the joints to the handles. There are five basic constraints:
·         Point
·         Aim
·         Orient
·         Scale
·         Parent
There are only two contraints we care about: Orient and Parent.

Let’s begin with the hip handle. First select the handle and then shift/command select the hip joint. Next go to Constrain > Parent > Options Box. Make sure maintain offset and click “Add.”  A Parent Constraint allows you to translate and rotate your skeleton. Repeat the same process for the rest of your handles but go to Constrain > Orient > Options Box this time. An Orient Constraint allows you to only rotate your skeleton, making it ideal for the spine and arms. You should now be able to move your handles and your skeleton will move.

Now that the upper body is complete, we will build handles for the lower half. We will only need two handles, one for each foot. We will now use an IK Handle to move the legs. IK Handles allows you to move a joint chain from the bottom of the chain to the top.  Go to Skeleton > IK Handle. Select the top joint of the leg (secondary hip joint) and now select the ankle joint of the same leg. Your skeleton should now be an orange color and have a line running through the chain.



We now constrain the leg to the handles. We repeat the same process from the upper body, but instead of selecting the joint we will select the IK Handle. We will also use a Parent Constraint to constrain the joints to the handles.

We now have a fully operational rig.



Weight Painting

Now that we have a fully functional rig, we need to attach it to the model. Before we do, let’s do some organizing. Select your entire skeleton, and add it to a new layer. Do the same for your handles. This will allow you to turn them off if you want.

We now select the skeleton and then select the mesh, Go to Skin > Bind Skin > Smooth Bind > Options Box. Inside this options box are a variety of features, we are only concerned with two: Skinning Method and Max Influences (Fig. 9).

When it comes to Skinning Method, I usually use Dual Quaterrion. It gives the model a nice flex when you rotate it to a certain point. You could also use Classic Linear, but it does not add that flex.

When it comes to Max Influences, we really only want our vertices to be controlled by three joints, so I set the influences down to three.

We can now click “Bind Skin.” Test out your character and see how he moves.

When you moved your character, the mesh deformed in areas you did not want it to move. Luckily this can be fixed by a process called Weight Painting. There is two ways of painting skin weights, but I will only be discussing one: Paint Skin Weights Tool.

Paint Skin Weights Tool allows use to paint the influences on our model. To access this, right-click your model and select “Paint Skin Weights Tool.” Your model will now turn almost entirely black except for some white and grey coloring around the hip.



The white area is the area influenced by the main hip joint. So if you rotate your hip control that is the area that will deform. We can switch between the joints, as well as set the value of influence (0 to 1, 0 being nothing and black, 1 being influenced and white) in the tool settings that appears when you select “Paint Skin Weights Tool."

With this tool, we can weight the skin on our model to move properly with the skeleton.