Chapter 11. Texture Mapping

The use of two-dimensional images to add color and detail to three-dimensional objects has been a big part of computer modeling and animation from the very start. This is known as texture mapping, and it is practically an art form all its own. A well-painted texture map can add an astonishing degree of realism, especially when combined with good lighting and a well-constructed 3D model. In this chapter you'll see how to use texture mapping to create photorealistic skin for a character.

In this chapter you will learn to:

  • Create UV texture coordinates

  • Create bump and normal maps

  • Create displacement maps

  • Use the PSD network node

  • Create a misss_fast_skin shader

  • Create texture maps for NURBS surfaces

UV Texture Layout

No matter what software you use or what type of object you're trying to model, UV texture mapping is not fun. It's a chore, and like most things in life that are tedious and difficult, it has to be done. Someday soon advances in rendering technology may make UV texture mapping unnecessary; however, until that day comes you'll have to embrace the arcane art of UV mapping. Fortunately Maya provides you with some advanced, yet simple-to-use tools to create UV texture coordinates for your models.

What Are UV Texture Coordinates?

Just as x-, y-, and z-coordinates tell you where an object is located in space, u- and v-coordinates tell you where a point exists on a surface. Imagine a dot drawn on a cardboard box. The u- and v-coordinates specify the location of that dot on the surface of the box. If you unfold the box and then place a grid over the flattened box, you can plot the position of the dot using the grid. One axis of the grid is the u-coordinate; the other axis is the v-coordinate. 3D software uses u- and v-coordinates to determine how textures should be applied to 3D objects. UV mapping refers to the process of determining these coordinates for polygon objects. UV layout is a term that refers to the 2D configuration of the UVs on a surface, such as a picture of the unfolded box on a grid taken from above (see Figure 11.1). In the UV Texture Editor, u-coordinates are plotted along the horizontal axis, and v-coordinates are plotted along the vertical axis.

UV coordinates appear as an unfolded version of the model. They determine how textures are applied to 3D models. In this image the coordinates tell Maya where to place the black dot on the cube.

Figure 11.1. UV coordinates appear as an unfolded version of the model. They determine how textures are applied to 3D models. In this image the coordinates tell Maya where to place the black dot on the cube.

NURBS surfaces have implicit UVs; this means that the coordinates are built into the parameterization of the surface. UV texture coordinates do not have to be created for NURBS surfaces; only polygon and subdivision surfaces require mapped UVs. With regard to subdivision surfaces, it's usually best to map the UVs on a polygon version of the model and then convert that model to subdivision surfaces. The mapped UV coordinates will be converted along with the polygon object (a discussion of texturing NURBS surfaces is at the end of the chapter).

Most of the time you are creating UV coordinates so that the colors applied to the object can be painted in a two-dimensional digital paint program, such as Photoshop. The UV map acts as a guide in Photoshop that tells you where to paint the various colors. Figure 11.2 shows a typical Photoshop texture-painting session using a snapshot of the UVs, created in Maya, as a guide. So for a character's head, a good UV layout may look a little strange, but you should be able to make out where the eyes, nose, mouth, ears, and other features are located. This is often referred to as a human readable UV layout as opposed to an automatically tiled layout that functions just fine but is impossible to decipher when trying to paint a 2D map in Photoshop (see Figure 11.3).

A good UV layout will also minimize stretching, warping, and the appearance of seams between the parts of the UV map. As you go through the exercise in this chapter, you'll learn about strategies that can help you avoid, or at least reduce, many of the problems that can arise when painting two-dimensional textures that will be applied to a three-dimensional model.

Even if you intend to create texture maps in a program such as BodyPaint 3D or ZBrush, which allow you to paint directly on a 3D model, it's a good idea to make sure you have human readable UVs. This is especially true when working in a production pipeline. The textures you create in ZBrush or BodyPaint may need to be mapped or enhanced in Photoshop. If the UVs are not human readable, this will be impossible.

UV coordinates are used as a guide for painting 3D model textures in digital paint programs such as Photoshop.

Figure 11.2. UV coordinates are used as a guide for painting 3D model textures in digital paint programs such as Photoshop.

Human readable UVs bear some resemblance to the original 3D object (top) so that an artist can easily paint textures. Automatically tiled UVs (bottom) will function but are impossible for artists to decipher.

Figure 11.3. Human readable UVs bear some resemblance to the original 3D object (top) so that an artist can easily paint textures. Automatically tiled UVs (bottom) will function but are impossible for artists to decipher.

Creating UV Texture Coordinates

This exercise uses a human head as an example. You can learn almost everything you need to know about creating UV coordinates for characters just from the head. Most of the rest of the body is pretty straightforward, and you can apply the techniques you learn here to most other objects.

There are many approaches to mapping the head, depending on what you need to achieve in your final render. In this example the goal is to create neat UVs that will maximize the texture space reserved on the face.

  1. Open the UVMap_v01.ma file from the chapter11scenes folder on the DVD. You'll see a polygon head of an older man, as shown in Figure 11.4.

  2. In the perspective view choose the UV layout panel arrangement by choosing Panels

    Creating UV Texture Coordinates

The interface of the UV Texture Editor is a 2D graph with menus and an icon bar at the top. Many of the icon commands are duplicated in the menu selections. The graph is divided into four quadrants. The upper-right quadrant (shaded darker gray) is typically where you'll keep your texture coordinates. Notice the numbers on the graph; the upper-right quadrant has the positive U and V values. The values range from 0 to 1. It is possible to have coordinates existing outside this range, and this may be useful in some circumstances, but most of the time you want to keep the coordinates within this range.

The workspace is divided between the perspective view on the left and the UV Texture Editor on the right. Currently the selected head object has no UV texture coordinates.

Figure 11.4. The workspace is divided between the perspective view on the left and the UV Texture Editor on the right. Currently the selected head object has no UV texture coordinates.

Mapping the Scalp

When creating coordinates for a large complex object, it's best to break it into its simplest components. The model has a large bald head; you'll start by making coordinates for just this part of the model.

Creating and editing UV coordinates is a lot like modeling, and you'll use many of the same tools and selection modes. The best time to create UV coordinates for a model is when you've finished editing the model itself. Inserting edges, subdividing, and extruding will alter the coordinate layout and produce undesirable effects.

  1. Click on the head model in the perspective view, and press the F key to center the model.

  2. Select the model and apply a Lambert shader. Name the shader oldManShader.

  3. Open the Attribute Editor for oldManShader. Click the checkered box next to the color slider to open the Create Render Node panel, as shown in Figure 11.5. Make sure that Normal is selected in the 2D Textures rollout, and click Checker. This will apply the checker texture to the color of the model. The checker pattern will not appear since the model has no texture coordinates.

    Select the checker texture in the Create Render Node panel.

    Figure 11.5. Select the checker texture in the Create Render Node panel.

  4. In the perspective view, select the model and press the 6 key to switch to shaded view.

  5. From the toolbar, select the Paint Selection tool, and the model will switch to vertex component mode. Right-click on the model, and choose Face to switch to face selection mode.

  6. Open the Paint Selection Tool options (see Figure 11.6). In the Stroke rollout, choose Reflection, and set Reflection Axis to X. When you use the tool to select faces, the faces on the opposite side will also be selected.

    The options for the Paint Selection tool

    Figure 11.6. The options for the Paint Selection tool

  7. Switch back to shaded view (hot key = 5). Paint across the top of the head on one side of the model. To adjust the radius of the Paint Selection tool interactively, hold the b key and drag on the model; the red circle indicates the radius of the selection brush.

  8. Use the Paint Selection tool to select the area of the head that corresponds to the scalp; use Figure 11.7 as a guide. You want to select just the top of the head. If you need to deselect some faces, just hold the Ctrl key while painting on the model. Switch to wireframe view, and make sure only the faces of the scalp are selected. By default the Paint Selection tool adds to the current selection, so you do not need to hold the Shift key while painting.

    Use the Paint Selection tool to select the faces of the scalp. The Reflection settings in the tool options allow the faces on the opposite side to be selected automatically.

    Figure 11.7. Use the Paint Selection tool to select the faces of the scalp. The Reflection settings in the tool options allow the faces on the opposite side to be selected automatically.

  9. Once you have the faces of the scalp selected, you'll map the UVs using one of Maya's preset mapping primitives. The cylinder works well to match to the rounded surface of the scalp. With the faces still selected, switch to the Polygon menu set, and choose Create UVs

    Quick Select Sets

    By default the cylindrical mapping manipulator appears aligned on the Y axis; you'll notice that the checker pattern in Figure 11.8 now appears on the scalp, since now the selected faces have UV coordinates. However, the pattern on the top of the head is distorted. The goal is to create as even and undistorted a checker pattern as possible on the entire head. Doing this requires some manipulation of the UV mapping manipulator and, later on, the UV points themselves.

    The checker pattern appears on the top of the head, where coordinates have been mapped using the cylindrical mapping manipulator.

    Figure 11.8. The checker pattern appears on the top of the head, where coordinates have been mapped using the cylindrical mapping manipulator.

    In the perspective view you can see the UV mapping manipulator and its position relative to the model; in the UV Texture Editor you can see a wireframe representation of the flattened model indicating how the mapping is being applied. You can also see the checkerboard pattern on the UV grid. The texture you have applied to the model will appear on the grid. This can be helpful in some cases, especially if you are trying to match the UVs to a prepainted texture map. In this case it's not helping much.

  10. Choose Image

    The checker pattern appears on the top of the head, where coordinates have been mapped using the cylindrical mapping manipulator.
  11. In the perspective view, tumble around the model and find the red T in the lower corner of the cylindrical mapping manipulator. Click on this to switch to the translate/rotate/scale mode of the manipulator (see Figure 11.9).

  12. Click on the blue circle of the manipulator to switch to rotate mode. Gently drag upward on the red circle of the manipulator to rotate it along the X axis. If you accidentally click somewhere and lose the manipulator, you can press Ctrl+z to undo and bring the manipulator back.

    Clicking on the T at the lower corner of the mapping manipulator switches to the translate/rotate/scale mode of the manipulator.

    Figure 11.9. Clicking on the T at the lower corner of the mapping manipulator switches to the translate/rotate/scale mode of the manipulator.

  13. You want to rotate the manipulator so that the cylinder is positioned like a curved hat above the head. You can rotate the manipulator numerically by opening the Channel Box and entering −90 in the Rotate X channel of the polyCylProj1 node.

  14. Notice that as you rotate the manipulator, the wireframe depiction of the UV coordinates in the UV Texture Editor also changes. The goal here is to create an undistorted, flat representation of the scalp that can easily be used as a guide in Photoshop for painting the scalp texture.

  15. In the perspective view, carefully click on the blue arrow at the center of the cylindrical mapping manipulator to switch to translate mode. Drag downward on the manipulator to reposition it. You want to remove as much of the distortion in the checker pattern seen on the top of the head as possible. The checker pattern on the sides of the head will become stretched. That's okay; it can be fixed later. You can also enter 0.690 in the Y field of the Projection Center coordinates in polyCylProj1's Attribute Editor or in the Channel Box.

  16. Switch to scale mode by clicking on the green box at the end of the arrow that points to the back of the head. Scale the manipulator along its Y axis until the squares of the checker pattern are no longer stretched. Note that since the manipulator has been rotated −90 degrees, the Y axis scale handle (colored green) is now facing the back of the head and not the top. Alternatively it may be easier to edit the scale numerically (see Figure 11.10). Enter 1.829 in the Projection Height field of the polyCylProj1 Channel Box.

  17. In the UV Texture Editor, drag on the red arrow, and move the wireframe view of the scalp off to the right.

Notice that as you move the UV coordinates off the grid in the UV Texture Editor, the checker pattern moves but does not disappear. This is because the pattern repeats infinitely beyond the 0 to 1 range of the grid (where the image preview is seen when the Display Image button is activated). Eventually you'll move the scalp back to the grid, but for now you just want to move it out of the way while you work on the rest of the head.

The cylindrical projection manipulator is translated, rotated, and scaled until the checker pattern on the scalp is even.

Figure 11.10. The cylindrical projection manipulator is translated, rotated, and scaled until the checker pattern on the scalp is even.

Creating UV Shells

The sections of the mapped head (such as the scalp coordinates mapped in the previous section) are referred to as UV shells. You'll continue by creating a UV shell for the back of the head.

  1. Tumble around to the back of the head in the perspective view. Deselect the selected faces, select the object, then switch to the Paint Selection tool and select the faces on the back of the head (take a peek at Figure 11.11 to see which faces you need to select).

  2. When the faces are selected, switch to wireframe view (hot key = 4), and make sure no faces on the model other than those on the back of the head are selected. If there are extra faces selected, remember that you can deselect faces by holding the Ctrl key while painting on the model with the Paint Selection tool.

  3. Switch back to textured view (hot key= 6). Click on the view cube in the upper-right corner of the perspective view, and switch to the back view (this may require clicking on the triangles just outside the view cube a couple times until the back view appears).

  4. Zoom out a little so you can see the entire back of the head. With the faces of the back of the head still selected, choose Create UVs

    Creating UV Shells
  5. In the UV Texture Editor, drag on the green arrow to push the wireframe representation of the UV coordinates on the back of the head downward and out of the way of the main grid.

    The faces on the back of the head are mapped using a planar projection.

    Figure 11.11. The faces on the back of the head are mapped using a planar projection.

  6. In the perspective view, right-click on part of the model, and choose Select from the marking menu. In the UV Texture Editor you can see the wireframe of both the scalp and the back of the head. If you deselect the head, the coordinates disappear; to bring them back, just reselect the head object.

  7. In the toolbar at the top of the UV Texture Editor, click the Move UV Shell tool icon (see Figure 11.12). This is the icon at the upper-right corner in the first section of icons at the upper-left of the UV Texture Editor toolbar.

    The icon for the Move UV Shell tool

    Figure 11.12. The icon for the Move UV Shell tool

  8. Click on any point in the shell for the back of the head. The points of the shell turn green, indicating that you are in UV selection mode—each green point is a single UV coordinate.

  9. Use the Move tool to reposition the shell above the scalp shell.

  10. Switch to the Scale tool (hot key = r), and drag on the yellow box at the center of the Scale tool in the UV Texture Editor to scale the back-of-the-head shell down so that the checker pattern on the scalp and the back of the head roughly match.

  11. Save your scene. To see an example of the scene so far, open the UVMap_v02.ma file from the chapter 11scenes folder on the DVD.

Flipped and Overlapping UVs

When creating UV texture coordinates, you need to make sure that the direction is consistent among all of the UVs; otherwise, strange artifacts can appear when the model is textured and rendered. Likewise, it is extremely important that UVs are not overlapping, tangled, or folded improperly. Overlapping UVs can cause a render to crash. Maya's UV Texture Editor has tools that can help you detect and eliminate overlapping UVs. In this next section you'll see these tools in action as you continue to create UV shells for the sides of the head.

  1. Continue with the scene from the previous exercise or open the UVMap_v02.ma file from the chapter 11scenes folder on the DVD.

  2. In the perspective view, use the Paint Selection tool to select the faces on the side of the head down to the jawline, just above the neck. Select all of the faces of the ears as well. Match the selection of faces, as shown in Figure 11.13.

  3. Make sure the selection on each side of the face is identical; even when the Paint Selection tool is set to Reflection, sometimes the selection on each side can be slightly different. This particular model is not perfectly symmetrical.

  4. Turn on wireframe view, and make sure only the sides of the face and the ears have been selected. Look for stray selections on other parts of the head. You can deselect extra faces by holding Ctrl while painting over them using the Paint Selection tool.

  5. From the Polygon menu set, choose Create UVs

    Camera Based Selection
    Use the Paint Selection tool to select the unmapped faces on either side of the head.

    Figure 11.13. Use the Paint Selection tool to select the unmapped faces on either side of the head.

  6. In the UV Texture Editor you'll see only one UV shell. If you zoom in, though, you'll see that there are actually two shells on top of each other. The slight asymmetry in the model reveals the difference in the wireframe of the two shells.

  7. In the UV Texture Editor, right-click on the UV shell created from the projection in step 6, and choose UV to switch to UV selection mode. Select a single UV point on one of the shells. Right-click on the selected UV, and choose Select

    Use the Paint Selection tool to select the unmapped faces on either side of the head.
  8. Press the w key to switch to the Move tool. Move the selected shell to the left so that it is no longer on top of the other shell. You could use the Move UV Shell tool as well; this is just an alternate workflow.

  9. Repeat steps 7 and 8 to select the other matching shell; move it to the left and below its twin.

    These two shells are on top of each other because they were created from the same side view camera that projected through the model. One of these shells needs to have its direction flipped so that it is consistent with the other shells. You can easily figure out which one by turning on the shaded UV mode.

  10. Click the Toggle Shaded UV Mode button on the UV Texture Editor toolbar. The icon is shown in Figure 11.15. When shaded UV mode is activated, the UV shells are colored according to their direction.

    Zooming in on the UVs reveals that there are two UV shells, one on top of the other. The slight asymmetry in the model makes selecting a UV of one of the shells a little easier.

    Figure 11.14. Zooming in on the UVs reveals that there are two UV shells, one on top of the other. The slight asymmetry in the model makes selecting a UV of one of the shells a little easier.

    The icon for the shaded UV display mode

    Figure 11.15. The icon for the shaded UV display mode

    If you zoom out on the editor, you'll see that the shells created in the previous section are colored blue. Likewise, one of the side-of-the-face shells is blue and the other is red. The red shell needs to be flipped to make it consistent with the other shells (Figure 11.16).

    The shell shaded in red (light gray in this figure) needs to be flipped so its UV direction is consistent with the other shells.

    Figure 11.16. The shell shaded in red (light gray in this figure) needs to be flipped so its UV direction is consistent with the other shells.

  11. Switch to UV selection mode (right-click on the UVs and choose UV from the marking menu). Select the red side-of-the-face shell (right-click and choose Select

    The shell shaded in red (light gray in this figure) needs to be flipped so its UV direction is consistent with the other shells.
  12. Click either the Flip UV button in the second section of the UV Texture Editor toolbar or choose Polygons

    The shell shaded in red (light gray in this figure) needs to be flipped so its UV direction is consistent with the other shells.
  13. Zoom in to a part of the shell that corresponds with the ear. You'll notice that some of the shell is shaded dark blue, purple, and red. These parts of the shell are overlapping each other as well as reversing direction as the ear curls around (see Figure 11.17). This is a situation you want to avoid at all costs. Maya has several tools that can help solve this problem.

    When shaded UV mode is activated, overlapping UVs are a darker shade than nonoverlapping UVs

    Figure 11.17. When shaded UV mode is activated, overlapping UVs are a darker shade than nonoverlapping UVs

Smooth UV Tool

The ears are a little tricky since they are a convoluted shape. However, since they are most likely going to have very simple colors applied, you may be able to get away with some stretching and warping of the coordinates. You can smooth out the overlapping UVs interactively using Maya 2009's new Smooth UV tool.

  1. In the UV Texture Editor, right-click on one of the shells, and choose UV to switch to UV selection mode.

  2. Drag a rectangular selection marquee over one of the shells to select all of its UVs.

  3. From the menu bar in the UV Texture Editor choose Tools

    Smooth UV Tool
  4. In the UV Texture Editor, you'll see a handle with two text boxes: one labeled Unfold, the other labeled Relax. Click and drag over the word Relax (drag back and forth). This smoothes the UVs by averaging their distances. By dragging back and forth, you can interactively set the level of relaxation. Keep an eye on the model in the perspective view to see how relaxing the UVs affects the texture mapping. Relax the UVs so the overlapping disappears, as shown in Figure 11.18. The position of the tool in the UV Texture Editor does not affect its operation.

    The Smooth UV tool allows you to relax or unfold the UVs interactively in the UV Texture Editor.

    Figure 11.18. The Smooth UV tool allows you to relax or unfold the UVs interactively in the UV Texture Editor.

  5. With the same UV shell selected, drag over the word Unfold. The Unfold operation untangles the UVs while trying to match the shape of the 3D surface. This fixes the warping caused by the Relax operation.

  6. Repeat these steps for the other side-of-the-face shell. You don't have to use both Relax and Unfold depending on the situation; sometimes you can get away with using just Unfold.

UV Smudge and UV Lattice Tools

Two additional tools that can help fix warped and stretched areas are the UV Smudge and Lattice tools.

  1. Use the Paint Selection tool to select the faces of the neck; use Figure 11.9 as a guide for selecting the polygon faces. The selection on the sides of the neck and the back of the neck should extend up to the previously mapped areas.

  2. Use cylindrical mapping to create coordinates for these areas (Create UVs

    UV Smudge and UV Lattice Tools
  3. In the UV Texture Editor, move the neck shell down off the grid.

  4. Convert the current selection to UVs. From the Polygon menu set choose Select

    UV Smudge and UV Lattice Tools

    The UV Smudge tool works on selected UVs. The icon looks like a finger pulling a grid of UVs (see Figure 11.20). It's the first icon on the bottom row on the left side of the UV Texture Editor toolbar.

    Select the faces of the neck.

    Figure 11.19. Select the faces of the neck.

    The icon for the UV Smudge tool

    Figure 11.20. The icon for the UV Smudge tool

  5. Click the icon for the UV Smudge tool. A red circle will appear, as shown in Figure 11.21. If you zoomed in too closely to the UVs, you may have to zoom out to see it. The red circle is the radius of the UV Smudge tool; you can resize it interactively by MMB-dragging while holding the B key.

  6. Drag the selected UVs in the UV Texture Editor window to reposition them. Watch the results in the perspective window; see if you can remove some of the warping in the checker pattern on the spaces on the bottom edges of the neck. There's no Reflection option for this tool, so try your best to make both sides of the neck shell consistent in shape.

    The UV Smudge tool allows you to push around the selected UVs.

    Figure 11.21. The UV Smudge tool allows you to push around the selected UVs.

  7. You'll need to occasionally resize the smudge radius as you work to move more or fewer UV points. It may be difficult to eliminate all warping in the texture.

  8. When you have the warping under control, select the UVs in the shell, and activate the UV lattice by clicking the UV Lattice tool icon (the icon shown in Figure 11.22). A red grid will appear over the selected UVs in the shell, as shown in Figure 11.23.

    The icon for the UV Lattice tool

    Figure 11.22. The icon for the UV Lattice tool

    You can use the UV Lattice tool to refine the arrangement of the selected UVs.

    Figure 11.23. You can use the UV Lattice tool to refine the arrangement of the selected UVs.

  9. To change the number of rows and columns in the UV Lattice, open the Lattice Settings panel and change the settings in the Columns and Rows sliders. Set Columns to 7 and Rows to 5.

  10. Move the points of the lattice around to help reduce the stretching and warping seen in the checker pattern on the model in the perspective view.

  11. Reselect the UVs of the shell with the UV Lattice button, and a new lattice replaces the older one. You can use this technique to apply multiple iterations of the UV Lattice tool when fine-tuning the shape of the UV shell.

  12. Select small portions of the shell with the UV Lattice tool to fix those areas.

  13. When the overall warping in the neck shell has been reduced, use the Smooth UV tool to relax and unfold the neck UV shell.

  14. Save the scene. To see a version of the scene so far, open the UVMap_v03.ma file from the chapter 11scenes folder on the DVD.

Automatic Mapping

Before tackling the face, there's one last bit that you can quickly map. You'll use automatic mapping to quickly generate UVs for the geometry that makes up the throat. Since this geometry will rarely be seen, if at all, you can get away with automatically generating UVs.

  1. Continue with the model from the previous section or open UVMap_v03.ma from the chapter11scenes folder on the DVD. Tumble around the model in the perspective view until you can see the throat geometry inside the head from the bottom of the neck.

  2. Use the Paint Selection tool to select the ring of polygons at the bottom end of the throat geometry, as shown in Figure 11.24. Remember to double-check in wireframe mode to make sure no extra faces have been selected.

    Select the ring of faces at the end of the throat inside the head.

    Figure 11.24. Select the ring of faces at the end of the throat inside the head.

  3. Once you've selected this ring, press the Shift+> keys to expand the selection. Repeat this six more times to add polygons to the selection, but stop just short of selecting the polygons that make up the outside of the lips (see Figure 11.25). It's easier to see what's going on if you switch to wireframe view in the viewport window (hot key = 4).

  4. Choose Create UVs

    Select the ring of faces at the end of the throat inside the head.
  5. In the UV Texture Editor you'll see the UVs of the throat geometry broken into several shells (see Figure 11.26). Select these shells and move them out of the way for now. You can take the time to sew them together, but it's not necessary since they won't really be seen.

Generating UVs automatically works when you need some texture coordinates made quickly or as a starting point for mapping out UVs on a complex object.

The faces of the throat are selected. The edges of the selected faces are enhanced in this image to make it easier to see in black and white.

Figure 11.25. The faces of the throat are selected. The edges of the selected faces are enhanced in this image to make it easier to see in black and white.

Automatic mapping creates a number of UV shells from the selected area.

Figure 11.26. Automatic mapping creates a number of UV shells from the selected area.

UV Mapping the Face

Generating UVs for the face is the hardest part, primarily because this is where the majority of the texture will be visible. You want to minimize warped or stretched UVs as much as possible, especially on the nose, where the tiny pores you paint as dots in Photoshop can become stretched, making the model appear less believable. The following exercise is one approach to mapping the face.

  1. In the perspective view, use the Paint Selection tool to paint the remaining unmapped faces of the face. Don't select the faces at the bottom of the chin.

  2. Turn off the visibility of NURBS objects in the perspective window to hide the eyes; make sure all the faces inside the eye sockets and the inside of the nostrils are selected.

  3. Zoom the camera inside the model, and make sure none of the polygons on the throat geometry are selected. Brush while holding the Ctrl key to deselect specific faces.

  4. Zoom inside the mouth so that you're viewing the lips from inside the mouth cavity behind the face. Make sure everything is selected except the polygon faces inside the mouth. Inspect the inside of the nose from within the head as well as the back of the eye sockets for any unselected polygon faces; this is shown in Figure 11.27.

  5. When you are satisfied that only the polygons that make up the face are selected, create a cylindrical UV texture coordinate projection by choosing Create UVs

    Use the UV Texture Editor to Refine Selection
  6. Click on the red T at the corner of the cylindrical mapping manipulator to activate the translate, rotate, scale manipulator for the cylindrical projection.

  7. Drag the blue arrow (the Z axis) of the manipulator toward the back of the head until the mapping becomes fairly even, as shown in Figure 11.28. The checker pattern on the nose will still be a little stretched. You can also set the Z coordinates of the Projection Center of the Attribute Editor to 0.721 to numerically position the manipulator.

    Zooming inside the face allows you to make sure the eye sockets and nostril interior faces are selected.

    Figure 11.27. Zooming inside the face allows you to make sure the eye sockets and nostril interior faces are selected.

    Apply cylindrical mapping to the face.

    Figure 11.28. Apply cylindrical mapping to the face.

    For the most part the projection is pretty good. There are a few areas that will need tweaking. For one thing, the UVs in the eye sockets and nostrils are overlapping.

  8. In the perspective view zoom in so that you are inside the head and can view the eye sockets from behind the eyes.

  9. Right-click on the model, and choose UV to switch to UV selection mode.

  10. Select the four UV points at the back of the eye socket. Click the Shift+> hot key three times to expand the selection until only the UVs within the eye socket are selected, as shown in Figure 11.29 (you may want to turn off textured view so the UV points are easier to see: hot key = 5).

  11. In the UV Texture Editor choose Tools

    Apply cylindrical mapping to the face.
  12. Repeat steps 8 through 11 to relax the UVs inside the nostrils. It's very important that all overlapping UVs are eliminated.

    Select the UVs on the back of the eyes.

    Figure 11.29. Select the UVs on the back of the eyes.

    The UVs on the inside of the eye socket are selected and relaxed to remove overlapping.

    Figure 11.30. The UVs on the inside of the eye socket are selected and relaxed to remove overlapping.

  13. Use the UV Smudge tool to remove any overlapping on the lips as well.

  14. Save your scene. To see a version of the scene so far, open the UVMap_v04.ma scene from the chapter 11scenes folder on the DVD.

Sewing UV Shells

The separate UV shells of the head and face will be joined into a single shell (with the exception of the shells on the neck and the interior of the mouth). The goal is to create an arrangement that minimizes UV stretching and seams. It should also be easy to determine the features of the face in the flattened UV arrangement so it will be easy to paint textures in a paint program. Before joining the shells, you need to map the chin.

  1. Select the unmapped faces on the chin, and use a planar projection on the Y axis to map these faces. If the resulting shell appears shaded red in the UV Texture Editor, flip it so it's consistent with the other shells (in the Polygon Texture Editor menu choose Polygons

    Sewing UV Shells
  2. Position this shell below the shells of the face, and scale down the projection in the UV Texture Editor, as shown in Figure 11.31.

  3. In the UV Texture Editor, select the shell for the top of the head and move it above the face shell.

  4. In the UV Texture Editor, right-click on the bottom edge of the top-of-the-head shell, and choose Edge to switch to edge-selection mode.

  5. Select an edge at the bottom of the top-of-the-head shell; you'll see that a corresponding edge on the top-of-the-face shell is selected as well. This is a single edge shared by the two shells, as shown in Figure 11.32. In the perspective view, you can see the edge selected on the model. The shared edge indicates how the shells should be arranged before they are sewn together.

    Map the faces of the chin using a planar projection.

    Figure 11.31. Map the faces of the chin using a planar projection.

    Select the edge shared by the face shell and the topof-the-head shell (enhanced in this image).

    Figure 11.32. Select the edge shared by the face shell and the topof-the-head shell (enhanced in this image).

  6. Select the other edges at the bottom of the top-of-the-head shell.

  7. Click the icon for the Move and Sew Selected Edges tool (shown in Figure 11.33) to join the face and the top of the head. Some warping will result, but you can fix it (see Figure 11.34).

  8. Use the same technique from steps 4 through 7 to attach the shells for the sides of the head to each side of the face shell. Be careful to select only the edges shared by the face and the side-of-the-head shells. If you select too many edges, the neck shell will be sewn to the face as well.

  9. Select the chin shell. Click the Rotate Selected UVs icon (clockwise or counterclockwise) four times to rotate the shell 180 degrees. These buttons (shown in Figure 11.35) rotate UVs 45 degrees each time you click them. The UV layout is shown in Figure 11.36.

    The icon for the Move and Sew Selected Edges tool

    Figure 11.33. The icon for the Move and Sew Selected Edges tool

    Sew the top-of-thehead shell and the face shell together.

    Figure 11.34. Sew the top-of-thehead shell and the face shell together.

    The icons for the Rotate Selected UVs tools

    Figure 11.35. The icons for the Rotate Selected UVs tools

    The chin shell is positioned below the face shell.

    Figure 11.36. The chin shell is positioned below the face shell.

  10. Select the edges shared by the bottom of the face and the chin shells; these should run all along the jawline.

  11. Click the Sew Selected Edges tool to sew these together (the icon shown in Figure 11.37). You can see in Figure 11.38 that there will be a lot of stretching along the jaw; once again, you'll fix this shortly.

  12. Find the back-of-the-head shell in the UV Texture Editor. Switch to edge-selection mode, and carefully select the edges that go straight down the middle of the shell.

  13. Click the Separate UVs Along Selected Edges tool to split this shell into two parts. When you click the icon for the tool (shown in Figure 11.39), it looks as though nothing has happened until you select one of the halves and move it away from the other, as shown in Figure 11.40.

  14. Move each half of the back-of-the-head shell to its matching side-of-the-face shell, and sew them to the face shell to complete the UV mapping for the face and head (see Figure 11.41).

  15. To see a version of the scene so far, open UVMap_v05.ma from the chapter 11scenes folder on the DVD.

    The icon for Sew Selected Edges tool

    Figure 11.37. The icon for Sew Selected Edges tool

    Sew the chin shell to the face shell.

    Figure 11.38. Sew the chin shell to the face shell.

    The icon for the Separate UVs Along Selected Edges tool

    Figure 11.39. The icon for the Separate UVs Along Selected Edges tool

    Split the shell for the back of the head into two shells.

    Figure 11.40. Split the shell for the back of the head into two shells.

    Sew the shells for the back of the head onto the face shell.

    Figure 11.41. Sew the shells for the back of the head onto the face shell.

Unfolding UVs

Once you have the basic UV layout created for the model, you can use Maya's UV Unfold command to remove any remaining overlapping UVs as well as to reduce distortion on the model. Unfold UVs can be used at any time during the process on entire shells or just selected UVs. The Unfold command tries to make the UVs conform to the three-dimensional shape of the object.

At this point, prioritize the areas of the face in terms of how much texture space needs to be reserved for detail. If your primary concern is to maintain a consistent level of detail across the entire model or to reduce seams between shells, you may want to attach the face, head, and ear shells into one piece. If you want to reserve as much texture space as possible for the face, you may want to keep the face as its own separate shell and scale larger than the other shells that make up the head.

  1. Select the face and neck shells, and choose Polygons

    Unfolding UVs
  2. In the options leave the Weight Solver set to 0. There are two types of solvers, Local and Global. The slider determines a bias setting toward one or the other. A setting of 0 means that the Local solver will be used, a setting of 1 means that the Global solver will be used, and any setting in between blends the two solvers.

  3. You can uncheck Pin UV Border and Pin UVs so that the entire shell can be unfolded without pins. If you want to unfold only part of the shell, you can use the Pinning settings to constrain the unselected UVs or the UV border so that they remain unaltered while the selected UVs are unfolded.

  4. You can set Unfold Constraint to None so the UVs can be moved in both U and V.

  5. The Unfold calculations are iterative, much like the Relax feature. The unfolding process will continue until the maximum iterations have been reached or the stopping threshold has been met. Maya makes its calculations based on a comparison between the original model and the unfolded result. For some models this process can take awhile. The face is simple enough that you can set the Stopping Threshold to 0 and the Maximum Iterations to 10.

  6. The Rescale feature is useful when you are unfolding multiple shells that need to have a consistent size. Check this option so the face and neck shells have a consistent size when the unfold operation is performed. Set the Scale Factor to 1 so the shells remain about the same size.

  7. Click the Apply button, and observe the results in the perspective view. You can keep clicking Apply to repeat the unfold process until most of the checker pattern is relatively even.

  8. If the shells end up on top of one another, select each shell and move it aside so that they no longer overlap, as shown in Figure 11.42.

  9. Select the shared edges at the bottom of the face and top-of-the-neck shells, and sew the two shells together.

  10. Select the joined shells, and run another unfold operation a few times to smooth the border along the jawline, as shown in Figure 11.43.

    Unfold the face shell and the neck shell, creating a nice, even UV mapping for each shell.

    Figure 11.42. Unfold the face shell and the neck shell, creating a nice, even UV mapping for each shell.

    The face shell and the neck shell are joined and unfolded a few more times.

    Figure 11.43. The face shell and the neck shell are joined and unfolded a few more times.

    Overall it looks pretty good: the checker pattern is mostly even with minimal warping, and most of the seams are on the back of the head or in places that can be hidden with hair. The only problem is that most of the texture space is devoted to the neck and the sides of the head and not to the face, where it will be needed the most. Wherever the checks are smaller and more numerous, that part of the model has more texture space. To fix this, you can use the UV Lattice tool.

  11. Select the face shell and use the UV Lattice tool to stretch out the UVs on the face so that more of the texture space can be devoted to it. This will take several applications of the UV Lattice tool, the UV Smear tool, Relax, UV Unfold, and a lot of tweaking. Try to get more of the checker pattern to appear on the nose. However, be careful not to introduce too much warping into the pattern. Remember to double-check areas such as the mouth for overlapping UVs.

Figure 11.44 shows the updated UV layout. Notice that the checker pattern on the face is smaller than in Figure 11.43. This means more texture space is devoted to it so that these regions can support more detail in the painted texture maps.

Tweak the UV shell so that more texture space is available for the face.

Figure 11.44. Tweak the UV shell so that more texture space is available for the face.

Arranging UV Shells

When you are satisfied with the overall job you've done on the UVs, you'll want to arrange the shells so they all fit within the 0 to 1 range on the UV Texture Editor grid. In this example, the face shell will be the largest of all the shells.

  1. The UV Layout command will automatically place all selected shells within an ideal arrangement on the UV Texture Editor grid. Just select the shells and choose Polygons

    Arranging UV Shells
  2. In some cases you may choose to arrange the shells manually so you can prioritize texture space yourself. You can use the Move, Scale, and Rotate tools to position each shell within the upper-right quadrant of the grid. The main things to keep in mind are to:

    • Arrange the shells so they all fit within the upper-right quadrant; this keeps them within the 0 to 1 range in U and V.

    • Arrange the shells efficiently, minimize the space between shells, but at the same time keep enough space so the textures are easy to paint.

    • Reserve more space for those parts of the object that will require more detail.

    • Avoid overlapping shells (at all costs), and keep a little space between the edges of the shells and the grid border.

  3. Once you are happy with the final layout, remember to delete history on the object! Otherwise, when you move or deform the object the UVs may not update correctly, and suddenly the textures will become distorted or behave in strange ways. Figure 11.45 shows the final UV layout for the head.

    The final UV layout for the character

    Figure 11.45. The final UV layout for the character

UV Snapshot

You can generate a snapshot of the UVs that will serve as a guide for painting the textures in Photoshop.

  1. In the UV Texture Editor window choose Polygons

    UV Snapshot
  2. In the options, use the browse button to choose the directory where you want to save the file.

  3. Set the size of the texture file. In this case choose 2048. You can resize the document in Photoshop if you decide you need higher or lower resolution for the texture. Since this is a single head model that will be seen close up, you may eventually want to increase the resolution as high as 4096. It's usually best to keep these dimensions the same size in X and Y so the texture is square.

  4. Keep Color Value white so the UV texture guide appears as white lines on a dark background. In Photoshop you can set the UV texture snapshot on a separate layer above all the other layers and set the bending mode to Screen so that the UV texture lines appear on top of the painted textures.

  5. Set the image format to .tiff, and click OK to generate the snapshot.

  6. Open the snapshot in Photoshop or your favorite paint program, and use the UVs as a guide for painting the textures. Refer to the section on the PSD texture node for more information.

  7. To see a finished version of the head with complete UV maps, open the UVMap_v06.ma file from the chapter11scenes folder on the DVD.

Additional UV Mapping Considerations

Proper UV mapping is essential for the creation and application of painted textures to your polygon and subdivision surface models. However, UV mapping can also affect how your models work with other aspects of Maya. Since displacement maps are essentially textures that deform geometry, it's important that UV coordinates are properly created in order for the displacements to deform the geometry properly.

2D procedural nodes, such as ramps, fractals, and (obviously) checker patterns, are affected by UV mapping. When you apply a fractal to a polygon model, the seams between UV coordinates can be very obvious if the UVs are not carefully mapped, as shown in Figure 11.46. Likewise, paint effects, hair, and fur all rely on UV coordinates to function properly.

UVs can also be animated using keyframes. You can use this to create some interesting effects, especially in games where it may be more efficient to create a repeating animated loop of UV texture coordinates than to create an animated sequence of images. To animate UVs, select the UVs in the UV Texture Editor, press the s hot key to create a keyframe, change their positions, and set another keyframe by pressing the s hot key again. You can refine the animation using the Graph Editor.

The UV seams on this object can be seen in the 2D fractal texture applied to the Color channel of the object's shader.

Figure 11.46. The UV seams on this object can be seen in the 2D fractal texture applied to the Color channel of the object's shader.

Transferring UVs

UVs can be transferred from one object to another. This is usually done between two versions of the same object and can be useful as a tool for quickly creating UVs on a complex object. This workflow might go something like this:

  1. Create a duplicate of a complex object.

  2. Smooth the duplicate using an operation such as Average Vertices or the sculpting brush.

  3. Generate UV coordinates for the smoothed version using any combination of methods. Smoothing out the detail makes applying UV coordinates a little easier.

  4. Select the smoothed version, and then Shift+click the original and choose Mesh

    Transferring UVs

Multiple UV Sets

An object can actually have more than one version of the UV coordinates. These are known as UV sets. For instance, for a character's head you may use one UV set to control how color information is applied to the face and another set to control how the hair or fur is applied to the head. To create multiple sets you can use the UV Set Editor (Create UVs

Multiple UV Sets

UV Mapping Alternatives

As mentioned at the start of the chapter, the process of mapping UVs is often tedious and technical. It's a necessary evil. Consider how much time you've just spent on the head of a character; now consider how much more work and time would be required to do a full body. Creating UV texture coordinates can bog down a production pipeline as well as hamper your creativity. Maya's UV mapping tools are powerful and easy to use, but there are also alternatives to consider that may make your life even easier. If you find yourself doing this kind of work a lot, you may want to consider a third-party UV coordinate-mapping program such as UV Layout by Headus (www.uvlayout.com), as shown in Figure 11.47.

UV Layout by Headus is an application devoted to making UV mapping faster and easier.

Figure 11.47. UV Layout by Headus is an application devoted to making UV mapping faster and easier.

UV Layout is a simple, inexpensive program that allows you to interactively split up a 3D model and create UVs using a process similar to Maya's UV Unwrap feature. However, the tools are much easier and faster to use, and you may find yourself spending much less time on UV mapping and more time creating your models. Headus has student and hobbyist pricing for UV Layout as well as a professional version.

There are also UV mapping scripts available on websites, such as www.highend3d.com, which can help you save time creating UV coordinates. Pelting Tools is a powerful script created by Sunit Parekh. The script actually uses particle springs to stretch a polygon mesh such as a fur pelt. The UVs are then projected onto the stretched version of the mesh and copied to the original polygon object.

Bump and Normal Mapping

Bump maps, normal maps, and displacement maps are three ways to add surface detail to a model using textures. In this section you'll learn about bump and normal maps. A discussion concerning displacement maps appears later on in the chapter.

Bump maps and normal maps are similar in that they both create the impression of surface detail by using color information, stored in a 2D texture map, to alter the surface normal of an object. When the light in a scene hits the surface of an object, the color values in the texture tell the rendering engine to alter the surface normal so the light creates a highlight or shading/shadowing. The surface geometry itself is not changed; however, the altered normal makes it look as though the geometry has more detail than it actually does. This saves the modeler the trouble of sculpting every single wrinkle, fold, bump, screw, or scratch into a model as well as keeps the geometry resolution of the model down to a level the computer's processor can handle.

Bump and normal maps do not actually alter the surface geometry. This means that the part of the surface that faces the camera will appear as though it has bumps and depressions, but as the surface of the geometry turns away from the camera, it becomes apparent that the silhouette of the geometry has not actually been changed by the bump or normal map. Figure 11.48 demonstrates this principle.

This sphere has a fractal texture applied as a bump map. It looks lumpy from the front, but the silhouette of the sphere is not altered by the bump map.

Figure 11.48. This sphere has a fractal texture applied as a bump map. It looks lumpy from the front, but the silhouette of the sphere is not altered by the bump map.

Bump and normal maps are mutually exclusive, meaning that you'll use either one or the other but not both at the same time. Normal maps are a more recent development and are gaining in popularity over bump maps. This is because normal maps are calculated very quickly, which makes them popular for use in real-time game engines. The shadows they create are also more accurate than those bump maps create. However, normal maps need to be generated automatically by software and can't easily be painted or edited by a texture artist in Photoshop.

Bump Maps

Bump maps are simply grayscale textures, usually painted in a 2D paint program such as Photoshop. Bump maps are best used for fine detail, such as tiny wrinkles, pores, small rivets, scratches, small dents, wood grain, and so on. When texturing highly detailed characters, you can best use bump maps with displacement maps, and you'll see how to combine them later on in the chapter. In this section, you'll apply a bump map to the old man character.

  1. Open the bump_v01.ma file from the chapter 11scenes folder of the DVD. You'll see the same old man character from the previous part of this chapter; his UV texture coordinates have already been created.

  2. A camera (renderCam) and basic three-point lighting arrangement have been created, and the renderer is set to mental ray, Production Settings.

  3. Select the old man's head, and open the UV Texture Editor (Window

    Linking Texture Files
  4. In the UV Texture Editor's menu, choose Polygons

    Linking Texture Files
  5. Use the browse button to set the location of the snapshot file and its name. Name the file oldManUV. The sourceimages directory of the current project is usually a good place to store textures since this is the default location Maya uses for texture files.

  6. Set Size X and Size Y to 2048, leave Color Value as white, and leave Image Format as .tiff.

  7. Leave the UV Range option set to Normal (0 to 1). Click OK. Maya will create the snapshot and save it in the directory you chose. Figure 11.49 shows the options.

  8. Start Photoshop or your favorite digital painting program (this exercise assumes you are familiar with and are using Photoshop).

  9. Open the oldManUV.tif file you created in Maya.

    The options for creating a UV snapshot

    Figure 11.49. The options for creating a UV snapshot

  10. The image will appear black with the UVs outlined in white.

  11. In Photoshop open the Layers panel. Select the Background layer and duplicate it.

  12. Create a new layer and fill it with gray (RGB = 128, 128, 128).

  13. Place the duplicate background layer above the gray layer, and set its mode to Screen. The UV lines will now appear as a guide over whatever is painted on the gray layer (see Figure 11.50).

    Open the UV snapshot in Photoshop. Arrange the layers so that the UV lines appear as a guide above the painted bump texture.

    Figure 11.50. Open the UV snapshot in Photoshop. Arrange the layers so that the UV lines appear as a guide above the painted bump texture.

  14. The gray color serves as the baseline bump value. Anything darker than the gray value will appear as a depression in the bump map; anything lighter will appear as a raised bump. The value 128 is halfway between 0 (black) and 255(white). The following list provides some tips for painting a believable skin bump map:

    • Get as much reference material as you can, and keep it nearby as you work. Online reference sites, such as www.3d.sk, are pretty good. Fine art photography books and magazines are also quite helpful.

    • Take photographs of skin and scans of images from books and magazines, and bring them into Photoshop as texture swatches; use the Clone tool to paint the texture into the areas outlined by the UVs. A number of skin texture samples are included in the chapter 11scenes folder on the DVD.

    • Pay attention to how skin changes over the face. The skin on the end of the nose is very different from the skin between the eye and the brow.

    • Older people are not raisins; don't create a bunch of random wrinkles. Pay close attention to how wrinkles appear on the face. Some older people have very smooth skin with wrinkles in very specific places; others have wrinkles all over. Skin tells the story of how a person has lived, which is what makes it interesting to study.

    • Use references from real people, not 3D characters created by other artists; otherwise you risk repeating someone else's mistakes or bad habits.

    • Use layers and blending modes to your advantage. Build up the skin bumps by layering textures and varying the opacity.

    • Use the Clone tool to blend textures across the seams.

    • A good texture map should take a long time to create—don't rush it!

  15. Save your painting and all its layers as an unflattened Photoshop file; you want to keep this version in case you need to make changes. The finished bump map is shown in Figure 11.51.

  16. Hide the UV snapshot layer so the UV lines are no longer visible. Hide any other layers you don't want visible in the texture.

  17. Select the entire image by choosing Select

    Open the UV snapshot in Photoshop. Arrange the layers so that the UV lines appear as a guide above the painted bump texture.
  18. Create a new file; by default the new file should be 2048′ × 2048. Paste the contents of the clipboard into the new file. Flatten the file and save it as oldManBump.tif in the sourceimages directory. In the TIFF Options panel, make sure the file is set to Uncompressed.

    The bump map is painted in Photoshop using the UV snapshot as a guide. You can use photographs as a source for the clone brush.

    Figure 11.51. The bump map is painted in Photoshop using the UV snapshot as a guide. You can use photographs as a source for the clone brush.

Applying the Bump Texture to the Model

Applying the bump texture to the model is very simple; you can even preview the bump texture in the perspective window.

  1. Start Maya and open the bump_v01.ma file from the chapter 11scenes folder on the DVD.

  2. Create a new Blinn texture. Name it oldManShader, and apply it to the old man character.

  3. Open oldManShader in the Attribute Editor. In the Bump Mapping channel, click on the checker pattern next to the Bump Mapping field. From the Create Render Node pop-up, choose File from the 2D Textures rollout (as shown in Figure 11.52).

  4. In the bump2d1 tab of the Attribute Editor, set Bump Depth to 0.5. This controls the intensity of the bump map (see Figure 11.53). Most of the time a value of 1 is too strong.

    Create a file node for the Bump channel in the oldManShader.

    Figure 11.52. Create a file node for the Bump channel in the oldManShader.

    The Bump Depth slider controls the strength of the bump texture.

    Figure 11.53. The Bump Depth slider controls the strength of the bump texture.

  5. Click the file1 tab in the Attribute Editor. In the File field rename the node oldManBumpFile.

  6. Click the folder icon next to the Image Name field; browse your computer and find the oldManBump.tif file.

  7. When the file is loaded, turn on High Quality Rendering in the toolbar of the camera view. The bump map will preview in the viewport window (see Figure 11.54).

  8. Switch to the renderCam in the perspective view, and create a test render.

  9. The bump is still a bit strong, so try lowering the strength of the bump to somewhere between 0.1 and 0.2, as shown in Figure 11.53.

    Activating High Quality Rendering allows you to preview the bump map in the viewport.

    Figure 11.54. Activating High Quality Rendering allows you to preview the bump map in the viewport.

3D Paint Tool

If you can see seams along the hairline or other bad spots, you may need to continue to work on the bump texture. You can do this interactively using the 3D Paint tool in Maya.

  1. Select the oldMan head, and switch to the Rendering menu set.

  2. Choose Texturing

    3D Paint Tool

    The 3D Paint tool needs to have a texture assigned to the current channel before you can paint on the model. By default the tool is set up to paint in the Color channel. The oldManShader has no texture in the Color channel, just in the Bump channel.

  3. Open the settings for the 3D Paint tool, scroll down to the File Textures rollout, and set Attributes to Paint To BumpMap.

  4. Switch to hardware texturing (press the 6 key). After a few seconds you'll see the bump map appear on the model as a color texture.

  5. Zoom into an area that has bad spots or visible seams.

  6. Reduce the size of the brush by holding the b key while MMB-dragging in the window.

  7. You can sample colors on the surface by clicking on the swatch next to the Color slider in the Color rollout, then using the eyedropper to select a color from the model's surface. You can also lower the opacity of the color with the Opacity slider.

  8. The Paint Operations rollout allows you to change the operation of the brush. You can switch to a Clone tool (see Figure 11.55). When Clone is active, you can click the Set Clone Source button, click on the model near the area you need to fix, and then paint on the problem area. Just like in Photoshop, the Clone tool copies the sampled area to the area below the brush .

    Use the 3D Paint tool to fix problems in the bump map.

    Figure 11.55. Use the 3D Paint tool to fix problems in the bump map.

  9. Use the 3D Paint tool to touch up the bump map texture if needed. The painting action will probably be fairly slow, which is why 3D Paint is best used for touch-ups rather than creating a map from scratch.

  10. When you've finished, click the Save Textures button to save the changes you've made to the bump texture.

  11. Do a test render of the model.

  12. To see a finished version of the model with the bump texture, open the bump_v02.ma file from the chapter 11scenes folder on the DVD.

If you look at Figure 11.53, you'll see that bump maps can only get you so far. To create believable characters, you must combine bump maps with displacement maps and well-painted diffuse and specular maps. You should also keep in mind how close the object will be to the camera; close-ups of an object require higher-resolution texture maps.

Rendering Textures Using the Optimized Format

Maya offers an optimized format that is used at render time. Textures using standard image file formats such as .tif are loaded into memory before rendering begins, which can slow down the rendering and lead to instability. Maya can convert the file texture to an optimized, uncompressed, OpenEXR format that allows Maya/mental ray to load the texture as needed during render, which not only increases stability but also allows for the use of much larger textures.

The original file textures, such as the .tif used for the bump map, are still used in the scene and stored in the sourceimages directory and referenced when you work in the scene. The conversion takes place automatically, and the converted files are stored in the sourceimages/cache directory by default. When you render the scene, you'll see your file textures listed there with the .map extension. In versions of Maya prior to 2008, you had to convert file texture images to the .map format manually using the imf_copy utility.

To enable this feature choose Window

Rendering Textures Using the Optimized Format
Enable the Use Optimized Textures feature in the Preferences window.

Figure 11.56. Enable the Use Optimized Textures feature in the Preferences window.

Normal Maps

A bump map displaces a surface normal either up or down (relative to the surface normal) based on the value of the texture. Normal maps, on the other hand, replace the normal direction with a vector stored in the RGB colors of the map. In other words, rather than pulling out a bump or pushing in a depression, the colors of the normal map change the X, Y, Z of the normal based on the RGB color of the map (see Figure 11.57).

The diagram shows how bump maps and normal maps affect the surface normals of a polygon in different ways.

Figure 11.57. The diagram shows how bump maps and normal maps affect the surface normals of a polygon in different ways.

When viewed as a 2D texture in a paint program, normal maps have a psychedelic rainbow color. These colors tell Maya how the normal on the surface of the geometry should be bent at render time. It's very difficult for an artist to paint a normal map because the RGB values are not intuitively applied.

There are two types of normal maps: object space and tangent space. Object space maps are used for nondeforming objects, such as walls, spaceships, trashcans, and the like. They are calculated based on the local object space of the object. Up in object space means toward the top of the object. If the object is rotated upside down in world space, the top is still the top—so a robot's head is still the top of the object in object space even if it's hanging upside down.

Tangent space maps are used for deforming objects, such as characters. Tangent space maps record the normal's vector relative to the object's surface. In tangent space, up means up away from the surface of the object. Tangent space maps appear more blue and purple since the direction in which the normal is being bent is always relative to the surface along the tangent space Z axis. The Z axis corresponds with the blue channel (XYZ = RGB). Object space maps, on the other hand, have more variation in color.

In practice, most artists use tangent space maps for everything. In fact, prior to Maya 2008, tangent space maps were the only type of normal maps that Maya supported. Tangent space maps actually work well for both deforming and nondeforming objects.

The most common way to create a normal map is to use a high-resolution, detailed version of the model as the source of the normal map and a low-resolution version of the model as the target for the map. The difference between the two surfaces is recorded in the colors of the map, which is then used to alter the appearance of the low-resolution model. This is a typical process when creating models for games where low-resolution models are required by the real-time rendering engine, but the audience demands realistically detailed objects.

Creating Normal Maps

In this exercise you'll create a normal map for the old man character. A high-resolution version of the model will be used as the source of the map. To create a normal map in Maya, you'll use the Transfer Maps tool. This tool can be used to create a number of different texture map types, including normal maps.

  1. Open the normal_v01.ma file from the chapter 11scenes folder of the DVD.

  2. Look at the familiar old man model. If you look in the Display Layer panel, you'll see two layers: one labeled loRes, the other hiRes. Turn off the loRes layer and turn on the hiRes layer. You'll see a higher-resolution detailed version of the head, as shown in Figure 11.58.

  3. Turn on both layers. Select loResMan in the Outliner, and switch to the Rendering menu set.

  4. Choose Lighting/Shading

    Creating Normal Maps
  5. Expand the Target Meshes rollout. The loResManShape object will be listed since loResMan was selected when you opened the interface. If it does not appear, select it in the Outliner and click the Add Selected button. No other objects should be listed; if they are, select them in the list and click the Remove Selected button.

  6. Expand the Source Meshes rollout, select the hiResMan object in the Outliner, and click the Add Selected button to add it to the list.

    The scene contains a high-resolution model of the old man's head on a separate display layer.

    Figure 11.58. The scene contains a high-resolution model of the old man's head on a separate display layer.

  7. Expand the Output Maps section; you'll see icons representing all of the different types of maps that can be created. Click the Normal button to add normal map to the list. If other types of maps are listed, click the Remove Map button in the section for the map you want to remove.

  8. Click on the folder next to the Normal Map field, and set the location and filename for the location of the map that will be created. Choose the sourceimages directory of the current project. Name the file oldManNormal.

  9. There are a number of file format options to choose from. The two best choices are Maya IFF and EXR. Both are 32-bit formats that will ensure a detailed smooth map. Choose EXR; this way you can open the map in Photoshop (CS1 and higher) for viewing if you need to. If the file format in the name of the file is something other than .exr, it will be automatically updated.

  10. The Include Materials check box is extremely useful if you want to include a bump map as part of the normal map. For now, uncheck it since there is no bump map applied to the hi-res mesh material. However, make a note of this option—you can add more detail to your normal map, such as pores and fine wrinkles, by applying a bump texture to the shader for the hi-res mesh object and then activating this option when using the Transfer Maps tool.

  11. Set Map Space to Tangent Space. You should always use tangent space maps for characters. Actually, as stated before, you can use them for any type of object.

  12. The Use Maya Common Settings check box makes the tool use the settings specified in the Maya Common Output. If this is unchecked, sliders will appear that will allow you to set the size of the map in this section. For now, keep this box checked.

  13. In the Connect Output Maps settings, you can connect the map to a shader automatically; you can uncheck the Connect Maps To Shader option for now. Later on you'll learn how to make the connection manually. Once you understand how the connection is made, you can use this option in the future to make things more convenient.

  14. In the Maya Common Output settings, set the size of the map to 2048 in width and height, set Transfer In to Object Space, Sampling Quality to Low, Filter Size to 1, and Filter Type to Gaussian. Leave Fill Texture Seams at 1 and the remaining three check boxes (Ignore Mirrored Faces, Flip U, and Flip V) unchecked. The settings are shown in Figure 11.59.

  15. Keep the scene and the Transfer Maps window open for the next section.

The Transfer In option has three choices: World Space, Object Space, and UV Space. These specify how the map will be calculated and transferred from the high-resolution version to the low-resolution version. If the models were different sizes, then World Space would be appropriate and the models would need to be directly on top of each other. The objects used in this tutorial are the same size and very similar except for their resolutions and level of detail, so Object Space is more appropriate. The UV Space option works best for objects of fairly similar but not exactly the same shape, such as a female human character and a male human character.

These settings in the Transfer Maps interface will create a normal map by comparing the difference between the high-resolution and low-resolution versions of the models.

Figure 11.59. These settings in the Transfer Maps interface will create a normal map by comparing the difference between the high-resolution and low-resolution versions of the models.

The Search Envelope

The search envelope is the most important aspect of this tool. It specifies the volume of space that Maya will use to search when creating the transfer map. Maya compares the target geometry (the low-resolution map) with the source geometry (the high-resolution map) and records the difference between the two as color values in the normal map. The search envelope sets the limits of the distance Maya will search when creating the map. The envelope itself is a duplicate of the target geometry that's offset from the original. The offset distance is specified by the Search Envelope slider in the Target Meshes section of the Transfer Maps tool. What's more, you can edit the Target Mesh geometry itself to improve the results of the final map.

  1. Continue with the scene from the previous section. In the Target Meshes options, set the Search Envelope slider to 2.5.

  2. Set Display to Envelope. The target mesh will be hidden, and you'll see a bloated version of the target appear around the hiResManShape mesh. This is the search envelope. It has a semitransparent shader applied so you can see the source mesh inside it (see Figure 11.60).

    The search envelope is an offset polygon copy of the model that defines the range Maya uses when calculating the normal map.

    Figure 11.60. The search envelope is an offset polygon copy of the model that defines the range Maya uses when calculating the normal map.

  3. Changing the Search Envelope slider changes the volume of the search envelope and thus the distance Maya searches when creating the map.

  4. Expand the loResManShape in the Outliner; you'll see that the shape node of the original model is hidden (when the name of the object appears in blue, it means the object is not visible). A second shape node labeled loResManShapeEnvelope has been created; this is the shape node for the envelope. Select this node and open the Channel Box.

  5. Select the polyMoveFace1 node and find the localTranslateZ value. If you change this value, the offset of the envelope will change just as if you had changed the Search Envelope percent value.

  6. If you ever need to generate a new envelope while still creating settings for the Transfer Maps tool, you can delete the loResManShapeEnvelope node for the Outliner, set the display menu to Mesh and then back to Envelope (or to Both if you want to see the target mesh and the envelope), and a new envelope will be created.

  7. Undo any changes you've made to the envelope, and return to its state from step 2. Inspect the envelope and see if there are any parts of the source mesh poking through the envelope. There should be such a spot at the tip of the nose as well as on the ear. If you select the hi-res mesh in the Outliner, these spots will be more obvious.

  8. Right-click on the envelope, and choose Vertex to switch to vertex-selection mode. Use the Move tool to gently edit the envelope mesh so that no portions of the source mesh are poking through it.

  9. Select the envelope, and choose (from the Polygon menu set) Mesh

    The search envelope is an offset polygon copy of the model that defines the range Maya uses when calculating the normal map.
    You can edit the search envelope geometry using the Artisan Brush tool. Overlapping areas in the mouth are removed by smoothing.

    Figure 11.61. You can edit the search envelope geometry using the Artisan Brush tool. Overlapping areas in the mouth are removed by smoothing.

  10. Smooth out the corners of the eyes as well. Don't overdo it; just separate the overlapping parts of the envelope as best you can. Depending on the complexity of the model, this may take a few tries before you get the hang of it.

  11. Scroll to the bottom of the Transfer Maps Advanced options. Uncheck Delete Envelopes On Bake so you can reuse this envelope if you need to.

  12. Set Max Search Depth to 0. This means Maya uses an unlimited search depth. If you keep getting errors in the map on complex objects, adjust this value when creating a map.

  13. Set Match Using to Geometry Normals; this option is best for organic surfaces such as characters. The Surface Normals option works better for hard-edge geometry like spaceships and vehicles.

  14. Set the Search method to Inside Envelope Then Outside Envelope. This setting determines how the map will be made. You can experiment using different settings to see if you get different results.

  15. Click Bake to make the map. The status of the process will appear in the help line. Depending on the complexity of the high-resolution mesh and the quality settings, this can take a fair amount of time, anywhere from a minute to several minutes. When it's done, the baked map should appear in the sourceimages directory. The next section covers how you can connect the map to the shader.

Applying Normal Maps

Normal maps are applied to an object's shader in the Bump channel, and they can be viewed in the perspective window. In this section, you'll see how the map looks when it's applied to the model as well as a few suggestions for fixing problems.

  1. Continue with the scene from the previous section.

  2. Open the Hypershade window (Window

    Applying Normal Maps
  3. In the Display Layer panel, turn off the visibility of the HiRes layer so only the low-resolution mesh is visible. The Envelope mesh is either hidden or deleted depending on the settings, once the normal map-generation process is complete.

  4. Select the low-resolution version of the old man. In the Work Area of the Hypershade, right-click and choose Graph Materials On Selected.

  5. Select the Old Man shader and open the Attribute Editor.

  6. Click on the checkered box next to the Bump Mapping channel, and choose a file from the Create Render Node pop-up.

  7. When you add the file node, the Attribute Editor will open to the bump2D node. Set the Use As option to Tangent Space Normals. This tells Maya the texture you're applying is a normal map and not a bump map. You can leave the Bump Depth at 1; it has no effect on the strength of the normal map.

  8. Switch to the file1 node, and click on the folder next to the Image Name field. Browse your computer's file directory and find the oldManNormal.exr file; it should be in the sourceimages directory (if you get an error when loading the plug-in, make sure the openEXRLoader plug-in is checked in the preferences).

  9. Once the file is loaded, you should see a preview in the texture sample icon. The texture should appear mostly blue and purple. If it is completely flat blue, then there was an error during the creation process—most likely the source mesh was not selected in the Transfer Maps options, so you'll need to remake the map.

  10. In the perspective view, choose High Quality Rendering from the Renderer menu at the top of the panel. After a few seconds you should see a preview of the normal map in the perspective view, as shown in Figure 11.62. (Make sure you have Texture Shaded activated; press the 6 key to switch to this mode.)

    The low-resolution model (left) has the same detail as the high-resolution model (right).

    Figure 11.62. The low-resolution model (left) has the same detail as the high-resolution model (right).

    The normal map should make the low-resolution model look very similar to the high-resolution model. You can see in the silhouette of the geometry that the blockiness of the profile indicates that geometry is still low resolution, but those areas facing the camera look highly detailed. This workflow is very popular when creating models for games. The models end up looking much more realistic and detailed without taxing the processor of the game console.

  11. Inspect the model for errors in the texture. Most likely you'll find some errors around the lips, ears, and eyes. If large portions of the model look wrong, you'll need to try creating the map again. Sometimes just editing the geometry of the search envelope can fix the errors when you regenerate the map. Other times you may need to change the actual generation settings such as the Search Method and Max Search Depth in the Advanced settings (see Figure 11.63).

    Small errors appear on the model in some parts of the map.

    Figure 11.63. Small errors appear on the model in some parts of the map.

    Normal maps are difficult but not impossible to edit in a 2D paint program such as Photoshop. If the normal map has just a few small glitches, you may be able to open it in Photoshop and very carefully use the Clone tool and Paint tool to eliminate small problems. This is faster than trying to regenerate a whole new map just to fix a tiny spot.

  12. Open the Attribute Editor for the normal map file node, and click the View button below the Image Name field. The normal map will open in either FCheck or whatever image-editing program you have set in the preferences. You can inspect the map for errors. Errors behind the eyeballs and deep inside the nose can usually be safely ignored.

  13. In the Render settings, set the Render Using field to mental ray and the Preset to Production Quality. Create a test render, and compare it with what you see in the perspective view (see Figure 11.64).

  14. For a completed version of the scene open the normal_v02.ma file from the chapter 11scenes folder on the DVD.

    Two versions of the completed normal map. The right image shows the normal map with the bump texture baked in using the Include Materials option.

    Figure 11.64. Two versions of the completed normal map. The right image shows the normal map with the bump texture baked in using the Include Materials option.

Displacement Mapping

Displacement maps are like bump maps in that they use a grayscale texture to add detail to a model. However, rather than just perturb the normal of the surface, displacement maps actually alter the geometry at render time. Unlike normal and bump maps, the silhouette of the geometry reflects the detail in the map. Displacement maps can be used with NURBS, polygon, and subdivision surfaces and can be rendered in both mental ray and Maya software. The best results are usually achieved by rendering displacement maps on a polygon surface in mental ray using metal ray's Approximation Editor to subdivide the surface appropriately during render.

Displacement maps are tricky to use and require some practice to master; however, the results are often worth the time invested. Recent advances in digital sculpting programs such as ZBrush and Mudbox have enabled modelers to bring an unprecedented amount of realism and detail to digital characters. The detail created in these high-density meshes is often brought into Maya in the form of displacement maps (and normal maps as well).

In addition to aiding in creating detail on creatures, displacement maps have a wide variety of creative applications and innovations. You can use animated displacements to simulate rolling waves on an ocean surface, fissures opening in the earth, or veins crawling beneath the skin. In this section you'll see some basic applications of displacement maps as well as how they can be applied to the old man character from the previous sections.

Creating Terrain with Displacement Maps

In this exercise you'll create detailed animated terrain using a simple Hypershade network and displacement mapping.

  1. Create a new scene in Maya.

  2. Create a polygon plane (Create

    Creating Terrain with Displacement Maps
  3. In the polyPlane1 shape node attributes, set the values to 24 units in Width and Height. Set the Subdivisions Width and Height to 24. Increasing the subdivisions will help ensure a smooth displacement.

  4. Create a Blinn shader and assign it to the plane; set the Reflectivity of the shader to 0.

  5. Click on the checkered box next to the Color channel to create a render node. You'll preview the displacement texture in the Color channel before applying it as a displacement (see Figure 11.65).

  6. Select Crater from the Create Render Node panel. Press the 6 key to switch to shaded mode so that you can see the texture.

    Placing the crater texture in the Color channel allows you to preview the look of the texture as you fine-tune it.

    Figure 11.65. Placing the crater texture in the Color channel allows you to preview the look of the texture as you fine-tune it.

  7. Set the following attributes in the crater's Attribute Editor:

    • Shaker = 1.98

    • Channel 1 = White

    • Channel 2 = Gray

    • Channel 3 = Black

    • Melt = 0

    • Balance = 0

    • Frequency = 1.653

  8. Switch the Attribute Editor to the place3dTexture1 tab, and set the Scale values for X, Y, and Z to 10.

  9. Set the render to mental ray. In the Quality tab of the Render settings, set the Quality preset to Production Settings and create a test render.

  10. Select the Blinn shader in the Hypershade and graph it. On the Create Maya Nodes rollout on the left side of the Hypershade, expand the Displacement rollout and click on the Displacement texture to create a displacement node.

  11. In the Work Area of the Hypershade, MMB-drag the new displacement node on top of the blinnSG1 node, and then choose Default from the pop-up menu. This will automatically connect the displacement node to the shading group in the Displacement channel.

  12. In the Hypershade, MMB-drag the crater texture on top of the displacement shader node; then choose Default from the pop-up menu. This will connect the crater texture to the displacement shader. The connection is made between the crater's outAlpha attribute and the displacement shader's Displacement attribute, as shown in Figure 11.66.

  13. Open the Attribute Editor for the crater node, and check the box that says Alpha Is Luminance. This converts the luminance of the texture into the alpha output of the texture so that the displacement is correct. Disconnect the crater texture from the Color channel of the Blinn shader.

    The displacement shader is connected to the Blinn's shading group node. This figure shows a typical Hypershade network for a displacement shader.

    Figure 11.66. The displacement shader is connected to the Blinn's shading group node. This figure shows a typical Hypershade network for a displacement shader.

  14. Create a test render of the scene using mental ray Production Settings (see Figure 11.67).

  15. To see a version of the scene, open the terrainDisplace.ma file from the chapter 11scenes folder of the DVD.

When you use simple geometry and procedural textures, the default settings for the displacement are usually just fine. There's no need to create an approximation node or change the settings in the plane's Displacement Map rollout in its shape node. More complex geometry requires a few more steps, as you'll see when a displacement is added to the old man character.

The crater texture can create a very realistic-looking terrain quickly. You can increase the height of the terrain by setting Alpha Gain to 4 and Alpha Offset to −4.

Figure 11.67. The crater texture can create a very realistic-looking terrain quickly. You can increase the height of the terrain by setting Alpha Gain to 4 and Alpha Offset to −4.

Converting Displacement to Polygons

If you decide you want actual geometry to be created from the displacement, you can convert the displacement to a polygon object. This might be helpful as a stand-in object if you need to position objects in the scene near the displaced plane or if you want to model terrain using a procedural texture.

  1. Select the plane and choose Modify

    Converting Displacement to Polygons
  2. To increase the resolution of the converted object, increase the subdivisions in Height and Width on the original plane. The conversion will take longer to calculate, and the resulting geometry will be denser.

Displacement Maps for Characters

Using displacement maps to add detail to characters is becoming increasingly common. This allows a low-resolution version of the model to be rigged and animated and then converted into a highly detailed mesh at render time. The end result can be quite spectacular. The render time involved, however, makes this workflow useable only for film and television; game engines are not nearly fast enough to render displacements in real time.

Since a displacement map is a grayscale texture, it can be painted much like a bump map. A displacement map should be used for larger details that need to be seen in the silhouette of the geometry, such as large folds and wrinkles in the flesh, bumps on the nose, and large veins. Smaller details, such as pores, should be reserved for bump or normal maps that can be used in conjunction with displacement maps. Furthermore, with characters and complex objects, the geometry to be displaced should be fairly close in shape to the displaced version and have just enough subdivisions to allow for the additional detail. The base mesh of the old man's head used in this chapter is a good example of how geometry should be organized to support displacement.

Maya's Transfer Maps tool also allows for the creation of displacement maps. The Transfer Maps tool works very well for normal maps but not nearly as well for displacement maps. Generating a workable displacement map using this tool takes a lot of time and effort, and the results are often disappointing. It does well for simple objects, but you should avoid it when creating displacement maps for complex objects such as characters.

The best possible way to generate a displacement map for a character or creature is to use a digital sculpting program such as ZBrush or Mudbox. Although it involves learning another application, the results are excellent. This is becoming the workflow of choice for many major studios. This lesson will demonstrate how to render the old man character using a displacement map generated in Pixologic's ZBrush 3.1.

When generating maps in a third-party application, it's always best to create 32-bit floating point maps. This will ensure that the displacement is smooth and free of the stair-stepping artifacts that can appear in 16-bit maps. Use the Optimized File Texture feature with displacement maps to ensure stability (see the section titled "Rendering Textures Using the Optimized Format," earlier in the chapter).

Mental ray's Approximation Editor is used in this section.

  1. Open the displace_v01.ma scene from the chapter 11scenes folder on the DVD. You'll see the same old man character from the previous sections complete with UV texture coordinates.

  2. Create a Blinn texture and name it oldManShader; then apply it to the character.

  3. In the Blinn shader, set Reflectivity to 0.

  4. Select the character's head and create an approximation node. Choose Window

    Displacement Maps for Characters
  5. In the Approximation Editor, click the Create button in the Subdivisions (Polygon And Subd. Surfaces) section. You do not need to create a displacement approximation node; the default settings will work just fine.

  6. In the Attribute Editor for the mentalRaySubdivApprox1 node, leave Approx Method set to Parametric, and set N Subdivisions to 3. This subdivides the model so the detail created by the displacement texture is more refined. Higher values allow more of the detail in the map to come through. A setting higher than 5 may cause mental ray to crash. The settings are shown in Figure 11.68.

  7. Set the renderer to mental ray, and use the Production Quality preset. Create a test render of the head. It should look nice and smooth.

  8. In the Hypershade, create a displacement shader node and attach it to the Blinn shader. Review steps 10 and 11 of the section "Creating Terrain with Displacement Maps" to see how to do this.

  9. In the Attribute Editor for the displacementShader1 node, click on the checker pattern next to the Displacement attribute and choose File from the Create Render Node pop-up.

  10. Name the new file1 node oldManDispFile. Click on the folder next to the Image Name field, and use the computer's browser to locate the oldManDisplace.map file from the sourceimages directory in the chapter 11scenes folder on the DVD.

    The subdivision approximation node will subdivide the polygon model at render time to allow more detail in the displacement to come through.

    Figure 11.68. The subdivision approximation node will subdivide the polygon model at render time to allow more detail in the displacement to come through.

  11. Expand the Color Balance section of the oldManDispFile node, set Alpha Gain to 2.2 and Alpha Offset to −1.1.

  12. Turn on Alpha Is Luminance and create a test render. The old man should look nice and detailed (see Figure 11.69). You can try increasing the number of subdivisions on the Approximation Editor node to allow more detail to come through, but don't move the value past 5.

    The displacement map adds very realistic detail to the rendered character.

    Figure 11.69. The displacement map adds very realistic detail to the rendered character.

Combined Displacement and Bump Maps

  1. Open oldManShader in the Attribute Editor. Add a file node to the Bump Mapping channel by clicking on the checkered box.

  2. Set the Bump2d1 Use As option to Bump Map. Set Bump Depth to 0.12.

  3. Rename the connected file node oldManBumpFile. Use the Image Name field to open the File Browser dialog box. Add the oldManBump.tif file from the sourceimages directory in the chapter 11scenes folder on the DVD.

  4. To see a completed version of the model with displacement, open the displace_v02.ma scene from the chapter 11scenes folder on the DVD. A rendered version is shown in Figure 11.70.

At this point the character looks very detailed, and you can move on to the next section to add a more lifelike color to the skin using a Photoshop file node.

The displacement and bump maps are used together to create realistic detail in the model.

Figure 11.70. The displacement and bump maps are used together to create realistic detail in the model.

PSD Networks

The PSD network is a quick and easy way to set up a single, layered Photoshop file that can be applied to multiple channels of a shader. In this section you'll create a PSD network to create the file textures for the color, diffuse, and specular channels of the character's skin texture. You will need to have a recent version of Photoshop (Photoshop 7 or higher) installed on your computer to use a PSD network.

  1. Open the PSDnetwork_v01.ma scene from the chapter 11scenes folder on the DVD. The scene contains the old man's head with a shader already applied. The shader has both a displacement map and a bump map applied.

  2. Select the old man's head, and switch to the Rendering menu set. Choose Texturing

    PSD Networks
  3. In the Image Name field you can set the location where the PSD file will be saved. It's best to store this in the sourceimages directory of the current project.

  4. Check the Open Adobe(R) Photoshop(R) option so that Photoshop opens automatically when the shader is created.

  5. Set the Size X and Size Y values to 2048. Check the option Include UV Snapshot and set Position to Top. Leave UV Set as map1 (the model only has one set), and leave Color Value at white so the UV snapshot is drawn as white lines in the Photoshop file. The UV lines will serve as a guide for painting the texture.

  6. The Attributes Selection box shows the shader channels available for use in the network. The Bump and Displacement channels have icons next to them indicating that there's already a texture in these channels. Click Color from the list on the left side of the panel, and then click the arrow in the middle pointing to the right. The Color channel will now be listed on the right, meaning that a layer will be created in the final Photoshop file for the Color channel.

  7. Add Bump, Diffuse, and SpecularColor to the left-hand side. When you add a channel that already has a texture, the texture will be included as part of the Photoshop file (see Figure 11.71). By adding the Bump channel to the Photoshop network, the texture for the Bump channel will be placed into a layer in the Photoshop file. You can then copy the detail you painted for this texture into the other layers and use them as a basis for the other texture channels.

    The options for the PSD network

    Figure 11.71. The options for the PSD network

  8. Click Create to make the network. Photoshop will start (if it's not running already), and a Photoshop file will open. Each channel of the shader is stored as a layer group, and the UV snapshot is visible at the top.

  9. When working with the file in Photoshop, don't change the names of the layer groups or their configuration. Try to keep a single layer in each group when you've finished with the file.

  10. Turn on the visibility of the upper layers to see the lower layers; just remember to restore the visibility of all the layers when you save the file before updating the network in Maya. Here are some tips for working with each layer:

    • Use the Bump layer as the basis for the other textures to help keep things consistent. For instance, you can duplicate the Bump layer and move the duplicate into the diffuse layer folder. Set its Blending Mode to Multiply and reduce its Opacity. Adjust the levels of the duplicate to make it lighter. Merge this with the gray color in the diffuse group, and you have a diffuse texture ready to go. You can use this layer to darken the areas under the eyes and brighten areas close to the cheekbone. The layer should remain grayscale.

    • The Specular layer can be painted quickly and roughly. Paint brighter areas where you think the skin should be shiny, such as on the tip of the nose and the lips. Darker areas should be matched with less-shiny regions, such as the cheeks. Add as much noise as possible to this layer to help break up the highlights on the skin.

    • The Color layer is a good place for freckles, blotchy red areas, veins, capillaries, zits, and lip color. Use photographs and reference skin close-ups when creating this texture. You can clone the pores in the bump texture to this layer so that they will show up better on the face.

  11. When you've finished painting each texture, make sure that there is one layer for each group and that they are all visible; then save the file (see Figure 11.72). In Maya, select the head and choose Texturing

    Detailed Attribute List
  12. You can make further adjustments to each texture without going back into Photoshop. To do this, adjust the Color Gain and Color Offset settings on textures that are connected through the outColor attribute of the texture (color, skin color), and the Alpha Gain and Alpha Offset settings of the textures that are connected using outAlpha (diffuse).

  13. In the Specular Shading section of the oldManShader, set Eccentricity to 0.5 and Specular Rolloff to 0.859.

    Painting textures in Photoshop requires time, effort, and lots of reference materials. Each layer group in the file corresponds to a designated channel in the shader.

    Figure 11.72. Painting textures in Photoshop requires time, effort, and lots of reference materials. Each layer group in the file corresponds to a designated channel in the shader.

  14. Create a test render of the model. Continue to tweak the textures in the shader as well as in Photoshop (see Figure 11.73).

  15. To see a finished version up to this point, open the PSDNetwork_v02.ma scene from the chapter 11scenes folder on the DVD.

    The old man character with Bump, Displacement, Color, Specular, and Diffuse channels textured.

    Figure 11.73. The old man character with Bump, Displacement, Color, Specular, and Diffuse channels textured.

Subsurface Scattering

Subsurface scattering refers to the phenomenon of light rays bouncing around just beneath the surface of a material before being reflected back into the environment. It's the translucent quality seen in objects such as jade, candle wax, and human skin (actually almost every material except metal has some amount of subsurface scattering). Subsurface scattering adds an amazing level of realism to CG objects and characters. It takes practice to master, but the results are worth it.

Fast, Simple Skin Shader Setup

In Maya there are several ways to create the look of subsurface scattering ranging from simple to complex. The Translucence, Translucence Depth, and Translucence Focus sliders included on standard Maya shaders offer the simplest way to create translucency. These sliders work fine for an object made of a single material, such as candle wax. Likewise the Scatter Radius slider and related attributes in the mental ray section of Maya shaders add a quick-and-dirty subsurface quality to simple objects. However, these options fall far short when you're trying to create a complex material such as human skin.

Since Maya 2008, the mental ray simple subsurface scattering shaders have become much easier to set up and use. Many of the connections that needed to be created manually in previous versions of Maya are now set up automatically when you create the shader.

There are several subsurface scattering shaders. These include:

misss_call_shader
misss_fast_shader
misss_fast_shader_x
misss_fast_shader_x_passes
misss_fast_simple_maya
misss_fast_skin_maya
misss_physical
misss_set_normal
misss_skin_specular

With the exception of misss_physical, these shaders are all similar and use the same basic technique for creating the effect of subsurface scattering. Some of the misss shaders are really combined versions of others. For instance, misss_fast_skin_maya is actually a combination of misss_fast_shader and misss_skin_specular with an extra layer of subsurface scattering. In this chapter, you'll focus on using the misss_fast_skin_maya shader.

The misss_physical shader is a more complex, physically accurate shader meant to be used with photon casting lights. For complete information on this shader refer to Mental Ray for Maya, 3ds Max, and XSI by Boaz Livny (Sybex, 2008). This shader also works best for objects that require a deep level of scattering, such as thick candles and marble.

  1. Open the sss_v01.ma scene from the chapter 11scenes folder on the DVD. You'll see the old man character with a custom light rig. The light rig uses area lights to cast soft shadows. The soft shadows created by the area lights will add to the realism of the render.

  2. Switch to the render camera and do a quick test render. Store the image in the render view so you can compare it with the subsurface scattering renders.

    You'll see that the character has a Blinn texture applied along with the skin, bump, displacement, and specular textures used in the previous section. These same file textures (along with a few others) will be plugged into the simple skin shader. The colors of the textures seem very extreme; however, once they are plugged into the misss_fast_skin_maya shader, you'll see that the variations in color become more subtle and even (see Figure 11.74).

  3. Open the Hypershade and, on the left side, switch to the Create mental ray Nodes section. From the Materials section, create a misss_fast_skin shader. Name the shader oldManSkinShader.

  4. Select the old man character and apply the oldManSkinShader (right-click the shader's icon in the Hypershade, and choose Assign Material To Selection). He'll turn red in the perspective view, and that's okay. Maya just can't preview some of the mental ray nodes using hardware rendering.

  5. Select the misss_skin_mayaSG1 node (it resides in the shader hierarchy above the misss_fast_skin_shader node) in the Hypershade, and right-click the shader. Choose Graph Network.

    The old man character rendered without subsurface scattering

    Figure 11.74. The old man character rendered without subsurface scattering

    You'll see that Maya has automatically created the necessary light map and texture nodes (misss_fast_Imap_maya and mentalRayTexture1). If you select the mentalrayTexture1 node, you'll see that the File Size Width and File Size Texture attributes are both highlighted in purple, indicating an expression is controlling their values. The expression is tied to the render size automatically, so you don't have to set these as you did in previous versions of Maya.

  6. In the Image Name field you can type a name for the light map texture file and a location for the file as well. It's a good idea to do this if you have more than one surface using a light map. You can leave this field blank for now. All other attributes can be left at their default settings. Likewise, there's no need to change anything in the misss_fast_lmap node.

  7. Select oldManSkinShader and open its Attribute Editor. At the top you'll see the diffuse layer. This layer controls the basic color of the object, much like the Color and Diffuse settings in a standard shader but with a couple of differences.

    Diffuse Weight controls the overall contribution, or lightness, of the combined diffuse channels. The Overall Color channel is a multiplier for the Diffuse Color channel, so you'll want to put your color textures in the Diffuse Color channel and then modify it using the Overall slider. That said, you can actually do the reverse in some cases; you may want to experiment by putting a color texture map in the Overall Color channel.

  8. In the Hypershade, switch to the Textures tab and find the PSD_oldManShader_color texture. MMB-drag it down to the Attribute Editor on top of the Diffuse Color channel. This texture file is the skin color used in the previous section.

    The Overall Color channel is also a good place for dirt or cavity maps. In this case you'll hook up an ambient occlusion node.

  9. In the left side of the Hypershade under the Create mental ray nodes, expand the Textures section and choose the mib_amb_occlusion node. An ambient occlusion texture node will appear in the Work Area. Reselect the misss_fast_skin shader, and MMB-drag the ambient occlusion node from the Hypershade Work Area over the Attribute Editor for the oldManSkinShader. Drop it on top of the overall color node.

  10. Set Diffuse Weight to 0.5; you'll probably want to adjust this more later.

  11. In the Textures area of the Hypershade, find the PSD_oldManShader_normalCamera (this is the texture used to create the bump) texture, and MMB-drag it to the Work Area. Expand the Bump Shader rollout in the oldManSkinShader, and MMB-drag the PSD_oldManShader_normalCamera texture on top of this channel.

  12. Select the bump2d node and set the Bump Depth to 0.15.

  13. In the Materials tab of the Hypershade, find the oldManDisplacement shader. MMB-drag this shader on top of the shading group labeled misss_fast_skin_maya1SG node, and choose Default. These are the same displacement node, file texture, and settings created earlier in the chapter (see Figure 11.75).

    The shading network for the misss_fast_skin shader has several file textures connected to it.

    Figure 11.75. The shading network for the misss_fast_skin shader has several file textures connected to it.

  14. Select the oldMan head in the perspective view, and switch to the renderCam. The oldMan head already has an approximation node attached, and the renderer has been set to mental ray. Create a test render to see how he looks so far.

  15. He has a very interesting look, kind of like a plastic doll. Compare the render with the previously stored version; notice how the color texture is not nearly as strong. The subsurface settings need to be tuned to create a more realistic-looking skin. Save your scene.

  16. To see a version of the scene so far, open the sss_v02.ma file from the chapter 11scenes folder on the DVD. The render is shown in Figure 11.76.

    At this point a render of the character looks grainy and plastic.

    Figure 11.76. At this point a render of the character looks grainy and plastic.

Subsurface Scattering Layers

The three channels listed under the Subsurface Scattering Layers control three different levels of subsurface scattering. Their controls are the same except for one additional attribute slider in the back scattering layer.

The Scatter Weight slider for each channel controls its overall contribution to the shader. Scatter Radius controls how light scatters across the surface of the object, and Scatter Depth (found only on Back Scatter Color in the misss_fast_skin_maya shader) controls how deeply light penetrates into the object. The Color value for each controls the color of the subsurface scattering; you can apply textures to all of these values.

The Epidermal layer is the topmost layer, where you'll find freckles and moles; the Subdermal layer is just beneath the skin, where you'll find veins and capillaries; and the back scatter color is the deepest layer, where bone and cartilage allow different amounts of backlighting to show through the skin.

  1. To remove the grainy quality you can expand the Lightmap rollout in the oldManSkinShader and increase Samples to 256. Raising this value does not actually increase render times much, but it will remove the graininess.

  2. Select the Ambient Occlusion node connected to Overall Color. Set its Samples value to 32 and its Max Distance to 1. This limits the amount of distance mental ray uses to calculate Ambient Occlusion.

  3. Select the oldManSkinShader, and connect the PSD_oldManShader_color texture to the Epidermal Scatter Color channel (MMB-drag the texture node on top of the Epidermal Scatter Color slider in the Attribute Editor). It's common practice to use the same texture for both the diffuse color and the uppermost layer of subsurface scattering.

  4. In the Textures tab of the Hypershade, drag the subdermalScatterColor and backScatterColor file texture nodes down into the Work Area. Connect them to their respective channels in the oldManSkinShader.

  5. Set the following values for the Subsurface Scattering Layer channels:

    • Epidermal Scatter Weight = 0.5

    • Epidermal Scatter Radius = 0.25

    • Subdermal Scatter Weight = 0.5

    • Subdermal Scatter Radius = 1

    • Back Scatter Weight = 1.5

    • Back Scatter Radius = 1

    • Back Scatter Depth = 0.2

These values are often arrived at through experimentation. The lighting, size of the scene, and objects, along with the desired look, all affect how these values are set. In general when working with them you'll want to set all of the weight values to 0 to turn them off and then raise the weight value of each one, starting with the back scattering layer, and set their values by tweaking and test rendering. If you arrive at settings you like, save the preset for reuse in other scenes. You can use the Scale Conversion attribute under the Algorithm Control rollout as a global scale adjuster for scenes and objects of different sizes.

Select the file node for backScatterColor, and click the View button to see the texture. Notice how deep the color is, yet it's quite subtle in the final render. Take a look at the subdermal file texture as well. The philosophy behind the arrangement of the colors in the file is based on the typical color zones of the face. Faces, both male and female and across races, generally have cooler colors around the mouth and eyes and in the recesses of the neck and ears. Warmer colors appear on the nose, cheeks, and forehead, and some yellows are seen in places where bone is close to the surface of the skin, such as in the temples and cheekbones.

Subsurface Specularity

The Subsurface Specularity attributes provide a number of ways to control how the skin of your character reflects the lights in the scene.

  1. Overall Weight adjusts how much the combined specularity settings affect the object. Setting this to 0 turns off the specularity altogether. Set this value to 1.5.

  2. Edge Factor controls the Fresnel effect of the specular reflection. Areas of the surface that turn away from the camera reflect more light than those that face the camera. This value controls the width of this effect. A higher value creates a thinner edge for the highlight on the skin. Set this value to 2.

    The specularity for the skin shader has two layers to simulate the broad, overall specularity of the skin as well as the shiny quality of oily or wet skin. The Primary specularity controls the broad specular reflection and should usually have lower values than the Secondary specularity values. The sliders themselves work the same way. Weight controls the overall contribution; Color controls the color or texture. Edge Weight is a multiplier for the edge of the highlight, and Shininess controls the size and intensity of the highlight (lips will have a higher shininess than the cheeks).

  3. In the Hypershade, switch to the Textures tab and find the PSD_oldManShader_diffuse node. This texture shares much of the same detail as the bump node, so it should work pretty well for the primary specularity. MMB-drag this node on top of the Primary Specular Color slider. Set Primary Weight to 0.2, Primary Edge Weight to 0.8, and Primary Shininess to 5.

  4. Use the same technique to connect the PSD_oldmanShader_specularColor node to the Secondary Specular Color. This texture contains a lot of noise and fine detail, so it should do a good job of breaking up the brighter highlights on the shinier parts of the face.

  5. Set Secondary Weight to 0.8, Secondary Edge Weight to 0.1, and Secondary Shininess to 50.

  6. The reflection settings work much like the specular values. If Reflect Environment Only is selected, only environment maps will be used for reflection and no reflection rays will be generated for the object. Skin is not terribly reflective, so for this scene you can leave Reflect Weight at 0 or put it at an extremely low value such as 0.005, and set Reflect Edge Weight to 0.1. The final settings are shown in Figure 11.77.

  7. Create a test render of the scene. To see a completed version, open the sss_v03.ma scene from the chapter 11scenes folder on the DVD. Compare the image (shown in Figure 11.78) with the render from the PSD network section. Subsurface scattering does a great deal toward adding realism to a character.

    The settings for the final oldManSkinShader

    Figure 11.77. The settings for the final oldManSkinShader

    The final render of the character with displacement, bump, painted skin textures, and subsurface scattering

    Figure 11.78. The final render of the character with displacement, bump, painted skin textures, and subsurface scattering

Texture Mapping NURBS Surfaces

NURBS surfaces use their own parameterization to determine texture coordinates. In other words, you don't need to map u- and v- coordinates using the UV layout tools. This makes NURBS easier to work with but less flexible. You can project a texture onto a NURBS surface similarly to the way you project UV coordinates onto a polygon. In this section, you'll see a couple common ways to map UVs onto NURBS surfaces.

Convert Texture to File Texture

Painting a texture map for a NURBS surface can be made easier by creating a visual guide that you can use in Photoshop. In this example you'll create a tire tread for a NURBS tire and use the image created in Photoshop as a displacement map.

  1. Open the carTexture_v01.ma scene from the chapter11scenes directory on the DVD.

    The tires on Anthony Honn's car model are revolved NURBS surfaces. You can try painting a tread pattern in Photoshop and then apply it to the model using the Texture Placement tool, but you'll probably get very frustrated when you try to precisely place the tread. Instead, you can first create a guide texture that can be used in Photoshop when you create the tread pattern.

  2. Select the rear wheel surface of the car in the perspective view, and apply a Lambert texture. Name the texture rubberTireShader.

  3. Open the Attribute Editor for rubberTireShader. Click on the checkered swatch next to the Color channel, and apply a ramp texture.

  4. Open the Attribute Editor for the new ramp, and set the Type to U Ramp so the colors of the ramp wrap around the tire (Figure 11.79).

  5. In the Attribute Editor for the ramp, set Interpolation to None.

  6. Change the colors of the ramp so the top and bottom are black and the middle is white.

  7. Move the positions of the color markers on the ramp so the center strip, where the tread pattern will be, is white and the sides are black. Use the numeric inputs in the Ramp's Attribute Editor to precisely position the color markers. Set the bottom marker's Selected Position to 0, the middle marker's Selected Position to 0.35, and the top marker's Selected Position to 0.65 (see Figure 11.80).

    Set the ramp texture to U Ramp so the colors of the ramp wrap around the tire.

    Figure 11.79. Set the ramp texture to U Ramp so the colors of the ramp wrap around the tire.

    The ramp colors are modified to black and white to define the limits of the tread.

    Figure 11.80. The ramp colors are modified to black and white to define the limits of the tread.

    Once you have the ramp positioned to indicate the placement of the tread, you can convert the ramp into a file texture that can be opened in Photoshop.

  8. Open the Hypershade window. In the perspective view, select the rear tire, and Shift+click the rubberTireShader in the Hypershade. From the Hypershade drop-down menu, choose Edit

    The ramp colors are modified to black and white to define the limits of the tread.
  9. A new rubberTireShader appears in the Hypershade. A file texture node is connected to this new shader. Select the new file1 texture, and open its Attribute Editor. In the Image Name field, you'll see the path to the directory where the image is stored (it should be stored in the sourceimages directory of the current project).

    The ramp texture is converted into a file texture and attached to a duplicate of the original shader.

    Figure 11.81. The ramp texture is converted into a file texture and attached to a duplicate of the original shader.

    The file texture can be opened in Photoshop and used as a guide to create the tread. The tricky part of the tread is making a repeating pattern that does not have visible seams at the top and bottom. The tread pattern should stay within the white area on the original texture. Make the tread pattern white and the black areas gray. Remember that in a displacement map a gray value of 0.5 means no displacement. Black creates a recess, and white creates a bump. So the parts of the tread that stick out should be white. I added dark gray areas in my version for the tread to create recesses. The sides of the tire can be gray so that the texture does not alter the model of the tires.

    You can create a pattern along the entire strip or make a section that can be repeated in Maya. In this example, I chose the latter method (see Figure 11.82).

    The treadTexture .tif file was created based on the converted ramp texture. It has been carefully cropped so the texture repeats exactly on the top and bottom.

    Figure 11.82. The treadTexture .tif file was created based on the converted ramp texture. It has been carefully cropped so the texture repeats exactly on the top and bottom.

  10. In the carTexture_v01.ma scene, open the Hypershade window and select the rubberTireShader1 shader. This is the duplicate that was created when you converted the ramp into a file texture. It has automatically been applied to the tire surface.

  11. Select the file1 node and open its Attribute Editor. Click on the folder next to the Image Name field and browse your computer to find the tread file you created, or use the treadTexture.tif file found in the chapter11sourceimages directory on the DVD.

  12. When you use the treadTexture.tif file, you'll notice it is stretched on the tire. To fix this you need to attach a file texture placement node. In the Create column of the Hypershade window, set Mode to Create Maya Nodes. Scroll down to the General Utilities section, and click 2d Placement Node to create a placement node.

  13. In the Hypershade window, MMB-drag the new 2dTexture Placement node on top of the file1 texture node, and choose Default from the pop-up menu. This makes the default connections between the placement node and the file texture.

  14. Open the Attribute Editor for the 2d Texture Placement node, and set the V field of the Repeat UV attribute to 88. In the perspective window, you'll see that the texture is now repeating on the tire (I arrived at the number 88 through trial and error). See Figure 11.83.

    The treadTexture file repeats around the tire, creating the texture pattern.

    Figure 11.83. The treadTexture file repeats around the tire, creating the texture pattern.

  15. To make the texture a displacement map, graph the rubberTireShader1 shader in the Hypershade. Disconnect the connection between the texture and the Color channel of rubberTireShader1. Select the shading group node attached to the rubberTireShader1 node (it should be named lambert3SG1).

  16. Open the Attribute Editor for lambert3SG1. MMB-drag the file1 texture node on top of the Displacement Mat. slot to make the texture a displacement material.

  17. Open the file1 node in the Attribute Editor and, under the Color Balance rollout, set Alpha Gain to 0.1 and Alpha Offset to −0.05 (for more information on these settings review the "Displacement Mapping" section in this chapter).

  18. Create a test render. You may need to adjust the Alpha Gain value to create the height for the tread pattern. The Alpha Offset option should be set to −1/2 of the Alpha Gain if you want the black parts of the texture to push into the tire.

  19. Zoom in on the tire, and create a test render of the scene (see Figure 11.84).

  20. Save the scene as carTexture_v02.ma. To see a finished version of the scene, open the carTexture_v02.ma scene from the chapter11scenes directory on the DVD.

    The treadTexture. tif file is used as a displacement map for the tire.

    Figure 11.84. The treadTexture. tif file is used as a displacement map for the tire.

Another way to map a texture onto a NURBS surface is to use a projection node. To project a texture on a NURBS surface, make sure the As Projection option is selected in the 2D Textures section of the Create Maya nodes. You can then use the projection manipulator to place the texture in the perspective view.

The Bottom Line

Create UV texture coordinates

UV texture coordinates are a crucial element of any polygon or subdivision surface model. If a model has well-organized UVs, painting texture and displacement maps is easy and error free.

Master it

Map UV texture coordinates for a character's hand; then try a complete figure.

Create bump and normal maps

Bump and normal maps are two ways to add detail to a model. Bump maps are great for fine detail, such as pores; normal maps allow you to transfer detail from a high-resolution mesh to a low-resolution version of the same model as well as offer superior shading and faster rendering than bump maps.

Master it

Paint a bump map for a character. Create high-resolution and low-resolution versions of the model, and try creating a normal map using the Transfer Maps tool. See if you can bake the bump map into the normal map.

Create displacement maps

A displacement map is a grayscale texture that can actually alter the geometry of a model. There are a wide variety of uses for displacement maps.

Master it

Create some terrain using a procedural texture, such as the crater texture, as a displacement map for a plane. Try animating the depth of the map so that canyons form in the ground over time.

Use the PSD network node

A PSD network automatically creates a multilayer Photoshop file with a layer group for each designated channel of a shader.

Master it

Create a PSD network for a shader that includes layers for transparency, incandescence, and reflected color.

Create a misss_fast_skin shader

The misss_fast_skin shader can create extremely realistic-looking skin. The secret is using painted texture maps for the Subsurface and Specularity channels.

Master it

Change the look of the old man character by making his skin paler or tanner; see if you can get the backlight to make his ears glow from behind.

Create texture maps for NURBS surfaces

NURBS models have UV texture coordinates built into the parameterization of the surface. You can convert a ramp into a texture to use as a guide for painting texture maps in Photoshop.

Master it

Create a texture for a tire that includes the text for the tire brand on the side of the tire.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset