Basics of Maya 3D
Basics of Maya 3D
Maya is a 3D graphics program, mostly used for creating animated 3D special effects used in film, notably the Lord of the Rings Trilogy and King Kong. The 3D objects created in Maya are vector based which means that they are scale invariant. Maya is broadly based on the same use conventions as Windows, Adobe Creative Suite and other comparable 3D programs such as 3D Studio Max and Lightwave. Maya should be used in a computer configuration that matches the approved hardware recommendations on the Alias website. Failure to do so will usually result in slow operation, frequent crashes and user interface inconsistencies. USER INTERFACE When you start the program up for the first time you will see this:
1)
User Interface
One of Mayas greatest strengths is that the User Interface (UI) can easily be customised. However if you are clicking around the screen and accidentally customise it so that something
vital disappears, on the top line menu go: Window > Settings/Preferences > Preferences > Edit > Restore Default Settings. On a single screen monitor where space is at a premium you may want to switch interface elements off, for example the pictorial icons shelf, which can also be accessed via the regular menu. (See diagram above) Rows of dots appear at various places on the interface. Right clicking them will turn on the User Interface elements menu. (See diagram) SAMPLE EXERCISE This exercise will familiarise you with the common user interface functions. You will create a bouncing ball with a crosshatch texture, animate it using keyframes and refine its motion using Bezier curves and splines.
2)
When modelling anything in Maya it is usually best to model objects so that they look and move the same way that they do in the real world. Obviously this is not a hard and fast rule, but doing so will simplify construction in the long run. First create a Polygon sphere. Make sure you have the modelling menu selected. (top left corner: see User Interface diagram). Create > Polygon Primitives > sphere A default green wireframe sphere will appear at the origin, ie the point where the Cartesian coordinate X, Y, Z graph axes meet.
3)
Note the black square to the immediate right of the sphere menu option. These black squares are available for most items and mean that there is a dialog box associated with the option. Clicking them will open the dialog box and reveal more options for the object you are working on, in much the same way that black triangles work in After Effects or Photoshop. MOVING YOUR VIEW AROUND IN 3D SPACE We use the keyboard <Alt> key plus the three mouse buttons to move around in 3D space. Select the top view window by clicking in it anywhere. A blue outline appears (see diagram 4). Hold the <Alt> key down and the right mouse button the scrub the mouse to zoom in on the sphere in the top view. Use this method for coarse zoom. Use the mouse scroll wheel on its own for fine zoom control. You can also zoom in on a selected object by hitting the keyboard <f> (for frame) key. The wireframe of a selected object is bright green as shown in diagram 3. Pan left and right by holding the <Alt> key down and the centre mouse button and scrubbing the mouse. Rotate the view in the perspective window (top right) by holding down the <Alt> key and the left mouse button and scrubbing the mouse. MOVING AN OBJECT AROUND IN 3D SPACE
Select the move tool (see diagram 5) to drag an object around in 3D space. Coloured handles appear for the X,Y and Z axes. Drag on the handles to move the object. The currently selected axis turns yellow. Dragging on the yellow square in the centre will enable you to free transform the object in multiple axes simultaneously.
If the handles are too short or too long increase or decrease their length using the + and keys. Above the move tool is the polygonal lasso tool which works the same way that it does in Photoshop Above that is the direct selection tool. All of these tools will display an Alt text label if you hover the mouse pointer over them. Below the move tool is the rotate tool. Three rings aligned with the X, Y and Z axes will appear. Click anywhere on the rings to rotate the object.
4) Tool handles
Below the rotate tool is the scale tool. Use it to change the size of an object. The other tools will be covered later. RENAMING OBJECTS
To the left of the front view window are the layout view selection icons. Click on the third one from the top to bring up the Outliner window (see Diagram 3) The sphere you created has automatically been given the name pShere1 by Maya. The blue icon to the left of the name tells you that it is a polygon mesh. Double click this name and change it to Ball. Then switch back to the four view window. SETTING KEYFRAMES Keyframes define the position of an object at any particular moment. The time slider at the bottom of the screen shows
5) The Outliner Window
the current time as a vertical grey bar. A keyframe appears as a vertical red bar. To the right of the time slider are the time controls. Hovering the mouse over the time controls will bring up a dialog box explaining the function of each one. NOTE: Hovering the mouse over some screen items will also bring up a small black box with three horizontal lines in it. This denoted that right clicking will reveal a context menu. Make sure that the move tool is selected, go to the front view panel and left click on the green arrow handle of your sphere. Drag it up the Y axis as shown in diagram 6. Once an object is selected, it turns green. A default unselected object mesh is dark blue, Dragging a marquee around any portion of a mesh will select the object.
6)
Setting keyframes
Once you move an object by dragging on its handle the numbers in the channel box (top right: see diagram 1) will change to reflect the numerical value of the new position. Go to the channel box and type in a new exact value for Translate Y, setting it to exactly 50. Then hit enter. Click on Translate Y to select it for keyframing. It will turn into inverse video as shown in diagram 6. Right click and select Key Selected, which is the second option from the top. The numerical value will turn brown and a red line will appear at frame 1 on the timebar,, indicating that a keyframe is set. If the value doesnt say 50 or it doesnt turn brown, you are doing it wrong and YOU HAVE NOT SET A KEYFRAME. Click on Translate X and set a keyframe at O for that as well. Note that you can <Shift> select several items to keyframe their values simultaneously. You can also <Ctrl> select several items to keyframe them. This is similar to the way we navigate files in Windows. Many keyboard shortcuts from Windows can be used in Maya.
Set the time slider to 120 and drag the ball to roughly the position shown in diagram 7. This position corresponds to the first ball bounce, as shown in Diagram 2. Set keyframes for Translate X and Y as before. Next, referring to diagram 2, set 4 more keyframes for Translate X and Y at positions corresponding to the peak and end of the second and third bounce. Use the times shown in diagram 2. When youre finished youll end up with keyframes set for Translate X and Y at frames 0, 120, 150, 180, 190 and 200.
7)
Setting keyframes
Press the Play triangle icon on the time controls to watch a preview animation.. You ball will follow a path like the yellow one shown in diagram 8. Note that the animation will only play in the currently selected window.. If you press play and the ball doesnt animate in the front view window, you probably have the wrong view window selected. This path doesnt look like the more realistic bounce path shown in diagram 2. To fix the path in our model we will have to modify the trajectory followed by the ball using the Graph window. Select your ball, then select the bottom layout view in the lower left hand corner of the screen. Hovering your cursor over it brings up a dialog box labelled Persp/Graph/Hypergraph. The bottom window now shows a graphical representation of the balls motion path. Two graphs will be visible, representing the balls X and Y position over time.
8) Motion path
9)
Graph Window
Some of our setup keyframes are now redundant and can be deleted. Make sure you have the move tool selected, click View > Frame All, then draw a marquee around all of the keyframes on the red X translation curve except the start and end keyframes. Selected keyframes turn yellow, and the selected curve turns white. Hit the delete key to remove the keyframes. Next, select the translate Y keyframe at 120 frames. The keyframe turns yellow and a brown tangent line appears. Select the break tangents option. The left side of the tangent turns blue. Lasso around the tip of the tangent. Press the middle button on the mouse and hold it down. A 4 direction pointer appears. Use it to move the tangent point upwards. Note how the graph curve changes. Break tangents and adjust the other two keyframes that are sitting on the X axis origin line and the keyframe at time zero. When youre finished, you will have a Translate Y curve that looks like the one in diagram 10.
Pr play on the time controls to test your animation and note that the Translate Y trajectory now closely resembles the ballistic path that would be followed by a real bouncing ball.
ADDING SURFACE TEXTURES Click on the hypershade/perspective view option, which is immediately above the Persp/Graph/Hypergraph view you currently have selected. Click Blinn in the Create Maya Nodes window. A Blinn sphere appears in the work area window.
Blinn refers to the surface properties of the sphere. Double click the Blinn sphere in the work area window to open the attribute editor for the sphere. Click on the checkerboard symbol to the right of the slider for the colour attribute. This is the texture option. Double click on the checkerboard texture in the Create Render Node window that opens. A checkerboard pattern will appear on the sphere in the work area window.
Select the right side perspective view window and press the F key. This will frame your ball in the perspective window as a grey sphere. There are two ways to apply the surface texture: 1: Middle mouse click on the sphere in the work area, then drag and drop the texture onto the grey sphere in the perspective view window. 2. Select the ball in the perspective view, then right click the checkerboard sphere. Options appear around the cursor tip. The context menu is called a hot box. The top option is Assign
material to selection. Right click and drag the cursor tip to this option. It will turn blue. Let the mouse button go. The checkerboard texture will be assigned to the ball when you let the mouse button go.