SLIDE 5 5
Texture Mapping
- Interpolate in the interior:
V2(10,10) The texture location for this left edge location is (15, 15). Why? Object locations are interpolated from (3, 3) to (20, 3) Texture locations are interpolated from (15, 15) to (100, 15) V0(0,0) V1(20, 3) (3, 3)
(0, 0) (50, 50) (100, 15) (15, 15) u v
Texture Mapping
- Interpolate in the interior:
V2(10,10) The texture gives a value that will influence the shading process. Specifically, the value from the texture replaces the diffuse constant in the calculation of the diffusion component in the illumination equation. By doing so, the texture values change the object appearance, but shape cues that come from the specular highlights will stay the same. V0(0,0) V1(20, 3) (3, 3)
(0, 0) (50, 50) (100, 15) (15, 15) u v
Texture Mapping
- Interpolate in the interior:
V2(10,10) V0(0,0) V1(20, 3) (3, 3)
(0, 0) (50, 50) (100, 15) (15, 15) x y
( ) ( ) ( ) ( ) ( ) ( )
k r V R I K N L I v u Texture I K I k r V R I K N L I v u Texture I K I k r V R I K N L I v u Texture I K I
n i s i db a ab b n i s i dg a ag g n i s i dr a ar r
+
= +
= +
= ) , ( ) , ( ) , (
(u, v)
(x, y)
u v
Texture Mapping
- Interpolate in the interior:
V2(10,10) V0(0,0) V1(20, 3) (3, 3)
(0, 0) (50, 50) (100, 15) (15, 15) x y (u, v)
(x, y)
A texture location can be calculated from object location directly. In general, mapping an object with x coordinates in the range from xmin to xmax and y coordinates in the range ymin to ymax into the texture coordinate range can be computed as: umin , umax , vmin , vmax are determined by the range of texture values assigned to the object vertices.
( ) ( )
min min max min max min min max min max
y y y y v v v x x x x u u u − − − = − − − =
u v