Tag Archives: Rig

Posted in: Films

So, I finally got around to watching The Hobbit – An Unexpected Journey tonight. Unsurprisingly, the scene I loved most was seeing the Eagles of the North. All I could think about as I watched them soaring across my TV screen was how much I’d love to see the rigs and learn how to create something that could be animated so beautifully. Plus, those feathers… just wow. I can only assume there was dynamics on them, and I’d be fascinated to know how that was done too. Hopefully one day, I will be working for a company that helps bring that calibre of film to life and I will be involved in the rigging, and then I won’t just know how it worked, I will have been involved in building it!

YouTube Preview Image

The final set of controls left for me to build were the face controllers. Unlike the rest of the controllers these needed to be placed very close to the mesh. I felt that the thin lines of the curves I had used for everything else would not be very obvious or easy to select for the animator. Instead, I used the top of a NURBS cylinder as this provided a small filled in circle which was much easier to select.

I wanted the mouth shape to be really flexible for the animator, so I placed a controller for each corner of the mouth as well as three along the top lip and three along the bottom lip.

Face01

I also wanted the animator to be able to easily move the position of the entire mouth, so I created a simple curve shape that I placed a small distance away from the mesh.

Face02

The nose was slightly simpler. I created two controllers that would allow the animator to flare the nostrils. I then created another simple curve that would allow the animator to move the nose about the face.

Face03

Finally I created three controllers for each eyebrow and a simple position controller for each eyebrow. I also decided to change the circles from the yellow as I felt it was too bright and distracting when looking at the face. I changed them to a dark blue instead.

Face04 Face05

Once I had built all the controllers I needed to start parenting them to the correct things. The nose and eyebrows were extremely simple, as the heirarchy was fairly obvious. However I had a lot of trouble finding something that would work for the mouth. I obviously wanted the controls on the bottom lip to move when the jaw was rotated. However I also wanted them to move dependent on where the mouth position controller was. Eventually I came up with the idea of creating two locators that were aligned with the jaw bone pivot point. I parent constrained one to the head and one to the jaw. I then point constrained the locators to the mouth controller. I could then parent constrain my individual mouth controllers to the relevant locators.

Face06

Unfortunately, the parent constraint on the locators clashed with the point constraint, so that when the jaw rotated the locators moved slightly and the mouth controllers disappeared into the mesh. It took me a little while to track down the problem, but once I had found it I decided to just replace the parent constraint to the jaw with an orient constraint and this fixed it.

Face08

Now that the first hand in has been and gone, I’ve been finishing off the rigging of the monkey. There were a few bones in the face that I had animated for the deform test that weren’t actually rigged. Firstly, I created some curves to control the ears and the two tufts of hair on the monkey’s head.

One of the most important things I still needed to create was some eye controllers. I wanted each eye to be controllable individually, but I also wanted the animator to be able to easily control them together. As such I decided to create two text curves (R and L) and aligned them with the eyes. I then used an aim constraint so that the eyes point at the controllers at all times. I created a third controller that would move both R and L together.

Eyes01

I also wanted the animator to be able to control the size of the pupil, as I have always found this to be a particularly effective tool to portray emotion when animating a “toony” character. Unsure of whether the animator would want to be able to control the pupil size from the individual eye controllers or from the dual controller. I decided to give them the ability to do it from either. I added an attribute to R and L for pupil size, and two attributes to the dual controller. I then wired these attributes to two plus/minus nodes. I have set the nodes to addition and as soon as I have the eye textures, I will wire the nodes to the scale of the texture.

Eyes02

Rigging the tongue was slightly frustrating as I really struggled to create controllers that could be selected whatever position the tongue was in. Initially I created simple curves that sat above the tongue. However, when the tongue was rotated upwards, the top curve disappeared into the back of the mouth.

tongue01 tongue02

As such, I decided to create some loops that went around the tongue and combine these with the curves above the tongue.

tongue03

April 25, 2013

Yesterday was the deadline for our first hand in. Its a chance to collate everything we have done so far and hand it in to the tutors to get some feedback before the actual deadline. Obviously nothing is finished, because we still have three weeks of work left to do, but its nice to be able to show the progress so far.

When I hand in the final versions of these I will be adding text to explain the rig demos and make them a bit clearer.

YouTube Preview Image YouTube Preview Image YouTube Preview Image
April 24, 2013

Whilst I was skinning I discovered yet another mistake with my leg (and arm) rigging. When constraining the three tibia joints so that they would always stay the right distance from knee and ankle, I used a parent constraint. I had thought this would mean they would twist nicely when the foot was rotated. What I had not thought about was that this would of course affect their rotation in all three axes, and not just the one twist axis I wanted. When I started working on the leg and looking at the movement during deform tests, I realised my mistake.

LegTwistError

The joints were rotating and so rotating the leg mesh on an axis that the leg shouldn’t be able to rotate. I had to delete all the tibia and femur constraints (including the parenting to the deform skeletons) on the IK chains. I also had to delete all the skinning I had done so far, as the deform joints were also out of position.

I used the FK joints to reorient them correctly and then used a point constraint rather than a parent constraint to control their positions relative to the knee and ankle. I then wired up the ankle and wrist controller’s on the twist axis to drive the limb’s rotation. I simply wired up each of the tiba/femur joints to have 0.25 of the twist rotation of the ankle/wrist. Combined with the cumulative rotation of the parent chain, this caused the three joints to rotate 0.25, 0.5 and 0.75 of the ankle/wrist rotation.

Then I just had to parent constrain the deform skeleton once more, wire up the various switches and I could start skinning again.

Suffice to say, lesson learnt. I will be thinking much more carefully about which constraints I use in the future.

April 23, 2013

When first starting the skinning, I like each vertex to either be 100% influenced by a joint, or not influenced at all.

Skinning01

I can define areas like the pelvis and the rib cage very clearly, and then seperate up the vertices in between and give influence to the joints in the spine. This results in deformations that have very sharp edges. However, it provides a very quick way to establish which areas of the body should be moving with which joints. It also removes any unwanted stray influences from joints that are nowhere near an individual vertex.

Skinning02

Once that is complete, I can start to smooth the influence so that multiple joints can be effecting any one vertex. The smooth tool is particularly effective for this part of the process, though it does occassionally cause an unwanted joint to gain some influence over an area of the mesh that you don’t want it to. However, by swapping between joints and smoothing gradually the deformations become much cleaner.

Skinning03

With the spine, arms and legs complete I needed to get the head and tail done to have the majority of the rigging finished so that I could start skinning. Creating the head controls was pretty quick and easy.

Head Neck

However, I wanted to give the animator the ability to control whether the head follows the orientation of the neck, or whether it always stays facing the same direction despite the neck rotating (as though it is constrained to the world orientation). To do this I created another switch controller and set up an attribute that would control the orientation. I then created two locators, both of which I placed on the pivot point for the head. I parent constrained one of the locators to the neck joint below it (this would be the local orientation locator). The other locator I point constrained to the local locator. This means it moves with the locator, but doesnt rotate. I then orient constrained the head controller to both locators and wired up the switch so that it would change the weighting of the constraint and therefore which locator the head follows.

When I went to start rigging the tail, I realised I had never actually built a deform skeleton for it. As such I quickly built the joints and used the comet tools to tidy up the orientations.

Tail01 Tail02

I decided to build the FK control system first, as it would be easier and faster. I created a small circle control for each individual joint and parent constrained the joints to their respective controllers. As always, all my controllers were parented to an _SDK group which was then parented to an _0 group. I wanted to make it easier for the animator to be able to animate large sections of the tail without having to select each controller individually. As such I created four extra controllers which I spaced evenly along the length of the tail. I coloured these yellow and the individual circles brown. This makes the controllers for controlling a larger part of the tail stand out more for the animator. Colour coding the controllers is important so that an animator can see at a glance how a rig works without the rigger needing to explain everything they have done.

Tail03

I then wired the rotation of each of the four main tail controllers to the _SDK groups of the individual tail controllers I wanted to control. This means that as the main control rotates, all of the joints in it’s section will rotate and therefore it will bend all of that length of tail.

Tail04a Tail04b

I also parent constrained each of the main tail controllers to the individual tail joint controller immediately preceding its section. This means that it should always move with the tail as it is animated.

I then set to work on the IK tail. As a monkeys tail is extremely flexible, I decided to create an IK chain with four spans. This means that there is a control point at either end, and three control points spaced evenly in the middle. I created clusters for each of the points so that I could parent constrain them to controllers. Unfortunately, as the monkeys tail was modelled in quite a curved position, I discovered that whenever I created the IK, the bones moved from their original positions. Despite playing with settings, I eventually accepted that I wasnt going to manage to get the bones to perfectly match up.

I point constrained the three middle controllers to the base and tip controllers, meaning that whenever one end moves, the controllers in the middle move as well. I changed the weightings so that the end closest to them had more effect.

I also tweaked the 0 positions of the controllers so that the IK joints lined up slightly better with the FK joints to try and minimise the movement of the deform skeleton when switching between FK and IK.

I set up a switch to allow the tail to swap between FK and IK, but I decided to add a couple of other attributes too. I set up an orientation switch for the tail that worked just as the head does, meaning the tail can either follow the position and rotation of the hips, or just the position.

Tail05

I also decided that animating an IK chain with no stretch can be very difficult, as if the curve is made longer than the length of the joint chain, the joints only shape themselves to the part of the curve they can reach. However, I didnt want to force the animator to have a stretchy IK tail, so I decided to add an attribute that would turn the ability to stretch the tail on and off. To do this, I simply used the same arclength node for the curve and a multiply/divide node as I have done in every stretch, but I added a condition node that would be affected by the switch.

Tail06

So at last, the majority of the rig building is complete. I can set up a deform test and start skinning the rig!

BodyComplete02

Having finally created working strethcy IK legs, I could get to work on making a set of FK legs. Like the IK, I duplicated the deform skeleton, but replaced the _jnt with FK_jnt. Unlike creating the IK leg, I didn’t need to create anything except controllers. I used the curve tool with snap to vertex turned on and drew the shapes around the mesh of the monkey. I used the MEL script “parent -r -s” to attach all the curve shapes to a single curve node so that the animator can click on any of the curves to select the entire controller.

The thigh and ankle controllers I drew with curves, but I just used circles (which I editted slightly) for the knee and tibia joints. To try and keep the rig clear to use I colour coded my controllers. The most important controllers I changed to a brighter colour and the less important ones (like the tibia joints) were darker.

Foot05 Foot06

Like before, I nested all of these controllers in a double set of groups (_SDK and _0). I then parent constrained each FK joint to its relative controller.

As the toe controls were parented directly to the deform skeleton (there was no seperate FK and IK version) I needed to get the main toe controller to follow both the IK and the FK skeletons. I created an FK/IK switch control for the leg and then proceeded to parent constrain the main toe controller to both the end of the IK and FK controller heirarchies. At the same time, I also parent constrained the deform joints to both the IK and FK joint chains.

I then had to wire up the switch to control the parent constraints between FK and IK. I used the hypershade to do this. I brought the switch and the parent constraints in and also created a reverse node.

Foot07

I then also wired up the visibility of the IK and FK controllers so that the animator can only see FK controls when the switch is at FK, and IK controls when it is at IK.

I decided to colour code the IK and FK so that it is clear at a glance whether the leg is set to FK or IK. For the IK I chose red (left) and blue (right), and for FK I chose pink (left) and green (right). However, since the toes are the same controllers whether the leg is in IK or FK, the controllers were just a single colour. I spent a bit of time trying to work out how to use the switch to drive the colour override for the control shapes. Eventually I found that I could use a condition node that was true when the switch was above 0.5 and false when below 0.5. Then I wired the condition node to the drawing override of the controller. As the drawing override is not in the short list of things in the hypershade I had to open the connection editor and wire them up in there.

Foot08 Foot09

Finally, I had to work out what number represented each colour. With some trial and error I eventually found the values and wired up all of the toe controllers so that they change colour. Success!

Foot10

April 16, 2013

Im not sure I can truely put into words how frustrating creating the IK leg for this rig was. I do know, however, that creating a stretchy IK leg should not take almost 48 hours to get working.

Before I duplicated my bones, I decided I wanted to put some extra bones along the lower leg to enable smoother twisting. To ensure things worked nicely later on I wanted to ensure that the three new bones I inserted were exactly a quarter, half and three-quarters of the way along the calf. To do this, I parent constrained each of the three bones to both the knee and the ankle, and made sure maintain offset was unticked. This placed all three bones exactly half way between the knee and ankle. I then changed the weighting of the parenting to two of them. Femur01 was weighted 0.75 to the knee and 0.25 to the ankle, whilst Femur03 was weighted 0.25 to the knee and 0.75 to the ankle. I then deleted the constraints and used comet tools to orient the joints correctly.

Joint Creation 11

Once this was complete I created two duplicates (one for IK, one for FK). I then created a third duplicate in which I deleted the three femur joints and reparented the ankle straight to the knee. This was so that I had just two bones in the IK system. I called it the IKGuide. I created an IK on the joints and made a simple cube controller for the foot. I parented the IK handle to this control. I then orient constrained the ankle bone to this controller so that it would not rotate as the leg moved. Finally, I created a simple circle controller and parent constrained the hip bone at the top of the IK to the circle.

IKLeg01

With the IK built and working, I started to set up the IK stretch. Like the IK spine, I needed to know how long the leg was at any one point in time. However, I only needed the straight line distance from hip to ankle. I used the distance tool for this. I aligned one locator with the hip and one with the ankle and then parented them to the corresponding controllers. Now, as the leg moved, the distance tool would always give the distance from hip to ankle. At this point I also realised I had not created a knee controller. For this I used an arrow shape. I point constrained the arrow to both the hip and ankle (with maintain offset unticked). This placed the arrow on the plane between the two, directly in the centre. I then used an aim constraint to ensure the arrow was pointing directly at the knee. After deleting both constraints I moved the arrow in front of the knee and set up a pole vector constraint on the IK.

IKLeg02

To wire up the stretchy leg I used another multiply divide node and, like the spine, the distance was wired to the first input. The second input needed to be the length of the thigh bone plus the length of the calf bone. As the joints had been oriented correctly this could be found simply by adding the x transform of the knee and ankle together. I changed the node to divide and wired the output to the “true” output of a condition node. The “false” output was left as 1. The condition node also had the distance in the first input and the length of the two bones as the second. It then compared the two lengths, and if the distance was greater than the bone length, the condition was true. I then wired this condition node to the x scale (length) of the thigh and calf. The two bones of the IK scaled nicely. Unfortunately, the ankle and foot bones were being scaled strangely when the leg stretched, despite not being wired to the condition node. I even checked the scale of both and x, y and z were all still showing as 1. This meant the bones shouldnt have been scaling at all.

FootScaleBug FootScaleBug02

I tried deleting the IK and remaking it, but the problem persisted. I then tried moving the controls with no IK present at all, and the ankle and foot continued stretching strangely. I could only assume there was something strange with the bones, so I deleted the IKGuide joints and re-created them. I set everything back up, re-wired the thigh and calf x-scale to the condition node and tested it again. I had exactly the same problem all over again. I tried re-creating the bones once more that evening but with no success. I finally decided the only option was to go to bed and look at it with a fresh mind in the morning.

As is often the way with re-visiting a problem the next day, I tracked the issue down quite quickly. I had all the joints in the hypershade to make sure my ankle and foot definitely hadnt managed to end up wired to anything and I realised there was no line showing the parenting of ankle to knee. I un-parented the ankle bone and re-parented it to the knee and the problem disappeared. I was delighted, until I found yet another problem. Whilst the ankle was no longer scaling strangely, it still was not doing what I expected when I moved the hip too far away. Despite being orient constrained the foot controller (and as such theoretically unable to rotate by itself) when I moved the hip controller forwards or backwards so that the leg stretched, my ankle would rotate.

FootBugRotate FootBugRotate02

I decided to fix the problem by simply creating a new version of the ankle and foot bone. I simply point constrained the new ankle joint to the one on the IK leg and orient constrained it to the controller again. Success! Problem solved, just not as tidily as I would have liked. It also left me feeling frustrated because I wanted to know why the problem had occured so I could avoid it in the future. Still, at least the problem was gone and I could get on with parent constraining the IK joints to the IKGuide joints. I unticked maintain offset and parent constrained all the joints to their respective guide joints. I parented the three femur joints in the same way I created them; by parenting to both knee and ankle and then editting the weights. However, what I hadn’t thought of was that a parent constraint would cause the joints to rotate out of alignment due to the ankle’s orientation. I pondered the problem for a while and decided I would simply ensure to maintain offsets when constraining the deform joints to the IK joints.

IKLeg03

I then set to work creating a control system for the toes so that I could create a simple set of foot roll controllers. Initially I decided to place a circle controller around each joint of the toes, but it quickly became clear that some of them would be hard to select.

Foot01

 

Instead, I moved the curve shapes of the controllers above each toe joint and this made them much clearer and easier to see. Finally, I also made a main controller that would be used to curl all the joints of a toe. I then began creating a simple set of foot roll controls and with some re-parenting of the IK handle my IK leg was complete.

Foot02 Foot03

Unfortunately, I quickly checked things in my orthographic side view and realised that at some point during the creation process I had managed to cause the entire IK system to move out of alignment from its starting position, despite all the controls being at 0, 0, 0.

Foot04

The only option was to yet again build the entire IK leg. I deleted all my bones, mirrored the right hand leg to the left hand side. The good thing was, that at least this time all the controllers were already built so all I needed to do was wire everything up correctly, and make sure my controllers were correctly aligned before constraining/parenting things to them. Fortunately, this time I got it right and my left IK leg was finally complete. Hooray!