• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Textures

Although color can go a long way when it comes to sprucing up Java 3D content, it's not the only way to customize the visual appeal of objects in a scene. As with VRML, Java 3D supports texture mapping of shapes. Conceptually, a texture map can be thought of as a sheet of rubber on which an image appears. This sheet is wrapped around an object, where it is stretched or pinched as needed in a process called texture mapping.

More specifically, the pixels in a texture image are mapped to the pixels of a 3D form. In other words, a geometric shape gets its colors from the pixels in an image when texture mapping is applied. Because images can be applied to shapes, texture mapping offers a wonderfully simply way to increase the visual appeal of objects in a scene without the need for added geometry. In many cases, texture maps are the only option when it comes to producing a specific visual appearance. Finely detailed grain in a piece of wood, for example, or bark on the trunk of a tree are quite easy to represent with a texture image, yet would be extremely time consuming (not to mention tedious or even downright painful) to create using only geometry (see Figure 14-7).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint