Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
There are many times when you'll need to cycle animation or would be able to actually have animation go automatically. Now Maya has a number of tools that allow you to cycle animations. Let's go ahead and do some of that. I am just going to create a simple object here and do some animation. So I am just going to set two keyframes here. So I am going to go to Frame 1 and move it over here and hit S to set a keyframe, and then move it to Frame 24 and set another keyframe.
So now I've got that. Now if I expand this timeline out to say 48 frames, what's going to happen is it's going to animate and then at Frame 24 it stops. Now if I want this to keep going, I could do a number of things. One, I could just keep animating it, or another way to do it is to cycle it. So we find cycles in the Graph Editor, and what we can do is we can cycle on a curve-by-curve basis, or we can select multiple curves as well, but in this case all we're really animating is translation in X. So let's go ahead and cycle that.
So we cycle things under Curves. So under this Curves menu, we have two options: one is Pre Infinity, the other is Post Infinity. So Pre Infinity is before the first keyframe. Post Infinity is after the last keyframe. So this side of it is Pre Infinity. That side of it is Post Infinity. Let's just go ahead and deal with Post Infinity, just understanding it works on both sides of that animation curve. So the first one that we can choose is called a Cycle,and what this will do is just literally rewind the tape and repeat it.
So if I do this it will just repeat that animation over and over for infinity. If I don't like that, I can certainly change the value. Probably the next most popular one is Oscillate. Now what this does is it actually rewinds the tape and plays it back. So in other words, it goes from 0 to 1 and then back to 0 and then back up and then back down. So this was what creates the oscillate effect.
Another nice one is called Cycle with Offset. Now it's very similar to Cycle in that it runs through the curve and then what it does is it takes that curve and plugs it in right there and then does it again. So basically it just keeps going. So in fact, let me go ahead and give us some more time here, so I am going to actually expand this out a little bit and actually zoom out here. So now you can see it just keeps going. Very cool! So another way we can do this, now let's go ahead and rewind this, so we can see what we have.
The other one is called Linear, very similar to Cycle with Offset, but what it does is it takes the tangent of this curve and just keeps it going. So in another words, it's just again, very similar, but it keeps it going. But if I did Cycle with Offset, if I had additional keys in here, it would repeat those keys. With Linear, it just finds whatever that tangent is at the end, and it just keeps going with that. And the last one is Constant, which is actually in some ways I think that is kind of redundant, because what it does is just whatever the last value is, it holds it and that's almost the default anyways.
So let me show you some more practical aspects of this. We are going to go ahead and open the scene called Scooter_02 and this is our favorite character and his scooter, also sitting in a world. And so what we can do is we can use some cycles to actually animate this to look like he's going down the road. Now before we do this, let's go ahead and zoom out, and I will show you my little trick that I did. And that is I've modeled everything on a tiny little planet. So if I select this planet and rotate in X, you can see that I can actually by rotating positive in X he is going backwards, and by rotating negative in X, so we want to go down to -90, for example, he's going forward.
So negative rotation means that it looks like he is moving forward, because what I'm doing is I am rotating the world backwards, so he looks like he's coming forward. So I am going to go ahead and set that rotate to zero here. Let's go ahead and use an animation cycle to get this world moving. I am going to go back to frame 1, and I am going to make sure that my rotate is set to zero and just set a keyframe. Then I am going to go forward a bit. Let's go forward about 4 seconds.
So I am going to go to Frame 48, if I can zoom in here. We are using this slider here. So I am going to go to Frame 48. I want to make sure I rotate the world every eight to 10 seconds. So 48, we are two seconds in, at 24 frames a second. So if I make this a value of about 90 and set that keyframe, then actually it's going to go backwards, because I actually need to set it at -90, because the world has to rotate backwards so he looks like he's going forward.
So now with a key of -90, let's see what the way it looks like. That's not too bad. Now again, I could do a Playblast of this, but let's just go ahead and go with this. So at this rate it looks like he is kind of going down the road, but it stops at frame 48. So the easiest thing to do is just to do a cycle. So I go into my Graph Editor and actually I just want to do Post Infinity > Cycle with Offset, so what that does is just keeps going.
So now, all I have to do is play. And once it gets pass Frame 48, it just keeps going. So he's just puttering down the road, and I can zoom in, and it just looks like he's going down the road. Well, it kind of looks like he is going down the road, but we need to do a little bit more. Let's go ahead and make it look like his ears are flopping in the breeze. And that's another great place to use a cycle. So I am going to go ahead and zoom into his ears and grab that little handle that I left on the bottom, which is for that Bend handle, and open up the INPUT here.
Now what I want to do is set a keyframe for Curvature at Frame 1. So Frame 1, right-click over Curvature > Key Selected. That sets the keyframe for Curvature. Now I am going to go, actually I want to zoom in on my Timeline a lot, because this is going to be to be a frame by frame thing. So I am going to go forward to say maybe frame 5 or 6 and affect that Curvature outward. So it's going to be blowing his ear out, like that.
It goes out and then go a few frames back, say frame, about 4 frames maybe to Frame 10, and this time I am going to put a little bit closer to his head. So it goes from there to there, and then I want to go out one more time. So this maybe go to frame 14 here and bring it out one more time. And so now it's kind of flopping, and it's not flopping evenly so I want to make sure that these keyframes are a little bit offset by each other. It's not exact.
So that way it looks a little bit more natural. So now that I have this, again I have that same situation I had with the planet, which is it works great until it stops working, which is at Frame 14. But very easy to fix this. All I have to do again is just go back into my Graph Editor, find the curve. Here it is, curve for Curvature is all right there, and just do a Post Infinity, but instead of Cycle with Offset, this time I'm just going to do Oscillate.
So basically it will just go this way and then that way and this way. So let's go ahead and bring this out and hit Play. So that's pretty good. You can obviously play with those parameters, but this looks pretty good. So now we've got, using Cycles, we actually have him going down the road.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 34168 Viewers
94 Video lessons · 23847 Viewers
100 Video lessons · 4353 Viewers
83 Video lessons · 9354 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.