Tuesday, 12 April 2011

Post 27 - Spline Spine

Legs, feet, arms and hands: done. Now the next major part of the rig which needs to be established is the spine and neck controls. This process was a bit fiddly, but is still within comprehension. Two 'spline' based IK solvers were created (one for the spine and one for the neck). A spline line, or 'curve' was used in the 3ds Max rig and then the bones were connected/constrained to it. In Maya, there is an IK for this specific purpose and has a spline built into it (saving time and the need to navigate across panels). With IK spline solvers, a 'twist' attribute is included, allowing for favourable control over it's rotation. The twist attribute can be seen in the command panel.

IK Spline Spine & IK Spline Neck

(It is worth pointing out at this stage that the spline is split up into verts, or points). I highlighted the top two 'verts' and created a 'cluster' with them (create deformer - cluster). Repeated the process for the bottom two also. These were then parented to the bottom and top of the spine. The process was then done again for the neck IK spline. These clusters create a smooth and well distributed influence and allow for an even translation. Custom manipulators are needed to control these clusters. (Same process used for the clavicle, i.e. re-positioning the pivot point and parenting the control). I created the letter N for neck and S for the spine as the Autodesk Maya book suggests. These have also been given the same IKFK blend treatment, giving it even more flexibility when needed.

The video below shows the end result. (You will notice that as I select the control/s, the part of the rig which it controls turns pink)


Spline spine clip - LINK

Post 26 - Driven Keys... TOES!!!

Deviating from the the Autodesk Maya books, I decided to create a controller for the toes. They initially were wired up to nothing and had no way of controlling them efficiently. I used the exact same process as mentioned in the previous post (NURBS controller, custom attributes, then setting driven keys).


As I suspected, the process went incredibly smoothly, with no problems. Any alterations that I needed to make were possible by simply re-keying the keys at the designated times. For the toes, I created toe curls for each toe (minimum -10, maximum 10) These were then animated so that at ten, they are slightly raised and straightened (if you were to stretch your toes) -10 resulted in a toe curl. Toe spread was also created as well as my favourite, 'toe scrunch'. The toe scrunch applies to all toes as does the toe spread.


Toe Controls clip - LINK

Post 25 - Finger Controls

In order to complete the arm setup, the last thing which needed doing was to make the fingers controllable. At this stage they can be manipulated in the scene, but it would be better to establish a set of controls/sliders in the attributes panel. This process was achieved by taking the following steps below:


1) Firstly, I created a NURBS curve shape and parented this to the wrist (this will be the finger manipulator). I then created a series of custom attributes (same as the other manipulator configurations). An attribute was created to control each finger's curl (rotation on the Z axis), and one for each of the thumb's axis' (XYZ as humans have opposable thumbs and are more agile than fingers). A 'finger spread' attribute was also created in order to be able to animate the fingers spreading apart and coming together.

2) The next stage is similar to that of the connection editor, but with a twist. To create the control, the 'set driven key' panel is utilised. select the controller as the driver, and the finger's joints as the driven; then select the rotation axis / attribute you wish to animate with. Set an initial key (with all finger attributes set to zero). Then, move the slider to its highest value (10 for this instance). Rotate the finger joints to the desired amount (I found what works best is the first joint at 80 degrees and the second at 60) Set the second key. Repeat this process for each finger.

Set Driven Key panel

What you will now have is a controller, which when selected brings up a series of sliders that can be used to control the fingers. These can be altered at a later date and even additional rational and translation values may be effected. The limits are near to none and driven keys can be used not just with joints but on any object/s which require some sort of relationship within the 3d space. The 3ds Max equivalent is the wire parameters and the use of MaxScript to create custom attributes. I am not a fan of streams of code and would much prefer this system. I find this methods much more straight forward and I like the idea that this same technique can be used to drive other items. The clip below demonstrates this process.


Finger control set up clip - LINK

Monday, 11 April 2011

Post 24 - Elbows, Clavicles & Twist equations

IK arm with pole vector and clavicle control
I have just finished creating the workings out of the arm. It now includes a manipulator to rotate the clavicle, an elbow pole vector and now features a working twist bone, which rotates at half the speed of the wrist (will look awesome when it is skinned and should have a smooth rotation).






Elbow Pole Vector
As the arm is made using an ikRP solver (rotate pole), I created a pole vector (which looks like a cross-hair). Then , by shift selecting the arm's IK solver, I navigated to the 'Constrain' panel and constrained it to the pole vector (identical method to that of the knee pole vectors).


Clavicle Control
Clavicle control
Using the curve to create an arrow control, this was then placed behind the clavicle joint. Its pivot point was relocated to the clavicle and then the clavicle was parented to the controller. The only attributes which need to be used for this is the rotational values, so any other attributes can be locked and hidden (you will notice in the clip in the link below that the translation option and the rotation option for the pole vector are greyed out. This is because they have been locked and hidden). This is a great way of making the rig fool proof and making it difficult to manipulate it using wrong attributes. This technique of applying constraints is almost identical to that of 3ds Max's system; the only difference being that it was linking, as suppose to parenting (although pretty much means the same thing).

Forearm Twist Joint
This was slightly complicated and involved a bit of maths.By using the hypershade (usually used for material viewing) a simple equation node can be made (the one I used was called MultiplyDivide). Then by using the Connection Editor, I connected the wrist manipulator (control) and the mathematical node (controlled). By making the input and out connections, the mathematical node could be configured to be effected 50% (by replacing 1 with 0.5). This results in a 50% less rotation when the wrist manipulator is rotated (hand rotates 100%, forearm 50%). This is more of a relational connection but can be done in the same way as any other attribute, which was very handy.

IKFK Blend
As with the legs, the arms have also been given the ability to switch between IK and FK. Creating the ability for an IKFK blend is surprisingly simple. The process is as follows:

1) Select the arm manipulator, then 'add an attribute' through the modify tab (same as the foot control process).
 2) add the attribute titled ikfkblend (minimum 0, maximum 1, default 1). In Maya, when 1 and 0 are used, 1 is on and 0 is off.
3) Connection Editor; add the wrist manipulator in the left, the orient constraint of the arm IK on the right and connect the ikfkblend attribute.
4) Select the IK and access the Attribute Editor. Under the ik attributes, the ikfk controls need to be turned on.

IK FK Switching of the arm


Below is a link to a video, which showcases all of the above.

Arm manipulators and features clip - LINK

Post 23 - Arms: Wrist manipulator issues

 The arms are next to be rigged. These are rigged using another ikRP solver as it, like the leg requires something to influence the angle it bends at. I have made the arm by placing the ik solver from the shoulder to the beginning of the twist (forearm) joint. Then 'effector was then repositioned and snapped to the wrist. The effector is effectively the ik handle's pivot point. By doing this, the ik motion moves the arm as it should, but does not interfere with the twist bone (since the forearm is split into two bones). 

Next task was to create a wrist manipulator, which would be used to rotate the wrist and control the arm via a parented IK handle. However, I have come up against a problem. My model's arms are at a slight angle. The process of creating a zeroed out object (manipulator) is by performing a 'freeze transformation' This zeros out all translational and rotational information, whilst maintaining the objects position in space. This however resets the rotational values. As my model's arms are not completely straight, this process creates an unwanted change in its orientation.


The solution for this is as follows:

1) Create Nurbs circle at centre of world space (0,0,0) 
2) Create a group for it (name it zeroed out, or similar) 
3) Snap position and parent the group to the hand/wrist joint 
4) Zero out the transform info for the group 
5) Rotate the group as needed for it to be aligned with wrist orientation 
6) Unparent the group 

Doing this leaves the group with all the unwanted transform information. The original circle controller is now in the right place, has the correct orientation and is zeroed out. The link below shows this process. The original solution to this problem was found of a CG Society forum, which can be viewed using this LINK. (answer provided by Coyote12)



IK Arm clip - LINK
Wrist Manipulator Freeze Transformation solution clip - LINK

Post 22 - Custom Attributes [creation, constraints and connection]

Legs and feet have now been created, but the foot joints need to be parented the control and the control needs to be wired, or connected. This will allow for the manipulation of the foot from the attributes panel. 

First, the foot joints (named left foot rev heel) were parented to the manipulator. Then, the manipulator was given a series of custom attributes using Maya's Custom Attributes panel. These can have any name and potentially any purpose. But for the foot, it is the rotational attributes that we wish to create. Once these have been made, the Connection Editor is needed to connect the custom attributes to the action/s. This is done by loading up the controller on the left hand side and the controlled on the right. Selecting the custom attribute, and then what you wish for it to control. Connected attributes are displayed using an italic font. Limitations are also very easy to input and gives the option of minimums, maximums and defaults. This is also done in the 'add attributes' panel, but can be added at a later date.

This process is very straight forward to use and provided a quick solution as supposed to 3ds Max's wire parameters and the need for MaxScript to create custom attributes. For this reason, up to now, Maya's rigging techniques and tools are to an extent superior in that they are much more artist friendly.What is also beneficial of Maya's system is that the attributes can be altered and re-connected after they have been established. In 3ds Max this is much harder unless the attribute is scripted, which is a whole skill-set in itself.


Custom Attributes [creation and connection] - LINK

Post 21 - IK Feet & Legs


Taking what I learnt from the Autodesk exercise, I have now constructed the legs. These are driven using an ikRP solver (Rotate Pole) which was applied to the upper and lower leg. This allows for a pole vector to be introduced to the mix in order to create a IK influence, e.g. controlling the knees leg direction. The ability to switch between IK and FK has also been added. The first link at the end of this post shows this technique.

By using the original foot bones, a new set were created and snapped into the same position. Then, two ikSP solvers (single chain, advantageous when no twisting is required) are connected. These are for controlling the ankle and the ball of the foot. Once a nurbs foot controller was made, the next next stage is to connect the foot to the foot controls in the command panel. This needs to be done using what are known as custom attributes.
Here are a couple of links to the short videos, demonstrating and showcasing the leg processes:

IKFK blend Leg - LINK
Knee Pole Vectors - LINK