1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.

Slides:



Advertisements
Similar presentations
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Advertisements

Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Computer Graphics Bing-Yu Chen National Taiwan University.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Compositing and Blending - Chapter 8 modified by Ray Wisman Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Objectives Introduce OpenGL buffers and read/write Introduce OpenGL buffers and read/write Introduce texture mapping Introduce texture mapping Introduce.
Computer Graphics (Spring 2008) COMS 4160, Lecture 19: Texture Mapping Many slides from Greg Humphreys, UVA and Rosalee.
(conventional Cartesian reference system)
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
University of New Mexico
Texture Mapping Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
1 Texturing. 2 What is Texturing? 3 Texture Mapping Definition: mapping a function onto a surface; function can be:  1, 2, or 3D  sampled (image) or.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Fundamentals of Computer Graphics Part 9 Discrete Techniques prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared.
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping Texture mapping.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Mapping method Texture Mapping Environmental mapping (sphere mapping) (cube mapping)
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
Texture Mapping. 2 Motivation A typical modern graphics card can handle 10s of millions of polygons a second. How many individual blades of grass are.
Texture Mapping Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Texture Mapping Software College, Shandong University Instructor: Zhou Yuanfeng
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
CS418 Computer Graphics John C. Hart
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
Compositing and Blending
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Texture Mapping. For Further Reading Angel 7 th Ed: ­Chapter 7: 7.3 ~ 7.9 Beginning WebGL: ­Chapter 3 2.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Texture Mapping.
1 Chapter 7 Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is.
Computer Graphics I, Fall 2008 Compositing and Blending.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
University of New Mexico
Buffers and texture mapping
Texture Mapping.
Computer Graphics Texture Mapping
Madhulika (18010), Assistant Professor, LPU.
Introduction to Computer Graphics with WebGL
Week 7 - Monday CS361.
Texture Mapping cgvr.korea.ac.kr.
Graphics, Fall 2017 Lecture 24: Texture Mapping
3D Graphics Rendering PPT By Ricardo Veguilla.
Introduction to Computer Graphics with WebGL
The Graphics Rendering Pipeline
So Far We have assumed that we know: The point The surface normal
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Interactive Graphics Algorithms Ying Zhu Georgia State University
Introduction to Computer Graphics with WebGL
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

1 Texture Mapping

2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing

3 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient for many phenomena Clouds Grass Terrain Skin

4 Modeling an Orange – 1/2 Consider the problem of modeling an orange (the fruit) Start with an orange-colored sphere Too simple Replace sphere with a more complex shape Does not capture surface characteristics (small dimples) Takes too many polygons to model all the dimples

5 Modeling an Orange – 2/2 Take a picture of a real orange, scan it, and “ paste ” onto simple geometric model This process is texture mapping Still might not be sufficient because resulting surface will be smooth Need to change local shape Bump mapping

6 The Quest for Visual Realism

7 Three Types of Mapping Texture Mapping Uses images to fill inside of polygons Environmental (reflection mapping) Uses a picture of the environment for texture maps Allows simulation of highly specular surfaces Bump mapping Emulates altering normal vectors during the rendering process

8 Texture Mapping geometric model texture mapped

9 Decal Textures

10 Bump Mapping

11 Where does Mapping take place? Mapping techniques are implemented at the end of the rendering pipeline Very efficient because few polygons pass down the geometric pipeline

12 Simple Texture Mapping s t x y z image geometry screen

13 Is it Simple? Although the idea is simple---map an image to a surface---there are 3 or 4 coordinate systems involved 2D image 3D surface

14 Coordinate Systems Parametric coordinates May be used to model curved surfaces Texture coordinates Used to identify points in the image to be mapped World Coordinates Conceptually, where the mapping takes place Screen Coordinates Where the final image is really produced

15 Texture Mapping parametric coordinates texture coordinates world coordinates screen coordinates

16 Texture Mapping = Pattern Mapping

17 Mapping Functions Basic problem is how to find the maps Consider mapping from texture coordinates to a point a surface Appear to need three functions x = x(s,t) y = y(s,t) z = z(s,t) But we really want to go the other way s t (x,y,z)

18 Backward Mapping We really want to go backwards Given a pixel, we want to know to which point on an object it corresponds Given a point on an object, we want to know to which point in the texture it corresponds Need a map of the form s = s(x,y,z) t = t(x,y,z) Such functions are difficult to find in general

19 Sample Mapping – 1/2 In next topic, we will study parametric surfaces Assume we want to map a point in the texture map T(s, t) to a point on the surface p(u, v) by a linear map of the form: u=as + bt + c v=ds + et + f as long as ae  bd, this mapping is invertible

20 Sample Mapping – 2/2

21 Mapping a Texture Based on parametric texture coordinates s t 1, 1 0, 1 0, 01, 0 (s, t) = (0.2, 0.8) (0.4, 0.2) (0.8, 0.4) A BC a b c Texture SpaceObject Space

22 Two-part Mapping One solution to the mapping problem is to first map the texture to a simple intermediate surface Example: map to cylinder

23 Cylindrical Mapping parametric cylinder x = r cos 2  u y = r sin 2  u z = v/h maps rectangle in u,v space to cylinder of radius r and height h in world coordinates s = u t = v maps from texture space

24 Spherical Mapping We can use a parametric sphere x = r cos 2  u y = r sin 2  u cos 2  v z = r sin 2  u sin 2  v in a similar manner to the cylinder but have to decide where to put the distortion Spheres are use in environmental maps

25 Box Mapping Easy to use with simple orthographic projection Also used in environmental maps

26 Second Mapping Map from intermediate object to actual object Normals from intermediate to actual Normals from actual to intermediate Vectors from center of intermediate intermediate actual What if a ray is blocked?

27 Texture Example The texture (below) is a 256 x 256 image that has been mapped to a rectangular polygon which is viewed in perspective mode

28 Linear Interpolation of Textures

29 Texture Mapping & Polygon Rasterization Problems of linearly interpolating texture coordinates in screen space. Similar problems in the interpolations of colors for Gouraud shading and normals for Phong shading. Problems in antialiasing Expanding and shrinking

30 Example

31 Perspective Correction Dividing the texture coordinates by w Linearly interpolating (u/w, v/w, 1/w) At each pixel, dividing (interpolated) u/w and v/w by (interpolated) 1/w

32 Aliasing Point sampling of the texture can lead to aliasing errors point samples in u,v (or x,y,z) space point samples in texture space miss blue stripes

33 Area Averaging A better but slower option is to use area averaging Note that preimage of pixel is curved pixel preimage

34 Sampling Texture Maps

35 Over-Sampling indicative of aliasing high-frequency details showing up in areas where we expect to see low frequencies

36 Spatial Filtering Prefilter the texture to remove the high frequencies that show up as artifacts

37 Mip Mapping MIP Mapping is one popular technique for precomputing and performing this prefiltering Computing this series of filtered images requires only a small fraction of additional storage over the original texture

38 Magnification and Minification More than one texel can cover a pixel (minification) or more than one pixel can cover a texel (magnification) Can use point sampling (nearest texel) or linear filtering ( 2 x 2 filter) to obtain texture values TexturePolygon MagnificationMinification PolygonTexture

39 Examples point sampling mipmapped point sampling mipmapped linear filtering linear filtering

40 Environment Mapping

41 Sphere Mapping

42 Box Mapping

43 Bump Mapping

44 Bump Mapping

45 Bump Mapping

46 Displacement Mapping

47 Bump Mapping versus Displacement Mapping

48 Texture Mapping in Quake

49 Shadow Maps

50 Basic Steps of Shadow Maps Render the scene from the light ’ s point of view, Use the light ’ s depth buffer as a texture (shadow map), Projectively texture the shadow map onto the scene, Use “ texture color ” (comparison result) in fragment shading.

51 Three Dimensional or Solid Textures

52 Tri-linear Interpolation

53 Line Aliasing Ideal raster line is one pixel wide All line segments, other than vertical and horizontal segments, partially cover pixels Simple algorithms color only whole pixels Lead to the “ jaggies ” or aliasing Similar issue for polygons

54 Antialiasing Can try to color a pixel by adding a fraction of its color to the frame buffer Fraction depends on percentage of pixel covered by fragment Fraction depends on whether there is overlap no overlapoverlap

55 Area Averaging Use average area  1 +  2 -  1  2 as blending factor

56 Image Filtering H: Filter(convolution) matrix of (2m+1)×(2n+1) Examples:

57 Motion Blur Jitter an object and render it multiple times, leaving the positions of the other objects unchanged, we get dimmer copies of the jittered object If the object is moved along a path, rather then randomly jittered, we see the trail of the object  motion blur