Computer Graphics Bing-Yu Chen National Taiwan University.

Slides:



Advertisements
Similar presentations
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Advertisements

Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
Computer Graphics (Spring 2008) COMS 4160, Lecture 19: Texture Mapping Many slides from Greg Humphreys, UVA and Rosalee.
(conventional Cartesian reference system)
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 18: Shading & Texture Mapping Many slides from Greg.
Texture Mapping from Watt, Ch. 8 Jonathan Han. Topics Discussed Texture Map to Models Bump Maps, Light Maps Environment (Reflection) Mapping 3D Textures.
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 Texture Mapping Ltjg Omer Arisut Turkish Navy Turkish Navy Texture Mapping Texture Mapping Ltjg Omer Arisut Turkish Navy Turkish Navy.
Texture Mapping Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
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.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and Texture Mapping.
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.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
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.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam October 30, 2003 Shading 1/35 CIS 736 Computer Graphics Lecture 17 of 42 Illumination.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Texture Mapping Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
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
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
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.
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.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Texture Mapping Sung-Eui Yoon (윤성의) CS380: Computer Graphics
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
CSE 167 [Win 17], Lecture 18: Texture Mapping Ravi Ramamoorthi
CENG 477 Introduction to Computer Graphics
Texture Mapping cgvr.korea.ac.kr.
Graphics, Fall 2017 Lecture 24: Texture Mapping
Texture Mapping COMP575/COMP770.
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
CS-378: Game Technology Lecture #4: Texture and Other Maps
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

Computer Graphics Bing-Yu Chen National Taiwan University

Texture Mapping  Texture Mapping  Texture Aliasing  MIPmaps  Environment Mapping  Bump Mapping  Displacement Mapping  Shadow Maps  Solid Textures 1

The Quest for Visual Realism Copyright©1997, Jeremy Birn Model Model with Shading Model with Shading and Textures 2

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 3

Texture Mapping  Previously, we assume that reflection properties such as are constant within each triangle.  However, some objects have complex appearance which arises from variation in reflection properties.  The common technique to handle this kind of variation is to store it as a function or a pixel-based image and “ map ” it onto a surface.  The function is called texture map and the process is called texture mapping. 4

History  1974 basic idea (Catmull/Williams)  1976 reflection maps (Blinn/Newell)  1978 bump mapping (Blinn)  1983 mipmap (Williams)  1984 illumination (Miller/Hoffman)  1985 solid texture (Perlin) 5

Texture Maps 6

Texture Mapping geometric model texture mapped 7

Texture Maps  How is texture mapped to the surface? Dimensionality: 1D, 2D (image), 3D (solid) Procedural v.s. table look-up Texture coordinates (s,t)  Surface parameters (u,v)  Projection: spherical, cylindrical, planar  Reparameterization  What does texture control? Surface color and transparency Illumination: environment maps, shadow maps Reflection function: reflectance maps Geometry: displacement and bump maps 8

Texture Mapping 2D mapping3D mapping 9

Example domains of the 3D model Parametric surfaces come with a 2D domain. Meshes: flatten parts to create a 2D domain. 10

Textured 11

Decal Textures += Copyright©2003, Technion-Israel Institute of Technology 12

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 Pixels Pixel operations Geometric processing RasterizationDisplay Vertices 13

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

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 15

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 16

Texture Mapping parametric coordinates texture coordinates world coordinates screen coordinates 17

Texture Mapping = Pattern Mapping 18

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) 19

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 20

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

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 22

Cylindrical mapping 23

Spherical Map  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 24

Spherical mapping 25

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

Planar mapping 27

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 28

Texture Mapping (u,v) sphericalcylindricalplanar 29

Planar Mapping 30

Cylindrical Mapping 31

Spherical Mapping 32

Box Mapping 33

Parameterization  A parameterization of a surface is a one-to-one mapping from a suitable domain to the surface. parametric surface: surface parameterization: 34

S x y z Parameterization  How to get P from S ? for each vertex of S, find its (u,v) from (u,v) of P, map image to S  A parameterization of a surface is a mapping : (x,y,z)->(u,v) from 3D space to 2D space P u v 35

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 36

Linear Interpolation of Textures 37

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 38

Example 39

Antialiasing 40

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 41

Magnification and Minification  Example: TexturePolygon MagnificationMinification PolygonTexture 42

Sampling Texture Maps over-samplingunder-sampling 43

Over-sampling  indicative of aliasing high-frequency details showing up in areas where we expect to see low frequencies 44

Spatial Filtering  prefilter the texture to remove the high frequencies that show up as artifacts 45

Changing Resolution ? 46

Nearest Neighbor  a.k.a. zero order interpolation  use 1 nearest neighbor ? 47

Bilinear  a.k.a. first order interpolation  use 4 nearest neighbors ? 48

Bicubic  a.k.a. second order interpolation  use 16 nearest neighbors ? 49

Example x2 ground truth nearest neighborbilinear bicubic 50

Example nearest neighborbilinearbicubic 51

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

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 53

Storing MIP Maps 54

Finding the MIP Level 55

Example point sampling mipmapped point sampling mipmapped linear filtering linear filtering 56

Reflection Maps 57

Environment Mapping 58

Sphere Mapping Copyright©1999, Paul Debevec 59

Box Maps Copyright©1999, Paul Debevec 60

Environment Maps ray tracedenvironment map 61

Bump Mapping 62

Bump Mapping 63

Bump Mapping  Textures can be used for more than just color  In bump mapping, a texture is used to perturb the normal: The normal is perturbed in each parametric direction according to the partial derivatives of the texture. 64

Bump Mapping 65

Bump Mapping 66

Bump Mapping 67

Displacement Mapping  In displacement mapping, a texture is used to perturb the surface geometry itself Silhouettes are correct Requires doing additional hidden surface calculations 68

Displacement Mapping 69

Bump Mapping & Displacement Mapping Copyright©2003, Microsoft 70

Illumination Maps 71

Texture Mapping in Quake Texture OnlyTexture & Light Maps Light Map 72

Shadow Maps 73

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. Eye’s ViewLight’s ViewDepth/Shadow Map 74

Shadow Buffer 75

Three Dimensional or Solid Textures Copyright©1985, Ken Perlin 76

Solid Textures 77

Solid Textures 78

Noise (Tri-linear) Interpolation 79

Evaluating Noise 80

Turbulence 81