Concept.
UV-mapping is the process of applying a texture image onto mesh object. This can be considered as "skining", "stratching texture over the mesh", but the most precise description is "mapping", since underlying process involves mapping of the mesh (or parts of the mesh) onto texture, but not visa versa.
Mapping is how you assigning an image texture to a portion of a mesh. Therefore, when we make a texture we MUST map it to the mesh, and do it correctly, so that it looks good. Most of the time, textures are not just untouched photos of whatever it is that you're modeling. Instead, they are distorted, retouched, airbrushed, groups of pictures in one image. The beauty of mapping is that you can assign different parts of an image to different parts of a mesh. For example, you can have side, front, and back views of a car, all in different sections of the same image, and then you can assign, or map, the various parts of the car onto the corresponding parts of that image. In fact, one of the virtues of a good texture is that it makes the most use of the space on the canvas, and fits as many parts of the car on one image as is possible, all at the highest possible resolution.
Internally, when UV-mapping you assign each 3D vertex to a certain location on texture. This location is it's U,V coordinates and they are stored within the mesh vertices. This pair of U,V is a uv channel and in some cases mesh can use (or have to use) more than one uv channel. But one channel is the most common case.
Since UV's are stored on a vertex-basis in the mesh and don't bind to texture they were mapped, texture replacement is widly used by games and appears as variouse "skins" for the same mesh.
Mapping areas on the mesh.
When mapping certain areas of the mesh onto texture there could (and will) be a case when neighbour ares on the mesh are mapped to completely different locations on texture. For example, the line where hood goes along the wings (left or right). In this case the hood is mapped to one area of texture and wings are mapped to another area. But understanding the internal concept (that uv is assigned to the vertices) you will clearly figure out that mesh splitting is required. Been more precise, you need to slice the areas-boundary edge, so each vertex on the boundary duplicated: one for hood and one for wing. To understand what is acutally happens in this case I recommend to apply detach tool to the hood, move it away, uv-map it, uv-map side wings and then move the hood to it's original position. When this areas-boundary issue will be clear to you, detach tool will still be used, but you will not require to detach mesh into stand-alone object and/or move it away.
What is required.
First of all, the mesh is required. It doesn't matter whether this is a single object or several objects (e.g. car body split to parts: hood, doors, roof, windows etc.) I've made this shape quickly just as an example.
Second, you require a texture you are going map to. As an example, I'll take an incomplete texture from Dodge Viper GTS. As you can see, it is loaded into textures browser which you can find in View/Textures Browser.
Finally, you need a material that uses this texture. There could be several materials with the same texture or several materials with variouse textures for single mesh, it doesn matter. In this tutorial, I've created a material and assigned vipergts.bmp texture to it. The have been done in several steps. First of all, I opened Materials Editor in View\Materials Editor. Then, using New Material button (the leftmost under material-preview sphere) created material. Then I renamed it in the list of the right to body skin material. Then, I expanded Textures rollup and clicked on wide ... button. The textures browser appeared where viper gts was selected by me and Ok button was clicked. As a result I see what is on the image: a textured material with required texture on it.
1. Assigning textured material to an object/polygons.
The first step you need to do before UV-Mapping is assign material to an object. If you use only one material/texture per object, you can make it only once before starting uv-mapping. If you use multiple materials in your mesh, assigning (or at least) verifying which material is already assigned to certain polygons) should be made each time before mapping certain areas of the mesh. I'll show you bothe examples here.
Assign material to the whole object is quite simple. As you have noticed, there is a Assign to Selection button in Materials Editor. By pressing this button in materials editor, you force it to assign currently shown material to the geometry you have currently selected. For example, you can select several objects, open materials editor, pick desired material and press this button. The same can be done if you have object switched to polygons level and have certain polygons selected. Material will be assigned to these polygons only.
I personally (for historycal reasons) use another way of assigning materials :). I assign them in attributes or Properties box. Simply switch to objects level, right-click on the object and pick Properties... in pop-up menu.
A Selection Properties dialog box will appear where you can expand Mesh\Polygons and change material propery to desired material. Also notice that I've expanded Mesh\Vertices\Format branch. Here you should ensure that at least one uv-channel is available in mesh vertices. On the image below it shows 2 available uv-channels. The same way you can select polygons and use Properties in context menu to assign material.
After assignin material in my case the whole car turned green: That's because there is no mapping assigned and all vertices uses upper-left texture pixel as a mapping. I always paint a small square (8x8 pixels) in upper-left corner of texture to any bright color, so I can see non-mapped areas of the mesh. The same I recommend to you. Also, if your texture has an alpha channel for transparency, the underlying alpha color should be white in this square, or you will get invisible (fully transparent) mesh after assigning textured material.
2. The first assignment.
I'll show you the basic mapping assignment here. We will uv-map the whole car using single "assignemnt" of mapping. By the world "assignment" I mean that UV-mapping will be generated for the whole car and these generated mapping will be edited as a single area of mapping. I'll map the whole car to car's top texture (which occupies upper area of texture).
Since mapping is vertex-based, I switch object to vertices level and select all vertices with Select\All tool (I used Shft-A hotkey for it). mesh got a dark red tint in the views. To force ZModeler work with selected vertices, SELECTED MODE have to be switched. Press according button in status bar so it turnes red. at the same moment vertices normals will appear on the mesh. Now you we are ready to the main UV-assignment step.
2. The Surface\Mapping\Edit UV tool.
This tool can be applied to selected vertices and allows to generate, restore or remove UV-mapping for vertices. Generate means that it creates new mapping and allows editing of it. Restore means that it uses current mapping and allows editing of it. Remove measn what is supposed to mean: it removices mapping by resetting all UV to 0,0 (initial state).
You can either pick this tool in commands bar, or use it from context menu. I will use it from context menu by right-clicking in Top view. An options box will appear for Edit UV tool. Here it is: All default options fit our needs in this case, but to make things more clear I'll explaing which options here your should pay attention to. They are:
You can click OK button to see a noticeable changes in 3D view. Deselect all vertices (Shift-D hotkey), switch to objects level and switch selected mode OFF by pushing the button. Of cause this generated mapping is not what we need and it requires editing. Edit UV has done it's job already and the next step is to open UVMapper.
3. The UVMapper view.
The UVMapper is a specific kind of view where you can edit UVMapping for the mesh. This viewport works with the mesh which was generated by Edit UV tool. This mesh is a Mapping-object and it is bind to original mesh mapping. When you edit this mapping object, an UV-mapping on original object changes.
Change any viewport (right for example) to UVMapper (by clicking on a viewport label and selecting desired viewport in context menu):
Guess what? There is nothing in UVMapper viewport. This is quite normal and you have to choose what you are going to modify in this viewport before anything will appear. First of all you need to select which material/texture mapping you are about to modify. Click on a Material button and select desired material in a pop-up list:
From this moment texture should appear in UVMapper. In most of cases the mesh will appear too, but if it doesn't, click on an Objects button and place a checkmark near desired object(s). Then press Esc to hide the list:
On the image below two viewports are shown: UVMapper and a Top view. Notice that mesh in UVMapper looks the same way it looks in Top view (where I've applied the Edit UV tool). You can pick a Modify\Move tool and move the mesh in UVMapper. At the same time you can look into 3D view to see what's changes when you move mapping-object. Don't be afraid to scale/rotate this mesh - it will no way distort your original mesh, only uv-mapping is affected.
To achieve what's on the image above I've rotated the mesh, scaled it , then switched it to vertices level, selected half of vertices and mirrored them. Finally, I adjusted certain vertices positions, using Modify\Move tool in Selected mode and moving groups of vertices that I selected with Quadr tool. Using hotkeys for these tools will improve your mapping performace.
You can change UVMapper back to original view when you've done mapping. Note that when you hide/close the last UVMapper viewport, a mapping-object is removed. If you wish to return to UVMapping again, you can use Edit UV tool to Restore mapping.
"Split and uv-map" aproach. "Area" mapping.
As it was stated before, you will need to map car parts to certain ares on texture. In my case I'll show how to map front of the car to front texture. First of all, you should remember the vertex-mapping concept: some vertices (those that near the hood and some other) are already mapped and this mapping should not be distorted, but other vertices in front part need new mapping to be generated.
Switch to polygons level and select the polygons you want to map. I selected those that will be mapped to a front-view texture. I temporary switched texture off, to show which polygons are in a question:
You need to separate these polygons from the rest of the mesh, so they use their own vertices and don't share these vertices (and their mapping). This can be done with a single apply of Modify\Submesh\Detach tool. Locate it in commands bar and expand it's options box: Set the options like one the image. They are:
Make sure SELECTED MODE is ON and click once in the view. Nothing (visually) will happen, but these polygons are now separated from the rest of the body. Keep selected mode ON and switch from polygons to vertices level (by pressing '1' hotkey). You should see vertices selected and these vertices shows that the area you've detached is now separate from the result of object: Once vertices are separated, you can apply Edit UV tool in Front view to selected vertices, but make sure to select Generate New option in Edit UV options box:
Then, exactly like you did with the whole body, the front area is mapped:
Conclusion.
As a conclusion, I'll quote here some mapping tips from Ryan's Ravisol tutorial.
To a point, the mechanics of mapping a mesh can be taught. However, the art of clever, precise mapping is something that comes with time. Some practices can help you speed this learning process up.