2010
Table Of Contents
- Contents
- Overview
- Maya Basics
- Polygonal Modeling
- Introduction
- Preparing for the lesson
- Lesson 1: Modeling a polygonal mesh
- Introduction
- Setting modeling preferences
- Using 2D reference images
- Creating a polygon primitive
- Modeling in shaded mode
- Model symmetry
- Selecting components by painting
- Selecting edge loops
- Editing components in the orthographic views
- Editing components in the perspective view
- Drawing a polygon
- Extruding polygon components
- Bridging between edges
- Adding polygons to a mesh
- Splitting polygon faces
- Terminating edge loops
- Deleting construction history
- Mirror copying a mesh
- Working with a smoothed mesh
- Creasing and hardening edges on a mesh
- Beyond the lesson
- Lesson 2: Sculpting a polygon mesh
- NURBS Modeling
- Subdivision Surfaces
- Animation
- Introduction
- Preparing for the lessons
- Lesson 1: Keyframes and the Graph Editor
- Lesson 2: Set Driven Key
- Lesson 3: Path animation
- Lesson 4: Nonlinear animation with Trax
- Introduction
- Open the first scene for the lesson
- Creating clips with Trax
- Changing the position of clips with Trax
- Editing the animation of clips
- Reusing clips within Trax
- Soloing and muting tracks
- Scaling clips within Trax
- Open the second scene for the lesson
- Creating clips from motion capture data
- Extending the length of motion capture data
- Redirecting the motion within a clip
- Beyond the lesson
- Lesson 5: Inverse kinematics
- Introduction
- Open the scene for the lesson
- Understanding hierarchies
- Viewing hierarchies using the Hypergraph
- Creating a skeleton hierarchy
- Parenting a model into a skeleton hierarchy
- Applying IK to a skeleton hierarchy
- Creating a control object for an IK system
- Constraining an IK system
- Limiting the range of motion of an IK system
- Simplifying the display of a hierarchy
- Applying parent constraints on an IK system
- Planning an animation for an IK system
- Animating an IK system
- Beyond the lesson
- Character Setup
- Polygon Texturing
- Rendering
- Introduction
- Preparing for the lessons
- Lesson 1: Rendering a scene
- Introduction
- Open the scene for the lesson
- Creating shading materials for objects
- Refining shading materials for objects
- Maya renderers
- Rendering a single frame using IPR
- Rendering using the Maya software renderer
- Batch rendering a sequence of animation frames
- Viewing a sequence of rendered frames
- Beyond the lesson
- Lesson 2: Shading surfaces
- Lesson 3: Lights, shadows, and cameras
- Lesson 4: Global Illumination
- Lesson 5: Caustics
- Dynamics
- Painting
- Introduction
- Preparing for the lessons
- Lesson 1: Painting in 2D using Paint Effects
- Lesson 2: Painting in 3D using Paint Effects
- Introduction
- Preparing for the lessons
- Brushes and strokes
- Rendering Paint Effects strokes
- Paint Effects on 3D objects
- Creating a surface to paint on
- Painting on objects
- Using turbulence with brush stroke tubes
- Using additional preset brushes
- Mesh brushes
- Converting mesh strokes to polygons
- Modifying a converted polygonal mesh
- Beyond the lesson
- Lesson 3: Painting textures on surfaces
- Expressions
- Scripting in Maya
- Assets
- Hair
- Fluid Effects
- Fur
- Introduction
- Preparing for the lessons
- Lesson 1: Assigning a fur description
- Introduction
- Lesson setup
- Duplicating objects across an axis of symmetry
- Renaming surfaces on a model
- Assigning objects to a reference layer
- Assigning a fur description preset to a model
- Reversing surface normals
- Modifying the fur direction
- Painting fur attributes
- Modifying the color of a fur description
- Creating a new fur description
- Beyond the lesson
- Lesson 2: Rendering fur
- nCloth
- Introduction
- Preparing for the lessons
- Lesson 1: Creating nCloth collisions
- Lesson 2: Creating nCloth constraints
- Lesson 3: Creating nCloth Clothing
- Introduction
- Lesson setup
- Making the dress into an nCloth object
- Making the character wear the dress
- Caching nCloth to speed up playback
- Adjusting the fit of the dress
- Defining the behavior of nCloth clothing
- Painting nCloth properties
- Open the second scene for the lesson
- Setting the initial state
- Constraining nCloth clothing
- Improving the quality of the nCloth simulation
- Smoothing nCloth clothing
- Beyond the lesson
- nParticles
- Introduction
- Preparing for the tutorials
- Lesson 1: Creating nParticles
- Lesson 2: Creating a smoke simulation with nParticles
- Lesson 3: Creating a liquid simulation with nParticles
- Introduction
- Lesson setup
- Creating a Water style nParticle object
- Adjusting Liquid Simulation attributes
- Adding fluidity to the nParticles
- Open the second scene for the lesson
- Convert nParticles to a polygon mesh
- Cache your nParticle simulation
- Adding Motion Streak
- Open the third scene for the lesson
- Render your liquid simulation
- Assigning material shaders
- Rendering a simulated frame
- Beyond the lesson
- Live
- Index
NOTE In the script above, you do not explicitly declare your variables. This is
because the return type of user interface creation commands is known to be a
string, and cannot be any other data type. Later in the lesson, you will allow a
data type to be implied, as you do not know what data type the return will be.
Linking the user interface
Currently the user interface in the window doesn’t do anything: moving the
sliders and clicking the check boxes has no effect. In this section you learn
how to link the user interface to the makeRoll procedure you used earlier:
■ The textField in the user interface will display the currently selected
object.
■ The check boxes in the window will be linked so that only one check box
can be selected at once.
■ The button will execute the makeRoll procedure with the arguments
specified in the window.
In the following steps you modify the user interface script.
A completed version of the user interface script named Mel_UI_Final.mel is
available in the GettingStarted project directory, within the mel sub-directory.
Displaying the currently selected object
The makeRoll procedure does not act upon the currently selected object. You
will modify the script so that the textField control will display the name of
the currently selected object.
To return the name of the currently selected object, use the ls command (list)
with the selection. Since you can select multiple objects in Maya, the return
from the ls command is not a string, it is a string array, even if only one
object is selected. An array is an ordered list of values used to store multiple
items of the same data type within one variable. The makeRoll procedure
cannot accept a string array as an argument, so you must modify the data
returned by ls -selection.
NOTE For more information on the ls command, see ls in the MEL Command
Reference.
For more information on arrays, see Arrays in the MEL and Expressions guide.
Linking the user interface | 695