 |
Building 3D Models for the Web
Texture Maps |
Texture maps add realism to your VRML worlds without adding complex
geometry.
For example, compare the two huts below, one with texture maps and one
without.
Types of Texture Maps
- ImageTexture
- JPEG graphics (some browsers also support GIF)
-
- MovieTexture
- MPEG movies applied as textures. Useful for flowing water.
-
- PixelTexture
- Specify the color of each pixel using RGB colors. Useful for very simple
patterns. Avoids downloading a JPEG or MPEG file.
Sources for Texture Maps
- Web- or CD-ROM-based clip art collections (see references below)
- Texture collections that come with Ray Dream 3D, Studio 5, and CosmoWorlds
- Scanned photographs (a scanner is available in Stright 219)
- Digital photographs (we will be getting a digital
MPEG Cam)
- Create your own using Photoshop, Illustrator, Bryce 3D, or other 2D
graphics software
Example
Shape {
appearance Appearance {
material Material { diffuseColor 0 1 0 }
texture ImageTexture {
url "stone.jpg"
repeatS TRUE
repeatT TRUE
}
}
geometry Sphere {
radius 3
}
}
Texture Map Coordinates
In VRML, s is the horizontal coordinate and t is the vertical coordinate. In
some other 3D graphics systems, the coordinates are named u and v.
Set repeatS and repeatT to TRUE if you want your texture to be tiled to cover
the surface of your 3D object. Set them to FALSE if you want the texture to
be clamped to the surface and the last row and column of pixels to be
repeated to cover the surface.
Examples:
- Applying a texture with default texture coordinates
- Texture image stretched to fill each face
- Texture image tiled 5 times horizontally and 8 times
vertically on each face
- Default texture maps for a Box,
Cylinder, Cone,
and Sphere
Textbook References
From John Cross's Book
See pages 99-109 for an introduction to texture maps.
From the VRML Handbook
See pages 89-90 for an introduction to texture maps, and pages 267 and 305 for
the format of the Appearance and ImageTexture nodes.

Maintained by
H. Edward Donley
<hedonley@grove.iup.edu>
and Francisco Alarcón
<falarcon@grove.iup.edu>
Last Modified Monday, 13-Aug-2001 16:53:28 EDT