Graphics Reference
In-Depth Information
•
Coverage.
The coordinate system is always defined over the entire image.
These properties of the
st
coordinate system are true independent of the resolution
of the image. For example,
Position in an image
st
coordinate value
top-left corner
(0.0, 0.0)
bottom-left corner
(0.0, 1.0)
middle
(0.5, 0.5)
xy=(0,1)
uv=(0,0)
xy=(1,1)
uv=(1,0)
top-right corner
(1.0, 0.0)
V
a
V
d
bottom-right corner
(1.0, 1.0)
y
In this way, depending on the resolution of the texture image, the same
st
coordi-
nate position may identify very different texel positions. For example, indepen-
dent of the resolution of a texture image,
st
rectangle
primitive
=(
0
.
5
,
0
.
5
)
indentifies the texel in the
center: texel
(
5
,
5
)
for an 11
×
11 pixel image; or texel
(
50
,
50
)
for a 101
×
101
x
pixel image; or texel
(
50
,
5
)
for a 101
×
11 pixel image.
xy=(0,0)
uv=(0,1)
xy=(1,0)
uv=(1,1)
V
b
V
c
The Explicit
uv
Texture Coordinate System
We, as the programmers, are responsible for defining and assigning
uv
texture co-
ordinate values to each vertex position on the primitives. Figure 12.14 shows an
example of texture coordinate assignments at the vertices of a rectangle primitive.
We observe that in addition to the
xy
geometric position, each vertex also has a
uv
texture position. These two coordinate positions identify points in two com-
pletely independent domains, and yet together they serve a complementary role
in computing final colors for the pixels: the
xy
geometric positions assist in deter-
mining which of the pixels are covered, whereas the
uv
texture positions assist in
determining the color for these pixels. The process of defining and assigning
uv
texture coordinate values to vertex positions is referred to as texture placement.
In general, high-quality texture placement is a laborious process involving highly
experienced artists spending long hours manipulating the
uv
values at individual
vertex positions to accomplish specific artistic effects.
Figure 12.14.
The
uv
coordinate system.
12.3.3
Texel Value Look-up
As illustrated in Figure 12.15, during rendering, for each pixel inside a primitive,
the following happens.
• Compute
uv
coordinate values based on interpolation from the surrounding
vertices.
• Reference
st
coordinate with the computed
uv
values to identify a texel.
Search WWH ::
Custom Search