Download Texture Mapping: Motivation - Lecture Slides | CS 5501 and more Study notes Computer Science in PDF only on Docsity! 1 David Luebke 5/6/2000 CS 551 / 645: Introductory Computer Graphics Texture Mapping David Luebke 5/6/2000 Administrivia โ Assignment 4 due โ No late days after this โ One more assignment David Luebke 5/6/2000 Texture Mapping: Motivation โ Scenes created with diffuse lighting look convincingly three-dimensional, but are flat, chalky, and โcartoonishโ โ Phong lighting lets us simulate materials like plastic and (to a lesser extent) metal, but scenes still seem very cartoonish and unreal โ Big problem: polygons are too coarse- grained to usefully model fine surface detail โ Solution: texture mapping David Luebke 5/6/2000 Texture Mapping: Motivation โ Adding surface detail helps keep CG images from looking simple and sterile โ Explicitly modeling this detail in geometry can be very expensive โ Zebra stripes, wood grain, writing on a whiteboard โ Texture mapping pastes images onto the surfaces in the scene, adding realistic fine detail without exploding the geometry David Luebke 5/6/2000 Texture Mapping: Examples David Luebke 5/6/2000 Texture Mapping โ In short: it is impractical to explicitly model fine surface detail with geometry โ Solution: use images to capture the โtextureโ of surfaces โ Texture maps can modulate many factors that affect the rendering of a surface โ Color or reflectance (diffuse, ambient, specular) โ Transparency (smoke effects) โ What else? 2 David Luebke 5/6/2000 Texture Mapping: Fundamentals โ A texture is typically a 2-D image โ Image elements are called texels โ Value stored at a texel affects surface appearance in some way โ Example: diffuse reflectance, shininess, transparencyโฆ โ The mapping of the texture to the surface determines the correspondence, i.e., how the texture lies on the surface โ Mapping a texture to a triangle is easy (why?) โ Mapping a texture to an arbitrary 3-D shape is more complicated (why?) David Luebke 5/6/2000 Texturing Fundamentals โ A texture is typically a 2-D array of texels โ Mapping the texture to an arbitrary 3-D shape is complex: David Luebke 5/6/2000 Texturing Fundamentals โ A texture is typically a 2-D array of texels โ Mapping the texture to an arbitrary 3-D shape is complex: David Luebke 5/6/2000 Texturing Fundamentals โ A texture is typically a 2-D array of texels โ Mapping the texture to an arbitrary 3-D shape is complex: David Luebke 5/6/2000 Texturing Fundamentals โ A texture is typically a 2-D array of texels โ Mapping the texture to an arbitrary 3-D shape is complex: http://www.cs.virginia.edu/~cs551/animations/unfold.mov David Luebke 5/6/2000 Texture Mapping: Rendering โ Rendering uses the mapping: โ Find the visible surface at a pixel โ Find the point on that surface corresponding to that pixel โ Find the point in the texture corresponding to that point on the surface โ Use the parameters associated with that point on the texture to shade the pixel