adding surface detail
DESCRIPTION
Adding Surface Detail. 고려대학교 컴퓨터 그래픽스 연구실. 3 D Rendering Pipeline. 3 D Primitives. 3 D Modeling Coordinates. Model Transformation. 3 D World Coordinates. Lighting. 3 D World Coordinates. Viewing Transformation. 3 D Viewing Coordinates. Projection Transformation. Surface details - PowerPoint PPT PresentationTRANSCRIPT
Graphics
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Adding Surface DetailAdding Surface Detail
고려대학교 컴퓨터 그래픽스 연구실
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
3D Rendering Pipeline
Model TransformationModel Transformation
LightingLighting
Viewing TransformationViewing Transformation
Projection TransformationProjection Transformation
ClippingClipping
Viewport TransformationViewport Transformation
Scan ConversionScan Conversion
3D Primitives
Image
3D Modeling Coordinates
3D World Coordinates
3D World Coordinates
3D Viewing Coordinates
2D Projection Coordinates
2D Projection Coordinates
2D Device Coordinates
2D Device Coordinates
Surface detailsSurface detailscan be added...can be added...
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Overview
Texture mapping methods Mapping Filtering
Texture mapping applications Modulation texture Bump mapping Environment mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Surface
Add visual detail to surfaces of 3D objects
Polygonal ModelPolygonal Model
With Surface TextureWith Surface Texture
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Mapping
2D projective transformation Texture coordinate system (ss, tt) to Device coordinate system (xx, yy)
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Textures
Color variation in interior of 3D polygon When scan converting a polygon
Vary pixel colors according to values fetched from a texture
tt
ss
Texture SpaceTexture Space
yy
zz
xx
Object SpaceObject Space
yyss
xxss
Image SpaceImage Space
Viewing and ProjectionViewing and ProjectionTransformationTransformation
Texture-SurfaceTexture-SurfaceTransformationTransformation
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Mapping
Steps: Define texture Specify mapping from texture to surface Lookup texture values during scan conversion
TextureTextureCoordinateCoordinate
SystemSystem
ModelingModelingCoordinateCoordinate
SystemSystem
DeviceDeviceCoordinateCoordinate
SystemSystem
tt
ssvvuu
(0, 1)(0, 1)
(0, 0)(0, 0)
(1, 0)(1, 0)
yyxx
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Mapping
Scan conversion Interpolate texture coordinates Distortion due to the bilinear interpolation
Subdivide the polygon into smaller ones
αα ββ
(u(u11, v, v11))
(u(u33, v, v33))(u(u22, v, v22))
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Mapping
Linear InterpolationLinear Interpolationof Texture Coordinateof Texture Coordinate Corrected InterpolationCorrected Interpolation
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Sampling
To determine color at each pixel in image
tt
ss
yy
zz
xx
yyss
xxss
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Filtering
To avoid aliasing problem
Point SamplingPoint Sampling Corrected ResultCorrected Result
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Filtering
Ideally, use elliptically shaped convolution filters In practice, use rectangles
Texture SpaceTexture Space Screen SpaceScreen Space
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Mip Maps
Keep textures prefiltered at multiple resolutions For each pixel
Linearly interpolate between two closest levels Trilinear filtering
Fast and easy for hardware
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Overview
Texture mapping methods Mapping Filtering
Texture mapping applications Modulation texture Bump mapping Environment mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Modulation Texture
))RV((, TTRSL LLn
SDAAE IKIKISKLNKIKIstTI ))RV((, TTRSL LLn
SDAAE IKIKISKLNKIKIstTI Texture Value
TextureTexture
Shaded ColorShaded Color
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Bump Mapping
Perturbate surface normals
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Bump Mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Environment Mapping
Map texture values to the environment map
Surface
ProjectionReference Point
Pixel Area
Pixel Projectiononto Environment
Map
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Summary
Texture mapping methods Mapping Filtering
Texture mapping applications Modulation textures Bump mapping Environment mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Wireframe
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Ambient Illumination Only
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Flat Shaded Polygonswith Diffuse Reflection
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Gouraud Shaded Polygonswith Diffuse Reflection
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Gouraud Shaded Polygonswith Specular Reflection
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Phong Shaded Polygonswith Specular Reflection
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Curved Surfaceswith Specular Reflection
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Improved Illumination Modelwith Multiple Lights
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Texture Mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Bump Mapping
KUCG
Graphics Lab @ Korea University Graphics Lab @ Korea University
http://kucg.korea.ac.kr
Reflection Mapping