Wednesday 13 April 2011

Post 30 - Skinning

I have begun the skinning process. This is a very similar, if not identical process to that of 3ds Max. However, in Maya I had to select every bone individually. This was the case as not all bone required skinning (e.g. the hip bone as there is a hip override on top of it). There is a way of using envelopes, which is the 'Interactive Skin Bind Tool'. However, I used the 'Smooth Bind Tool'. This one is the most mainstream and commonly used. This from the start when skinned looked rather nice and seemed to work rather well. Then, I proceeded to use the 'Edit Paint Weights' tool. The video link below demonstrates this tool and how to use it when faced with bad deformity.


The paint weights tool is almost the same as the one in 3ds Max, but with a couple of improvements. The scale isn't done by colour but rather from black to white (white - high influence, black - little to no influence). 3ds Max had a blend weight tools, which did work, but was a tad slow. Maya's equivalent is the flood feature. When the paint brush is set to smooth, clicking the flood button smooths all the the influence out over the selected joint. Very quick and useful. What took 3-5 days in Max took about a day in Maya.

I am happy with the result. There are other things you can do to tweak it, such as deformers and driven keys if there are problems with the mesh but the smooth bind skin tool is so effective there is no need to do so at this stage.




'Paint Weights' tool clip - LINK

Post 29 - Maya Joint system: Summary & Evaluation

Here is the Maya completed rig using the joint system. As with the 3ds Max 'bones' rig, I also intend to use Maya's skinning tools to bind the rig to the model as I believe that a rig's true capabilities can only be measured when taken to this stage. I found the joint system of creating a rig extremely flexible and intuitive. The ability to alter the pivot orientation, position and other attributes after it has been created only adds to its appeal and allows for mistakes and issues to be addressed rather than ignored or limiting the animator. The rig is in fully working order, from the toe and finger manipulators, to the hips, IK solvers and pole vectors. There is a huge range of real world and industry applications for this method of rigging as there is so much flexibility; it is very evident when using these systems that a quick turnover and production work-flow has been taken into consideration. This has resulted in an array of tools for adding, editing attributes and connecting them. This was a main disadvantage of 3ds Max. As it stands, creating custom attributes either means that they cannot be edited, or would require knowledge of MaxScript (both options which take time). These rigging techniques can be applied to both film and games. 

In addition, many driven key and connection tools can be used not just of joints but any other vectors and manipulators, which needed this type of relational transformation.
 
Maya Final Rig

Customisation is key to this tool set, and with it the learning curve is very gentile. Joints can even be used to rig animals, such as a birds wings or a fish's bone system. The amount of time taken to rig in Maya was significantly less than 3ds Max. However, a couple of negative areas I came up against are as follows:


Orientation confusion.
Manipulators need to have zeroed out attributes. This is done by freezing the transformations. However, when this is done the orientation is reset (a problem I had with the wrist manipulator). Not all manipulators are perfectly positioned in 3d space and it depends on the mesh. As I researched this problem many other people were also stumped at this issue. I did find a work around but was rather tedious and seemed to me that it could of been foreseen by the developers (involved grouping, parenting and un-grouping). I can see that these sort of issues would potentially stop a project in its tracks and create a hazardous and erratic work-flow.

Grouping and multiple views
Another area which for someone starting out in Maya was the grouping and multiple views of the scene. There are an array of schematic views and each serve a different purpose. Some include the Outliner, Hierarchy Hypergraph, Connection Hypergraph, Connection Viewer and son on. It is true that they are useful in being able to pick certain items which may be lost in a mesh or hidden from the main viewport, but there was a period for me that they just all became a bit confusing. One or two panel, with tabs for switching views would possibly be better and lass cluttered. Grouping and un-grouping items in a scene was also touch a go for a bit. It makes perfect sense to me now, but when I was in the middle of the project, you had to be very careful when dealing with joints and ik solvers. Un-grouping the wrong thing and the whole of the arm's hierarchy (example) would detach from the main hierarchy and become its own entity in the Hypergraph. However, as it is a flexible system, there are ways of re-introducing it into the chain. may benefit from having warnings when detecting major changes to the operation the user is about to perform.

None the less, very happy with this Maya rig; joints are definitely an improvement on 3ds Max's bones as it provides to flexibility after they have been created. Also, the custom tools creators speed up the process and does not require scripting. As this was the first time I used Maya, I found the process to be a good start.

Next stage is to skin it. This process will also be evaluated against 3ds Max and in relation to industry usage.
 

Post 28 - Hips, jaw and master controls

The rig is now technically fully established, the last process to take care of is to create the final manipulators and to colour coordinate it (same as 3ds Max, green for the right and red for the left).

Hip & Hip Override Manipulators
Very quick and simple, first up are the hip manipulators. These (also like 3ds Max) are circle 'hoops'. Their pivot points are snapped and aligned to the hip joint and then the hip joint is parented to the hip manipulator. This one controls the upper body and when lowered effects the bend of the legs. a smaller circle is next, the hip override joint is parented to this one. This will control the rotation of just the hip and so will not effect the upper body.


Jaw Manipulator
Next up is a control for the jaw. For facial rigging, which will be covered a a few weeks time, blend shapes tend to be favourable, but for the purpose of rigging, I shall rig a simple jaw also. A custom controller is made, then its pivot point is aligned with the jaw pivot point. The jaw is then given a parent constraint. This means that the jaw will 'look at' where ever the jaw manipulator is (look at constraint in 3ds Max). All but the jaw manipulator's translation attributes are then locked and hidden to avoid unwanted transforms.





Master Manipulator
The final control is the master control. This is a NURBS curve, which has been used to create a N,S,E,W, arrow controller. This is placed at the center, under the rig. Then ,all of the rig items are then grouped to it. This means that the whole rig and its controllers will move with the master control. 




 

Here is a breakdown of the rig so far.

Progress status...

Coords X,Y,Z, 0,0,0,

"1"(         
(Toes_Left&Right:CustAttributes_SetDrivenKeys)
(Foot_Left&Right:IKSCSolver_CustAttributes+MinMax_ConnectionEditor)
(Leg_Left&Right:IKRPSolver_CustAttributes_ConnectionEditor_IKFKBlend)
(Hip)
(Hip Override)
(Arm_Left&Right:IKRPSolver_CustAttributes_ConnectionEditor_
IKFKBlend)
(Hand_Left&Right)
(Fingers_Left&Right:CustAttributes_SetDrivenKeys)
(Spine:IKSplineTool_VertToCluster_CustControl_
IKFKBlend)
(Neck&Head:IKSplineTool_
VertToCluster_CustControl_IKFKBlend)
(ParentManipToJoint/s)
(Group)

"2" (
(Manipulators:_Toes_Foot_Knee_Hip_HipOveride_Clavicle_Elbow_ArmWrist_Fingers_Spine_
Neck_Jaw_Master)
)

In Addition to this breakdown, many other common procedures and tools were used such as: Freeze Transformations, Channel Controls (Lock and Hide), Mirroring items and joints (many IK systems cannot simply be mirrored over so the process had to be repeated for left to right).

Colour Coordinated with All controls

Here is a clip of the controls being used.

Main control usage clip - LINK

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