Graphics, Fall 2017 Lecture 24: Texture Mapping

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.
Computer Graphics Bing-Yu Chen National Taiwan University.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
Computer Graphics (Spring 2008) COMS 4160, Lecture 19: Texture Mapping Many slides from Greg Humphreys, UVA and Rosalee.
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 Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
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 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
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.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and Texture Mapping.
Computer Graphics 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 고려대학교 컴퓨터 그래픽스 연구실.
Mapping method Texture Mapping Environmental mapping (sphere mapping) (cube mapping)
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.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Texture Mapping.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
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.
CS425 © 2003 Ray S. Babcock Pixels and Bitmaps ● OpenGL allows us to work directly with bits and groups of bits, or pixels, which flow down a parallel.

Discrete Techniques.
Week 7 - Wednesday CS361.
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
Texture Mapping cgvr.korea.ac.kr.
Basic Rendering Techniques
ATEC Procedural Animation
ATCM 3310 Procedural Animation
So Far We have assumed that we know: The point The surface normal
Chapters VIII Image Texturing
Interactive Graphics Algorithms Ying Zhu Georgia State University
Michael Tanaya , Hua ming Chen
Introduction to Texture Mapping
Texture Motivation: to model realistic objects need surface detail: wood grain, stone roughness, scratches that affect shininess, grass, wall paper. Use.
Introduction to Computer Graphics with WebGL
3D Game Programming Texture Mapping
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
Textures Lecture 11 Wed, Oct 5, 2005.
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Texture mapping - other methods
OpenGL Texture Mapping
Advanced Computer Graphics: Texture
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

Graphics, Fall 2017 Lecture 24: Texture Mapping The Problem with Polygons: To date, we have learned how to create objects using multiple polygonal surfaces. We could use this technique to create complex scenes with many objects, for example a field of grass. Problem: It would take huge amounts of time to render. Polygons tend to look too smooth for some purposes. Many surfaces have lots of variation in them (e.g. carpet, oranges, wood grain).

Creating Textured Scenes To create scenes with lots of variation, we can use a variety of techniques. Among them are: Texture Mapping: Create a texture or pattern and map it onto a surface. Bump Map: Perturb the surface of an object by slightly varying the surface normals. Environmental Map: Map the environment onto a surface (e.g. reflections.

Texture Mapping With texture mapping, we map a texture or image onto an object. Creating the texture: Write program to create regular or random texture. OR Load in an image map and use that as the texture. Textures can be in 1, 2 or 3 dimensions: 1-D textures: Map onto a line or curve 2-D textures: Map onto a surface 3-D textures: Map into a volume. Will see texture if take slices through the volume. We will examine only 2-D textures.

Representing a Texture A 2D texture is represented as a 2D pattern: T(s, t) s and t are called texture coordinates. T is stored in a 2D array (n x m) of texture elements, called texels. Textures are rendered as discrete elements. A texture map associates a unique point of T with each point on a geometric object. The object is then mapped to screen coordinates. y y y x z projection x x t z s

Working with Curved Surfaces When mapping texture onto a curved surface, it is useful to represent the surface in parametric form: We can relate the texture coordinates to the image coordinates as follows: u = as + bt + c v = ds + et + f where ae does not equal bd

Mapping onto a rectangle Mapping onto a rectangle is like a simple coordinate switch: (smax, tmax) t v (umax, vmax) s u (smin, tmin) (umin, vmin)

Mapping a square onto a cylinder Define texture on a unit square: Parametric representation of cylinder: Map with u = s and v = t: t v s u p(x, y, z)

Problems in mapping 2D to 3D For some 3D surfaces, it is hard to map from 2D to 3D. For example, imagine trying to wrap a piece of paper around a soccer ball! Mapping a rectangular texture onto a sphere is difficult to do without generating distortions in the texture.

Methods for Mapping 2D to 3D One solution is to unfold the 3D object into a 2D surface: Unfolded cube: Map the 2D texture onto the unfolded object, then fold it again. This does not work as well for a sphere. Flattening a sphere leads to distortions (e.g. world maps).

Mapping to an intermediate surface Another solution is to map the texture onto an intermediate surface (a sphere, a box or a cylinder) and then map from there onto the 3D object. Ways of mapping: Normals of intermediate object to final object Normals of final object to intermediate object Mapping from center of final object Different choices give different results.

Aliasing Because we are mapping discrete points (texels) onto discrete points (pixels) there can be problems if the relative sizes and resolutions do not match. Aliasing occurs in repeated textures, when sampling from the texture skips over pieces of the texture. t v Disappearing Stripes s u Aliasing can cause texture elements to disappear and can also cause moire patterns. Area averaging: One way to deal with aliasing is to assign the average of the texel with the nearest neighboring texels to the point on the surface. This limits the moire patterns, but does not help with the disappearing stripes (we just see gray instead of white).

Scaling the texture Problems arise when the texture scale does not match the image scale. We may have several texels mapping to a single pixel (or vice versa). t v s u Solutions: Use averaging: Use the nearest texel value; Or Use Mipmapping Mipmapping works by creating a set of texture arrays for different resolutions. E.g. 64 x 64, 32 x 32, 16 x 16, etc. OpenGL then chooses the appropriate mipmap for a given object. The one with the closest matching resolution will be used.