Hierarchy


Sometimes, you have groups of objects in your scene that are related to each other without being connected as a single entity. For example, you might have a bouquet of roses that more or less translate together, or you might have a car object with four wheel objects, and the wheels are stuck to the car's position but rotate independently of the car object. In cases like these, Maya's hierarchies come into play as you applying groups and parenting.

Grouping Explained

Any collection of objects can be selected and made into a group by choosing Edit | Group on the menu. This makes a new, single node (in Maya terms, a transform node) that connects to all the members of the group, and transforms the group's members as the group node is modified. Note that the objects are not tied up into this bundle; you can still select them independently. There's simply a new object that stands for the collection.

At first, this doesn't seem to be an improvement in scene organization, but navigation to the group is not difficult. The group node is "over" the members of the group, and the up and down arrow keys enable you to navigate up or down through your selection. So, you merely select a member of the group and press the up arrow, and the entire group is selected. In fact, the grouping is created by making a new group node (which can't be rendered) and then parenting each member of the group to this node. The members of the group are the children, and the group node is the parent.

Parents and children in hierarchies work as follows: Where the parent goes, the child must follow, but the child is otherwise free to roam. Therefore, any animation or transform applied to the parent node ripples to any child object. The child objects can still be animated independently, however, without affecting the parent or other siblings. With groups, the group node can be animated and all the members of the group follow the group node, but the group's members can still animate independently of the group.

Normally, when Maya creates objects, it links a shape node to a transform node to define a single object. The shape node defines the object's geometry, and the transform node defines its transform. When you create a group, you create a node that is an empty transform; it has no linked shape node, so there's nothing to render of the group node itself. However, it can be made a parent or child of any other object in the scene, which is often helpful in organizing or animating a scene.

Parenting and Unparenting Objects

You can directly assign hierarchical relationships to objects by selecting the child object(s), Shift-clicking to select the parent, and then choosing Edit | Parent (hotkey: p). Any transform applied to the parent is then reflected in the child. Note that the child transforms around the parent from the parent's pivot point. This makes sense because you would want the child object to seem connected to the parent when the child object is not animated to transform independently of the parent. In the previous example, a car's four wheels would be parented to the car body, so the car wheels were children to the body. Now the wheels can be animated (rotating to spin and steer), but they follow the body wherever it moves.

You can also break this bond by using Edit | Unparent (hotkey: Shift+P). This works only when the child object or objects are selected.

Parenting and Grouping: What's the Difference?

Parenting creates individual parent-child relationships between the objects in your scene. Creating a group is a special kind of hierarchy that's automatically created. When you group several objects, Maya creates the group transform node, which can't be rendered. Its pivot point is usually placed at the geometric center of all the objects, but you can move it to another position in the usual Pivot Editing mode. Grouping creates a parent-child relationship, with each of the group members parented to the group node. To sum up, parenting is the general concept of creating a hierarchy between scene elements, and grouping makes all the grouped objects siblings that are parented to a new unrenderable scene element.

If you open the Outliner (Window | Outliner), you see the group object with a + beside it. Clicking this + in the Outliner opens the group list so that you can see the members. If you have hierarchies that are several layers deep (children of children of children of children), the Outliner makes it easy to see the relationships (see Figure 3.11). If you select a child object, its parent is also selected but in a different color (by default, a light green).

Figure 3.11. The Outliner shows parent-child relationships by indenting. Notice the transform icon that appears beside the group node.

graphics/03fig11.gif



Maya 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2006
Pages: 198

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net