About Aligning and Snapping Objects


In the real world, objects touch each other to form other objects. A room, for example, is formed by multiple adjoining walls. You can use Maya's alignment tools to line up objects and components (Figure 6.20), saving the additional steps it would take to align objects by eye and eliminating the uncertainty over whether the objects actually touch each other.

Figure 6.20. You can align one point on one surface to one point on another surface. Here one point on each surface has been selected and the point-to-point command has been run, so that now the two select points are on top of each other (inside the square).


Maya's alignment options include the Snap Align and Snap Together tools. The Snap Align tool is especially easy to control because it's completely icon-based (Figure 6.21)which means there's no Options window to fuss with. This is a great tool for aligning one object to another, giving you multiple alignment choices (for example, aligning one object to another's center, top, or bottom just by clicking the respective icon). The Snap Together tool takes alignment even further by allowing you to move and rotate an object while aligning it (Figure 6.22).

Figure 6.21. Graphical elements are used as quick alignment tools.


Figure 6.22. Arrows appear when the alignment tool is invoked to show how the alignment command will affect the surfaces when is pressed, completing the command.


Snaps are alignment shortcuts used to quickly align objects or components to gridlines, curves, points, or view planesfor example, moving a selected object to a specific gridline (Figure 6.23). You can also use Snaps to make sure curve components and surfaces actually overlap other curves or surfaces. This is important in Maya because many commands require that curves and/or surfaces actually touch in order for the command to work properly. The best way to confirm that a selected point is touching the desired curve is to select the point and use curve snap to move the point to the curve. Snapping can also help bring selected, out-of-view surfaces into view by snapping the selected object to a gridline or curve that is within view.

Figure 6.23. Snaps help surfaces jump into alignment with gridlines, curves, and points.


The four snaps

Let's take a look at the four snaps (Figure 6.24) available in Maya:

  • Snap to Grids () Snaps a CV, pivot point, or polygonal vertex to a grid corner. If you turn on this option before you draw a curve, the CVs will snap to the grid corners (Figure 6.23).

  • Snap to Curves () Snaps a CV, pivot point, or polygonal vertex to a curve or curve on a surface (Figure 6.25).

    Figure 6.24. The four Snaps, from left to right: Grid, Curve, Points, and View Planes.


    Figure 6.25. Snap to Curves moves the surface into alignment with the curve.


  • Snap to Points () Snaps a CV, pivot point, or polygonal vertex to another point (Figure 6.26).

    Figure 6.26. The two curve's endpoints are snapped together using Snap to Points.


  • Snap to View Planes Snaps a CV, pivot point, or polygonal vertex to a view plane (Figure 6.27).

    Figure 6.27. Use Snap to View Plane to snap the surface along the plane axis.


To snap an object to the grid:

1.

Select an object.

2.

Select the Move tool.

3.

Hold down and drag with the middle mouse button along the grid you would like the object to snap to (Figure 6.28).

Figure 6.28. The center point of the surface is used to snap from gridline to gridline.


or

Click in the status bar and drag with the middle mouse button along the grid you would like the object to snap to.

The pivot point of the object snaps to the grid corner where you clicked with the middle mouse button.

4.

Release the mouse to finalize the snapping position.

To snap an object to a curve:

1.

Select an object.

2.

Select the Move tool.

3.

Hold down and drag with the middle mouse button on the curve where you would like the object to snap to (Figure 6.29).

Figure 6.29. The surface's center point will slide across the curve until you release the mouse button.


or

Click in the status bar and drag with the middle mouse button on the curve where you would like the object to snap to.

The pivot point of the object jumps to the curve where you clicked with the middle mouse button.

4.

Release the mouse to finalize the snapping position.

To snap an object to a view plane:

1.

Select an object.

2.

Select the Move tool.

3.

Click in the status bar and drag with the middle mouse button on the view plane where you would like the object to snap to.

The pivot point of the object snaps to the view plane where you clicked with the middle mouse button (Figure 6.30).

Figure 6.30. The pivot point of the object snaps to the view plane where you clicked with your middle mouse button.


To snap a point on one surface to a point on another surface:

1.

Create two NURBS planes (Figure 6.31).

Figure 6.31. Separate two primitive planes so that you can easily view the snapping results.


2.

Select both planes and press .

The selection mode switches into CV components.

3.

Select a corner CV on one of the planes (Figure 6.32).

Figure 6.32. Select the point you would like to snap into alignment with another point.


4.

Select the Move tool.

5.

Hold down and click and drag with the middle mouse button on a second plane near the CV where you would like the object to snap to.

The pivot point of the selected CV snaps to the CV on the second plane that's closest to where you clicked with your middle mouse button (Figure 6.33).

Figure 6.33. Any selected point can be snapped to any edit point or CV.


Tips

  • Although you can use the left mouse button when snapping, using the middle mouse button prevents unwanted objects from accidentally being selected.

  • Although we showed snapping points on a curve in this example, the same technique can be used to snap a point on one object to a point on another object. You can snap any point to any other point on a surface or a curve, on the same object or a different object.


The Snap Align tools

The Snap Align tools are a set of alignment aids for placing multiple objects. Alignment is very important in the world of 3D modeling because an object can appear to be aligned in the Perspective view but be completely off in the orthographic views (Figure 6.34). This happens because the camera angles of orthographic views are straight on from the side, top, and right; whereas the Perspective view can be viewed at any angle, often giving you an inaccurate perception of the scene.

Figure 6.34. The cone seems to be centered on the plane in the Perspective view, but in the orthographic views, you can see that it's actually very much out of alignment.


The Snap Alignment tools include the Point-to-Point Snaps, Snap Align Objects, Snap Align Tool, and the Snap Together Toolall of which are essential to a streamlined workflow. Many of the alignment tools are similar; you'll soon determine which one best fits your workflow.

To align two or more objects using the Align Objects tool:

1.

Create two primitive cylinders (making one taller along the Y axis) with some space between them (Figure 6.35).

Figure 6.35. The cylinders are different sizes to better illustrate the change after alignment.


2.

Select the cylinders.

3.

From the Modify menu select the box beside Snap Align Objects > Align Objects.

The Align Objects Options dialog box opens.

4.

Select Min for the Align Mode, and check Align in World Y (unchecking World X and Z) (Figure 6.36).

Figure 6.36. Min aligns the surfaces with the minimum Y value of the two.


Setting the World to Y forces the movement to happen along the Y axis.

5.

Click Apply.

One cylinder moves up the Y axis, and one cylinder moves down the Y axis until the base of each object is aligned (Figure 6.37).

Figure 6.37. The bases of the two surfaces are now placed on the same grid line.


6.

With the Align Objects Options dialog box still open, select Mid for the Align Mode, and check Align in World Y (unchecking World X and Z).

7.

Click Align.

One cylinder moves up the Y axis, and one cylinder moves down the Y axis until the center of each object is aligned (Figure 6.38).

Figure 6.38. The two surfaces are aligned to their centers.


To evenly distribute multiple objects along an axis using the Align Objects tool:

1.

Create a primitive cylinder.

2.

Duplicate the cylinder four times.

3.

Move one of the cylinders up the Y axis 10 grid units (Figure 6.39).

Figure 6.39. Only the placement of the two surfaces farthest away from each other matters now because the rest of the objects will be distributed evenly between them.


4.

Select all of the cylinders.

5.

From the Modify menu select the box beside Snap Align Objects > Align Objects.

The Align Objects Options window opens.

6.

Select Dist as the Align Mode, and check Align in World Y (unchecking World X and Z) (Figure 6.40).

Figure 6.40. The Dist option can be used to evenly distribute the selected objects along the selected axes.


Setting the World to Y forces the objects to be distributed along the Y axis.

7.

Click Apply.

Each of the cylinders moves up the Y axis until they're all evenly spaced between the two cylinders farthest from the others (Figure 6.41).

Figure 6.41. The cylinders are perfectly spaced along the Y axis.


To align two or more objects using the Align tool:

1.

Create five primitive cylinders and randomly space them away from each other (Figure 6.42).

Figure 6.42. The order of selection becomes important because the objects are aligned to the last selected object.


2.

Select one cylinder by clicking it, then -select each of the others one at a time until all are selected.

3.

From the Modify menu, select the box beside Snap Align Objects > Align Tool.

A gray box appears around the selected cylinders. On the edges of the box are icon manipulators used to align the objects (Figure 6.43).

Figure 6.43. A gray bounding box is for visualization purposes only: You need to click the icons for the Align function to work.


4.

Click on the surrounding box (Figure 6.44).

Figure 6.44. Note that each icon actually illustrates the side, or center, on which the alignment will occur.


The cylinders fall into alignment with the selected icon.

5.

Press to undo the alignment, then click on another icon to see its alignment type.

6.

Repeat the last step until you feel comfortable with each of the alignment icons functions.

Tip

  • Objects are aligned to the last selected object (blue).


To use the Point-to-Point Snap Align tool:

1.

Create one primitive cylinder and one primitive cone.

2.

Select the objects and press .

3.

Select one CV from the cylinder, then -select a CV from the cone (Figure 6.45).

Figure 6.45. You can select any edit point or CV to be aligned with any edit point or CV on another surface.


4.

From the Modify menu, select the box beside Snap Align Objects > Point to Point.

The entire object associated with the first selected point moves into alignment with the second object. The two selected points are now stacked on top of one another (Figure 6.46).

Figure 6.46. The two selected points now appear as one but are actually sitting on top of each other.


Tip

  • If you only want the points to move into alignment, not the entire object, use Point Snap (explained earlier in this chapter) instead of the Point-to-Point Snap Align Tool.


To use the 2 and 3 Point-to-Point Snap Align tools:

1.

Create one primitive cylinder and one primitive cone.

2.

Select the objects and press .

3.

Select two CVs from the cylinder, then -select two CVs from the cone (Figure 6.47).

Figure 6.47. The selected set of points will be aligned to the other selected points as closely as possible without changing the shape of the surface.


or

Select three CVs from the cylinder, then -select three CVs from the cone.

4.

If you selected two CVs on each object, from the Modify menu, select the box beside Snap Align Objects > 2 Points to 2 Points. If you selected three points on each object, select the box beside Snap Align Objects > 3 Points to 3 Points (Figure 6.48).

Figure 6.48. The Snap Align Objects drop-down menu holds many of the alignment commands.


The entire object with the first selected points moves into alignment with the second object's selected points. The points may not stack on top of one another if the spacing between points is different on each of the objects (Figure 6.49).

Figure 6.49. The cylinder's placement shifts into alignment with the selected points on the cone's surface.




    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