Graphics Reference
In-Depth Information
Fig. 2.22 UVs (texture coordinates) are used to orient a texture map on the polygons it is
assigned to
2.4.2.4
Texture Coordinates
A texture map is attached to a polygon by using texture coordinates, also called
UVs . UVs are like vertices, except they are positioned over a texmap, to identify
which part of the map will be rendered under which UV. The UVs are also attached
to the vertices of your object, to identify which parts of the map are attached to
which vertices. If you liked to build kites, you might use tacks instead of glue to pin
your kite paper to its wooden struts. The UVs are like the tacks, and the texture map
is like the kite paper. The struts are the wireframe of your model (Fig. 2.22 ).
The term “UV” comes from the coordinate axes used for textures. The X, Y, and Z
axes are reserved for Cartesian coordinates, so U and V are used for local space . Local
space is defi ned by the shape of an object. For instance, if an arm is tattooed, the tattoo
moves with the arm, which in turn moves in the global coordinate system. To track the
tattoo, the local space of the arm must be defi ned. This is done with UVs.
In a four-sided polygon, or quad, you will have one UV for each of the four vertices
of your object. These UVs will be connected by edges that correspond to the edges
of your polygon, and the connection pattern between its vertices. The UVs can be
adjusted in a texture editor, to modify which part of a texture map is rendered within
their borders. If done properly, your image will show up where it is supposed to; not
upside down, backwards, or distorted.
To position a texture map on a face, the face must have texture coordinates
projected onto it (or automatically assigned). Projecting UVs is done in very much
the way a movie projector casts an image on a screen. If someone walks in front of
the light, part of the movie will be projected on that person. Some parts of the image
Search WWH ::




Custom Search