Introducing Maya 6: 3D for Beginners | 4 | WebReference

Introducing Maya 6: 3D for Beginners | 4

Introducing Maya 6: 3D for Beginners

Saving Your Work

Now save your work. Saving frequently is a critical habit to establish. Power failures and other unforeseen circumstances may not happen often, but they do happen. (As mentioned in the sidebar on the previous page, Maya's incremental save feature makes it easy to maintain backups of each stage of your work.) Because you created this as a new project, the Save File window will direct you to the Scenes folder of that project. Save your scene as planets in .mb (Maya Binary) format. (If you're working in Maya PLE, you can only save your files as .mp files.)

The file Planets_v1.mb in the Scenes folder of the Solar_System project on the CD shows what the scene should look like at this point.

Creating the Moons

For the planets with moons, create a new NURBS sphere for each moon. For simplicity's sake, create a maximum of only two moons for any planet. However, to get more comfortable with this exercise, feel free to make all the moons for all the planets.

The first moon will be Earth's. Use the top view to follow these steps:

1. Create a NURBS sphere and scale it to about half the size of Earth using the scale manipulator. There's really no need to type any values for any of the moons' sizes; you can just visually estimate their sizes.

2. Move the sphere to within half a unit of Earth using the move manipulator by the X axis. There's no need to snap it to a grid point, so toggle off the Snap to Grid icon ( ).

3. Repeat steps 1 and 2 for the remaining moons, placing them each within half a grid unit from their respective planets. When you create two moons for a planet, place one on either side of the planet.

4. Once you're done with all the moons and their placements and sizes, select all the elements in the scene and press 3 to increase the display resolution on all the spheres. When you're done, you should have a scene similar to Figure 3.6 in perspective view.

Figure 3.5 Changing the creation attributes of the NURBS torus in the Attribute Editor

Applying a Simple Shader

To help distinguish one gray planet from another, attach simple shaders to each of the planets. You can easily take care of this task using the Hypershade window. Follow these steps:

1. Choose Window >Rendering Editors > Hypershade to open the Hypershade window. You will notice three default (or initial) shader icons already loaded. (See Figure 3.7.)

2. In the Create Maya Nodes Panel on the left of the Hypershade window and under the Surface heading, click the Lambert icon (a gray sphere) to create a new Lambert shader node. It will appear in the top and bottom of the Hypershade window. Click it another eight times to create a total of nine Lambert shading groups in the Hypershade window.

Figure 3.7 The Hypershade window

3. Click the first of the new Lambert nodes (lambert2) in the Hypershade window, and then double-click its icon to open the Attribute Editor. At the top, replace lambert2 with Mercury_Color to identify this material as the one you will use for Mercury.

4. Name each of the remaining eight planets in your animation (Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto).

To rename a node in the Hypershade window, you can also right-click the node’s icon and choose Rename from the shortcut menu that appears.

Again, keeping a well-named and organized scene is paramount in a smooth animation experience. It's so much more of a chore to root through dozens of unnamed nodes to find the one you want. When you're done with naming all the material nodes, save your work. You may want to take a break.

Once you've created the shaders, you can assign the appropriate colors to each of them according to the planet they represent.

1. Double-click Mercury to open its Attribute Editor if it's not currently open (see Figure 3.8).

2. To change the color of the shader, click the gray box next to the Color attribute. This opens the Color Chooser window, from which you can choose a new color from the color wheel or by adjusting values with the HSV sliders. Since Mercury has a brownish red appearance, go with an orange such as in Figure 3.9.

SETTING KEYFRAMES

As with many other functions in Maya, you can set a keyframe in several ways. The best way when you're first starting to learn Maya is to choose Animate > Set Key q to display the Set Key Options dialog box:

If you simply choose Animate > Set Key instead, Maya sets a keyframe for every single keyable attribute for the selected object. Although this may seem convenient, it makes for a sloppy scene, especially if the scene must be heavily animated.

Having keyframes for attributes that may not actually be animated creates unnecessary clutter. In the Set Key Options dialog box, set the Set Keys On to All Keyable Attributes instead of the default All Manipulator Handles and Keyable Attributes.

Set Channels to From Channel Box instead of the default All Keyable.

Now, when you choose Animate > Set Key, you will set only a keyframe for the channels that you specify explicitly through the Channel Box, giving you greater control and efficiency. All you have to do is highlight the channel you want to keyframe and then choose Animate > Set Key. Save your settings by choosing Edit > Save Settings, and then click Close to close the dialog box.

3. Change the remainder of shaders as follows:

Mercury Orange Brown
Venus Beige Yellow
Earth Blue
Mars Red Orange
Jupiter Yellow Green
Saturn Pale Yellow
Uranus Cyan
Neptune Aqua Blue
Pluto Bright Gray

Figure 3.10 shows the shading groups. Next you will apply shaders to each of the planets.

4. Select a planet in the perspective window, and RMB click its corresponding material in the Hypershade window to open a marking menu. Drag up to highlight Assign Material to Selection and release the button to select it. You can also MMB drag the material from the Hypershade window to its planet, although assigning material in this way is not preferable. Leave the moons the default gray color. When you're finished, you should have a scene similar to Figure 3.11.

Figure 3.8 Mercury's shading group in the Attribute Editor

Now that you're done with that, you're ready to animate! Just save this file, and if you've enabled incremental save as recommended earlier, it won't be replaced with subsequent saves. If you get lost in your animation and need to start fresh, you won't have to create everything from scratch again. You can just return to a previous version of the file and start your animation again.

Figure 3.9 The Color Chooser window

Figure 3.10 The Hypershade window with all the colored planet shading groups

Figure 3.11 The shaded planets in perspective view

Created: March 27, 2003
Revised: November 1, 2004

URL: http://webreference.com/graphics/maya_6/1