Join Lee Lanier for an in-depth discussion in this video Animating the ship, part of VFX Techniques: Space Scene 01: Maya Animation and Dynamic Simulation.
We've created a curve as a reference for an ideal path we'd like the ship to follow. Here it is. I've renamed this curve MotionRef. Let's see how the ship animation compares. I'll make the working camera view larger and play back. You can see, the ship is just going in a straight line. If I look at the side view, can also see a straight line. Ship only has two key frames so the animation doesn't really follow. Ship also slides a bit. Let's improve that. Now to make life a little bit easier I'm going to hide this giant star field plane that's in the background.
Select it and press Ctrl+H. That just gets in the way. It's pretty big. I've also hidden the lights already, you can do that through the Show menu. I'll hide them here in the front view too. Now there's one important thing to remember before placing new key frames on the ship. If I select the ship right here in the view panel. And check the hypergraph. I can see that I've selected a piece of geometry, but not the top, not the group node. The group node, which is called ship sat, has the animation. I can tell that because the node here in the hypergraph is trapezoidal and also there's red keyframe indicators here in the channel box.
Of course, you can select the ship here, in the hypergraph, or the outliner. But if you want to select it in the view panel you can try this. Go to the hierarchy mode for selection. Then when you click on the ship you can see that it selects the top of the hierarchy. Which is what we want. So it's very important to make sure that you're setting key frames on the correct node or the correct part. So let's go to the midpoint of the animation which is 35. I can see the ship is way off the path. So the first thing I'll do is move and rotate the ship back over here to the left.
You can use the move or rotate tools here or use your hot keys. For example the W hot key goes to move. So, I'll move the ship here through the working camera view. You can also use other views like the front. And rotate, I'll use the E key for the hot key. To orient the ship so it looks like it's pointing in the correct direction. Now this is a halfway point in terms of the current key frames, frame 35.
What I'd really like to do though is have the ship start fast and then slow down. The trick to that is to take that midpoint position, like I have here, and set that for a different key frame, like frame 25. This is where the prompt option for the set key tool comes into play. Again to select the prompt option, go to the Animation menu set, go to Animate > Set Key. Option box. Normally it's at the current time, however if you set the prompt and set key or press the S key, this is what happens.
The prompt window opens. You can enter any frame number here you want. So if I enter 25 and press OK. It means that the current position of rotation that you see on the screen is stored as the frame 25 position. What that means is, the ship travels fast between one and 25 to get to the mid-point then slower to get to the end. Fewer key frames, faster. More key frames, slower. Let's go to a different key frame and check the position again. How about ten? Here I want the ship just to be on the path.
So, I'm going to rotate and move it until it's in the correct place. And then set a key frame for frame ten. Again, S hot key, prompt. To make the animation a bit more interesting though, instead of just having the ship simply travel on the path, I can also do things like add banks or turns. So I'm going to go back to frame 25. Instead of having the ship flat here, on the path, I'm going to rotate the ship slightly sideways.
Like this, a small bank. As if it's turning. And update that current position rotation by entering 25 into the prompt box again for the set key. And then move on to a different key frame. Let's try 40. At frame 40, let's say that the banking or the turning is done, it'll simply return the ship to the path. Then set a key frame for frame 40. Let's go to 55.
We're going to do something different in 55. 55 is where the ship's starting to slow down. We're going to actually animate some thrusters firing off here and the main engines shutting down. Because of that, we're going to have the ship kick up, or kick its nose up as if it's reacting to those new forces so, I'm going to rotate the ship like this, nose up. Not too much, just a little bit. And then set a key for that, 55. Course, I do want the ship to be on the path, so let me make sure he's moved over here, and oriented, pointed in the correct direction. So I can always update that position by simply, setting a new key, frame 55.
Now I'll check the very last frame here, frame 70. To make sure the ship is still pointing the correct direction. All right, that looks pretty good. Frame 70, set a key. And let's see what we have in terms of animation. I'll play it back. Start at the first frame. There we go. So it's not perfect. It's more interesting, but not perfect. The ship does follow the path roughly, does bank a bit. However it's going through some turbulence. There's a few bumps, some sliding. But luckily we can address all those mistakes in animation by going to the Graph Editor, which we'll do in a following step.
- Animating the spaceship and asteroid
- Animating cameras to follow the action
- Setting key and fill lights
- Creating layers for the sun, stars, and planet
- Setting up shadow and lighting layers
- Creating mental ray render passes
- Exploding geometry in a dynamic simulation
- Attaching nParticle emitter to bodies
- Batch rendering render layers