Buffers and texture mapping

Slides:



Advertisements
Similar presentations
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
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.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Computer Graphics Bing-Yu Chen National Taiwan University.
Objectives Introduce OpenGL buffers and read/write Introduce OpenGL buffers and read/write Introduce texture mapping Introduce texture mapping Introduce.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
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.
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.
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.
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.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
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
Game Programming 06 The Rendering Engine
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
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.
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Texture Mapping.
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.
Viewing and Texture Mapping In OPENGL. VIEWING 1.One or more objects 2.A viewer with a projection surface 3.Projectors that go from the object(s) to.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Chapter 10: Computer Graphics

Introduction to Computer Graphics with WebGL
University of New Mexico
Texture Mapping.
Computer Graphics Texture Mapping
Madhulika (18010), Assistant Professor, LPU.
Introduction to Computer Graphics with WebGL
Photorealistic Rendering vs. Interactive 3D Graphics
Sampling and Aliasing Ed Angel Professor Emeritus of Computer Science
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Graphics, Fall 2017 Lecture 24: Texture Mapping
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
So Far We have assumed that we know: The point The surface normal
Chapter 10: Computer Graphics
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Models and Architectures
Introduction to Computer Graphics with WebGL
Interactive Graphics Algorithms Ying Zhu Georgia State University
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics
Procedural Animation Lecture 6: Mapping
Models and Architectures
ATCM 6317 Procedural Animation
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:

Buffers and texture mapping Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Buffer Define a buffer by its spatial resolution (n x m) and its depth (or precision) k, the number of bits/pixel pixel Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

WebGL Frame Buffer Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

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 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Modeling an Orange How many triangles do you need to make an orange look real? How about Clouds Grass Terrain Skin Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Modeling an Orange Take a picture of a real orange, scan it, and “paste” onto simple geometric model This process is known as texture mapping Still might not be sufficient because resulting surface will be smooth Need to change local shape Bump mapping Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Three Types of Mapping Texture Mapping Uses images to fill inside of polygons Environment (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 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Texture Mapping geometric model texture mapped Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Environment Mapping Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Bump Mapping Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

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 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Coordinate Systems Parametric coordinates Texture coordinates May be used to model curves and surfaces Texture coordinates Used to identify points in the image to be mapped Object or World Coordinates Conceptually, where the mapping takes place Window Coordinates Where the final image is really produced Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Texture Mapping parametric coordinates texture coordinates window coordinates world coordinates Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

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 (x,y,z) t s Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Backward Mapping We really want to go backwards Need a map of the form 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 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Two-part mapping One solution to the mapping problem is to first map the texture to a simple intermediate surface Example: map to cylinder Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Cylindrical Mapping parametric cylinder x = r cos 2p u y = r sin 2pu 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 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Spherical Map We can use a parametric sphere x = r cos 2pu y = r sin 2pu cos 2pv z = r sin 2pu sin 2pv in a similar manner to the cylinder but have to decide where to put the distortion Spheres are used in environmental maps Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Box Mapping Easy to use with simple orthographic projection Also used in environment maps Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Second Mapping Map from intermediate object to actual object Normals from intermediate to actual Normals from actual to intermediate Vectors from center of intermediate actual intermediate Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Aliasing Point sampling of the texture can lead to aliasing errors point samples in u,v (or x,y,z) space miss blue stripes point samples in texture space Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015

Area Averaging A better but slower option is to use area averaging pixel preimage Note that preimage of pixel is curved Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015