In this tutorial we will learn how to unwrap the car model we created in the first part of this series, and create its texture.
1. Marking the Seams
We will continue using the mirror modifier. So select the model by Right Clicking and press TAB to enter into Edit mode, if you are not already in edit mode.
Press Control-TAB to choose either Vertex or Edge selection in Mesh Select Mode, or click on the Edge button in the 3D view's menu bar.
Select the line of vertices/edges along the side of the car as shown in the image below. Hold the Shift key and Right Click on the edges one by one, to make multiple selections.
Select the bottom side lines as well. Make sure you don't select any other edges.
Step 3With the edges selected, press Control-E to bring up the Edges menu and select Mark Seam. The seams are the line from where the mesh will be "unstitched". Press A to deselect the vertices.
Step 4Similarly, select the edges from the front part of the bonnet/hood to the bottom, as shown in the next image. Press Control-E and select Mark Seam.
Now select the edges along the back, press Control-E and select Mark Seam. And then press Control-S to save the file.
Now select the inside edges of the tires and then press Control-E and click on Mark Seam. Repeat the same process for the rear wheel as well. We now have all the necessary seams marked.
As the other side is generated by the Mirror modifier, we already have a seam in the center, so we don't have to mark that seam. We can take advantage of this mirror modifier for UV unwrapping and texture painting on symmetrical models with a symmetrical texture.
2. Unwrapping the Mesh
Press Control-TAB and select Face select mode. Mouse over any face on the top and press L. You will see that only the group separated by seam is selected. This works only with face select mode. If you press L to select a group while in Vertex select mode, all the connected vertices will be selected, despite of any seams.
Move the mouse over any other group (like the wheels) and press L again to check. If you get any extra faces selected, then the seams are not properly closed. So recheck them from all views. Move you mouse over the selected group and press SHIFT-L to deselect it, or press A to deselect/select all.
Move the mouse over the 3D view's top right corner and drag to split the view into two.
Click on the left most icon in the new 3D view's header (located at the bottom of the view), to bring out the EditorType menu, and then select UV/Image Editor.
Step 3Press A in the 3D viewport to deselect any vertices or faces, and make sure you are in Face select mode (press Control-TAB and select Face select mode if you are not.) Move the mouse over the side of the car and then press L to select only the side group.
Press 3 (on the numpad) to get into a side view. Press U to bring up the UV Mapping menu and select Project From View. This option will unwrap the selected part without any distortion as seen in the 3D viewport.
You will see that the side (one half) is unwrapped as it's being viewed in the UV editor. We see only one side of the car unwrapped, because the other side is being generated by the Mirror modifier.
Just like when editing the points on one side of the mesh, the changes are mirrored on the other side. Similarly, painting on one side will also be mirrored on the right side.
Step 5In the UV Editor and with the side vertices selected, press G to move them towards the center. Press S and Scale it a bit, and then Left Click to confirm.
In the 3D viewport, press A to deselect any faces or vertices. Press 7 on the numpad to get into the Top view. Move the mouse over the top part and press L to select the faces of that group.
With the top part selected, press U and select Project From View.
Step 8Move your mouse in the UV editor. With the top group selected, press R, then N and then type 90 to rotate the group 90 degrees.
Some vertices on the bonnet may overlap, so separate them a little bit. The editing commands are same for the UV Editor as well - Right Click on a vertex to select it, press G to move. You can zoom in and out with mouse's scroll wheel.
Move the mouse over the 3D view. Press the A key on the keyboard to deselect any faces/vertices and press 1 on the numpad to get into the Front view. Move your mouse over the front part and press L to select the front faces separated by the seams. Press U to bring up the UV Mapping menu and then select Project From View.
Step 11Press G and move the group towards the side as shown, and Left Click to confirm. You can also Scale the group up using the S key.
Tweak and loosen up the vertices which are overlapping. Right Click to select one and press G to move it.
Step 12Move your mouse to the 3D view and press A to deselect all. Press Shift-7 (on the numpad) to get into the Back view. Hover over the back of the car and press L to select the back faces separated by the seam. Again press U and then select Project From View to unwrap it.
With the mouse in 3D view select all the wheel vertices, even though some are separated by seams. Press U to bring up the UV Mapping menu and select Unwrap. This will unwrap the mesh regardless of the view.
Again, move your mouse back to the 3D view and press A to deselect all. Now select the lower part of the body. Press and move the middle mouse button to rotate. Hover over the lower part and press L to select all the faces separated by the seam, and then press U and select Unwrap. We also don't need this one to be unwrapped with regards to the view.
All parts of the mesh are now unwrapped. Select all the vertices/faces of the mesh with the A key in the 3D view and you will see all the UV islands (or groups) in the UV Editor. Only the selected faces will appear in the UV Editor, so make sure you have all the faces/points selected in the 3D view.
You will notice that all the groups (or islands) are overlapping each other. So rearrange all the groups in such a way that they perfectly fit the UV Area. To select any group in the UV Editor we have various options, just like in the 3D view:
- Hover over any group and press L to select the group.
- Select any vertex or vertices of the group and press Control-L to select the whole group with the connecting vertices.
- Hold Shift for multiple selections.
- Press A to deselect/select all.
Here are the other commands for the UV Editor, though they are the same as the editing commands in the 3D view.
- G to move
- R to Rotate
- S to Scale
- Zoom in / Zoom out = Mouse wheel.
- Pan = Shift-Middle Mouse Button and drag.
To maximize the UV Editor, move the mouse over the UV Editor and press Control-Up Arrow. Press Control-Up Arrow to toggle back.
Both of the wheels will share the same texture, so place the wheel groups on top of each other and Rotate and Scale if necessary. Each of the vertices in the group should be aligned properly, i.e. they should be exactly on top of each other. Zoom in to check.
Select the inner circles with the B key and Scale them up using the S key. Left Click to confirm. Make sure you select the inner circles of both wheels which are aligned.
Once all the islands are well arranged, press Control-S to save the file.
With the model selected, Press TAB to enter into Edit mode and select all the vertices with the A key. In the UV Editor, click on the
UVs Menu and select Export UV Layout.
Select the PNG format and decrease the Fill Opacity to 0.00.
3. Painting the Texture
Open the saved image in your favorite image editor.
Create a new layer below it and fill it with the base color of your car.
With the UV layout as guidelines, create new layers and start painting the texture. Create separate layers for the shadows, highlights, windshield, etc.
Instead of painting everything manually, you can copy and paste in images
directly too, as I've done here for the lights and wheels.
Finally add another layer for the additional lines (door seams, etc).
Turn off the UV wire layer and save the file as a .psd or .png.
4. Applying the Texture to the Model
Now go back into Blender. In Edit mode, press A to select all the vertices and in the UV Editor,
open the image you saved.
Move the mouse over the 3D view and press Alt-Z to see the texture applied on the model.
Move your mouse onto the 3D view and press TAB to exit Edit mode. With the model selected (Right Click on the car if it's not),
click on the Materials button in the Properties panel and add New.
Rename the material. Reduce the Specular level and under the Options panel,
check Face Textures. You can also set the material to be Shadeless
(under the Shading panel) as per your requirements.
The model is now ready. Press TAB if you are still in Edit mode. You can also press Apply in the Mirror Modifier panel and Control-S to save the file.