Using the Align Tool and Transform Gizmos
In the previous chapter, you learned how important the reference coordinate systems are for using 3ds Max 8 productively. In this chapter, you'll extend some of that knowledge to quickly and efficiently align objects with one another. Without a fundamental understanding of how the reference coordinate systems function in relation to the Align tool and Transform gizmos, the transformation of objects in a scene is often a random process of eyeballing objects as you move and rotate them into position. For instance, many users who are new to 3ds Max try using the Align tool but quickly abandon it because they don't understand the corresponding reference coordinate system.
Transform gizmos appear in the viewports when you are using the Select and Move or the Select and Rotate tools. These gizmos let you accurately constrain the transformation of a shape along specific axes, such as X, Y, or Z. You can also constrain transformations to just two of the three axes. For example, you can freely move or rotate an object in both the X and Y coordinates at the same time.
The Transform gizmos are displayed as red, green, and blue indicators that turn yellow to indicate the active axis as the pointer passes over them. Incidentally, the choice of red, green, and blue isn't coincidental in 3ds Max 8: the formula RGB = XYZ is evident throughout the software as a visual reference for clearly identifying the three axes.
Aligning Objects Quickly and Accurately
In the first exercise, you'll use a simple 3ds Max 8 scene containing several 2D shapes that form the basis of a building, a pier, and some pilings. (In another exercise later in this book, you'll import this same scene into another scene.) The 2D shape in the scene that represents the pier has already been positioned so that it will match up with the landscape you'll use in Chapter 6. Your task in this exercise is to transform and align the other shapes into positions that will be useful later when you construct 3D objects in Chapter 4.
Example 3.1. Transforming and aligning shapes
- Open the Pier01.max file on the CD-ROM, and save it to your project folder with the name Pier02.max.
- Right-click in the Top viewport to activate it (the active viewport is indicated by a yellow border). Press the G key, a keyboard shortcut that toggles the grid on and off in any viewport. This scene contains a line, circle, and several rectangles that will eventually become a pier with a building at one end. The large rectangle representing the pier has been positioned and rotated to fit in a landscape scene in later chapters.
- To rotate and align the building rectangle with the pier rectangle, first make sure the Select Object button is highlighted in the main toolbar and then, with the left mouse button, pick on the edge of the rectangle called shack01.
The rectangle turns white, and the red and gray axis tripod representing the rectangle's pivot point displays (see
on the next page).
Figure 3.1 A selected objectsappearance of selectedobject in the viewport turns white and displays an axis tripod at the pivot point.
- On the main toolbar, to the right of the transform buttons, click View in the list field, and then choose Local (
Because Shack01 is rotated at an unknown angle to the World reference coordinates, and because Local coordinates always remain oriented with the object, using the Local reference coordinate system makes it easier to perform transforms and alignments.
Figure 3.2 Local reference coordinate systemswitching from View toView reference coordinate systemswitching to Local fromSwitch from View to the Local reference coordinate system on the main toolbar.
- Click the shack01 rectangle and then the pier_shape rectangle. Notice the axis tripod for each shape has retained its orientation to the original shape. This is useful information when you are aligning the shapes because you will align them from Local axis to Local axis.
- In the Top viewport, select shack01. On the main toolbar, click the Align button. Move the pointer over the edge of the pier_shape rectangle, and click when you see the pointer change to a cross with two rectangles and a line. The Align Selection [pier_shape] dialog appears.
- Uncheck all the boxes in the Align Position [Local] area. In the Align Orientation [Local] area, check the X Axis box (
). Click OK.
Figure 3.3 The Align Orientation [Local] option, a feature of the Align tool, lets you axesrotating objects by aligning Localobjectsrotating by aligning Local axesrotate objects by rotationaligning Local axes for objectaligning their aligningLocal axes as means of rotating objectsLocal axes.
- On the main toolbar, click the Select and Move button (Figure 3.1). Notice that a Transform gizmo is displayed at the pivot point of shack01, instead of the red and gray axis tripod.
- In the Top viewport, click and hold on the X-axis arrow shaft to move the shape to the left. This restricts all movement to the X axis alone. Now click and hold on the Y-axis arrow shaft to move the shape up and down the viewport along the Y axis only. Finally, click and hold on the red and green lines forming a rectangle at the apex of the tripod (a yellow rectangle appears), to move the shape freely in the X axis and Y axis. Notice on the main toolbar that the reference coordinate system has reset itself to View. The reference coordinate systems are "sticky" to the transform buttons—View is the default system for the Select and Move tool.
- On the main toolbar, reset the reference coordinate system to Local so that the Transform gizmo will rotate accordingly. You can now move the shape along its own axes. At this point, trying to align the two shapes so that their upper corners match would be pure guesswork. You need the shapes to be aligned perfectly, and the Align tool will get you there.
- With shack01 selected, click the Align button on the main toolbar, and click pier_shape in the Top viewport. The Align Selection [pier_shape] dialog appears again, indicating that the Align Position is based on the Local axes of the shapes.
- In the Align Position [Local] area, check the X Position, Y Position, and Z Position boxes. The two shapes align according to the geometric centers of their bounding boxes (
). Click the Apply button to clear the axis-position check boxes.
Figure 3.4 The Align tool aligns the bounding boxes of aligningobjects by bounding boxesobjects according to the current reference-coordinate-system settings and the current active viewport.
- Now check the X Position box, and choose the Minimum radio buttons in the Current Object and Target Object columns. These selections align the two edges of the bounding box in their extreme negative Local X-axis dimension. Click the Apply button.
- Check the Y Position box and choose the Maximum radio buttons in the Current Object and Target Object columns. These selections precisely align the upper left corners of the two shapes (see
on the next page). Click OK.
Figure 3.5 You can use the Apply button (Align Selection dialog)Apply button, which is part of the Align tool, to align the bounding boxes of objects until they are positioned the way you want them.
- On the main toolbar, click the Select Object button and select the circle called pier_piling01 in the Top viewport (Figure 3.1). Notice that its Local axes have already been oriented to the Local axes of the large rectangle.
- Save the file; it should already be called Pier02.max.
This simple exercise makes it evident that if you want to use the Align tool effectively, you must have a solid grounding in the reference coordinate systems. The Local system is perhaps the most useful, because in most situations it lets you align objects with other objects, regardless of their orientation in space.
Increasing Your Productivity: More Gizmo Practice
In the next exercise, you'll gain extra practice with the Transform gizmos and reference coordinate systems so that you get a sense of how they can increase your productivity once you master them. You'll also learn a few keyboard shortcuts that will help make your daily work go faster.
You'll use the Pier02.max file you created in the previous exercise to practice transforming a shape called roof_profile. This exercise is just for practice—you won't be saving the results to use in other exercises later in the book.
Example 3.2. Using Transform gizmos and keyboard shortcuts to enhance productivity
- Open the Pier02.max file on the CD-ROM or from the last exercise. Make sure that the Top viewport is active and the Select Object button on the main toolbar is highlighted. Press the H key.
This keyboard shortcut diplays the Select Objects dialog (
Figure 3.6 The H keyboard shortcutH keyboard shortcut lets you select objects in the scene by objectsselectingselectionsselecting scene objects by nameselecting the name of the object.
- Double click roof_profile in the list to select it. Let's assume for the purposes of this exercise that you can't see the roof_profile object in the viewport because the viewport is crowded with many other objects.
- Access the Isolate Selection tool by pressing Alt + Q.
All objects except the currently selected objects (roof_profile, in our case) are hidden, and 3ds Max 8 zooms to fill the screen with the selected objects (
). An Isolated Selection warning also appears, which includes an option to exit Isolation mode by clicking the bright yellow field. For now, we'll stay in this mode.
Figure 3.7 The Isolate Selection tool, accessed here using the keyboard shortcut Alt + Q, lets you clear the viewports of all but the selected objects.
- On the main toolbar, click the Select and Rotate button (Figure 3.1). The current reference coordinate system automatically changes to View because that is the default setting for the Select and Rotate tool, which is appropriate for this exercise.
- As you pass the pointer over the Transform gizmo, the currently restricted rotation axis is highlighted in yellow. Drag the mouse on any of these axes to rotate the shape. Position the pointer in the space between the axes, and, when the sphere turns gray, drag to rotate the shape freely in two axes (
Figure 3.8 Using the Transform gizmo, you can rotate objects by rotationrestricting Transform gizmo movementrestricting movement to a specific axis or Rotate Transform gizmorotate them freely in two axes.
- To better see what you are doing in the current viewport, position the pointer at the intersection of the four viewports, and when you see the four-way arrow cursor appear, drag to the lower right to enlarge the Top viewport. Then press Alt + W to toggle the active viewport to full screen. Press Alt + W again to toggle the screen back to the four-viewport layout. Right-click at the intersection of the four viewports, and then click the Reset Layout button to return to four equally distributed viewports (see
on the next page).
Figure 3.9 active viewportresizingkeyboard shortcutsresizing active viewportresizing viewportsviewportsresizingResize the viewports by dragging at their intersections, or maximize or minimize the active viewport using the Alt + W keyboard shortcut.
- On the main toolbar, click the Select and Move button. In the Top viewport, click and hold the Transform gizmo to move the shape in any direction, but don't release the mouse button. As the shape approaches the edge of the viewport, press the I key to pan transparently while still in the Select and Move mode. Press the left bracket ([) and right bracket (]) keys to zoom in and out respectively.
- Click Exit Isolation Mode in the Isolated Selection warning to unhide all other objects in the scene.
- Exit or Reset 3ds Max 8 without saving the file.
This exercise highlights just a few of the keyboard shortcuts you should get in the habit of using to work more efficiently in 3ds Max 8.