Join Lee Lanier for an in-depth discussion in this video Animating the asteroid, part of VFX Techniques: Space Scene 01: Maya Animation and Dynamic Simulation.
We've animated the camera and animated the ship. We're now ready to move on to the third item that needs animation and that's the asteroid. Here it is down at the bottom left of this window. Let's see where it winds up for the camera. Here it is. It's not doing anything, just sitting there. What we need to do is animate it tumbling slowly through space. Now before I get to the animation, I do want to prepare the asteroid. Let's click on the hypergraph. Right now the asteroid's a single node. Just called asteroid hole. We're going to need this for some other steps during dynamic simulation so I'd rather not put animation on it.
So one trick I can do, is group it to itself, and then animate the group node. Let's try that. With that selected, I'll go to edit,group, look at the option box. Want to make sure it's set to group, pivot center. And then, group. So there,the asteroid is grouped to itself essentially, can animate the group node. I'll rename that, I'll double-click in the channel box, and call that, asteroid group. There we go.
Now, by choosing center pivot through the group option box, I'm sure that fit'll be right there, and not zero,zero,zero. So with that group node selected, let's figure out what we want to do with the animation. So idea with this shot is, the ship flies in, sees the asteroid, slows down, fires a missile of some type that blows up the asteroid, and the ship goes away. So let's say that the ship's going to fire at frame 82. And let's say it takes ten frames for the missile to get there.
So in frame 92, the asteroid is hit. Then maybe it takes a few frames to break up. So by 96 though it's gone. So that's the last position where we see the asteroid. So let's go ahead and key the group to make sure it's there on 96. So S key prompt 96. Now, 97, it's gone, it's blown up. And we're going to shatter it later on. But for now we're going to 97. And one way to do that is to animate the visibility. So the visibility and channel box I'm going to set to zero. And zero is basically off, can't see it.
Then I'm going to key that, I'm going to highlight the visibility name, right mouse button click and then choose key selected. That allows you to key just that channel without affecting the other ones. So now here's the asteroid and now it's gone. So we need to have it tumble through space next. So with the group selected I'm going back to one and then move it using, say the working camera view or the front view. I want to move it in line with this curve, which is the path for the ship, so I want to move it down this way.
Like this. But also for more of a top view, keep it lined up this way, so maybe over here. Now it's hard to guess how far back to move it since it's already out of frame at the start, but just move it back a bit like this, and you can always update the animation later. So there's a position. And let's try some random rotation and another way to do that is to go the channel box, highlight a channel like rotate X, then middle mouse drag in the view panel. That remotely changes the value and rotates.
You can go to different channels and give it some random rotation. You'll have to experiment with this. It's hard to tell exactly what the value should be, but you can go ahead and set a key frame, for frame one, and then play it back. There it is. Now maybe it'll look good the first time or maybe you'll need to update it. Let's say that you want it to rotate more. We'll go back to frame one. Pick it as a group, and give it even more rotation, higher values. Either larger negative values, or larger positive values. Then set a new key frame. You can always change the position if you want to.
You can move farther away, which means it's going to be traveling faster or move it closer, so it winds up traveling slower. In that case, I'm going to update this keyframe and then playback again. Alright, let's say that's good. Once you feel that you've got the position rotation working for you, what you can do is, pick that group node again. And do one final step, and that's to go to the animation editor, graph editor, and make sure these curves are linear. This is not a machine, somebody's not flying it, it's just floating through space, through physics, right? So what we can do is change these tangent types to linear and I'll make it more natural.
In other words, we don't want it to slow down. Want it to be the same speed the entire time. There we go. So, there's some basic animation on the asteroid. So, at this round of animation and we spend more time using the channel box to set values and also to set key frames more specifically.
- 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