Grouping vs. Parenting


Grouping two or more objects connects those objects with an additional node, called Group(n) (Figure 6.3), which you use when you want to perform an action to both, such as moving them at the same time. (The (n) in Group(n) represents the number of the group node.) Even though the objects are grouped, you can still select one and move or perform an action on it without affecting the other objects in the group. Alternatively, you can select the Group node and have your actions affect the grouped objects as if they were only one object (Figure 6.4).

Figure 6.3. The top node is used to change values of the entire group without changing the current values of the individual objects.


Figure 6.4. Rotating the group node rotates all of the surfaces in the group at the same time around one pivot point.


Parented objects react a bit differently than objects that are grouped. Parented objects have a child-parent relationship. In real life, when a child is holding a parent's hand, the child must follow the parent wherever he or she goes (at least in theory). The same is true in 3Dan object that is parented to another object has to follow the other object around (Figure 6.5). When you parent one object to another, no extra node is created. Maya knows which object you want to be the parent and which you want to be the child by the order in which you select them.

Figure 6.5. The sphere on the left is parented to the sphere on the right. This means that the sphere on the left moves when the sphere on the right is moved.


To group two or more objects together:

1.

Marquee-select two or more surfaces with the Arrow tool (Figure 6.6), or -click to select multiple objects.

Figure 6.6. You can drag a marquee to select multiple surfaces. The marquee only needs to touch a part of the surface.


2.

From the Edit menu, select Group (Figure 6.7).

Figure 6.7. Select Edit > Group to group objects together.


The objects are grouped together with an additional node.

3.

From the Window menu, select Hypergraph.

The Hypergraph opens in a new window.

4.

Press to zoom the Hypergraph to the selection.

There is now one more node than the number of objects. This additional node is the group node, named group# (Figure 6.8).

Figure 6.8. The top node is created at the same time the group is created. You use it to control the nodes beneath it.


Tip

  • You can select the Group node and set the Pick mask to hierarchy mode to move the grouped objects together, or you can select a surface's node and set the Pick mask to object mode to move that surface separately from the group.


To ungroup an object:

1.

Select the Group node in the Hypergraph (Figure 6.9).

Figure 6.9. The Group node's default name is group#, with # representing the number of groups created so far.


2.

From the Edit menu, select Ungroup (Figure 6.10).

Figure 6.10. Select Edit > Ungroup to pull objects out of the group.


The geometry is no longer grouped, and the Group node is deleted.

Once objects are grouped together, they can be translated, rotated, or scaled as if they were a single object. One of the reasons Maya creates an extra group node is to give you an additional pivot point to use as the center point that the objects rotate or scale around. When an object is grouped, the pivot point of the Group node is placed at the origin. The pivot point can then be moved anywhere in the scene to determine its rotation and scale center point.

To translate, rotate, or scale a group:

1.

Select the Group node in the Hypergraph, or click one of the grouped objects with the Pick mask set to hierarchy mode to select the Group node.

2.

Select the Rotate, Scale, or Move tool in the toolbar, or use their respective hotkeys.

3.

Press / to go into pivot-point edit mode.

4.

Move the pivot point to the position you want the group to rotate around or scale from (Figure 6.11).

Figure 6.11. The Group node's pivot point is used as the center point for the entire group.


You can ignore this step if you're just translating the object.

5.

Press / to get out of pivot-point edit mode.

6.

Translate, rotate, or scale the group by selecting a manipulator's (Figure 6.12) axis and dragging left or right in the pane with the middle mouse button to change the axes' value.

Figure 6.12. You translate, rotate, or scale a group the same way you do an individual object.


Tip

  • You can move the pivot point to the center of a selected Group node by selecting Modify > Center Pivot (Figure 6.13).

    Figure 6.13. The Modify > Center Pivot command is useful for quickly centering the pivot of a group.



To move one object within a group:

1.

Select the object you want to move with the Pick mask set to object-type mode .

2.

Select the Move tool icon from the toolbox, or press .

3.

Translate the object by selecting any axis of the Move tool's manipulator, and then dragging left or right in the pane with the middle mouse button to change its value.

The selected object moves, but the rest of the group does not (Figure 6.14).

Figure 6.14. Grouped objects can still be edited individually by selecting just that object and not the group node.


Tips

  • You can follow these same steps to rotate or scale an object within a group without affecting the rest of the group.

  • Once you've selected a member of a group, press to move up the hierarchy and select the Group node.


A solid parenting example is a biped skeleton. For our example, we'll use an arm. Your arm starts at your shoulder blade and continues down, connecting your shoulder to your upper arm to your lower arm to your wrist to your palm to your fingers. A relationship is created that forces the fingers to follow the rest of the arm. This relationship is called a parent-child relationship. In this case, the parent is the upper arm and its child is the lower arm. The lower arm is the parent of the wrist, which itself is the parent of the palm. Whenever the upper arm is moved, all the children beneath it move, creating the whole arm movement (Figure 6.15).

Figure 6.15. The fingers are children of the palm, and the palm is a child of the lower arm. When the lower arm is rotated, all the joints and surfaces below the parent joint follow.


The overall relationship of the parts of the skeleton is called a hierarchy (Figure 6.16). A hierarchy determines which objects control other objects. The order of the hierarchy is important to both selecting and translating.

Figure 6.16. An entire hierarchy is formed by parenting one bone to another until they're all connected.


When parenting two objects together, the order in which you select the objects is very important. The second object you select becomes a parent of the first object selected. Once it's parented, the child will follow the parent's translations.

To parent two objects together:

1.

Select the object you want to become the child by clicking it.

2.

Select the object you want to become the parent by -clicking it (Figure 6.17).

Figure 6.17. -click additional objects to add them to the selection.


3.

From the Edit menu, select Parent, or press .

The second selected object becomes a parent of the first object (Figure 6.18).

Figure 6.18. The cube is the parent of the cylindershown in the Hypergraph by a connecting line.


Tips

  • Because no additional node is added when objects are parented, the pivot point of the parent is used as the center point for controlling the entire hierarchy.

  • If more than two objects are selected, all selected objects become children of the last object selected.

  • You can parent one object to another by using the middle mouse button to drag the child onto the parent in the Hypergraph and Outliner.


To unparent objects:

1.

Select each of the children you want to unparent by clicking the first child and then -clicking additional children in the Hypergraph or with the Pick mask set to object mode.

2.

From the Edit menu, select Unparent to unparent the object, or press (Figure 6.19).

Figure 6.19. Select Edit > Unparent to separate two or more parented surfaces.


This pulls the object out of the hierarchy, so that it now acts separately from the parented hierarchy.

Tip

  • You can also use the middle mouse button to drag the object out of the hierarchy in the Hypergraph and the Outliner, disconnecting the selected object from the rest of the hierarchy.




    Maya for Windows and Macintosh
    MAYA for Windows and MacIntosh
    ISBN: B002W9GND0
    EAN: N/A
    Year: 2004
    Pages: 147
    Authors: Danny Riddell

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