Friday, 11 March 2011

This tutorial is going to be going through some of the ways the graph editor can be useful, not only in the general process of animating but for displaying some of the basic principals of animation. It's not going to be that advanced, but I honestly don't think it needs to be. Animating has no need for some of the complicated procedures Maya is capable of, and once you know the basics there really isn't a need for a lot else!

I'm going to set this out in the same way I'd go about actually completing an animation, so starting with key poses and blocking, then moving on to splining and roughing out the core animation, then finally polishing. Whilst I go through all these I'll be attempting to sly in some animation principles and pretending to be clever, when the truth is I know very little. Not the most encouraging statement to come out with at the beginning of a tutorial I know, but hopefully it won't send 100% of readers away!

To show all these points I'm gonna be using a character piece I've been working on for a while now, which was done using a free rig called 'Eleven'. This is a really great rig that's been in development for a while, and made by the guys at www.11secondclub.com. The link below is to the resources page on the 11SC website which has got a good few really high standard character rigs that are well worth a look so check it out if you've got a minute.

http://www.11secondclub.com/resources/



BLOCKING

Planning key poses is always a great way to start any animation, and sketching them out really helps speed up the process as well as helping to create stronger poses. The movement this tutorial will be based around is a character sitting down and, being lost for words at the actions of another character, sticks out his hand and pulls a face as if to say “Really? You're gonna be that guy?”. This might seem like a really short movement to focus on, but there's really a lot more to it when it gets more involved. This also covers the principle of Pose to Pose animation, and it'll be clearer why soon.

Once I decided on the poses I was happy with, I translated them into Maya and moved the characters handles accordingly. It's important to note at this point that I'm using autokey, but it's not entirely necessary to do this yourself it's just preference.

I posed the character three times on three key frames that were right next to each other, for example: Pose 1 on frame 1, Pose 2 on frame 2, etc. This way you can select all the characters handles and shift them around in the timeline until you get a timing your happy with, which is again entirely preference.

These are the poses I chose:





There are really two ways to do this next part, one being very simple and the other a bit more involved. But neither are especially strenuous so it's up to you. Both have their advantages! But I'll start with the way I always do things.

-> Select all the handles and, making sure your in the animation tab at the top left, click on:

Window
Animation Editors
Graph Editor

-> Without any keys selected the Graph Editor looks like this:


-> And with the keys for an entire piece it'll look more like this:



It's probably important at this point to decipher what your'e actually looking at. All the black dots represent key frames, and the lines connecting them describe the way in which that handle moves from one keyed movement to another, and these lines are called splines (fairly easy to remember). It literally represents movement over time, and is NOT in any way a direct visual representation of what your character is doing, but more of a metaphoric one. All it is, is a graph of value over time, and how it gets there.

-> For example:

- A flat line between two keys means that it's not moving, as there is no change in value over time.

- A shallow line means there is a small change in movement.

- And a very steep line means there a large change in movement.


Once that's understood it makes things a lot easier to look at, and helps understand what's about to be shown.

-> Back to where we were before, in the graph having all the handles been previously selected. The white box on the left lists all the handles you've selected and all the components within them:



-> Shift select them all. Now move your mouse back to the graph window and press F, this frames all the splines for the handles you've selected in the window.

I've taken out all the keys for other poses to make things easier to look at:


We're now looking at three vertical lines of keys with splines connecting them.

-> Now, select all those keys and it should look something like this:


-> Don't worry about why these are different colours and have all grown brown arms just yet, that'll be explained a little later. For now draw your attention to the box at the top of the Graph Editor that looks like this:


These are there to edit your splines, but for now we only need one of them. More specifically this one:



-> This button changes all selected splines to STEPPED. All your points should now look something like this:



So what have we done here? Well there's been an obvious change to the splines that were there before. They are now in stepped mode, which basically means that the value of your key will stay frozen until the next key, at which point it will snap to the next movement. This translates in the graph editor by straight lines.

This means that if you had two points, the line between them would be entirely horizontal, which as I mentioned before means there is no change in movement. The line will then go vertically up to the next point, which means that the movement changes with no frames in between them.

If we now exit the graph editor now and get back to the main screen in Maya, press play, and you should be seeing something like this:




Now on to the second, quicker way. The first method was for picking out certain points of an animation and working through them thoroughly, because you might have a really polished few seconds at the start but just poses after that, so it's useful for focusing on bits one at a time. If, however, your'e the kind of person that prefers blocking out an entire animation first before adding detail to anything then you'll enjoy the next way.

-> Before you even start moving handles, go to your preferences. This is located at the bottom right of the interface and on the right of the autokey button:


-> Your preferences window will appear, and will have tabs running up the left hand side of it.

-> Select animation.


-> Draw your attention to the tangents box. Both the default in and out tangents are set to clamped.

-> Open up the drop down box next to each and change them to stepped:


This changes the computers default method of changing value in the graph editor. Instead of going for straight forward, even movements everything will be in stepped mode automatically. As I said this is really preference, or you may need both depending on your approach to a shot.

I hope that all made sense. Blocking might seem a bit counter productive, but it's actually really useful. You can see all your poses laid out bare in the timeline with none of the assuming that the computer tries to do for you. In other words, Pose to Pose animating. You can continue to lay down more poses to your hearts content, until eventually you can end up with a blocked out pose of everything other frame and you can see 90% of your animation in front of you, before you even start to concern yourself with the finer details of the movements.


                                        SPLINING/ ROUGH ANIMATION

The next step I'm going to go through is editing your splines to get an idea of the basic animation. Having already blocked out the poses, you know what the bones of the animation look like, but editing how each part gets from one key to the next is the harder part.


Firstly, I need to effectively undo what I've just done, but this won't take long.

-> Select all the handles again, and then open the Graph Editor back up.

-> Press the F key to frame all the splines and drag over them to highlight them all again. But this time click on the button at the top of the editor in this area:



-> Then click on this button:



And your curves should go back to the way they looked before, something like this again:



And your animation will look like this:


I've cut out all the other key from the animation I took this movement from so it's a bit easier to look at. You've now got splines in between three horizontal lines of keys which are the three poses:



-> Now, when you highlight any key in the Graph Editor, the splines going in and out of the key turn white and the brown tangent handles appear.



These tangent handles are really useful for editing the timing of a particular movement.

For example:

  • A 90 degree angle between two keys means that there is change in value, but the computer has made that change very even and boring.

  • If a line between two keys was flat until halfway then sprung up quickly to the next key, it means that the handle held its value for more time before shooting towards its next position.


This is a method of editing a characters movement without littering the timeline with unnecessary keyframes. It keeps things cleaner, and ultimately gives you a better understanding of timing. It's really simple to do but requires a bit of setting up first, which is what I'm going to go through next.

-> Open up the Graph Editor.

-> Select the keys you want to start editing, and they'll look something like this:



The next steps are all about setting up the tangent handles so that you an start playing around with the splines between your keys.

-> Click on the Curves tab at the top of the editor.

-> Go right down to the bottom of the box and select Weighted Tangents.



-> Now select the Keys tab and click on Free Tangent Weight.



-> Now look at the list of symbols below the tabs at the top of the Editor.



-> Click on this one:



You'll notice that your tangent handles now look like this:



Your'e now free to edit the splines going in and out of your keys as much as you want!

-> Make sure you've selected the move tool at the top left:



Now, by selecting the boxes on the end of the tangent handles, you can move them in all directions to edit the spline curves. The handles will go blue when selected:



It's worth experimenting with all kinds of possibilities, bearing in mind what the curve between two keys means and what kind of movement it's describing, and below are a few examples of how the splines change as you move the handles.


In the picture above the splines shoots above the value of the key then comes back down, which means that whichever handle you've chosen will be doing something very similar.


I can't think of a time when you'd edit a spline to look like this one on purpose, but you never know!


This picture would mean that the handle would move slowly for a few frames before shoot up pretty fast straight into the next value and would never exceed the value of the next key, because the line never goes over it.

                                                    EDITING SPLINES

Now it's time to put spline editing to good use. As I said before it's really good for editing timing of a handle between two keys, which is what this next part focuses on.

One thing I wanted to sort out from the last video was the timing in which the hand reached its upward pose. I wanted it to reach the pose faster, hold at the top, then release quickly into the next pose. This covers both the ease in/ease out animation principle, and well as anticipation.

Again, there are two ways to do this. So far I have two keyframes I'm focusing on with the arm: one at its lowest point and one at its highest. The first way to achieve the pose hold would be to simply copy the value of the second keyframe and place it between the two I began with, so it'd look like this:



Which is fine! But it's a slippery slope when you start doing things this way. Pretty soon you'll end up with a keyed movement on every other frame and it'll become impossible to edit your timing or motions at all. This is why the graph editor is so useful, because you can edit your tming as much as you want without making a mess. And here's how:

-> This is my first pose, which falls on frame 92:



-> And this is my second on frame 133:



And there they are in the timeline:



What's important next is to use your own judgement. Keep playing your animation over and over until you can decide on a good frame to have the pose hold on. In this case I've chosen frame 108.

So there it is, the task laid out plainly:

  • The arm has to come up from f92
  • Reach it's pose at f108
  • And hold the pose until f113. Now we can get started.

-> Select the forearm handle:



-> Now open up the Graph Editor.

-> The arm comes up by using the rotate tool, so you're going to need to select the Rotate Y in the left of the editor.



I've selected Y because that's the up/down axis, but it's not always as easy to tell when your animations get more complicated. An easy way to tell what you should be selecting is just to press E in the main window and match the colour of the rotate line to the colour of the axis in the graph editor. So for example: green line makes the arm come up, so select translate Y in the editor because it's the colour green!



-> First select frame 108 on the timeline. It'll become clear why very soon.

-> Now select the keys you want to edit, and change the tangents so they're ready for tangent editing.

The spline will look something like this:



-> Notice the blue vertical line? That's sitting on frame 108, which means we've got something to aim for now. The spline needs to reach almost the extreme of it's pose on f113, so the curve has got to be almost at it's highest by the time it meets the blue line. Simple!

-> Select the move tool and start editing the spline until it looks more like this:



-> Done. The arm is now holding from f108 to f 113, and you can visit the main window for proof:


This arm now works much better and the character is easing in to the hold, as well as anticipating the next pose much more clearly! There's still a couple of adjustments to be made, but you get the idea. And this technique can be used throughout the rest of the animation to get sharper timings that'll really bring the character to life. 'm going to show another example just to make things clearer. As the arm now comes up on f108, the shoulders and torso need to match it. So I'll start with the shoulders.

-> Start by selecting the two shoulder handles:



-> Then click on f108 in the timeline, so that you'll have the blue line to aim for in the Graph Editor.

-> Open up the Graph Editor.

-> Select the Translate Y tabs in the left of the editor.



-> Press F to frame the keys. Now You should have un-edited splines between the keys and the blue line falling on f108, something like this:



-> Same as before:

  • Select your keys
  • Curves tab, then click weighted tangents
  • Keys tab, then click free tangent weight
  • Then this button: 

Now the editing can begin!

-> Making sure you've clicked the move tool again, select a key to edit.

-> Then select a tangent handle, and drag it quite far up and to the right, so that the curve is just below its peak at f108 and reach its peak at f113, like this:



-> Do the same to the keys at f113, but don't pull them out nearly as far. Just move them out enough to smooth out the spline as it goes into the key nicely. Once your done your keys should look something like this:



Again I hope that all made sense. I've always just found this way of doing things much cleaner than littering the timeline with keys. It might not be as quick as just keying in movements, but I think it's a small price to pay to have a much cleaner scene. Plus you can edit timings as much as you this way too!



                                                          POLISHING


Once you've got to a stage where you're happy with your animation it'll be time to polish it. Polishing is a really important stage of the process, and it can really compliment your animation by making it much more fluid and natural. There's loads of methods you can use to do this, but I'm going to cover the two I use the most: Cushioning and Moving Holds.

Cushioning

Cushioning is a really simple idea but it's unbelievably effective, and relates to the principle of ease in/ease out again and well as overlap. You'll notice in your animation that in some places a body part will stay completely still after a movement which is what is happening in the video below:



All of the handles stay still after the last pose and they all need cushioning, but I'm going to focus on cushioning the head first. Cushioning a movement in Maya is really just adding one key frame after a big movement to have it ease out instead of stopping dead. It's good to add the key at least four frames after to make it as smooth as you can. It's really not a difficult process at all but once you've cushioned all the big movements in your animation it will look considerably smoother, and there's two ways to add this key depending on how you feel more comfortable.

The first way is really self explanatory, just adding another key straight into the timeline, but I'll show it just to make things clearer. My last key was on f124, so I need to leave a minimum of four keys between the next key.



-> Select the head and rotate it upwards a very small amount on the x axis. Simple as that! Play it back to check if it's working but if you want to cushion straight into the timeline then it's really that easy!

The second way is essentially the same method in a different form, but it's useful to know if you're the kind of animator who lives entirely in the graph editor.

-> Select the head

-> Press E to get the rotate handle around the head



-> The red line on the handle is the one you'll need to cushion so open up the graph editor and select rotate x tab.



This is the spline we're looking at now:



-> Select the key at f124 and press F to frame it.



-> An important point to mention now is that the graph editor has the time (in frames) along the bottom of the graph, which you'll need to look at for the next part.



-> With the key at frame f124 go along to the right by a minimum of four frames, then move the mouse down a little less than you just went right.

-> Now hold I and middle mouse click at the point you've chosen and this will add in keyframe!



-> It's essentially done the same thing as the first method, but this way you've already seen the spline you've just created so you can see how things are working a lot better. It' really important to edit the spline now so that it's nice and smooth like this:



Moving Holds


Creating a moving hold is a very similar process to cushioning, and just as simple to create. They are exactly what they sound like, subtle movements when a character is holding a pose. Nothing is ever entirely still in real life, so it shouldn't be when your'e animating either. It's not something you notice when you watch an animation, but you can feel it without even realising. It's only when something stops moving all together that an audience will really pick up on it. The most important thing about using moving holds is deciding where to use them, and acting out the pose will help you realise where the weight will be shifting and if there'll be more overlap on some body parts more than others.

After trying to hold the pose my character is in myself I felt that the chest was dropping ever so slightly, as well as the extended arm becoming slightly tired so falling slowly. I'm going to start with the chest.


The character holds the pose on f124, so I've planned a slight torso drift at f156.

-> Select the torso handle.



-> Press W to see the move handles.


-> Now, making sure you're on a frame around 156, move the torso ever so slightly left along the x axis. This is just so the torso isn't generally so still.

-> Once that's done, press E to see the rotate handle:


-> Now rotate the torso down a little bit too. The torso is bound to be relaxing from the pose over time, so don't rotate it so much that it stands out. Just enough to seem natural.

-> If you go into the graph editor now just to see how the holds' curve looks:


It's a smooth spline, and one that you could even add straight into the editor. But I prefer to see exactly what I'm doing with moving holds so that they're not too extreme. You can use these holds throughout your animations to help them look really natural, and it does a lot for the believability of a performance. After all, you don't want you work to look like it was animated at all!


So that's pretty much the end of the tutorial, I hope it's been useful! As I've said a couple of times, most of the techniques in this tutorial come down to preference, so it's just about finding a way of working that you feel most comfortable with and that works well.

Just to put what I've been showing into context, the video below is a rough render of the scene that it came from. It still needs work, but it might make things a little more understandable.



Thank you for reading!