Bump Mapping


Another powerful and useful method to add to texture mapping is bump mapping. You saw this briefly in the 3D Paint tutorial, and now you'll take it one step further. 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 looks like it's bumpy. Because the bump effect breaks down when you view a surface in profile, you can't use bump mapping to simulate large features; for example, you can't bump map a nose, but you can bump map pores on a nose. However, for many surfaces bump mapping is perfect fabrics, craggy surfaces, wood grain, even metal vents, provided the camera doesn't get too close.

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 luminance 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 don't work as well as softer images with gradations between the extremes.

In this next tutorial, you'll apply a procedural Mountain effect to the Bump Mapping attribute of the walls material to give it a more natural, rough appearance. Also, to finish off the lobby scene, you'll need bump mapping for the front and back windows and the tile floor.

Tutorial: Applying Bump Maps to the Lobby

Applying a bump map to the textures for your lobby requires a little more work. In this tutorial, you'll learn how to apply bump maps for several materials: the walls, floor, and windows.

On the DVD

graphics/camera_icon.gif

Chapter_09\movies\ch09tut07.wmv


trap

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


  1. First, load your scene into Maya. You can continue from the previous lobby tutorial, or load the file noted next to the DVD icon.

    On the DVD

    graphics/compack disk_icon.gif

    Chapter_09\sourceimages\floortilesbump.tif


  2. In the Hypershade window, you'll find all the materials you created before. Double-click on the walls material. Click the checkered button to the right of the Bump Mapping bar, and choose the Mountain node from the 2D Textures section.

    On the DVD

    graphics/compack disk_icon.gif

    Chapter_09\ sourceimages\ch09tut07begin.mb


  3. Now, right-click over the Walls material in Hypershade, and select Graph Network. You should see the Walls material expanded in the Work Area. Double-click on the Bump2d node and set the Bump Depth value to 0.042.

  4. Move to the glasswindows material, and double-click it to open the Attribute Editor. As with the Walls material, click the checkered button on the right side of the Bump Map bar. Select the Grid texture node type, and set U Width to 0.010 and V Width to 0. Next, select the place2dTexture tab at the top of the Attribute Editor. Set Repeat UV to 30, 0, which places lines or grooves in the large front windows.

  5. Position your view to see the front entrance and a good portion of the front window. Render the scene to check that the lines are visible from a distance. Scale the lines if necessary, using the 2d placement node attached to the grid. To add more lines, adjust the Repeat UV setting. To adjust the thickness of the lines, use the grid's U Width setting.

    All of your materials have been applied now. However, one more item in Hypershade should be covered. You might want to use other premade materials in your projects or begin your own library of materials. To do this, you can access new shaders easily through Hypershade by creating a new tab to organize them in.

  6. In HyperShade, choose Tabs | Create New Tab. In the Create New Tab dialog box, enter M5F maps in the New Tab Name text box, select the Bottom radio button for Initial Placement, select the Disk radio button for Tab Type, and then point the root directory to the Chapter_09\Textures folder on the DVD-ROM (see Figure 9.23). Click the Create button.

    Figure 9.23. Adding a new tab to Hypershade.

    graphics/09fig23.jpg

On the DVD

graphics/compack disk_icon.gif

Chapter_09\ch09tut07end.mb


On the DVD

graphics/compack disk_icon.gif

\Models\ch09lobbyobjects.mb


On the DVD

graphics/compack disk_icon.gif

\Chapter_09\ch09lobbycomplete.mb


Going Further

To further your understanding of materials and texturing, try setting up the remaining materials for the lobby and experimenting with different methods of applying textures, such as projection methods, 3D textures, and so forth. You could also add more objects or details to the lobby. You could model large picture frames, the elevators shown in the reference images, a lamp, or even a chair, or you can import a file. The DVD contains a Models folder, which includes royalty-free objects that are ready to use.

To import a Maya (.mb) scene, click File | Import | option box. Reset the settings to the default, and click the Import button. Then, browse to the file's location on the DVD-ROM, and click the Import button again.

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

Figure 9.24. Objects imported into the office lobby.

graphics/09fig24.gif




Maya 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2006
Pages: 198

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net