June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | www.cs.uml.edu/~haim 1 Texture.

Slides:



Advertisements
Similar presentations
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
Advertisements

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.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Computer Graphics Bing-Yu Chen National Taiwan University.
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 - Class 10
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 12 Solid Textures Bump Mapping Environment Mapping.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004.
Computer Graphics (Spring 2008) COMS 4160, Lecture 19: Texture Mapping Many slides from Greg Humphreys, UVA and Rosalee.
(conventional Cartesian reference system)
Texture Mapping from Watt, Ch. 8 Jonathan Han. Topics Discussed Texture Map to Models Bump Maps, Light Maps Environment (Reflection) Mapping 3D Textures.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
Texture mapping. Adds realism to computer graphics Texture mapping applies a pattern of color Bump mapping alters the surface Mapping is cheaper than.
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.
Guilford County Sci Vis V204.01
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.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
3D Computer Graphics: Textures. Textures: texels Texture is a way of assigning a diffuse color to a pixel – can be with 1, 2 or 3D- can use maps, interpolation.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
Modelling and Simulation Types of Texture Mapping.
Noise and Procedural Techniques John Spitzer Simon Green NVIDIA Corporation.
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.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Buffers Textures and more Rendering Paul Taylor & Barry La Trobe University 2009.
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.
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.
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.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Vector Graphics Digital Multimedia Chap 이병희
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
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.
Mapping: Image Texturing CPSC 591/691. Texture Mapping Two-dimensional techniques place a two-dimensional (flat) image onto an object using methods similar.
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.

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
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Graphics, Fall 2017 Lecture 24: Texture Mapping
Introduction to Computer Graphics with WebGL
So Far We have assumed that we know: The point The surface normal
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Introduction to Computer Graphics with WebGL
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Advanced Computer Graphics: Texture
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 2 Overview Objectives and introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures OpenGL details

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 3 Objectives Why texture mapping? Introduce mapping methods –Texture Mapping –Environment Mapping –Bump Mapping Consider basic strategies –Forward vs backward mapping –Point sampling vs area averaging

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 4 Why texture mapping?

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 5 Limits of Geometric Modeling Graphics cards –Render over 10 million polygons per second Still insufficient for many phenomena –Clouds –Grass –Terrain –Skin Few real objects are smooth

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 6 Textures Can handle –Large repetitions Brick wall Stripes –Small scale patterns Brick’s roughness Concrete Wood grain Typically 2-D images of what’s being simulated

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 7 E.g., problem: Modeling an orange (fruit) Start with orange-colored sphere –Too simple Replace sphere with more complex shape –Does not capture surface characteristics Small dimples –Too many polygons to model all dimples

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 8 Modeling an orange (2) Take picture of real orange –Scan –“paste” onto simple geometric model –Process known as “texture mapping” Still not sufficient –Resulting surface smooth –Need to change local shape Bump mapping

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 9 Three types of mapping Texture Mapping –Uses images to fill inside of polygons Environment (reflection) mapping –Uses picture of environment for texture maps –Allows simulation of highly specular surfaces Bump mapping –Emulates altering normal vectors during rendering

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 10 Texture mapping geometric model texture mapped

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 11 Environment (reflection) mapping

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 12 Bump mapping

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 13 Where does mapping take place? Mapping techniques implemented at end of rendering pipeline –Very efficient because few polygons make it past clipper

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 14 Is it simple? Idea: simple –Map image to surface But, 3 or 4 coordinate systems involved 2D image 3D surface

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 15 Coordinate systems Parametric coordinates –Model curves and surfaces Texture coordinates –Identify points in image to be mapped Object or World Coordinates –Conceptually, where mapping takes place Window Coordinates –Where final image really produced

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 16 Texture mapping parametric coordinates texture coordinates world coordinates window coordinates

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 17 Mapping functions Basic problem: how to find the maps Consider mapping from texture coo’s to point on surface Appear to need three functions x = x(s,t) y = y(s,t) z = z(s,t) But really want to go other way s t (x,y,z)

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 18 Backward mapping Really want to go backwards –Given pixel, want to know to which point on object it corresponds –Given point on object, want to know to which point in texture it corresponds Need map of form s = s(x,y,z) t = t(x,y,z) Such functions difficult to find in general s t (x,y,z)

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 19 Two-part mapping One solution to mapping problem –first map texture to simple intermediate surface Example: map to cylinder

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 20 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

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 21 Spherical map Can use parametric sphere Similar manner to cylinder –But have to decide where to put distortion Spheres used in environmental maps x = r cos 2  u y = r sin 2  u cos 2  v z = r sin 2  u sin 2  v

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 22 Box mapping Easy to use with simple orthographic projection Also used in environment maps

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 23 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

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 24 Aliasing Point sampling of texture can lead to aliasing errors point samples in u,v (or x,y,z) space point samples in texture space miss blue stripes

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 25 Area averaging Better but slower option –Use area averaging Note that preimage of pixel is curved pixel preimage

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 26 Painted textures -- details Map locations on object into locations in texture Value from texture replaces diffuse component in shading calculations If texture > object, –only part of texture used, or –texture is shrunk If object > texture, –texture repeated across object or –texture stretched

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 27 Painted textures If object location maps between texture locations, value between them can be interpolated f 1 = fract(u) f 2 = fract(v) T 1 = (1.0 – f 1 ) * texture[trunc(u)][trunc(v)] + f 1 * texture[trunc(u)+1][trunc(v)] T 2 = (1.0 – f 1 ) * texture[trunc(u)][trunc(v)+1] + f 1 * texture[trunc(u)+1][trunc(v)+1] result = (1.0 – f 2 ) * T 1 + f 2 * T 2

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 28 Repeating textures A texture can be repeated across an object with the equations:

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 29 Repeating textures Repeated texture must be continuous along edges to prevent obvious seams

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 30 Painted texture problem Texture values don’t alter specular highlights –Specular highlighting may be inconsistent with texture appearance

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 31 Bump Mapping For real bump, surface normal changes when moving across bump Similar appearance if similar change made to surface normal for a plane

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 32 Bump Mapping ==> texture image called ‘bump map’ bump map used to alter surface normal altered surface normal used for color calculations N B = bump(u, v, N) R B = 2 * N B * (N B V) – V C r = k ar + I L * [k dr * L N B + k s * (R B V) n ] C g = k ag + I L * [k dg * L N B + k s * (R B V) n ] C b = k ab + I L * [k db * L N B + k s * (R B V) n ]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 33 Bump Mapping bump function based on gradient of bump map –gradient = measure of how much bump map values change at chosen location modified normal calculated using gradients in two directions (B u and B v ) and two vectors tangent to surface in those directions (S u and S v ) parenthesized expression can also be multiplied by factor to control appearance of size of bumps

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 34 Bump Mapping Examples Bump map based on product of sine taken of two coordinates: sin(10*u*π/1024) *sin(10*v*π/1024)

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 35 Bump Mapping Examples Bump mapped plane using factors (h) of 1.0, 0.5, and light sources illuminate surface patch

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 36 Bump mapping problem Surface shape not changed ==> “bumps” near silhouette will not change silhouette shape If bump-mapped object rotated, bumps will disappear when they reach object profile

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 37 Displacement mapping In displacement mapping, object is subdivided into many very small polygons Texture values cause vertices to be displaced in direction of surface normal In this case, texture actually changes object shape

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 38 Environment mapping Environment mapping simulates reflective objects Environment map – = rendering of scene from inside reflective object –used to determine what would be seen in reflection direction

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 39 Environment mapping Environment map can be –Spherical, require calculation to convert direction through sphere into 2- dim matrix location –or –cube shaped …

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 40 Environment mapping Cube shaped environment map –renders scene from center of object onto faces of a cube component of reflection vector with largest absolute value determines face reflection vector goes through

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 41 Environment Mapping

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 42 Environment Mapping Location on correct face is calculated by: Where –a = component of reflection vector shown on horizontal axis, –b = component shown for vertical axis, and –c = component for chosen face

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 43 Three-Dimensional Textures Very difficult (impossible?) to create texture that can be wrapped around irregularly shaped object without visible discontinuity 2-D texture applied to surface ==> –object can be thought to be carved out of 3-D texture Storage requirements for 3-D texture extremely large ==> 3-D textures closely related to functional textures

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 44 Functional Textures Calculation based on texture location –Instead of stored image as texture Function continuous in every direction –==> texture continuous in every direction Space computation time Change how texture calculated –==> many different textures can be created

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 45 Noise 1st step : noise function True white noise highly random For graphics, repeatable pseudo random noise important –Truly random noise ==> texture would change every time image rendered or for every scene of animation

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 46 Perlin Noise Perlin: developed noise function –used in many Hollywood movies This noise function has: –No statistical variance when rotated –No statistical variance when translated –Narrow range of values

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 47 Turbulence 2nd step : build turbulence function on top of noise function Functional textures then built on top of turbulence function Turbulence function takes multiple samples of noise function at many different frequencies Different researchers frequently develop own turbulence function

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 48 Peachy’s Turbulence Function float turb(float x, float y, float z, float minFreq, float maxFreq) { float result = 0.0; for (float freq = minFreq; freq < maxFreq; freq = 2.0*freq) { result += fabs( noise(x*freq, y*freq, z*freq ) / freq ); } return result; }

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 49 Peachy’s Turbulence Results Samples have frequency ranges of [1.0, 4.0], [1.0, 16.0], and [1.0, 256.0]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 50 Perlin’s Turbulence Function float turb(float x, float y, float z, float minFreq, float maxFreq) // minFreq = lowest allowed; maxFreq = image resolution { float result = 0.0; x = x ; for (float freq = minFreq; freq < maxFreq; freq = 2.0*freq) { result += fabs( noise(x, y, z ) ) / freq; x *= 2.0; y *= 2.0; z *= 2.0; } // return the result adjusted so the mean is 0.0 return result-0.3; }

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 51 Perlin’s Turbulence Results Samples have frequency ranges of [1.0, 4.0], [1.0, 16.0], and [1.0, 256.0]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 52 Marble Texture Perlin/Ebert marble function uses turbulence value to determine color for location void marble(float x, float y, float z, float color[3]) { float value = x * turb(x, y, z, minFreq, maxFreq); marbleColor( sin(π * value), color ); } Variations how marbleColor function implemented –Linear interpolation between light and dark color –Spline-based interpolation between light and dark color

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 53 Linear Interpolation Marble Examples Samples have frequency ranges of [1.0, 4.0], [1.0, 16.0], and [1.0, 256.0]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 54 Spline Interpolation Marble Examples Samples have frequency ranges of [1.0, 4.0], [1.0, 16.0], and [1.0, 256.0]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 55 Spline Interpolation Marble Examples Samples have a frequency range of [1.0, 256.0] and have no multiplier, and multipliers of 3 and 7

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 56 Cosine Textures Based on summations of cosine curves Parameters in equation provide control on result 2-D equation is:

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 57 Cosine Texture Parameters N controls # cos terms –Typically 4 to 7 Cons’ts Φ Gx Φ Gy = global phase shifts –move pattern C i terms change amp of various cos com’s A 0 terms shift pattern but related to C i terms ω x1 & ω y1 determine # times pattern repeats  x i and  y i = phase values –interdependent with base periods of x & y

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 58 Number of Cosines Examples show the results of using 1, 4, and 7 cosines

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 59 Global Phase Shift Examples with x global phase shifts of 0 and 150 show that global phase shift moves the pattern

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 60 Cosine Amplitude Ratio Examples show cosine amplitude ratios of , , and 1.414

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 61 Cosine Offset Examples show cosine offset values of 0.5, 1.0, and 1.5

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 62 Base Periods 1st example : same base period (256) for x and y; 2nd : x base period of 256 & y base period of 512

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 63 Base Period Ratio Examples have base period ratios of 1.5, 2.0, and 2.5

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 64 Phase Shift Amplitude Examples have phase shift amplitudes of 0, π/4, π/2, and π

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 65 Cosine Texture Results Cloud-like texture possible with 4 cosine components, x global offset of 200, cosine amplitude ratio of 0.5, phase shift amplitude of π/2, cosine offset of 0.75, x base period of 655, y base period of 325, and base period ratio of 1.7 Bark-like texture possible with 4 cosine components, cosine amplitude ratio of 0.707, cosine offset of 1.0, x base period of 256, y base period of 1216, and base period ratio of 1.7

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 66 Antialiasing Textures Frequency of entity & rate sampled can cause visible artifacts Example: appears like multiple textures used Aliasing causes visible artifacts

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 67 Aliasing Corrections Aliasing artifacts: reduced by altering sampling method Common techniques include –Supersampling –Supersampling with jittering –Inverse mapping Techniques discussed re textures –Apply to other antialiasing applications

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 68 Supersampling Multiple evenly spaced samples taken from texture for each location Average / weighted average taken of samples to produce final result One weighted average uses 9 samples and filter (weighting):

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 69 Supersampling With Jittering Sample locations shifted by random amount –Instead of evenly-spaced samples ==> helps disturb regular sampling frequency

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 70 Supersampling Examples Supersampling Supersampling with jittering

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 71 Inverse Mapping Area of pixel projected back onto object That object area projected back into texture Integrating or averaging values in this area of texture ==> final texture result to be used

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 72 Inverse Mapping Example

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 73 OpenGL Texture Steps to using texture in OpenGL : –Create / load texture into OpenGL –Enable texturing –Specify how texture is to be used –Specify texture coordinates for polygon vertices or surface corners Allows programmer to specify if texture is to be added before or after specular highlight Allows textures of varying resolutions to deal with aliasing problems Also support for environment mapping

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 74 Texture Coordinates Texture coordinates –influence how texture is applied –are in range [0.0, 1.0] If OpenGL told to repeat texture –==> values outside of range cause multiple copies of texture used If OpenGL told to clamp coordinates –==> any values below range set to 0.0 above range set to 1.0

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 75 Texture Coordinates In 1st example, texture coordinates in range [0.0, 1.0] In 2nd example, texture coordinates in range [0.0, 0.5]

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 76 Texture Coordinates By picking appropriate texture coordinates, two adjacent planes can be textured seamlessly

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 77 Bézier Surface Texturing Bézier surfaces can be textured if points also supplied for four corner control points

June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 78 Specular Highlights OpenGL can include specular component –before texturing –after texturing