Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.

Similar presentations


Presentation on theme: "Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실."— Presentation transcript:

1 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실

2 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 2 3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates Texture Mapping

3 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 3 Textures Color variation in interior of 3D polygon When scan converting a polygon  Vary pixel colors according to values fetched from a texture s t Texture y z x Surface ysys xsxs Image

4 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 4 Texture Surface Add Visual Detail to Surfaces of 3D Objects Polygonal Model With Surface Texture

5 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 5 Overview Texture mapping methods Mapping Filtering Texture mapping applications Modulation textures Illumination mapping Bump mapping Environment mapping Image-based rendering Non-photorealistic rendering

6 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 6 Texture Mapping Steps: Define texture Specify mapping from texture to surface Lookup texture values during scan conversion Texture Coordinate System Modeling Coordinate System Device Coordinate System s t v u (0,1) (0,0) (1,0) y x

7 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 7 Texture Mapping When scan converting Device coordinate system (x,y) Modeling coordinate system (u,v) Texture image (t,s) Texture Coordinate System Modeling Coordinate System Device Coordinate System s t v u (0,1) (0,0) (1,0) y x

8 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 8 Texture Mapping 2D projective transformation Texture coordinate system (t,s) to Device coordinate system (x,y)

9 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 9 Texture Mapping Scan conversion Interpolate texture coordinates Distortion due to bilinear interpolation approximation  Cut polygons into smaller ones, or  Perspectively divide at each pixel αβ γ (u 1, v 1 ) (u 3, v 3 ) (u 2, v 2 )

10 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 10 Texture Mapping Linear Interpolation of Texture Coordinate Corrected Interpolation with Perspective Divide

11 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 11 Texture Mapping Texture mapping methods Mapping Filtering Texture mapping applications Modulation textures Illumination mapping Bump mapping Environment mapping Image-based rendering Non-photorealistic rendering

12 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 12 Texture Filtering Must sample texture to determine color at each pixel in image s t y z x ysys xsxs

13 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 13 Texture Filtering Aliasing is a problem Point Sampling Area Filtering

14 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 14 Texture Filtering Ideally, use elliptically shaped convolution filters In practice, use rectangles Texture Screen

15 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 15 Texture Filtering Size of filter depends on projective warp Prefiltering images  Mip maps  Summed area tables s t ysys xsxs Texel Pixel s t ysys xsxs Texel Pixel MagnificationMinification

16 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 16 Mip Maps Keep textures prefiltered at multiple resolutions For each pixel, linearly interpolate between two closest levels (e.g., trilinear filtering) Fast and easy for hardware

17 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 17 Overview Texture mapping methods Mapping Filtering Texture mapping applications Modulation textures Illumination mapping Bump mapping Environment mapping Image-based rendering Non-photorealistic rendering

18 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 18 Modulation Texture Map Texture Values to Scale Factor Wood Texture Texture Value

19 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 19 Illumination Mapping Map Texture Values to Surface Material Parameter K A K D K S K T n

20 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 20 Bump Mapping Map Texture Values to Perturbations of Surface Normals

21 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 21 Bump Mapping

22 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 22 Environmental Mapping Map Texture Values to the Environment Map Surface Projection Reference Point Pixel Area Pixel Projection onto Environment Map

23 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 23 Image-Based Rendering Map Photographic Textures to Provide Details for Coarsely Detailed Polygonal Model

24 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 24 Nonphotorealistic Rendering

25 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 25 Summary Texture mapping methods Mapping Filtering Texture mapping applications Modulation textures Illumination mapping Bump mapping Environment mapping Image-based rendering Non-photorealistic rendering


Download ppt "Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실."

Similar presentations


Ads by Google