Graphics Adding Surface Detail http kucg korea ac

  • Slides: 30
Download presentation
Graphics Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실 http: //kucg. korea. ac. kr Graphics

Graphics Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실 http: //kucg. korea. ac. kr Graphics Lab @ Korea University

3 D Rendering Pipeline 3 D Primitives CGVR 3 D Modeling Coordinates Model Transformation

3 D Rendering Pipeline 3 D Primitives CGVR 3 D Modeling Coordinates Model Transformation 3 D World Coordinates Lighting 3 D World Coordinates Viewing Transformation 3 D Viewing Coordinates Projection Transformation 2 D Projection Coordinates Clipping 2 D Projection Coordinates Viewport Transformation Surface details can be added. . . 2 D Device Coordinates Scan Conversion Image http: //kucg. korea. ac. kr 2 D Device Coordinates Graphics Lab @ Korea University

Overview n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications

Overview n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications Modulation texture n Bump mapping n Environment mapping n http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Texture Surface n CGVR Add visual detail to surfaces of 3 D objects With

Texture Surface n CGVR Add visual detail to surfaces of 3 D objects With Surface Texture Polygonal Model http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Texture Mapping n CGVR 2 D projective transformation Texture coordinate system (s, t) to

Texture Mapping n CGVR 2 D projective transformation Texture coordinate system (s, t) to n Device coordinate system (x, y) n http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Textures n CGVR Color variation in interior of 3 D polygon n When scan

Textures n CGVR Color variation in interior of 3 D polygon n When scan converting a polygon o Vary pixel colors according to values fetched from a texture y t Texture-Surface Transformation ys Viewing and Projection Transformation x s z Texture Space http: //kucg. korea. ac. kr Object Space xs Image Space Graphics Lab @ Korea University

Texture Mapping CGVR Steps: n Define texture n Specify mapping from texture to surface

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

Texture Mapping n CGVR Scan conversion Interpolate texture coordinates n Distortion due to the

Texture Mapping n CGVR Scan conversion Interpolate texture coordinates n Distortion due to the bilinear interpolation n o Subdivide the polygon into smaller ones (u 1, v 1) α (u 2, v 2) http: //kucg. korea. ac. kr β (u 3, v 3) Graphics Lab @ Korea University

Texture Mapping Linear Interpolation of Texture Coordinate http: //kucg. korea. ac. kr CGVR Corrected

Texture Mapping Linear Interpolation of Texture Coordinate http: //kucg. korea. ac. kr CGVR Corrected Interpolation Graphics Lab @ Korea University

Texture Sampling n CGVR To determine color at each pixel in image y ys

Texture Sampling n CGVR To determine color at each pixel in image y ys t s x xs z http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Texture Filtering n CGVR To avoid aliasing problem Point Sampling http: //kucg. korea. ac.

Texture Filtering n CGVR To avoid aliasing problem Point Sampling http: //kucg. korea. ac. kr Corrected Result Graphics Lab @ Korea University

Texture Filtering n CGVR Ideally, use elliptically shaped convolution filters n In practice, use

Texture Filtering n CGVR Ideally, use elliptically shaped convolution filters n In practice, use rectangles Texture Space http: //kucg. korea. ac. kr Screen Space Graphics Lab @ Korea University

Mip Maps n CGVR Keep textures prefiltered at multiple resolutions n For each pixel

Mip Maps n CGVR Keep textures prefiltered at multiple resolutions n For each pixel o Linearly interpolate between two closest levels o n Trilinear filtering Fast and easy for hardware http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Overview n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications

Overview n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications Modulation texture n Bump mapping n Environment mapping n http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Modulation Texture CGVR Texture Shaded Color Texture Value http: //kucg. korea. ac. kr Graphics

Modulation Texture CGVR Texture Shaded Color Texture Value http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Bump Mapping n CGVR Perturbate surface normals http: //kucg. korea. ac. kr Graphics Lab

Bump Mapping n CGVR Perturbate surface normals http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Bump Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Bump Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Environment Mapping n CGVR Map texture values to the environment map Surface Pixel Projection

Environment Mapping n CGVR Map texture values to the environment map Surface Pixel Projection onto Environment Map Pixel Area Projection Reference Point http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Summary n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications

Summary n CGVR Texture mapping methods Mapping n Filtering n n Texture mapping applications Modulation textures n Bump mapping n Environment mapping n http: //kucg. korea. ac. kr Graphics Lab @ Korea University

Wireframe http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Wireframe http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Ambient Illumination Only http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Ambient Illumination Only http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Flat Shaded Polygons with Diffuse Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab

Flat Shaded Polygons with Diffuse Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Gouraud Shaded Polygons with Diffuse Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab

Gouraud Shaded Polygons with Diffuse Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Gouraud Shaded Polygons with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab

Gouraud Shaded Polygons with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Phong Shaded Polygons with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab

Phong Shaded Polygons with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Curved Surfaces with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @

Curved Surfaces with Specular Reflection http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Improved Illumination Model with Multiple Lights http: //kucg. korea. ac. kr CGVR Graphics Lab

Improved Illumination Model with Multiple Lights http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Texture Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Texture Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Bump Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Bump Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Reflection Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University

Reflection Mapping http: //kucg. korea. ac. kr CGVR Graphics Lab @ Korea University