The Game Artist's Guide to Maya, Pt. 3 | 3
The Game Artist's Guide to Maya, Pt. 3
The 3D Paint Tool
When you are texturing a model, creating a guide to the major parts of the body for the UV layout can be very helpful. A guide can spare you a lot of grief if you have trouble recognizing the various parts of the model within the jumble of lines that make up UV layouts. The 3D Paint Tool can help you accomplish this, but it can be a little confusing if you are not familiar with it.
First of all, the model has to be UV mapped, and it needs to have a material applied (without a color map) for the 3D Paint Tool to work properly. When these two criteria are met, you can get started.
To avoid confusion, hide everything except the objects to which your current material is applied. Start with the sword, so you can hide the body and the head.
- Here
are the steps:
- 1. Combine the three sections of the sword together into one. With the sword
selected, go to the Rendering module (F5) and go to Texturing > 3D Paint Tool >
Options.
- 2. Scroll down in the 3D Paint Tool options toward the bottom. Under the File
Textures section, choose the Image Format (I chose Targa) and click the
Assign/Edit Textures button. A small window will pop up; you can use it to
enter how large the image will be. For the sword, choose a 512 Ã 512 image to
match your UV layout. This enables the brush.
- 3. To resize your brush, manipulate the radius attributes at the top of the Paint
Tool options. You can also hold the B key and click and drag with the middle or
left mouse button. Paint on the model to mark it up and help you in the texture
painting process.
- Don't try to be too perfect, as this is mainly a guide and usually should not be
incorporated into the texture itself. Once you have the model marked up a bit to indicate
where the major parts are in the UV layout, you will need to save it.
- 4. In the File Textures section of the Paint Tool options, click the Save Textures
button. This will save the texture file into the 3DPaintTextures folder of your
project directory.
- Continue with the body and the head, following the same steps. Remember to
combine the geometry together to help make the painting easier. You can later use Edit
Polygons > Separate to undo this. My results are shown in Figure 3.36.
Vertex Coloring
Vertex coloring is one method that some game engines use to add large swaths of color to a model without having to edit the texture files. Many game engines project lighting onto models using vertex coloring as well. To apply per-vertex coloring in Maya, select the geometry, and navigate to Edit Polygons > Colors > Paint Vertex Color Tool > Options. This tool works very similarly to the 3D Paint Tool, and it uses a brush to paint on color. You can change the color in the options, under the Color section.


Figure 3.36 A texture guide created with the 3D Paint tool
Baking Normal Maps
A normal map, as described earlier, is a pixel shader that uses light information to calculate very accurate bump mapping in real time. The image is RGB, with the three hues controlling XYZ depth, respectively. One method for creating a normal map is to actually create a high-resolution version of the model in addition to the low-polygon version and baking that information down into a normal map using Maya 6's new Transfer Surface Information function.
First, you need to create a high polygon version of your game model. Also, your low-polygon model must be UV mapped. For this example, we will use Silenus's horn (Figure 3.37).

Figure 3.37 A high-resolution version of the horn
- 1. Place the high-resolution model over the low-resolution model.
- 2. Select the low-poly model first and shift-select the high-poly model.
- 3. Under the Rendering module, go to Lighting/Shading > Transfer Surface Information
> Options.
| Note: Make sure the plug-in,TransferSurfaceInfo.mll, is loaded under Window > Settings/Preferences > Plug-In Manager. |
- In the options, you can set the image resolution, file location and name, and file
format. You may need to experiment with the Search Depth when making your normal
maps. Search Depth indicates how far from the low-poly model it needs to look to
properly calculate the normal map.
- 4. When ready, click the Bake button and Maya will calculate the normal map and
save it to the indicated location.
Texture Painting Tips
Texture painting is definitely a process that depends a lot on talent and practice. Here are some tips to keep in mind while painting your own textures.
Contrast Make sure that your texture is not too subtle. Folds, wrinkles, etc. need to be very clear to be conveyed in the texture. Making sure the image has some contrast can help with this.
Hand Painting versus Photo Sourcing There are two main schools of thought when it comes to creating textures: paint them by hand or use photo sources. Personally, I do both. But even when I use photos of some kind, I rarely use them as is, and I will always try to customize what I take from photos.
The method you use will generally be determined by the style of the game. A game like The Legend of Zelda: The Wind Waker probably would not use much in the way of photo sourcing because of the cartoon style.
Note: A great source for high-resolution photo references is www.3d.sk. |
Saturation Color saturation can depend a lot on the style of the game, but you want to make sure that the nice pretty colors you choose in Photoshop show up nicely on the model.
The Finished Model
For the final Silenus model, we have the following textures:
Color Maps The color maps are the main textures that you see with all of the color information (Figure 3.38). These images are mapped to the Color attribute of your materials.
Specular Maps The specular maps are grayscale images with specularity information.
Wherever the model should be shiny, the texture should be white (Figure 3.39). If you use specular maps, you will need to change your Lambert material into one that is capable of specularity, such as a blinn. This is easily done in the material's Attribute Editor by changing the Type attribute near the top.
Specular maps are mapped to the Specular Color attribute of your materials.

Figure 3.38 The three color maps for Silenus

Figure 3.39 The three specular maps for Silenus
Transparency Maps As mentioned before, transparency maps (or opacity maps) will make a model transparent where the texture is black. White areas will remain opaque (Figure 3.40). Transparency maps are mapped to the Transparency attribute of your materials.
| Note: Maya will automatically apply the alpha channel of your color maps to the Transparency attribute. Maya will automatically apply the alpha channel of your color maps to the Transparency attribute. |

Bump Maps As technology has increased, bump maps have rapidly become replaced with normal maps. But essentially, white areas indicate high, while black areas indicate low. Bump maps are mapped to the Bump Mapping attribute of your materials.
Because this book is not in color, I will not show the bump maps here.
Essentially, they are grayscale versions of the color maps. All of the maps I used can be
found on the CD under Tutorials/Chapter3/Character_UVMapping/sourceimages.

Created: March 27, 2003
Revised: January 17, 2005
URL: http://webreference.com/graphics/game3/1

Find a programming school near you