Introduction
Welcome back, sports fans. In this little tutorial we're going to create an animation of an alien solar system, with planets and their circling moons. Cool, huh? Although this might sound complex (and this tutorial might seem a little that way at times), it's actually a fairly simple procedure, it just takes a little thinking.
What I'm trying to do in these tutorials is give you, the budding animator or designer, ways of getting a little further up that vertical learning curve we all sit on. The way to follow this tute is to think more about process than about which button to press. Sure, the first time you run this tute, you will be wondering what the hell to do next. But It's structured in an instruction-followed-by-explanation method.
So the next time you do the tute (and I suggest leaving it for a week then doing it again, just to concrete some of the methods), try to do the exercise just by following the instructions, not the explanations. Once you do, you're well on your way to a better method of learning not only MAX, but any 3D platform. After all, a shape is a shape, a particle system is a particle system. Maya, SoftImage and LightWave have particle systems and shapes and many other things, and you can adapt whatever process you've learned to any of these applications.
Okey dokey. On with it!
Alien Solar System
Task: Create five circles in the top viewport. Dimensions - Circle1: 50, Circle2 : 100, Circle3 : 180, Circle4 : 280, Circle5 : 500
Explanation: The first thing we need to do is create the major orbits, with an imaginary sun (for now) in the centre. This solar system is fairly small, with only five planets, and no asteroid belt (phew!). We're going to be using the Top viewport, so you may as well make it full screen so its easier to see what you're doing. Right mouse click on the top viewport, and press W. This is a keyboard shortcut I use quite a bit, so it's a handy one to remember.
You'll notice the grid in the viewport, use this for reference. In the centre of the viewport, create a circle shape (If you remember, the circle tool is under CREATE, SHAPE tool area). Using the left mouse button and dragging outwards from the centre, make the first orbit 50 units wide. Create another circle from the same centre point in the viewport, and make this one 100 units. Create another, this one 180 units. By this time, you may be thinking we're running out of room to create two more, bigger circles. That's okay, press the ZOOM EXTENTS ALL button on the bottom right of the screen.
This will bring everything back into perspective. Create two more circles (using the ZOOM EXTENTS ALL button again if you have to), one 280 units, and the last should be 500 units (we'll need a bit of room for this one).
Alien Solar System
Your top viewport should now (hopefully) be showing something like this:
If it doesn't, and you got totally bamboozled, feel free to load solarsystem1.max from the included files.
All righty then. From this point forward, we'll need to look at some sections in closer detail, then zoom back out to examine the big picture. This might be a good time to familiarise yourself (if you haven't done so already) with the zoom tools in the lower right hand of the screen. The two principal tools we'll be using are the REGION ZOOM and PAN tools on the bottom.
I've underlined them in RED for your convenience.
Have a bit of a play around with them, and press the ZOOM EXTENTS ALL button when you're ready to move on.
The Sun
Task: Create a sphere in the centrepoint of the circles, Radius 30, 32 segments. Name it SUN.
Explanation: Now we create a nice, stable, G type star that should support our planets without risk of exploding or frying everything. Use the REGION ZOOM tool and zoom in to the first circle. At the centre of the circle, create a sphere, Radius 30. The segments should be set to 32.
The Planets
Task: On the right hand side of each circle, create a sphere. Dimensions - Sphere1 : 5, Sphere2 : 8, Sphere3 : 8, Sphere4 : 10, Sphere5 : 30.
Explanation: Here we create our planets on top of our circular orbits. No moons yet, they come later. In our viewport, we should be able to see our sun, and surrounding that, our first circular orbit. On the right hand side (the east vertex, to be precise) create a sphere of 5 units in size. In reality, we could actually make our sphere anywhere we want, though it helps to keep things in perspective for our example. This is a small, rocky planetoid like Mercury.
Zoom out a little, so we can see the second orbit. Again, create a sphere on that right hand side, 8 units in size. This is more of a Venus. On the third orbit, make another sphere of 8 units in size. (You can actually shortcut that process by CLONING the second sphere. To do that, select the MOVE tool, select sphere2, and once you've done that, hold down the LEFT SHIFT key and move the sphere on the X axis to the right. Move it into position, let go of the mouse button, and make sure COPY is selected. Press OK, and we've cloned our planet.)
Now we have our Earthlike world, it has its own moon, which we will create a little later.
The Planets
On the fourth orbit, create our fourth world, 10 units in size. This is basically Mars, though larger. It has two moons, which we will create later.
Finally, on the wide fifth orbit, our Gas Giant. It's a small one, but a gas giant nonetheless. 30 units in size. It has two moons, one of which has its own moon.
By this stage, we should now have all of our planets. Yes, all you astrophysicists will send nasty emails telling me the scale is all out of whack. I know this, but it's just an example.
If you're having trouble getting it looking right, feel free to load solarsystem2.max from the supplied files.
The Moons
Task: Create circular orbits and accompanying moons around planets 3,4 and 5. Planet 5 has its third moon orbiting around moon 2.
Planet 3 - orbit1 radius 25. Moon1 : radius 3
Planet 4 - orbit1 radius 25, orbit2 radius 45. Moon1 : radius 3, Moon2 : radius 4
Planet 5 - orbit1 radius 55, orbit2 radius 115. Orbit 2a radius 35. Moon1 radius 4, moon2 radius 8, moon2a radius 3.
Explanation: Here's where it starts to get a little more interesting. Now we create our moons orbiting around some of the planets. Planets 1 and 2 are possibly a little close to the sun, and didn't form moons. Planet 3 has a moon, so we'll start there. You may want to zoom in closer to planet3 to see what you're doing. Just the same as when we created the orbit for the first planet around the sun, we create the orbit for the moon around planet3. Create a circle shape, using the planet as centre. Make it 25 units in size. On the right hand side, create a moon - a sphere just 3 units in size.
Still with me? That's all we have to do. Now we just follow the same principal and create two orbits and two moons around our fourth planet (hint - you can use the PAN tool to shift the view sideways). The first orbit is 25, with a moon 3 units in size. The second orbit around the planet is wider - 45 units in size, with a moon slightly larger at 4 units.
Planet 5
Now we move on to our Gas Giant, with its intricate moon orbits. Create the first two orbits as normal. Make the first orbit 55 units with a moon 4 units, and the second orbit 115 units, with a moon 8 units in size.
To create our third moon, it's the same procedure we used when adding a moon orbit to our third planet. Zoom in to the second moon on planet5, and using the second moon as the centre, create an orbit 35 units in size. On the right of that, add a moon 3 units in size.
Sound strange? Have a look at the diagram if you get a little lost.
It's really just a solar system within a solar system, if you think about it. I've provided another file at this stage, if you'd like to use mine instead of continuing with your own, or you got lost along the way, or the computer exploded and you lost all your work. It's called Solarsystem3.max.
The Orbits
Okay, you may be saying to yourself - 'I've spent a bit of time on this, and it's not raising my eyebrows so far. In fact, it's sitting there like a stunned mullet.' That is true. If you press play, nothing moves. How boring, huh? Well, now we bring the whole thing to life. We'll be using controllers and hierarchies within MAX to achieve our goal. We'll be going at breakneck speed, so grab your mouse, take a breath, here we go.
First things first, let's animate the first two planets, and place them on their orbits.
Select planet1(sphere2, if you haven't renamed them), and go to the MOTION panel on the top right.
You will see a tab underneath called ASSIGN CONTROLLER. Open it out by clicking on it. We're given some options to adjust or transform things - we can select POSITION, ROTATION, or SCALE. On the right of each transform, we can see what sort of CONTROLLER they are using. For example, POSITION is using a BEZIER POSITION controller (for the technically minded, this means that positions between keyframes are connected by curved bezier splines. This means, for example, a space ship will move smoothly between keyframes instead of mechanically, for example). We're going to change this to a PATH controller - basically, our orbit will become a path for this planet.
The Orbits
If you look at this image, you can see I've highlighted the POSITION controller, and above it on the left has appeared a green triangle button. That's the ASSIGN CONTROLLER button, and allows us to change what type of controller is assigned. The options it makes available varies, depending on what you select in the first place.
Pressing the button will bring up the following options:
You can see a little symbol next to BEZIER POSITION, this indicates that this controller is assigned right now. At the bottom, it also tells us this is the default controller applied.
The Orbits
We're going to change the current controller to PATH. Resist the temptation to press the 'make default' button, it can get you into all kinds of confusing messes if you don't know what you're doing. Press OK, and on the right, you'll see another menu rollout appear. Scroll your menu upwards if you can't see it all.
Here we can see a PICK PATH option. Select the first circle as the orbit, and press play. WOOHOO! Round she goes. Select the second planet, and do the same routine again, assigning a path controller, and picking the relevant orbit around the sun as the path. Do the same again for planets 3, 4 and 5.
If you've pressed play, you'll notice that the planets are all swinging around and reaching their start points at the same time. Of course, things wouldn't work that way in space. So, we need to fix that. Also, the moons aren't following. That's okay, we'll get to that.
The Orbits
Assigning the path controller basically animates the object (our planet) travelling on the path (our circular orbit) from 1 - 100% over the duration of the animation. This means, that all of our planets are going from 1 - 100% over the 100 frames that makes up this particular animation. We need to change that, and give them different rotation lengths.
First, we need to adjust the length of the entire animation. Press the TIME CONFIGURATION BUTTON and set the ANIMATION END TIME to 200 frames.
What we need to do now is adjust the length of the time each planet takes to go around their respective orbits. We'll start with the biggest orbit first, just for something different.
Select planet 5. If you look at this next image,
(save image to see the complete picture)
You'll see I've placed arrows next to two circular shapes at the bottom of our animation bar. This is the TRACKBAR, and is a new feature in MAX3 designed to help make quick adjustments of keyframes. In this case, what we can see are the start and end keyframes for our selected planet. We can see it starts at frame 0 (the half circle on the left hand edge) and finishes at frame 100 (the other keyframe). Move the frame slider over these keys and you'll see the action stop right where the keyframe does.
What we'll do is click on the end keyframe and drag it across to the right to frame 200. We can keep track of the frame number by looking at the area I've circled in red in the image above. It will change and tell you what is happening, and what frame you are up to.
Once you've dragged it out, press play. You should see the planet now travel slower, reaching its destination at frame 200, the end of the animation.
Now see if you can adapt this knowledge you've learned to change the other planets orbit end times to the following:
Planet 1: frame 40
Planet 2: frame 60
Planet 3: frame 90
Planet 4: frame 130
If you press play, the planets should rotate once at different, staggered speeds.
The Moon Orbits
Okely Dokely. Now we're going to get the moons animating on paths in staggered times just like we've done with the planets.
See if you can go through the moons just like you did with the planets, and assign path controllers to their various orbits. Once you've done that, go through and adjust their end times (shifting the end keyframe).
Here are some end key times for you to use.
Planet 3, moon - end 25
Planet 4, moon1 - end 25
Planet 4, moon2 - end 40
Planet 5, moon1 - end 40
Planet 5, moon2 - end 55
Planet 5, moon2a - end 30
To save you time (this is a lot like a cooking program, eh?) I've baked it up for you. Feel free to load Solar System 4.MAX and continue.
Linking
So now you've set up the moons, you've set up the planets, but it all still seems rather crappy looking. It's still looking nothing like the amazing thing you thought it would be. Well we're nearly there, just two steps away from finishing something you can take home and show your mum.
Next step is to link up the various orbits of the moons so they follow the planets around the sun. First, make sure your frame slider is sitting on frame 0, so all the planets are in their starting positions.
What we're going to do is create a series of hierarchies that will make the orbits of the moons follow the planets around their own orbits. Make sense? Follow me, I promise to go a little more slowly.
Find the SELECT AND LINK tool on the top toolbar - it looks something like this:
This tool creates a relationship between two objects - known as a parent / child relationship. Of course, any of those two objects could, themselves, be linked in a similar relationship with any other object. The best example of this is a helicopter. The blades are attached to the rotor, which is attached to the helicopter. The blades can pivot on their own, which doesn't affect the rotor. But if the rotor turns, the blades turn with it. By the same token, the spinning of the rotor doesn't affect the helicopter, but as the helicopter moves, the rotor and the blades come along for the ride. It's a difficult thing to explain, so perhaps if it's still not making sense, we might as well just jump in the water, so to speak, eh?
First things first. To make the moon of planet 3 follow it around on its yearly journey around the sun, we need to connect it. We don't need to connect the moon, we need to connect the path. That's because we want the moon to go AROUND the planet on the circular path, but we want the orbit to change and go the same direction as the planet is. Hmm.
Use the SELECT AND LINK tool. First, select the ORBIT of the moon (here shown in white),
hold down the left mouse button, and DRAG onto the planet, and let go. The planet will flash white once, briefly. This will indicate it is now the parent in a link. The orbit is now the child. To see the effect of this, press play. The moon goes around the orbit, which follows the planet. Making a little more sense now?
Let's try the next planet. Using the SELECT AND LINK tool again, select the orbit of the first moon for planet4, and drag-link it to the planet. Do the same for the second moon. Press the play button as a test - the orbits (and the moons) should now be following the planet around the sun, doing their own rotations as they do.
The last one is planet five. This will be a three level hierarchy. Use the SELECT AND LINK tool, and attach the orbit of the two main moons to the planet one at a time. Once you've done that (and tested the link worked by pressing play), we then need to add in another part of the hierarchy. Use the Select and Link tool to attach the orbit of moon 2a (the moon around a moon) to Moon2 (the moon it's orbiting around).
So now we've set up our solar system and it's nearly looking sweet. One more thing to do.
Looping Keyframes
You can load up Solar System 5.MAX or keep going with your own file.
Now we need to work in the TRACKVIEWER. It can be a daunting interface (it still scares the bejeebers out of me), but it is, I'm afraid, a necessary evil for many things.
Open up the trackviewer.
You'll see something like this:
What we need to do is quickly sort through the large amount of information in the track viewer to find the bits we're after. A good way to do this is use the filter button. This is located in the very top left hand corner of the track viewer, and will bring up the following menu.
All we need to do is show the ANIMATED TRACKS, because these are the only things we need to look at. Anything that isn't animated is just screen clutter to us right now.
On the top right hand side, select the ANIMATED TRACKS box in the SHOW ONLY area. Once you've done that, press OK.
Open up the WORLD rollout by pressing the plus sign on the left of it. We're then going to open up the OBJECTS rollout in its entirety. To do this, right mouse click on the OBJECTS rollout, and select 'Expand All' from the menu. You'll see all our spheres/planets, and they'll have three sub categories - Transform, Position, and Percent.
Highlight the PERCENT section of SPHERE2 (sphere 1 is our sun). You'll notice a new button at the top appear (here highlighted for you in red)
This is the PARAMETER CURVE OUT-OF-RANGE TYPES button. What does that mean? Basically it's just a tool that tells MAX what to do once it runs out of keyframes during the course of the animation. Press it and it will bring up the following menu:
At the moment, it's set to CONSTANT, which means that it starts at the beginning, and ends at the end. That's it. We really want the planets to loop repeatedly around their orbits, smoothly connecting the start to the end. So we click on LOOP. There are other options there, like PING-PONG which will move forwards, then backwards between start and end keyframes. Or CYCLE, which will go through a series of keyframes, and jump back to the beginning without a smooth transition.
Click on LOOP, and press OK. Minimise the track viewer, and press play on the controls. Now you should see the first planet continue to revolve around the sun all the way through the animation, instead of stopping dead at frame 40.
Maximise your track viewer, and go through each sphere (all planets and moons), and change the percent to a LOOP out-of-range curve type. Once we've done that, We're pretty much finished!
You can use this same technique on out-of-range curve types on helicopter blades, wheels on a moving car, or any sort of animation where repetitive motion is required. Electric fans, you name it.
Conclusion
So there you have it - LET THERE BE LIGHT.
The things this tutorial covers can be used on such a wide variety of applications. You can use similar methods to create banks of machinery, factories or spinning whimsical images. Getting an object to follow a path is only the beginning. Try creating a 3D path that arcs through the solar system, and attach a camera to it. We'll cover cameras and paths in a later tutorial, keep an eye out! I'm sure if I receive encouragement enough, I'll come up with a few more tutes that cover a wide range of process orientated solutions for MAX. If you liked this tute, let me know. If you didn't - I don't care! I did it for fun anyway. See you next time.
Load the Solar System 6.MAX file to see the end result. If I had enough time, I would have made the sun a lens flare, and put a starfield in the background…
Download the files used in this tutorial. Download (340 kb)