Управление разверткой

Материал из Blender3D.

Перейти к: навигация, поиск

Содержание

The second step is to work with the UV layouts that you have created through the unwrap process. If you do add faces or subdivide existing faces when a model is already unwrapped, Blender will add those new faces for you. In this fashion, you can use the UV Texture image to guide additional geometry changes.

The UV tools were significantly enhanced for Version 2.46. For users of Blender 2.45 and before, consult this archived page Шаблон:Clr

Activating UV Textures

The UV/Image Editor allows you to map textures directly to the mesh faces. The 3D View window shows you the object being textured. If you set this window into Textured viewport shading, you will immediately see any changes made in the UV/Image Editor window in this window, and vice versa.

Изображение:Manual-UV-material-texture.png
The Material and Texture panels using a UV Texture.

You can edit and load images, and even play a game in the Blender Game Engine with UV textures for characters and object, without a material, and still see them in the 3D window. This is because no 'real' remdering is taking place; it is all just diffuse shading.

To render an image however, you must

  1. create a Material for the object, and
  2. tell Blender to use the UV Textures on faces when rendering.

To create a Material, you have to click Add New Material in the F5 Shading context.

There are two ways to tell Blender to use the UV Texture when rendering: the Proper way and the Quick Way.

Изображение:Manual-UV-materialistex.png
The Material panel with activated TexFace button.
  • Quick Way: The quick way is to set up a TexFace Material as shown. To do so, with the buttons window displayed, press F5 to display the Shader Buttons. In the Buttons window, Material settings, click ADD NEW material. On the Material panel, enable TexFace. This way is quick, but bypasses the normal rendering system for fast results, but results which do not respect transparency and proper shading.
  • Proper way: In the Texture channel panel F6((shown above), Add a New Texture which is mapped to the UV texture (it will be mapped to Color by default, and the UV Texture is named "UVTex" by default). Select the Textures subcontext, and define the texture as an image and load the image you want to use. If the image has an alpha channel and you want to use it, click "UseAlpha" in the Map Image panel.

Шаблон:Note

Combining UV Maps

Very often you will unwrap an object, such as the face example we have been using, and get it 'mostly right' but with parts of the mesh that did not unwrap properly, or are horribly confusing. The picture to the right shows an initial unwrap of the face using the Unwrap from sphere option. The issues are with the ear; it is just a mush of UVs, and the neck, it is stretched and folded under. Too much work to clean up. Шаблон:Clr
Изображение:Manual-UV-Unwrap-Face.png
Unwrap Face Only, without Ear or Neck
We can tell that the ear would unwrap nicely with just a straightforward projection from the side view, and the neck with a tubular unwrap. So, we have to unwrap part of an object using one unwrap calculation, and the rest using another calculation. We select only the face faces, unwrap them using the Sphere calculation, and scale and rotate them somewhat to fit logically within the image area of the UV/Image Editor window pan. For the next part of the mesh, unselect the faces you were working with. Their UVs will disappear, but they are still there, just not show. To verify this, you can select a few faces in 3D view and it will show up in the UV/Image Editor.

To work on the ear, in the 3D View, we select only the ear faces. You can switch out of UV Face Select mode, into Edit mode, and use Vertex Groups to select the ear. Selecting sub-meshes is easy too, since they are not connected to the rest of the mesh, simply selecting Linked vertices will select that entire submesh.


Back in UV Face Select mode, re-unwrap the ear using the Project calculation, scale and rotate them somewhat (discussed in the next section), and place them off to the side. You can do this repetitively, using different UV calculations; each re-calculation just puts those UVs somewhere else. Choose the calculation that gives you the best fit and most logical layout for subsequent painting. Шаблон:Clr

When all parts of the mesh have been unwrapped using the various calculations, you should end up with something that looks like to the Example to the right. All of the sections of the mesh have been mapped, and all those maps are laid out in the same UV Texture map. Congratulations! From here, it is a simple matter of stitching (discussed in the next section) to construct the entire UV Map as a single map. Шаблон:Clr When you have completed arranging and stitching, you will end up with a consolidated UV Map, like that shown to the right, arranged such that a single image will cover, or paint, all of the mesh that needs detailed painting. All of the detailed instructions on how to do this are contained in the next section. The point of this paragraph is to show you the ultimate goal. Note that the mesh shown is Mirrored along the Z axis, so the right side of the face is virtual; it is an exact copy of the right, so only one set of UVs actually exist. If more realism is desired, the Mirror modifier would be applied, resulting in a physical mirror and a complete head. You could then make both side physically different by editing one side and not the other. Unwrapping would produce a full set of UVs (for each side) and painting could thus be different for each side of the face, which is more realistic. Шаблон:Clr

Averaging UV Islands

Update, added UV Island average tool, (Ctrl+A in the uv window) This makes selected UV islands proportionally equal, using their area in the 3d view

Multiple UV Layouts

Изображение:Manual-UV-Fashion.png
Mesh with Multiple UV Textures

You are not limited to one UV Layout per mesh. You can have multiple UV layouts for parts of the mesh by creating new UV Textures. The first UV Texture is created for you when you select a face in UV Face Select mode. You can manually create more UV Textures by clicking the New button next to "UV Texture" on the Mesh panel in the Buttons Window, Editing Context) and unwrapping a different part of the mesh. Those faces will then go with that UV Texture, while the previously unwrapped faces will still go with the previous UV Texture. Note that if you unwrap the same face twice or more times (each time to a different UV Texture), the coloring for that face will be the alpha combination of the layers of those UV Textures.

In the example to the right, we have a mesh for a blouse. The mesh has been seamed as a normal blouse would, shown in the middle in UV Face Select mode. Wishing to make a cut pattern, the front of the blouse was unwrapped and basic rotation and scaling was done to center it in the UV/Image Editor window. It was then moved off to the side, while the left and right sleeves were unwrapped, each rotated and scaled. Then, select a sample face from each cloth piece, in the 3D View Select->Linked Faces, and the UV/Image Editor will show all those pieces (as shown to the right). You can then work with all pieces for that UV Texture layout. The example shows all three pieces moved onto the image area for painting. As you can see, the pattern nicely fits a square yard of cloth.

Another UV Layout was created by clicking the New button in the Mesh panel, and the process was repeated for the backs of the sleeves and the back of the blouse. Two images, one for the front and one for the back, are used to color the fabric. In this case, some faces map to the first texture, while other faces map to the second texture. Шаблон:Clr


Additional Options

When you switch your 3D window to UV Face Select mode, Blender changes its menus slightly to give you more and better tools to use.

Similar to Active
The Select menu now offers a script to help you select items that are similar to the last-selected (active) face. You can pick all the faces, for example, that have the same surface area (plus or minus a limit) as the active one. For each choice, you can add or take away the similar items from the list of faces selected. Criteria include Material, UV Image, Face mode, Vertex colors, and many others. For example, if you were going to change an image used as a UV texture, you would want to select all faces that used that same UV image in order to evaluate the impact of the change on the overall mesh.
Linked Faces
Recall that not all faces and vertices of a mesh have to be connected. A single mesh can be composed of many disconnected sub-meshes. Selecting Select->Linked Faces is useful for selecting all the faces of a submesh. Also, linking goes up to a seam as previously discussed.
Set Vertex Colors
If you don't like potato white, select Set Vertex Colors (Face menu) to view your mesh using the active color of Vertex Paint. A blue face color contrasts the seam colors nicely.

Editing Buttons

In the Buttons window, press F9 to get the Editing buttons. When in UV Face Select mode, the buttons change to give you additional options when working with UV maps. The AutoTexSpace button should be enabled. Шаблон:Clr

UV Textures List

The Mesh panel (shown to the right) clearly lists the UV Texture maps created for this mesh, and allows you to create New ones as placeholders for future unwrapping operations. Each map has a selector button, a name, and a fat X Delete button. The selected map is displayed in the UV/Image Editor window. The example shows a few UV maps created for a character, and the map for Clothes is selected.

Deleting a UV layout for the mesh destroys all work done in all unwrapping associated the mesh. Click with care. You've been warned. Шаблон:Clr

UV Texture Options

The Texture Face panel is added when you go into UV Face Select mode, so you are not used to seeing it. Lots of neat options for controlling how the UV texture interacts with the rest of your scene. Options for how and if it is shown include: Tex, Tiles, Light, and Invisible. You almost always want it to participate in object and particle Collisions. The texture can be Shared, rendered front and back (Two Sided), and, where blank, can be shown using the object (not the vertex painted) colors.

The texture can color Halos, or be shown like a Billboard, or normally with neither of these selected. The face can used to cast Shadows on other objects.

When rendered, Opaque lets you see this texture, which is almost always a good idea. If you want sections to be transparent where the texture is, use Add; to use the texture as an alpha mask, use Alpha.

Copy UV+ is an action button, not a setting. It copies the UV mapping from the active face (the last face selected) to all other faces that are selected. Select all faces you want similarly mapped first, then Шаблон:SMB the model face, and click Copy UV+ Drawing options (how the UV mapping looks to you while working in Blender) include drawing Faces, Edges, Hidden Edges, and Seams. When you project from a view, normally the View Aligns Face, but you can specify that, for unwrapping round objects (tubes and spheres), the view is aligned to the top (poles) of the object.

By default, Unwrap uses the Angle-Based Formula, or ABF. If you want to use Least-Squares Conformal Method (LSCM) instead, change Angle-Based to Conformal. The reason why ABF is default is because it is generally better than LSCM. There may be some exceptions for that though, so if an unwrap just isn't clean to you, try conformal.

Please set the cube and tube sizings to encompass your object prior to unwrapping, or incredible skewing and sizing will result.

Saving your UV Layout

The UV coordinates and image links are automatically saved with the mesh in the .blend file. There is nothing extra you need to do.

Saving an outline of your UV Layout

As a way of communicating to an artist who is painting your UV Texture for you, Blender offers a script called Save UV Face Layout (located in the UV/Image Editor Window, UVs->Scripts->Save UV Face Layout) that saves an image in Targa format (.tga) for the object you have selected. The image is an outline of the UV face mapping. The file is (by default) named with the prefix you enter. If Object name is enabled, then the name of the object is appended on so that you don't accidentally overwrite one layout for one object with another's.

Controls allow you to:

Size
select the size of the image in pixels. The image is always square
Wire
the thickness of the wire lines that define each face border
All Faces
if disabled, then only the UV faces selected will be outlined
SVG
if enabled, saves the file as a scalable vector graphic (SVG) format file, not a Targa.
Fill SVG faces
fills in SVG faces to allow easier editing and face recognition
Edit
Enabling Edit and specifying the name of an editing program int eh Editor: field will launch that program and load in the saved layout (after the image has been saved).

The image will be lines defining the UV edges that are within the image area of the UV mapping area. Edges outside the boundary, even if selected, will not be shown in the saved graphic.

The artist will use this as a transparent layer in their paint program as a guide when painting your texture. The example below shows Blender in the background, and the Gimp working on the texture, using the saved layout as a guide. Note that targa format supports the Alpha channel, so you can paint transparent areas of the mesh.
Изображение:Manual-UV-SaveLayout.png
Using the layout as a guide in Gimp


Личные инструменты