Thông tin tài liệu:
CREATING GAME ART FOR 3D ENGINES- P8: Iwish to thank the editing team at Charles River Media (Emi Smith,Karen Gill, Jennifer Blaney, and Jenifer Niles) for their help in gettingthis book publish-ready. Thanks, too, to my technical editor, MikeDuggan. Also deserving recognition are the guys who make the TorqueGame Engine available, GarageGames, who directly or indirectly madethis book and the accompanying CD possible. In particular, I want tothank Joe Maruschak at GarageGames for the great articles and forumanswers that have helped me and many others get a handle on this engine.I...
Nội dung trích xuất từ tài liệu:
CREATING GAME ART FOR 3D ENGINES- P8This page intentionally left blankCHAPTER 8 CHARACTER UNWRAPPING In This Chapter • Unwrapping a Character—Overview • Unwrapping the Hands with a Planar Map and Adding Them to the Body • Unwrapping the Body with a Normal Map • Unwrapping the Character’s Face • Creating a Character UV Template • Unwrapping the Helmet • Unwrapping a Component Mesh • Unwrapping with Multiple Materials IDs • Saving, Loading, and Combining UVs • Baking the Texture into the Mesh 189190 Creating Game Art for 3D EnginesUNWRAPPING A CHARACTER—OVERVIEW Unwrapping a character is more difficult than unwrapping weapons and pickups be- cause the mesh is more organic. Setting up the UVs properly in the Edit UVWs dia- log box can be like putting together a complex 3D puzzle where the shapes keep changing. If you have worked through Chapter 3, “Unwrapping Game Art,” and you are patient, you should see promising results with a few hours’ work. If you are using your own mesh, try to keep it simple the first time through. Unwrapping Before You Rig the Model Unwrapping is best done before rigging your model. You can do it later, but if you are using a biped skeleton, and the Skin modifier is already added, make sure that the biped is in Figure mode; otherwise, when you select faces on the model, they may be slightly offset due to minor adjustments in bone position when you switch out of Fig- ure mode. You can also make a copy of the entire character mesh from the rigged character (again, while the biped is in Figure mode) and delete the Skin modifier from the copy. You can then unwrap this copied version of the mesh; its UVs are saved and applied to the actual character. As long as the number of vertices stays the same, the UVs should transfer from mesh to mesh without difficulty. If you see green lines in any of your UVs that come from an overhang or from polygons that face the wrong direction, it’s likely you have found some stray vertices in your mesh. Understanding the Impact of Stray Vertices Any stray vertices in your model at this stage of the game cause issues in your un- wrapping process. You don’t want to get nearly finished with the unwrap and find that you have to weld some vertices together. Changing the vertex count on your Editable Mesh can cost you some of the work you have done in the Edit UVWs dia- log box unless you detach the problem area before fixing it and then reattach to the main body. Figure 8.1 shows a before and after image; the image on the left is the completely unwrapped character with carefully placed UVs in the texture area, and the image on the right is what the texture and UVs can look like after any ver- tices are welded, or if any parts of the mesh are detached. Depending on how much your model is changed, you can lose all of the UV work you have done. Clicking the Undo button does not fix this problem. Hold off on positioning your UVs in the texture area until you are sure the model is what you want. In most cases, you can rescale and reposition these UVs by bringing in the finished texture as the new back- ground and adjusting the UVs until they fit the saved texture file. Removing Stray Vertices If you are not sure whether you have stray vertices or not, one technique is to select all the vertices in the Editable Mesh, and from the Edit Geometry rollout, in the Weld group, click the Selected button. This operation is easier to do with an Editable Chapter 8 Character Unwrapping 191 FIGURE 8.1 Changing the vertex count on the mesh affects your UVs. Poly, because the Threshold Weld dialog box gives vertex count feedback. As long as you set the threshold value correctly, this process should weld any stray vertices. For a hand on a 2.5-meter character, a weld threshold of 0.01 meters should work well. You can also try rotating the model and moving vertices to see if they are not prop- erly welded; in addition, visually inspect the model after any threshold weld process to make sure you did not weld too many vertices together. The smallest areas of the mesh are most prone to being welded inadvertently. If you perform a threshold weld while zoomed in on small detail areas like the lips or fingers, when you see these smaller features begin to weld together, you know it’s time to increase the weld thres ...