Tag Archive: FK


Usable Rig (at last)

So yesterday, I finally got the elephant rig to a point where it could be referenced into the animator’s files. One of the major things I worked on was updating all of the controllers so that they are clearer and fit the model nicely. I foolishly assumed this would be easy, but I hadn’t reckoned on the awkwardness of the curve creation tools in Maya. It took me quite a while of just repeatedly trying to create shapes and deleting them as they failed to work. I think my determination to create things that were perfectly symmetrical possibly did not help the situation, but an assymetrical controller just doesn’t look as neat and clean in my opinion. Eventually I hit upon the idea of using the snap to vertex tool and using the edges and vertices of the elephant to help me create controllers that fit nicely to the contours of the elephants body. Having drawn a selection of curves I needed to then join all the individual curves together into a single item. This involved reparenting the individual curve shapes a single curve node and then deleting the rest of the empty nodes. Frustratingly I could find no way to tell Maya to actually combine all the shapes nodes on each curve into one single curve, but each controller selects the entire item wherever you click it, so it still works, its just not as clean as I would like it to be. I then scaled the controllers out from the body slightly and coloured them. I had hoped I could then parent these new shapes to the controllers already in existence (as I had with each individual curve to make the new controller), but every time I tried, the new controllers were rotated strangely and moved away from the body. This was due to the difference in positions of the pivots of the old and new controllers. Hoping I could avoid having to reposition each new controller I decided to instead break all the constraints and set everything back up on the new controllers. It turns out I still had to reposition the pivots, and so rearrange the shapes, but at least I knew I didnt have to spend time trying to delete the shapes of the old controllers, I could just remove the entire item.

I did, however, forget to redirect the spine rotation to the new controllers, so I had a bit of a scare later in the evening when I created a global control and tried to check that everything moved as I wanted it to. When the elephant rotated 90 degrees, the spine flipped, presenting a problem I had first encountered in my 2nd year when rigging a quadroped in 3ds Max. I panicked for a while that my IK spline spine was in fact broken and I would have to come up with a completely new set up. However after I checked the IK I realised that in creating the new controllers, I had not told it to use them to decide the rotation of the spine. Thankfully, this fixed the problem.

IKspine03a

I also needed to update the rig with the new low poly model that Paul had altered for me. I brought the mesh in and whilst trying to work out how to load the skinning from the old mesh to the new mesh, I found an option that instead replaced an old mesh with a new mesh. I tried it out and it worked brilliantly. The old mesh changed to the new mesh. However, I now had two versions of the new mesh, one that was skinned, and one that was not. Assuming that the unskinned mesh was no longer needed I promptly deleted it. A couple of hours later, when testing some other part of the rig, I discovered my mesh no longer seemed to be moving with the bones. Confused I saved the file under a new name, closed it and reopened it. To my horror, the mesh was now invisible. The outliner still showed all the various parts of the mesh, but I couldn’t get them to appear.

MissingMesha

I hastily opened my previous iteration only to discover that that file suddenly had exactly the same problem. Desperately hoping I hadn’t somehow broken every single version (and so lost all my skinning) I tried the next step back. To my relief the old mesh was there and skinned and working absolutely fine. I had simply lost my day’s rigging work, but nothing else. Deciding that replacing the mesh clearly wasn’t the best method to update my rig, I started working on saving off the skinning so that I could load it onto the new mesh. Frustratingly it seemed Maya was only giving me the option to load each bones skinning one at a time. It was doable, but a bit pointlessly time consuming. Fortunately, I knew one of my classmates, Joe, had successfully, and easily, loaded skinning onto new meshes during his project. I asked him about it and he showed me a quick and easy method. It involved skinning the new mesh to the bones (but not editing it at all) and then telling the new mesh to look at the old mesh for the skinning values. Maya can load the skinning in a variety of ways, by volume, by UV map etc. It was brilliant and loaded the skinning onto the new mesh perfectly. I didn’t even need to tweak it, though Joe had warned me I might need to. This is great to know as I now know I can quickly skin the high poly elephant to the rig (and tidy it up afterwards) as soon as it is ready. I will not have to go through the time consuming process of skinning from scratch again.

The last thing I needed to build was dynamic tail. Having already gone through the long process of working out how to do the trunk, it was simple a case of repeating the method on a much simpler chain. The dynamic output curve became a blendshape for the spline whilst the controls affected the dynamic input curve. Again, unfortunately, the rig doesn’t update its position until the animation is played, but, to my current understanding of dynamics, there is no way around this.

I also created a control for the tail that will rotate all three FK controllers at the same time. I actually created three of these for the trunk as well, so that an animator can control the entire tail (or a section of trunk) without having to select a whole bunch of controllers. Every controller I create is parented to a group (with the suffix _SDK) and that group is then parented to another group (with the suffix _0). The _0 group becomes the null group, which provides a 0 point for position and rotation. The _SDK group allows me to create batch controllers whilst still making the individual controllers able to tweak the bones position. I simply wired the rotation of the batch controller to the _SDK groups of the relevant individual controllers. When the batch controller is rotated, each _SDK group wired to it also rotates. The individual controllers parented to the _SDK groups also rotate (due to the parenting) and so rotate the relevant bones. However, because the controls are not wired to anything, the animator is still able to tweak the position of the bones individually at any time.

 Tail01a

I then set up a switch for the tail to allow the animator to blend between dynamic and FK. Like the trunk I also set up some attributes to allow the animator to change the stiffness and flexibility of the curve dynamics if they wish.

Tail02a

Finally, I added some empty attributes to various controllers ready to be wired up to blendshapes when I have the highpoly mesh. I created them in advance so that it is less likely there will be any problems with the referencing when I update the rig later on. I wanted to make sure that everything that might be animated was already in place, and so it is only skinning and wiring and not controllers that will change in future files.

Advertisements

The Elephants Trunk

The elephant’s trunk was one of the most challenging parts of the rigging. I knew I wanted a simple FK trunk, and I knew I wanted a trunk with dynamics. However one of my animators had also informed me they wanted an IK spline trunk to animate with as well. As such, I needed a trunk that could switch between any of these, and more importantly, blend between any of them to any of the others. My desire to allow the trunks to blend meant I couldn’t simply use an “enum” attribute to change the parent constraints as this is an “all or nothing” attribute. Theres no way to have half of one and half of another. I also decided I couldn’t use a single “float” attribute with one of each of the control types at -1, 0 and 1. There would be no way for me to blend between the two trunk control types at either end (-1 and 1). They would only be able to each blend with the control type that was at 0.

Eventually I decided to use two different sliders, one that would blend between FK and “other” and a second that would blend between IK and Dynamic. This second slider controlled what the “other” was. In order to do this I had to create four duplicates of the trunk bone set up. I had an FK duplicate, an IK duplicate, a Dynamic duplicate and the “other” duplicate. The deform trunk was parent constrained to both the FK and the “other”. I then wired up the FK/other attribute to control which parent constraint was in use. The “other” trunk was then parent constrained to both the IK and the Dynamic and these parent constrains were wired to the second IK/Dynamic attribute.

It meant spending a huge amount of time in the Hypershade, wiring up various items. It was extremely time consuming as I had to organise items in the hypershade so I could see what was parented to what and where the wires actually needed to go. Its definitely the largest wiring system I’ve created when rigging so far.

Trunk01a

Trunk02a

Trunk03a

Having achieved the ability to blend between any of the different control systems, I needed to actually work out how to create a dynamic trunk. I watched a variety of tutorials and read a load of sites before deciding what I felt would be the cleanest, and simplest, way of rigging it. I applied another IK spline to the trunk and then duplicated the spline curve. This duplicate would be the input for my dynamics. So this was the curve that I had to create controls for. I made them in the same way as I did for the trunk, by creating clusters for the various points along the curve and parent constraining the clusters to controllers. I then applied dynamics to this duplicate curve which created another two curves in the process. One was the dynamic curve, and one was the output of the dynamics. The final step was to make this output curve control the original IK spline. I simply applied a blendshape to the spline, turned it up to 1 and locked the attribute so it couldn’t be changed or broken.

Working with dynamics is slightly strange though, as the dynamics only update when Maya plays the animation. This means you can tweak the starting position of the trunk, but it doesnt actually move the mesh (or the bones) until you press play. I think it unlikely the animators will want to ever just have a dynamic trunk, but I feel it may be nice to blend with some FK animation to add some extra secondary motion to the trunk.

Finally, I created some extra attributes so that the animators can edit the flexibility and stiffness of the dynamics and so affect the way Maya calculates the shape of the output curve.