Category Archives: Rigging Studio 1

IK arm with weighted constraint twist control

Arm IK with weighted constraint twist control
deleteForearm
This IK arm is an alternate method for setting up a partial twist on the forearm when the wrist rotates in X.

Firstly we need to do these steps so that the local orientation of the controller matches the local orientation of the joints –
V – Snap the controller box to the world origin.
Freeze transforms.
Group it to itself, call it buffer.
Select the wrist joint.
Select the buffer.
Parent constraint – no maintain – it should snap up into position.
Delete the constraint – now the local orientation axis is matching whilst retaining zero rotations on the controller, only the buffer retains the garbage values.

Apply an RP solver from shoulder to forearm. We use RP rather than SC so that we can point the elbow independently.
Grab the PIVOT of the end effector and snap it to the wrist, the solver will still calculate to the forearm but we have move the goal to the wrist. This stops the forearm from snapping.

Apply the pole vector constraint from the IK handle to the elbow control.

Point constrain the IK handle to the hand control.
Orient constrain the wrist joint to the hand control.

Select the hand control, then the forearm JOINT.
Orient constraint but ONLY IN X.
Select the elbow joint, then the forearm joint.
Orient constrain but ONLY IN X.

Now we have 2 orient constraints for the forearm joint. Set the weights at .6 for the hand control and .4 for the elbow.

Now we have a weighted forearm twist, if you parent a box to the forearm you will see that it partially twists when the hand is twisted.
IKwithTwist

Advertisements

FK Spine using blended weight constraints

Here is the starting point for this setup, 11 spine joints and 3 spine controllers.
Spine Control 1 is snapped to spine joint 1 (freeze transforms)
Spine Control 2 is snapped to spine joint 6 (freeze transforms)
Spine Control 3 is snapped to spine joint 11 (freeze transforms)-
FK_spine_Start
We need to make sure the local orientation axis for the spine controllers matches the local orientation axis for the joints. The joints are oriented to standard local space with x pointing up the bone to the next joint in the chain. Because of how the controllers were created we currently have an unwanted ‘garbage’ rotation value of 90 degrees in Z when the rotation axis matches that of the joints.
junkValues
We need to keep the actual orientation of the curve like this but have the Z value zeroed out so we need to use a buffer group. These are the steps for matching local orientation and keeping the values on the curve at zero.
set the z value back to 0, the curve will rotate 90 degrees.
make sure the curve is snapped to joint 1 and freeze transforms
group the curve to itself
snap the pivot of the group to joint 1
rename the group ‘spine_Control_1_Buffer’
select joint 1, then control select the spine_Control_1_Buffer group (make sure you have selected the group, not the curve – helps to use the outliner panel)
apply a parent constraint (no maintain offset)
• now, the group buffer inherits the rotation value but the curve itself has NO GARBAGE VALUES – all rotation values are at zero and it is oriented correctly
delete the parent constraintit has served its purpose!
Essentially what we have done is to force the buffer to inherit the rotation values, so that the curve can stay inside its protected universe. The buffer group itself will not ever be animated so it does not matter that it has non-zero rotations.

Rather than repeat that process for the next 2 controllers, I like to just duplicate the ‘spine_Control_1_Buffer’ group.
Duplicate spine_Control_1_Buffer
snap it up the the middle joint (joint 6)
rename it ‘spine_Control_2_Buffer’
rename the curve inside the group to ‘fk_spine_Control_2′
open the freeze transformations options
just select transforms, this gets rid of the translate Y values but does not freeze out the rotation- if we do this the orientation axis will flip again! Freeze transforms.
repeat the above steps for the 3rd controller, this time snapping to the final joint 11 (rename group to ‘spine_Control_3_Buffer’  and the curve to ‘fk_spine_Control_3’

Now the controllers are all ready to go, we need to set up the weighted constraints. Here are the steps for setting up the constraints. It can be confusing to explain but basically we will set up a system where there are numerous orient constraints from the controllers to the joints with the weighting for each constraint having a reducing influence as it is further away in distance. Here is a diagram showing how to set up the weight for each constraint-
weightingDiagram
Apply all the orient constraints first, then for each joint set up the weightings in the channel box according to the diagram, so for instance for joint 7 set the weighting for controller 2 to .8 and the weighting for controller 3 to .2
weightingChannels
Once all the weights are entered, this completes the setup. As with most FK rig setups, the controllers will only be used for rotations, not translates while in FK mode.

Rigging- Leg IK with reverse foot tutorial

The following is a tutorial that explains the character rigging process for an IK leg with reverse foot setup. Among other things, this rig can be used for character walk cycles.

This leg rig will be part of a full ‘broken hierarchy’ rig and more parts will be added in future posts –
• Step 1 – Joint Creation – 
First, I create all the joints that I need for the rig. In this case, I have created a set of locators which will aid with the joint placement.
 Most importantly, we need to be aware of joint orientation. It is vitally important to understand how orientation effects the operation of the rig. The default in maya and the mostly common approach is to use local orientation  with x as the primary axis. Most automated rigging solutions follow this convention so its best to stick to defaults of x pointing down the bone.
Leaving ‘orient joint to world’ unchecked could be referred to as choosing ‘local orientation’.
So stick with the default of x as the primary axis
jointOrientation
So we use the joint tool at the default settings and start placing our joints. In this case, I am going to start with a basic hip chain. Then I will create a chain for the leg and parent it to the hip which will be the root for the entire hierarchy.
So I create a joint for the hip, then a second joint down toward the crotch. Note the hierarchy in the outliner.
rootJoint
Now I create a new joint chain for the left leg starting at the hip, then knee, ankle, ball and toe.
legJoints
Now I parent the hip joint (at the top of the leg chain) to the root bind joint to add it to the hierarchy. A new bone is automatically drawn to show the connection-
parentLeg
Personally, I like to add this entire joint chain to a ‘leg joints layer’ now so that we can template it out of the way later.

• Step 2 – Reverse foot – we are now going to create a joint chain called the ‘reverse foot’. The reverse foot chain will not be used for skin binding. It is a dummy system created to reverse the hierarchy of the foot and give snapping points for the IK handles.
I want the joints to operate in world space i.e normal world orientations where y is up, x is left and right and z is depth. Since they are not real joints and are not part of the hierarchy system that the geometry is bound to, we can keep it in world space which will simplify the control system.
orientToWorld
I lay down 5 joints but note the order of the hierarchy, this is the whole key to the reverse foot setup, the order of the joint hierarchy flows from the heel to the toe, then comes back in the inverse direction and picks up the ball – place the joints according to the illustration below – numbered 1 through to 5.  Note the area I circled in the outliner to point out where the hierarchical flow is reversed. I have also turned on the local joint rotations to illustrate that they are in world space, not local.
reverse
Now I I grab this joint chain and place it on its own layer called ‘inv_Layer’. Again this will be handy later when we need to template it out of the way.
• Step 3 – Inverse Kinematic Setup
We have now created all the joints for the left leg. It is time to add the IK. The first thing we need to do before adding the leg IK is to set preferred angle.
It is especially important in this case because the leg has been built completely straight with no Z rotation in the knee. The IK needs to make a decision on which way to bend the knee and so far has no information to base that on.
Select the knee joint and rotate y in the direction of the knee bend. Then right click on the knee bind joint and select set preferred angle. Best to enter local rotation mode before doing this.
IKdefault
We want to change the solver setting to RP or rotate plane. This will give us a pole vector or in other words, control over what the knee points at
ChangeToRP
Using the above settings, click the hip joint and then the ankle joint. We will always name our IK after the joint that they finish at, so name it ‘ik_L_Ankle’.
Note where I have circled- you can change the type of solver after the fact in the attribute editor if you need to.
makeRPsolve
Now change the IK setting back to the default of SC solver. This stands for single chain- we are only spanning two joints with the next 2 solvers so there is no need for a rotation plane.
Create one handle from the ankle to ball joint, hit Y to re-invoke the tool then make another handle from ball to toe. Remember to name them after the joint they finish at –
3IKs
Now we parent the IK handles to individual joints in the reverse foot-
Parent the Ankle IK to the Ankle joint
Parent the Ball IK to the Ball joint
Parent the Toe IK to the Toe joint-
IK_parenting
Now the heel joint can control foot lift and rotation, the toe joint can control heel lift pivoting at the toe and the ball joint can control rotations pivoting at the ball.
• Step 4 – Duplicating for the right side
There are two options for recreating all this for the right leg. One option is to mirror the joint chains across. Just note that because it involves joint orientations and IK it can be problematic and buggy. If you do decide to mirror the left leg joint chain to the right, I find its best to do it before parenting the leg to the hip bind or adding the IK. Select the root joint in the chain -(i.e the hip joint in the case of the leg) and use the ‘mirror joint’ tool. In this case, mirror across the YZ axis. It will mirror the whole chain. Also, stick with the default of ‘behaviour’ rather than orientation. This will make life easier for the animator as the rig will operate in a consistent across the symmetry and animation can be copied from one side to the other with predictable results.
If you have used a consistent naming convention, you can search and replace names, for instance swapping ‘L’ for ‘R’ so that you don’t need to spend time renaming joints.

The second option is to repeat all the above steps (apart from the initial hip bind joint creation) for the right leg. It doesn’t take long once you get the hang of it and it is another chance to practice – you probably need it!

• Step 5 – Control system

Build a foot control roughly in the shape of a foot. Make sure to freeze transformations when it is ready. Snap the pivot to the ankle joint.
footController
Select the foot controller, then the main joint in the reverse foot chain and apply a parent constraint. No need to ‘maintain offset’ as they share a pivot point and are both operating in world space.
This foot control now controls the root joint of the reverse setup which in turn controls the ankle IK, so this will control translates of the foot.
Now, if we used this to control rotations, we would always pivot at the ankle which would be useless when trying to complete a walk cycle. So we will build some individual controllers for rotations that pivot at the ball, the heel and also at the toe.

Create an arrow shaped controller, snap it to the back of the foot control. Dupe it and snap it the front of the foot control. Dupe it again and place it above the ball joint.
Freeze the transformations on all three – this gets rid of the ‘garbage values’ sets everything to zero an puts orientations to world which, if you remember, matches the orientation of the reverse foot joint chain. So they are all ready to work together nicely.
Snap the pivot for the heel control to the heel joint.
Snap the pivot for the toe control to the toe joint.
Snap the pivot for the ball control to the ball joint.

This is what it should look like-
heel_toe_ball_controls
Now to connect the rotations of the controllers to the joint rotations. We are dealing with direct connections here i.e if we rotate the heel control 90 degrees in x, we want the heel joint to rotate 90 degrees. When this is the case, rather than constraints, we can use the connection editor.
Open the connection editor, load the Heel control on the output side, load the heel joint on the input side –
connect rotate X to rotate x
connect rotate y to rotate y
connect rotate z to rotate z
the rotate values in the channel box for the joint turn yellow to show that the are being controlled.
conectionEd_rotations
Repeat this process for the toe control and the ball control.

Now we need to create a hierarchical system whereby the controllers will move with the rig. This is simple, we need to follow the hierarchy of the rig itself.
My summary of this logic –
when the heel JOINT is rotated, it affects the toe and ball because of the hierarchy, so when the heel CONTROLLER moves, it makes sense that we want the toe and ball CONTROLLERS to move.
when the toe JOINT is rotated, it affects just the ball because of the hierarchy, so when the toe CONTROLLER moves, it makes sense that we want the ball CONTROL to move.
when the ball JOINT is rotated, it affects just itself because it is last in the hierarchy, so when the heel CONTROLLER moves, it doesn’t need to move either of the other CONTROLLERS.
So –
Parent the heel control to the foot control
Parent the toe control to the heel control
Parent the ball control to the toe control
parentControllersTogether
Just a couple more steps to go before we are done-
• Step 6 – Pole vectorcreate a simple 4 pointed arrow (or similar). Snap it to the knee joint to get the position just right, then move it in Z so that it is far enough away that the IK handle will not cross over it at its most extreme position, this would cause the knee to flip.
Freeze transforms, delete history. Select it, then the ankle IK and apply a pole vector constraint, default of weight 1 is fine, we want it to 100% control the knee direction –
poleVector
• Step 7 – Cleanup –

1/ go through all the controllers and lock and hide all the attributes that we don’t want the animator to have access to.
2/ Clean up the outliner, delete anything unnecessary and add all the controllers to a group.
3/ Template the joint layers so that they wont be accidentally selected, we don’t need them.

• Step 8 – TestingAnimate your rig, push it to its limits to test its ‘breaking strain’ or even better – hand it over to someone else to animate and report back any problems.
Here it is a quick display of the rig functioning –