Chapter 8 -- Texturing

[Previous] [Next]

Chapter 8

To make a rendered scene look more realistic, Microsoft Direct3D provides the capability of applying textures to 3D primitives. You can apply textures to a 3D world to simulate wall coverings and materials such as tapestries and bricks. Direct3D provides an advanced set of texturing methods that you can use to create vivid, real-time games and simulations. Once rendered, your 3D scenes will successfully mimic the images and environments you see in the real world.

Think of a texture as a bitmap of pixel colors that you apply to the surface of a 3D object. In the real world, texture refers to an object's color, pattern, and tactile characteristics. In Direct3D, however, texture is simply the color pattern of the object; it doesn't change the geometric form of the object at all. This color pattern makes the object appear textured or bumpy. (We'll go over bump maps, which produce the appearance of raised textures on an object's surfaces, later in this chapter.) Direct3D textures don't actually create a geometric texture on the object's surface. That would be a computationally intensive endeavor, to say the least.

Although textures are only bitmaps, you can apply them to 3D primitives to make them look like real-world objects. In this chapter's code, you'll see how to use textures to render blacktop roads—complete with the painted line down the middle—sidewalks, and brick walls. You'll also see how to apply textures to cars and signs to give them the appearance of having windows, posters, and so on.

This chapter will also cover how to apply advanced texturing approaches, including mipmapping and texture blending. Mipmapping allows you to create textures with multiple levels of detail so that, as the user moves closer to an object in the virtual world, more complex textures gradually replace the simpler ones. Mipmapping enables you to produce realistic, highly detailed objects without excessive computational overhead. Texture blending allows you to apply multiple texture maps to the same surface. You can use this technique to simulate subtle lighting or material effects.



Inside Direct3D
Inside Direct3D (Dv-Mps Inside)
ISBN: 0735606137
EAN: 2147483647
Year: 1999
Pages: 131

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