From the course: Maya 2018 Essential Training

Animate objects using Set Key - Maya Tutorial

From the course: Maya 2018 Essential Training

Start my 1-month free trial

Animate objects using Set Key

- [Instructor] Animation in Maya is done by setting keys. Now, keys can record almost any attribute in Maya, and typically, we use them to record position, rotation, and scale, and that will move an object through a scene, but we also can animate things such as color, intensity, and really, almost any attribute can be animated. So let's just take a look at how to do some basic animation in Maya. So I have this rocket here, and let's go ahead and animate it. Now, in order to animate something, we do need to make sure we're in the animation menu set. So let's go and move this object back, so I'm going to go ahead and select my move tool, and just move it back a little bit in the scene, and maybe zoom out a bit. Now, for animation to take place, we first need to set a key and we do that under the Key menu. So, we have Set Key here at the top, and the hot key for that is S. Now, we also have a couple of others, one is Key on Translate, Rotate, and Scale, and those are great ways to animate just those attributes. Well, we're going to go ahead and just set a key for everything. So when I select Set Key, watch what happens in the channel box. We get all of these values now have a little red box next to them, and that tells me that those are keyed, and that were actually on the keyframe. Now, if we move off of that frame, these will dim. So they're kind of now a pink color, but they still tell us that these particular channels are animating, and that can be important, so when we're directly on the key, they're red, and when we're in between keys, they're dimmed out. Now, if I want to set another key, all I have to do is move my time slider forward, and let's say to frame 50 here, and move my object. Now, without a keyframe set, if I continue to move my timeline, watch what happens. The object snaps back to its original key, so basically it will go back to the previous key. So I'm going to go ahead back to my frame 50, move my rocket forward, and I'm going to hit the letter S to set a key, and again, notice how everything lights up in the channel box. So now we have keys, and we can play this back, and as you can see, it goes from one position to another. Now, another way to set keys is to use automatic keyframing, so if I go down to this red button here that says Auto Keyframe Toggle, and turn it on, anytime I move this object, it will set a key. Now, in order for this to work, you do have to initially set a key for the object, so you do need to go through and set at least one key, and then once one key is set, auto keyframe will work. So lets go ahead and move this object, so I'm going to move up in Y, and watch what happens on Translate Y. That one lights up red, so now I have a key just on Y. So here, I have a key on everything, on this one, I have a key on Y, and on this other one, I have a key on everything, and that's because I hit set key for the other ones, it keys all of the attributes. Now, if I want to, I can continue to modify this, so if I want to, say, rotate this a little bit, it'll go ahead and rotate around X or Y, and notice how, once I manipulate all of these, all of these keyframes show up. Now, if I want to set keys for all of these, all I have to do is just hit the letter S, and that will key everything, and once we have this middle keyframe in, we can see how this animates. Now, if we want to, we can continue to animate this, so if I want to, I can go, say, to frame 36 and rotate it some more, maybe move it down a bit, and set those keys, so now we've got a total of four key frames. Now, if we want to manipulate keyframes, we can do that directly on the timeline. One way to do that is to copy and paste keys, so if I select, say, this key here, I can right click over it, and you'll see we have Cut, Copy and Paste, so I'm going to go ahead and cut this key, and when I do, basically that key disappears, but if I go back and right click again, I can paste that key in a different place, and now, we got a slightly different animation. Another way to work with keys is to just slide them around the timeline, so if I hover over this key here, hold down Shift + left click, notice how it highlights that key, and I can now just left click and drag and slide it. Now, another way to do this is to slide multiple keys, so again, if I hold down Shift + left click and drag, notice how it drags out this red bar, and that's really just a window, and any keys that fall within that window can be manipulated. So, if I click in the middle here, I can reposition these keyframes maybe towards the front, or if I middle click, I can position them somewhere else. Now, another thing we can do is, we can actually scale ranges of keys, so if I grabbed the beginning or the end of this box, I can scale this out or in, and this will allow me to stretch and squash animation, and as you can see, this is probably a great way to re-time and manipulate animation on your timeline. Now, one thing you do need to be aware of is that, when we do this, these keys will fall on whole frame boundaries, so it may re-time your animation just a little bit. Now, one more thing I want to show you is that, we can cut, copy, and paste whole ranges of keyframes, so if I Shift + left click and drag all of these, I can right click, and again, I can do cut, copy, or paste, so I'm going to go ahead and right click, and do a paste, and now it's pasted those back in. So, as you can see, it's fairly easy to animate in Maya. You first need to hit a set key, by using the letter S, and then once the first key is set, you can continue to set keys manually, or you can auto keyframe.

Contents