Basic Texture Mapping and Performance
By Andrea L. Ames
Textures make 3D worlds look more realistic, and it's easier to map textures than to build the intricate geometry necessary to convey the same sense of realism. Yet texture mapping isn't always the way to go. In this column, I'll explain basic VRML texture mapping so that you'll be able to determine the most appropriate circumstances under which to map textures.
Basic Texture Mapping
Texture mapping is like applying stickers or decals, but with more control. To map a texture, you need geometry and either an image, pixel, or movie texture; see
Table 1. Basic texture mapping is pretty easy:
- Build a VRML shape.
- Specify a texture as part of the shape's appearance.
- Specify the geometry onto which you want the texture mapped.
The example shown in
Listing One and
Figure 1 is a brick-pattern image texture designed to be repeated, and the geometry is a VRML box. A texture node (ImageTexture, PixelTexture, or MovieTexture) is specified as a value of the Appearance node's texture field.