UV Mapping Editor

From ShadeCamp

Jump to: navigation, search

Contents

UV Mapping Editor Overview

UV mapping is the process of mapping a vertex in a polygon mesh to a point (UV value).

With the UV Mapping Editor, you perform the UV mapping process by mapping the polygon mesh, based on a mapping image (used as a template), to the wireframe, and editing it.

Using UV Mapping Editor

To render the modifications applied to objects using UV Mapping Editor, follow these steps in the Surface window:

1. Select image from the Pattern pull-down menu, and load an image into the Picture box.

2. Select the Wrap option for the mapping method.

3. Select a location where edited UV information is stored (“Distance” or “UV”) from the UV Pattern pull-down menu.

We will use a spherical polygon mesh to briefly describe how to use the UV Mapping Editor plug-in.

1. Before using UV Mapping Editor, apply the appropriate surface attributes to the polygon mesh in the Surface window.

In the Surface window, select an image to load it in the Picture box. Specify the Wrap for the Projection type.

Important: You must select the Wrap option for the mapping method in order to incorporate the results of the UV mapping feature into the rendering process.

Check and remember the selected item (“Distance” or “UV”) in the UV Pattern pull-down menu because this setting relates to your editing within the UV Mapping Editor.

For more information, refer to the section “UV Pattern pull-down menu” under the section “UVMappingEditor window” in the “UV Mapping Editor Reference” below.

2. Select the polygon mesh of which UV information you want to edit, and choose the UVMappingEditor option from the View menu.

The UV Mapping Editor window appears.

3. From the Textured Image pull-down menu, select the layer for the image you loaded in the Surface window.

Note: If no image has been loaded in the Surface window, the Textured Image pull-down menu contains no layers. However, when you select a polygon mesh that inherits a texture image from its parent part, that image is displayed.

4. The texture image belonging to the selected layer is displayed in the edit area.

You can load the wireframe of the polygon mesh into this are for editing.

5. First, select a UV pattern from the UV Pattern menu. This pattern must be the same as that selected in the UV Correct menu under the Mapping section in the Surface window.

The polygon mesh has two types of UV information, i.e. Distance and UV, one of which must be selected in the UVMappingEditor window (UV Pattern).

The Distance and UV options in the UVMappingEditor window correspond to those with the same names contained in the UV Correct pull-down menu in the Surface window.

These two options in the UVMappingEditor window simply indicate the locations where information is stored, and the editing steps in this window are the same regardless of which option is selected.

See also the section “UV Pattern pull-down menu” under the section “UVMappingEditor window” in the “UV Mapping Editor reference” below.

6. Select a Make UV method from the Make UV pulldown menu in the UVMappingEditor window and click the Make UV button.

Based on the option selected in the Make UV pulldown menu, the polygon mesh is loaded into the edit area in wireframe format. For more information on the options available in the Make UV pull-down menu, refer to the section “Make UV pull-down menu” under the section “UVMappingEditor window” in the “UV Mapping Editor reference” below.

Note: When the polygon mesh is not selected, some menus and their entries will be grayed out and unavailable.

7. The Make UV dialog corresponding to the selected option appears.

The dialog above will appear when the Cylinder option is selected in the Make UV pull-down menu.

The parameters in the Make UV dialog depend on the selected option in the Make UV pull-down menu. For more information, refer to the section “Make UV dialog” under the section “UVMappingEditor window” in the “UV Mapping Editor reference” below.

TIP: Default values for the center and size parameters are calculated so that the entire object fits inside the edit area (gray area), and they are displayed in the Make UV dialog.

8. Click the OK button.

According to the selected option in the Make UV dialog, the wireframe of the polygon mesh is displayed in the edit area.

When you select a control point in the wireframe displayed in the edit area, the corresponding control point in the polygon mesh in the Figure window is selected. This allows you to compare the original polygon mesh and its wireframe. The Wireframe in the Figure window must be in Modify mode in order to see the selected point.

Top: the edit area. Bottom: the Figure window

9. Move the control points in the edit area to edit the UV information of the polygon mesh.

For more information on how to move control points as well as how to configure options, refer to the “UV Mapping Editor reference” below.

10. Once the rendering is completed, you can see the effect of editing the UV information.

UV Mapping Editor Reference

UV Mapping Editor Window

Make UV Pull-down Menu

This pull-down menu allows you to select a Make UV method from Plane, Cylinder and Sphere.

The results of selecting Plane, Cylinder and Sphere, from the top.

Make UV Button

Clicking this button will display the Make UV dialog.

When you specify options in the Make UV dialog and click the OK button, the wireframe of the polygon mesh is displayed in the edit area (the UV coordinate plane) according to the selected options.

TIP: The selected Make UV method can be applied to only a particular surface of the polygon mesh. To do so, select the surface of the polygon mesh and click the Make UV button while holding down the Ctrl key (Win) or the option key (Mac).

Make UV Dialog

This dialog opens when you click the Make UV button in the UVMappingEditor window. Parameters displayed in this dialog vary depending on the selection in the Make UV pull-down menu.

The Make UV dialog when the Plane option has been selected from the Make UV pull-down menu.

Projection Plane Pull-down Menu

This pull-down menu is displayed when you select the Plane option in the Make UV pull-down menu. Use this menu to select the type of view. The polygon mesh is displayed in the edit area using this view.

Axis Pull-down Menu

This pull-down menu is displayed when you select the Cylinder or Sphere option in the Make UV pull-down menu. This menu allows you to select the axis around which the wireframe is rotated.

Center Text Box

This text box allows you to specify a point in the polygon mesh using its coordinates. The polygon mesh is displayed in the edit area so that this point is located at the center of the texture image. By default, this point is identical to the center of the polygon mesh.

Size Text Box

This text box is displayed when you select the Plane or Sphere option in the Make UV pull-down menu. Enter values to specify the size of the wireframe which is displayed in the editor area. By default, the size is calculated and displayed so that the entire object is contained inside the image section of the editor area.

UV Pattern Pull-down Menu

Use this pull-down menu to select a UV pattern from Distance and UV.

A polygon mesh inherits UV information, which is either Distance or UV, contained in a curved surface. However, unlike the case of the wrap mapping process on a curved surface, a change in the selection of a UV pattern for the polygon mesh will not affect the creation of the wireframe or the procedure for editing the UV information.

More specifically, your editing in the UVMappingEditor window will not be affected by the option you selected, i.e. Distance or UV. Thus you will edit either of the UV information options associated with the polygon mesh. It is possible to edit each type of UV information by switching to the other option.

In order to use the type of UV information you edited in the rendering process, you need to select the same type (Distance or UV) in the UV Correct pull-down menu of the Surface window.

Call UV Button

Clicking this button will call the current UV information associated with the selected polygon mesh. The UV information is distributed in the edit area (UV coordinate plane).

Note: Points to which no UV values are allocated will appear at the top left corner of the edit area.

TIP: When you click the Call UV button, the selection state of control points in the Figure window will be reflected on the wireframe in the edit area.

Scale Pull-down Menu

This pull-down menu lets you specify the display scale of the edit area. Refer to the section “Operations in the edit window” below for keyboard shortcuts available in the edit area.

Color Box

This box lets you select colors for the wireframe and control points in the edit area. The three color boxes represent the colors of the wireframe, non-selected control points, and selected control points, from left to right.

Click a Color box to display the Color picker, where you can choose a color.

Textured Image (layer) Pull-down Menu

This pull-down menu allows you to select a layer related to a texture image loaded in the Surface window. The image for the layer selected in this pulldown menu is displayed in the edit area.

Textured Image (RGB/Alpha) Pulldown Menu

Use this pull-down menu to select a display format for the image. Valid options are RGB and Alpha. When the RGB option is selected, the image is displayed normally. Select the Alpha option when using a TARGA format file, causing the image’s alpha channels to be displayed.

Selection Pull-down Menu

Using this pull-down menu, you can specify the movement of a control point when you drag it. Available options are Group and 1Point.

With the Group option selected, when you drag the vertex that is shared by multiple polygons, all those polygons are affected.


When the 1Point option is selected, you can move the vertex for an individual polygon, even if the vertex was shared by multiple polygons.

Accordingly, by selecting the 1Point option, you can separate the polygons that constitute the wireframe. The surface of the separated polygon is filled with a portion of the current texture image.

Operation Pull-down Menu

This pull-down menu allows you to specify the type of operation in the edit area. Available options are Move/Select, Scale and Rotate.

In case the Move/Select option is selected, you can select and/or move control points in the edit area.

When the Scale item is selected, you can magnify or reduce the currently selected points. Click anywhere and drag the mouse towards the bottom right for magnification and towards the top left for reduction.

Dragging direction for magnification

Dragging direction for reduction

When Rotate is selected, the rotation of the selected portion is possible in the edit area. Drag the mouse towards the right to rotate the selected portion clockwise and towards the left to rotate counterclockwise.

Dragging direction for clockwise rotation

Dragging direction for counterclockwise rotation

Selected Face Check Box

When this check box is turned on, only the surface represented by the selected control points is displayed. If no surface is selected, nothing is displayed.


Selected Face check box - top: off, bottom: on

TIP: To separate a surface from other surfaces that share the vertices, turn on this check box and drag the surface.

Align U and Align V Buttons

Click the buttons to align selected control points based on the U or V value. In the editor, the U and V values represent the horizontal and vertical coordinate values respectively. Control points are aligned based on the average position of the selected control points.


The U value alignment


The V value alignment

Degenerate Button

When you click this button, the currently selected control points are combined into one point.

Multiple selected control points are integrated into a single point.

<< and >> Buttons

Click the << (undo) button to cancel the last action you performed. The maximum undo level is 10.

Click the >> (redo) button to restore the last action you canceled.

Editing Operations

In general, operations in the edit area, such as selecting control points, scrolling the screen and magnifying/ reducing the view, are almost the same as those in the Figure window in the Modify mode.

A change in the selection state of each control point in the edit area is reflected in the corresponding control point of the polygon mesh in the Figure window. To reflect the selection state of the control points in the Figure window on the corresponding control points in the edit area, click the Call UV button in the UVMappingEditor window.

In the edit area, the texture image displayed in the edit area is tiled (repeated) over the blank areas, although it is invisible. Accordingly, when you position the wireframe outside the texture image section, the texture image will still be drawn on the wireframe during rendering.


Results of rendering: the object is a rectangular polygon mesh.

Useful Techniques

With the UV Mapping Editor, you can separate each portion of the wireframe, which is a skeletal rendering of a polygon mesh, from other portions, or process individual portions independently.

Performing image mapping using the UV Mapping Editor plug-in

Projection rendering in the Front view

Separating and editing each portion of the wireframe individually

Results of rendering

Below are useful procedures when editing a wireframe.

Mapping a Portion of a Wireframe

Select the control points belonging to the portion you wish to edit, and click the Make UV button while holding down the Ctrl key (Win) or option key (Mac) to apply a specific mapping to that portion.

Separating a Polygon

If the vertex of a polygon is shared by other polygons, you can separate the polygon by performing one of the following steps.

Choose the 1Point option from the Selection pull-down menu, and select and move the surface you want to separate (see the section “Selection pull-down menu” in the “UV Mapping Editor reference”).

Select the surface you want to separate, turn on the Selected Face check box, and move the surface (see the section “Selected Face check box” in the “UV Mapping Editor reference”).

Reading the State of Control Points from the Figure Window Into the Edit Area

Clicking the Call UV button will read the selected control points in the Figure window and select just the corresponding control points in the edit area.

Important Notes on the UV Mapping Editor Plugin

To map an image correctly as specified in the UV Mapping Editor, follow the guidelines below.

  • In order to include UV information into the rendering process, you must select the Wrap option for the Projection type (mapping method) in the Surface window.
  • In order to use the UV information you edited in the rendering process, you need to select an appropriate type (Distance or UV) in the UV Correct pull-down menu of the Surface window.
  • When the Round slider is enabled in the Polygon Mesh dialog, the texture may not be drawn correctly.

If UV mapping is not contiguous, the image may not be correctly drawn for the polygon mesh to which the Round slider has been applied.

  • While editing UV information in the UVMappingEditor window, you can also edit the polygon mesh in the Figure window, for example increase or decrease the number of surfaces. In this cases, click the Call UV button to update the UV information.

If you attempt to edit the UV information without clicking the Call UV button, a warning dialog will appear.



When you have increased or decreased the number of vertices in the polygon mesh, click the Call UV button in the UVMappingEditor window to update the UV information.

When you have added a surface to the polygon mesh while editing the UV information, make sure to click the Call UV button to update the UV information. This will load the control points associated with the added surface into the top left corner of the image frame.

Loaded control points can be edited individually or in a group. To edit in a group, select multiple points and click the Make UV button while holding down the Ctrl key (Win) or option key (Mac) to apply a specific mapping to that section.

Add a surface to the polygon mesh.

When you click the Call UV button, the control points associated with the added surface will be displayed at the top left corner of the image frame (shown in the red circle).

Camera Mapping

To use Camera Mapping you will need a photograph to apply to a simple Shade model. Here we will use "CameraMap.bmp" located in the “Documentation/ Supplemental Manual” folder of your Shade directory. Before using Camera Mapping, open this bitmap file in an image viewer to verify that it is the image you want to use.

Note: It is best to position the camera so that all the vertices of the polygon mesh object are in front of the camera, within the camera's field of view. If some vertices are behind the camera, Camera Mapping may not be applied correctly.

1. Open a new scene by choosing File > New.

2. Choose "Rectangle" from the Create tool and draw a rectangle that will become the table in the photo. Creating a rectangle of approximately the same size as the physical table in the photo will make the Camera Mapping process easier. If you don't know the size of the actual table, try estimating the size from the photo.

Here we have created a table that is 77.5 centimeters wide by 160 centimeters deep.

3. From the Figure menu choose “Load Perspective View" from the "Template" submenu. In the Open dialog box that appears, select the "CameraMap.bmp" file. The photo is loaded into the Perspective view as a template.

4. Now open the Rendering Options tab in the Image window by choosing "Rendering Options" from the Rendering menu. In the Image tab there is a section called "Resolution", under which you can set the size of the image to render. Set the width to 2048 and the height to 1536 pixels, equal to the dimensions of the template.

5. Select "Camera" from the Create tool in the Toolbox, and create a camera like the one shown in the image below.

6. Open the Camera window if it is not already displayed by choosing "Camera" from the View menu. In the Camera pop-up menu (to the right of the virtual joystick), choose "Camera." This is the camera you created in the previous step.

Now adjust the camera position, angle, and zoom so that the rectangle you created in step 2 forms an outline around the table in the photo.

If after making adjustments to the camera you still can't match up the rectangle with the top of the table, fine-tune the rectangle's shape by adjusting the position of the control points in Modify mode.

TIP: If you have trouble seeing the rectangle on top of the template image, select "Settings..." from Figure menu > Template. In the dialog that appears, adjust the "Opacity" value so that the rectangle is more visible. You can also change the display color of the grid lines and objects by choosing Edit menu > Preferences and clicking the Colors tab.

7. With the rectangle selected in the Browser (listed as "Closed line"), choose "Convert to Polygon Mesh" from the Convert tool in the Toolbox. Simply click "OK" when the Convert dialog box appears to use the default settings.

8. Enter Modify mode by choosing "Enter Modify Mode" from the Modify tool in the Toolbox.

9. Select the face of the rectangle (polygon mesh). If you cannot select the face, verify that the Face selection mode button is selected at the top of the Mesh toolbox.

10. Now click the Divide button in the Mesh toolbox, and choose "5" to divide the polygon mesh into five rows and columns.

11. Click the Finish button in the Toolbox to exit Modify mode.

12. Open the Surface window by choosing "Surface" from the View menu.

Check the Mapping checkbox, and choose "Image" from the Pattern pop-up menu. To load the Camera Mapping image, click the "Edit Image" button below the Picture Box and choose "Load." In the Open File dialog box choose /Documentation/Plugin Manual/ ”PM_office.jpg.”

13. Open the UV Mapping Editor by choosing View > UV Mapping Editor. From the "Textured Image" pop-up menu,choose the layer on which you added the image in the Surface window. If you only have one mapping layer, this will be "layer1."

14. After verifying that the "Make UV" pop-up menu is set to "Plane," click the "Make UV" button to open the Make UV dialog.

Select "Perspective" from the Projection pop-up menu and click OK. The default center and size values are fine for this image.

A view of the polygon mesh shown from the Perspective view appears in the editing area of the UV Mapping Editor.

15. Verify that the wireframe displayed in the UV Mapping Editor matches the outline of the table top of the photo. If it is slightly off, you can move some of the wireframe's vertices. To do this, click on the vertices and drag them with the mouse as you would any control point.

Now that that the polygon mesh object has been mapped using Camera Mapping, you can close the UV Mapping Editor window.

16. With the polygon mesh selected in the Browser,start rendering.

You should get a rendered image similar to that shown above.

17. Open the Image tab of the Rendering Options, by choosing Rendering menu > Rendering Options, and selecting the "Image" tab. Click the "Edit Image" button below the Picture Box and choose "PM_office.jpg" from the Images submenu.

Check the Backdrop checkbox to set the loaded image as the backdrop in the rendered image.

18. Now render the polygon mesh again. (Confirm that the polygon mesh is selected in the Browser, and then click the Render button in the Image window.)

The rendered image should look similar to the following image:

The Camera-mapped polygon mesh image and the backdrop should match up perfectly. However, when compared to the original photo, the shadow cast by the polygon mesh causes the table to appear a darker color.

19. With the polygon mesh still selected in the Browser, open the Surface window and click the "More" button to the right of the Picture Box at the top of the palette.

Check the checkbox labeled "No Shading" at the top of the "More Shading" dialog.

20. Now render the polygon mesh once more. Shading of the polygon mesh caused by the lighting in the scene is ignored, resulting in a rendered image almost identical to the original photo.

At this point you can create an object to place on top of the table. By adjusting the lighting in the scene to fit well with the photo, you can sucessfully merge a 3D object with a photograph.

The above scene, “PM_office.shd” is included in the “Documentation - Sample” tab in ShadeExplorer. |

Personal tools