Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Bump Mapping

Another powerful and useful method to add to texture mapping is bump mapping. This kind of map does not change the geometry in any way, but it tweaks the way the surface responds to lighting to give the impression of bumpiness based on an applied map. Only the luminance of the applied bump image is used to create the bump effect, so grayscale images are the norm for bump maps. A middle gray is considered flat, lighter areas are higher, and darker areas are lower. In areas where the bump map's brightness is changing, the surface will look like it's bumpy. Because the bump map effect will not affect the silhouette of a surface, you can't use bump mapping to simulate large features that you'll get near to or the effect will be ruined. For example, you wouldn't normally bump map a character's nose; however, you might bump map the pores on that nose. For many surfaces, bump mapping is perfect—fabrics, craggy surfaces, wood grain, or even metal vents, provided the camera doesn't get too close.

TIP

To see a bump effect, the material usually needs to have at least a minimal amount of shininess.

Coordinating Texture and Bump Mapping

When you combine texture mapping and bump mapping artfully, you can get an extraordinary amount of detail from even fairly simple models. Artists often create these maps in a paint program, and carefully match the placement of the bump effects in the grayscale bump map to the corresponding colored areas in the color texture map. Maya uses the bump map's luminence to set the "height," with white being all the way "out" and black being all the way "in." If you try to use an image as its own bump map, it rarely works; the shiny areas appear as large bumps and darker areas that protrude look recessed. It's important to keep bump maps slightly soft; ultra–high-contrast black-on-white images do not work as well as softer images with gradations between the extremes.

Tutorial: Applying Bump Maps

In this tutorial, you'll apply a procedural noise effect to the Bump Mapping attribute of the flower pot's clay material to give it a more natural, rough appearance.

On the CD

Chapter_08\movies\ch08tut07.wmv

  1. In Hypershade, MMB-drag the pottery material to the bottom tab area. If the bottom tab area is cluttered, you can clear it by selecting the materials you are done with and clicking the Clear Graph button (refer to Figure 8.1).

On the CD

Chapter_08\ch08tut05end.mb

  1. Double-click the pottery material to open the Attribute Editor. Click the checkered button to the right of the Bump Mapping attribute near the top of the Common Material Attributes section to open the Create Render Node dialog box.

  2. Click the Solid Fractal type in the 3D Textures section of the Create Render Node dialog box. The Attribute Editor will show the Bump Value and Bump Depth settings. Notice that the Bump Depth defaults to 1.0. You can intensify or reduce the bump amount with this slider. Click the right-arrow icon next to Bump Value to take you to the solid fractal that's driving the bump. The Solid Fractal Attributes section will appear in the Attribute Editor.

  3. Set Ratio to 1.0 to intensify the bump.

  4. Click the place3dTexture tab in the Attribute Editor. You can also find this node in Hypershade, connected to the left side of the Solid Fractal swatch that connects to the pottery swatch. In the Attribute Editor, increase the scale of the Solid Fractal: Set Scale X, Y, and Z to 50. Note the size icon that appears in the 3d panels.

  5. Render the scene to see the flower pot's bumpy appearance.

On the CD

Chapter_08\ch08tut07end.mb

Tutorial: Applying Bump Maps to Your House

Applying a bump map to the textures for your house requires a little more work. In this tutorial, we'll guide you through applying a bump map for three materials: the chimney, foundation, and outer walls.

On the CD

Chapter_08\movies\ch08tut08.wmv

  1. Load your scene with the textured house (see the file noted below the CD icon). Because bump maps are determined with values taken from a grayscale image, you can often take the color version of a texture you have and modify it to become the bump map, as shown in Figure 8.34. After you have a bump map, all you have to do is set the placement so that it lines up with the texture already applied to the object.

On the CD

Chapter_08\ch08tut06end.mb

  1. Switch into the Hypershade/Render/Persp saved layout. Hide all layers except for DoorL. The material for the door will be the easiest one to add a bump map to. There are no sharply defined lines for the door, so you can use almost any type of bump map. Maneuvering in the Perspective view, focus on the door from an angle. If you look at the door straight on, it's more difficult to see the results of the bump map. Do an IPR render.

  2. Double-click the Door_Blinn material to open the Attribute Editor. Click the checkered button next to Bump Mapping. Select the Normal radio button in the Create Render Node dialog box, and then click File as your texture type. In the File tab, load the file noted below the CD icon into the Image Name text box.

On the CD

Chapter_08\BumpMaps\planks_bump.tif

Figure 8.34Figure 8.34 The grayscale bump maps in the bottom row were created by desaturating and altering the original color textures in the top row, so that "higher" areas are lighter.

TIP

If you load the bump map files from the CD-ROM, you'll need the CD-ROM every time you load the scene. A good plan would be to copy the files from the CD-ROM into the sourceimages folder in your project directory.

  1. The bump map is applied almost perfectly, with the wood grain running vertically. In the bump2d tab, decrease the Bump Depth to 0.6. In Hypershade's Work Area, click the place2dTexture tab for the bump map, and set Repeat UV to 1 and 0.7. Add some Noise UV set to 0.01 and 0 to make the vertical lines "wiggle" a little. Look at Figure 8.35 to see the difference before and after the bump map was added.

  2. Now you'll add a bump map to the walls of the house. Make the OuterWallsL layer visible. Focus on the front left side of the house in the Perspective view, and IPR render. With Walls_Blinn open in the Attribute Editor, click the checkered button next to Bump Mapping and click File as the texture type. In the bump2d tab, decrease Bump Depth to around 0.5. Next, drag and drop planks_bump.tif (see the file noted here) to the Image Name text box as before. Double-click on Walls_Blinn in Hypershade, and you can find the values for the place2dTexture node in the Channel Box (hotkey: Shift+C) by clicking on the place2dTexture entry under Inputs. Close the Attribute Editor to get it out of your way.

On the CD

Chapter_08\BumpMaps\planks_bump.tif

Figure 8.35Figure 8.35 The door, before and after adding a bump map to its material.

  1. The Inputs section of the Channel Box contains information about the material's connections (textures and mapping placement). There are currently three place2dTexture nodes, with the most recent one at the bottom. Click on the last place2dTexture node to see a plethora of attributes (see Figure 8.36). Change Rotate Frame to 90, and set Repeat U to 7 and Repeat V to 4.

Figure 8.36Figure 8.36 In the Channel Box, you can modify values for your material's placement nodes.

  1. When adding the bump map to the foundation, you have to set the map's placement to fit with the cobblestone texture. Open Foundation_PhongE and connect a 2D texture File to the Bump Mapping attribute. Be sure the Normal radio button is selected for the placement. Because the original color texture is set up as normal placement, the easiest way to align the two maps is to use an identical placement setup. Open the file cobblestones_bump.tif, and drag it to the Image Name text box.

On the CD

Chapter_08\BumpMaps\cobblestones_bump.tif

  1. The default placement for the bump map is way off, which you can see by doing an IPR render. The cobblestones_bump.tif file is the modified version of the foundation's texture. If the bump map is mapped overlaying the texture, you'll have a much more realistic look. RMB-click on Foundation_PhongE, and choose Graph Network. Rearrange the graph in the Work Area (RMB-click | Graph | Rearrange Graph).

  2. Delete the place2dTexture node that connects to the File node for bump by clicking to select it, and then pressing Delete. Now hold down the Ctrl key while MMB-dragging from the remaining place2dTexture node to the File node for Bump. When you release the mouse button over this node, all the connections should instantly appear.

  3. Select the Bump2d node, and in the Attribute Editor, adjust the Bump Depth level to around 1.2, so that it looks like stone with deep grooves. The foundation should look similar to Figure 8.37 after you're finished.

  4. The last bump map you'll apply is for the chimney base. Having gone through the mapping process for the foundation, try doing the chimney on your own. The directions are basically the same, except that you'll load the bricks_bump.tif file (noted below the CD icon) and apply the bump map to the ChimneyBase_Lambert material.

On the CD

Chapter_08\BumpMaps\bricks_bump.tif

Figure 8.37Figure 8.37 Applying the bump map to the foundation adds a lot of detail.

Going Further

To further your understanding of materials and texturing, try setting up the remaining materials for the house and experimenting with different methods of applying textures, such as projection methods, 3D textures, and so forth. You could also add some objects inside the house. You could model a coffee table, a lamp, or even a chair, or you can import a file with these objects already created for you.

To import the scene, go to File | Import | option box. Reset the settings to the default, and click the Import button. Then browse to the file's location on the CD-ROM, and click the Import button again. A ground material has been created as well as some objects for inside the house.

On the CD

Chapter_08\ch08importObjects.mb

You might have to reposition some of the objects, but if you're having trouble, you can load the scene file noted below the CD icon. Figure 8.38 shows the scene with the objects imported.

On the CD

Chapter_08\ch08tut08end.mb

Figure 8.38Figure 8.38 The objects have been imported.

For your viewing and rendering pleasure, a fully textured version of the house is available on the CD-ROM. Load the scene file noted below the CD icon to see the objects imported and textures added.

On the CD

Chapter_08\ch08HouseComplete.mb

  • + Share This
  • 🔖 Save To Your Account