pjt@cis cis.pku.edu.cn 2 2224 2003-09 09-10
2 g g g g g g g
3
4
5 1.1 ; ;, \ \ \ \ ; ;
1.1 6
1.1 7 No illumination Constant colors Polygons Parallel light Diffuse reflection Free-form surfaces
1.1 Parallel light Specular reflection Multiple local light sources 8
1.1 9 2D-Image-Textures Bump-Mapping Reflection textures
1.1 10 Few Polygons More Polygons
1.1 11
1.2..,... b u 8 + v 8. g( u, v) = { a u 8 + v 8.. f ( u, v) = A(cos( pu) + cos( qv)) 12
13 1.2 X Y Z
14 1.2
1.3 ( ) "Carve the shape out of the texture matter" 15
16 1.3 3D textures are useful for: (1)volume rendering and examining a 3D volume one slice at a time; (2)animating textured geometry, for example, people that move; (3)solid texturing, for example, wood, marble and so on; (4)eliminating distortion effects that occur when you try to map a 2D image onto 3D geometry;
17 1.4 u, v, w w s, t, r, q q
18 1.5
19 g
20 g : : :
21 g
22 g : : :
23 g
24 g
25 g OpenGL gltexgen
26 g
27 g (1) DirectX OpenGL (2) (3) DirectX OpenGL (4) DirectX OpenGL (1) (2) (3) (4)
28 g (1)RGB (2) (3)RGB
29 g (1) (2) (3)
30 256 256
31 g 32 64
32 g : t(x, y) x y (p u, p v ) b
33 g
34 g ( ) Mipmapping SAT Summed Area Table
35 g (Mipmapping),. mip multum in parvo 2 2 d
36 g ( ): d?
37 g ( ): ( ) :
38 g ( ) : u v RipMapping.
39 g 16 0, 0
40 g 16:1 ATI Radeon
41 galpha g g g g g
42 4.1 Alpha : : (Rs,Gs,Bs,As) :(Rd, Gd, Bd, Ad) : (Sr, Sg, Sb, Sa) (Dr, Dg, Db, Da)
43 4.1 Alpha g alpha
44 4.2 Phong,.
4.2 45
46 4.2 Gloss Mapping.
4.2 t diff RGB i diff t gloss i spec 47
48 4.3 Blinn Newell EM EM
49 4.3 EM
4.3 1: : 2:. : EM EM 50
51 4.3 Blinn Newell 1976 Blinn Newell, 0 2 0, [0, 1] u, v Blinn Newell
4.3 Blinn Newell : (1) ; ( ) (2) =0 ; ( ) (3) ;( ) (4).( ) 52
53 4.3 ( 1986 Greene ),
54 4.3 ( ): (1) ; (2) ; (3) (4) ; (5) ;( )
55 4.3, Williams Miller Hoffman
56 4.3 ( )
57 4.3 ( ) A f u h
58 4.3 ( ) r = e 2(n e )n n : surface normal e : r :
59 4.3 ( ) ( Blinn Newell )
4.3 Heidrich Seidel 60
61 4.3 z : ( ) r z
62 4.3
4.4 Blinn 1978. 63
64 4.4 b u b v u v
65 4.4 : (1), (2)
66 4.4 (y)/ 2 +.5
67 4.4 Displacement Mapping
4.4 : 68
69 4.4 1. 2. u, v 3. 4. Gouraud
4.4 Texture Map Bump Map Shifted Bump Map The result of the subtraction gives us the light map Combine this lightmap with the original texture 70
71 4.4 t u l x u l y v. u, v (n, t, b) l x l y (l x, l y r r
72 4.4
73 4.4 1. 2. 3. 4.
74 4.4 (1) DirectX 9 (2) (3) : - - -
75
76 g? g? (1) (2) Tiling Mosaicing : (3) LRU, Least Recently Used. (4) MRU, Most Recently Used. (5) :. (6) :.
77 The clipmap algorithm is based on the following constraints: The viewer can see only a small part of a large texture from any given viewpoint. The viewer looks at a texture from only one location. The viewer moves smoothly relative to the clipmap geometry (no teleporting). The textured geometry must have a reasonable, relatively flat topology.
78 g? (1) JPEG PNG (2)S3 S3TC, Texture Compression DirectX DXTC
79
80 30 million Phong
81 Quake III 10 1-4 5 6 7 8 9 / 10 Flash
82 2
83
84 Thank you for your attention!