Using the Unwrap UVW modifier


The Unwrap UVW modifier lets you control how a map is applied to a subobject selection. It can also be used to unwrap the existing mapping coordinates of an object. You can then edit these coordinates as needed. You can also use the Unwrap UVW modifier to apply multiple planar maps to an object. You accomplish this task by creating planar maps for various sides of an object and then editing the mapping coordinates in the Edit UVWs interface.

The Unwrap UVW modifier lets you control precisely how a map is applied to an object. The Unwrap UVW modifier has Vertex, Edge, and Face subobject modes. In subobject mode, you can select a subobject, and the same selection is displayed in the Edit UVWs interface and vice versa. This synchronization between the Edit UVW window and the viewports helps to ensure that you're working on the same subobjects all the time. When Edge subobjects are selected, the Ring and Loop buttons become active.

In the Modify panel, you'll find two rollouts: Selection Parameters and Parameters. The Selection Parameters rollout includes a button with a plus sign and one with a minus sign. These buttons grow or shrink the current selected subobject selection. You can also select to Ignore Backfacing, Select by Element (instead of faces), set the Planar Angle, or select by Material ID or Smoothing Group.

The Edit UVWs interface

The Parameters rollout includes a button named Edit. This button opens the Edit UVWs interface, shown in Figure 24.3 for a simple cube. You can also load and save the edited mapping coordinates using the Save and Load buttons in the Parameters rollout, and the Reset UVWs button resets all the mapped coordinates. Saved mapping coordinate files have the .UVW extension. The Display section of the Parameters rollout lets you set how the edges of the planar maps are displayed. The options include Show No Seam, Thin Seam Display, and Thick Seam Display. By making the seams visible, you can easily tell where the textures don't match the object's creases.

image from book
Figure 24.3: The Edit UVWs interface lets you control how different planar maps line up with the model

Table 24.1 shows and describes the buttons in the Edit UVWs dialog box.

Table 24.1: Edit UVW Interface Buttons
Open table as spreadsheet

Buttons

Name

Description

image from book

Move, Move Horizontal, Move Vertical

Moves the selected vertices when dragged.

image from book

Rotate

Rotates the selected vertices when dragged.

image from book

Scale, Scale Horizontal, Scale Vertical

Scales the selected vertices when dragged.

image from book

Freeform Mode

Displays a gizmo that you can use to transform the subobject selection.

image from book

Mirror Horizontal, Mirror Vertical, Flip Horizontal, Flip Vertical

Mirrors or flips the selected vertices about the center of the selection.

image from book

Show Map

Toggles the display of the map in the dialog box.

image from book

Coordinates

Displays the vertices for the UV, UW, and WU axes.

image from book

Pick Texture drop-down list

Displays a drop-down list of all the maps applied to this object. You can display new maps by using the Pick Texture option.

image from book

Absolute/Relative Toggle

Lets you enter U, V and W values as absolute values or relative offsets.

image from book

U, V, W values

Displays the coordinates of the selected vertex. You can use these values to move a vertex.

image from book

Lock Selected Vertices

Locks the selected vertices and prevents additional vertices from being selected.

image from book

Filter Selected Faces

Displays vertices for only the selected faces.

image from book

All IDs drop-down list

Filters selected material IDs.

The buttons in the lower-right corner of the Edit UVWs dialog box work just like the Viewport Navigation buttons described in earlier chapters including buttons to snap to grid and snap to pixel.

Within the Pick Texture drop-down list is a Checker Pattern option. This option applies a checker map to the mesh without having to assign a material. The checker pattern makes easy work of looking for stretching on the model.

Using the Options panel

Many of the commands found in the menus also can be found in the Options panel at the bottom of the interface. You can expand these controls by clicking the Options button, as shown in Figure 24.4. Using these controls, you can enable Soft Selection with a specified Falloff value. The UV and XY options let you switch between texture coordinates and object coordinates for the falloff. The Edge Distance lets you specify the Soft Selection falloff in terms of the number of edges from the selection instead of a falloff value. You also can choose the falloff profile as Smooth, Linear, Slow Out, or Fast Out.

image from book
Figure 24.4: The Options pop-up interface includes many of the same features as the menus

To the right of the Soft Selection controls are the Selection Modes with buttons for selecting Vertex, Edge, and Face subobjects. Selected subobjects in the Edit UVW interface are highlighted red. Using the + and -buttons, you can expand or contract the current selection. The paintbrush icon button is used to Paint Select subobjects, and the small + and - buttons to its immediate right allow you to increase and decrease the brush size. The Edge Loop button automatically selects all edges that form a loop with the current selected edges. The Select Element option selects all subobjects in the given cluster. This happens only when the Select Face subobject mode is enabled in the Modifier Stack. The Rotate +90 and Rotate 90 buttons rotate the selected subobjects 90 degrees in the Edit UVW interface.

The Bitmap Options section lets you specify the exact size of the loaded bitmap. This only affects how the bitmap is displayed in the interface and doesn't change the actual bitmap file dimensions. The Tile Bitmap option places the bitmap end-to-end for the specified number of tiles. The Constant Update option causes the viewport to update along with the texture map. The Show Hidden Edges option lets you make the hidden edges visible or invisible. The Center Pixel Snap causes the Pixel Snap button at the bottom right of the interface to snap to the center of the background pixels instead of to its edges.

Using the Edit UVW interface's menu commands

The File menu can also be used to load (Alt+Shift+Ctrl+L), save, and reset UV coordinates. The Edit menu lets you specify the mode to use to transform subobject selections. These modes include Move (W), Rotate (E), Scale (R), and Freeform, which lets you use the gizmo to transform subobjects. Corresponding buttons are available on the toolbar. The Edit menu also includes Copy and Paste and a Paste Weld command. The Copy and Paste commands let you copy a mapping and paste it to another set of faces. The Paste Weld command welds vertices as it pastes the mapping.

The gizmo is simply a rectangle gizmo that surrounds the current selection. Move the selection by clicking in the gizmo and dragging; Shift+dragging constrains the selection to move horizontally or vertically. The plus sign in the center marks the rotation and scale center point. Scale the selection by dragging on one of its handles. Ctrl+dragging on a handle maintains the aspect ratio of the selection. Click and drag the middle handles to rotate the selection. Ctrl+dragging snaps to 5-degree positions, and Alt+dragging snaps to 1-degree positions.

Within the Edit UVWs interface, you can select vertices, edges, or faces. The Select menu commands let you convert selections between vertices, edges, and faces. Additional options let you to select all inverted and overlapped faces, allowing you to find potential problem areas. Subobjects that are selected in one planar map are also highlighted in the other planar maps. This makes it easy to stitch elements together. The Stitch dialog box also includes an option to scale the entire cluster instead of scaling only the selected edges.

The Tools menu includes commands for flipping, mirroring, welding, breaking, and detaching subobjects. The Tools image from book Stitch Selected menu command lets you stitch mapped segments together into a single cluster, and the Pack UVs menu command lets you combine UVs into a smaller space. Packed UVs are easy to move and work with because they use a smaller resolution bitmap. Within the Pack dialog box, the Spacing value sets the amount of space between each segment, and the Normalize Clusters option fits all clusters into the given space. The Rotate Clusters option allows segments to be rotated to fit better, and the Fill Holes option places smaller segments within open larger segments.

The Tools image from book Sketch Vertices command lets you select vertices by dragging over them. The vertices can then be aligned to a shape including Line, Circle, Box, or Freeform. You can also set the cursor size used to select vertices. This tool is available only in Vertex selection mode.

The Mapping menu includes three auto-mapping options: Flatten, Normal, and Unfold Mapping. The Flatten Mapping option breaks the mesh into segments based on the angle between adjacent faces. This option is good for objects that have sharp angles like a robot or a machine. Figure 24.5 shows a plastic bottle with Flatten Mapping applied.

image from book
Figure 24.5: The Flatten Mapping option displays every part of a model as a separate segment

The Normal Mapping option lets you select to map a mesh using only specific views, including Top/Bottom, Front/Back, Left/Right, Box, Box No Top, and Diamond. These views are based on the direction of the normals from the faces of the mesh. It is helpful for thin models like butterfly wings or a coin.

The Unfold Mapping option is unique because it starts at one face and slowly unwraps all the adjacent faces into a single segment if possible. Figure 24.6 shows a simple cylinder that has been unwrapped using this method. The advantage of this mapping is that it results in a map with no distortions. It includes two options: Walk to Closest Face and Walk to Farthest Face. You'll almost always want to use the Walk to Closest Face option.

image from book
Figure 24.6: The Unfold Mapping option splits the model and unfolds it by adjacent faces into a single segment

The Options image from book Preferences (Ctrl+O) menu command opens the Unwrap Options dialog box, shown in Figure 24.7, and lets you set the Line and Selection Colors as well as the preferences for the Edit UVWs dialog box. You can load and tile background images at a specified map resolution or use the Use Custom Bitmap Size option. There is also a setting for the Weld Threshold and options to constantly update, show selected vertices in the viewport, and snap to the center pixel.

image from book
Figure 24.7: In the Unwrap Options dialog box, you can set the preferences for the Edit UVWs dialog box

Tutorial: Controlling the mapping of a covered wagon

The covered wagon model created by Viewpoint Datalabs is strong enough to carry the pioneers across the plains, but you can add a motivating slogan to the wagon using the Unwrap UVW modifier. In this tutorial, we add and edit the mapping coordinates for the covered wagon using the Unwrap UVW modifier.

To control how planar maps are applied to the side of a covered wagon, follow these steps:

  1. Open the image from book Covered wagon.max file from the Chap 24 directory on the DVD.

    This file includes a covered wagon model. The Chap 24 directory also includes a 256 × 256 image, created in Photoshop, of the paint that we want to apply to its side. The file is saved as image from book Oregon or bust.tif (note that the spelling in the file is rough).

  2. With the covered section selected, choose Modifiers image from book UV Coordinates image from book Unwrap UVW. In the Parameters rollout, click the Edit button.

    The Edit UVWs interface opens. In the Modifier Stack, select the Face subobject mode.

  3. In the Edit UVWs interface, choose Mapping image from book Normal Mapping. In the Normal Mapping dialog box, select the Left/Right Mapping option from the drop-down list and click OK.

    The left and right views of the wagon's top are displayed in the Edit interface.

  4. From the drop-down list at the top of the interface, select the Pick Texture option. The Material/ Map Browser opens. Double-click on the Bitmap option, and select the image from book Oregon or bust.tif image from the Chap 24 directory on the DVD.

    The texture appears in the window.

  5. Drag the mouse over all the vertices for the lower half of the wagon's cover, and press the Delete key to delete all those vertices.

    This represents the half of the top that won't be painted.

  6. Then select all the remaining vertices, and with the Move tool, drag them to the center of the Edit UVWs window. Click and hold over the Scale tool, and select the Vertical Scale tool. Then drag in the window to vertically scale the vertices until they fit over the texture. Then horizontally scale the vertices slightly until the background texture is positioned within the wagon's top.

    Figure 24.8 shows the covered wagon with the mapped bitmap.

  7. Press the M key to open the Material Editor. Click on the mapping button next to the Diffuse color, and double-click on the Bitmap type in the Material/Map Browser. Then select the image from book Oregon or bust.tif file from the Chap 24 directory on the DVD. Apply this material to the covered wagon top. Click the Show Map in Viewport button (the small checkerboard cube icon) to see the map on the covered wagon.

image from book
Figure 24.8: The Edit UVWs interface lets you transform the mapping coordinates by moving vertices

Figure 24.9 shows the results of the new mapping coordinates.

image from book
Figure 24.9: The position of covered wagon's texture map has been set using the Unwrap UVW modifier

Relaxing vertices

If your mapping coordinates are too tight and you're having a tough time moving them, you can use the Relax Dialog menu command (found in the Tools menu of the Edit UVW interface) to equally space the vertices. This tool works like the Relax modifier, pushing close vertices away and pulling far vertices closer together. Selecting this menu option opens the Relax Tool dialog box, shown in Figure 24.10, which offers three different relax methods: Relax by Face Angles, Relax by Edge Angles, and Relax by Centers. The Iterations value is the number of times to apply the relax algorithm. The Amount value is how aggressive the movements of the vertices are, and the Stretch value controls how much vertices are allowed to move. You also have options to Keep Boundary Points Fixed and Save Outer Corners.

image from book
Figure 24.10: The Relax tool can make working with vertices easier

Using the Quick Planar Map

One of the easiest way to isolate mapping surfaces is with the Quick Planar Map button found in the Map Parameters rollout. If you select a set of faces either in the viewports or in the Edit UVW window, you can click on this button and a planar map based on the X, Y, Z or an Averaged Normals is separated and the selected area is marked with a map seam.

NEW FEATURE 

The Quick Planar Map button is new to 3ds Max 9.

Tutorial: Creating a mapping for a swan mesh

An early chapter created a swan based on scanned images of an actual model. This irregular shape can be tricky to separate into maps, but the Quick Planar Map button makes it easy.

To create maps for a swan model, follow these steps:

  1. Open the image from book Brass swan.max file from the Chap 24 directory on the DVD.

    This file includes the simple swan modeled in an early chapter. The model has been converted to an Editable Poly object.

  2. With the swan mesh selected, choose Modifiers image from book UV Coordinates image from book Unwrap UVW. In the Parameters rollout, click the Edit button to open the Edit UVW window.

  3. Rotate the swan to its side and select the Face subobject mode. Then drag over the swan's side in the viewport with the Ignore Backfacing option in the Selection Parameters rollout enabled.

  4. Click the Quick Planar Map button with the Averaged Normals option enabled in the Map Parameters rollout. In the Edit UVW window, drag the selected faces away from the rest of the faces to separate it.

  5. Back in the viewport, rotate the swan around and select all the faces on its opposite side. Then click the Quick Planar Map button again. Drag these faces away from the others in the Edit UVW window.

  6. In the Edit UVW window, enable the Select Element button and drag over all the vertices that haven't been separated. Then click the Quick Planar Map button again.

  7. If any stray polygons exist, select them and notice which elements they are next to. Then select the stray polygon and the major element that it should be connected to and press the Quick Planar Map button to combine them.

  8. Once all the stray polygons have been attached, you can position each of the elements for the final map.

Figure 24.11 shows the results of the swan mapping.

image from book
Figure 24.11: The Quick Planar Map button makes separating the faces into elements easy




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

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