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.

Slides:



Advertisements
Similar presentations
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
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.
Cs123 INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Andries van Dam Texture Mapping Beautification of Surfaces 1/23.
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.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Computer Graphics Inf4/MSc Computer Graphics Lecture 13 Illumination I – Local Models.
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.
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.
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.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Guilford County Sci Vis V204.01
Textures – Magnification and Minification Lecture 30 Mon, Nov 17, 2003.
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.
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.
Week 8 - Monday.  What did we talk about last time?  Workday  Before that:  Image texturing ▪ Magnification ▪ Minification  Mipmapping  Summed area.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
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.
1 Texture Mapping ©Anthony Steed Overview n Texture mapping Inverse and Forward Mapping Bilinear interpolation Perspective correction n Mipmapping.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Textures and shadows  Generation  Mipmap  Texture coordinates,
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
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.
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.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
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.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
Texture Mapping CAP4730: Computational Structures in Computer Graphics.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
第三课. Overview of this Section Concept of Texture Mapping ( 纹理映射 ) 2D Texture 3D Texture Environment Mapping Bump Mapping Others OpenGL Implementation.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
Mapping: Image Texturing CPSC 591/691. Texture Mapping Two-dimensional techniques place a two-dimensional (flat) image onto an object using methods similar.
Acquiring, Stitching and Blending Diffuse Appearance Attributes on 3D Models C. Rocchini, P. Cignoni, C. Montani, R. Scopigno Istituto Scienza e Tecnologia.
Texturing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.

Week 7 - Wednesday CS361.
University of New Mexico
Buffers and texture mapping
Texture Mapping.
Computer Graphics Texture Mapping
Week 7 - Monday CS361.
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Graphics, Fall 2017 Lecture 24: Texture Mapping
So Far We have assumed that we know: The point The surface normal
UMBC Graphics for Games
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
Advanced Computer Graphics: Texture
Presentation transcript:

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 or images- we’ll consider mostly 2D- when using images it is generally safer to have the dimensions (including any border) powers of 2 Texel is a texture element: individual colors in a position (u,v) Pixels need to be mapped to texels: not always 1-1: magnification or minification – can have some interpolation- also problems with specular component Can think of a 3D texture as being carved in wood or marble

Texture: mapping Textures get mapped via vertices (can think of the texture as sewn onto polygons) What happens when the polygon and the texture are different sizes or even different shapes?

Exercise in mapping Take an 8x8 texture that is 4 squares (a checkerboard) Consider mapping the texture onto the 4 corners of the square; a triangle; a rectangle What happens if the square you are mapping is 16X16, 9X9

Texture tiling Instead of stretching or shrinking a texture onto a polygon, it can be repeated with tiling. In that case a pixel is mapped directly to a texel (can also be more complicated). If you run out, only part of the texture is shown, if you have more pixels than texels, then it repeats (in either or both directions) When you do tiling you probably want the texture to make sense when it repeats; also beware of tiling random-like textures such as bark because they can produce unwanted patterns Try tiling the checkerboard onto a 16x16; and onto a 20x20; onto a 5x16

Bump Mapping What to do about the specular highlights? What to do about the look of wallpaper painted on a plane? The highlights are those of the plane polygon and don’t reflect the content in the texture One could put in many more polygons but a (clever) solution is to alter the normals. Then the lighting and highlights will make it seem as if the polygon has “bumps” or “wrinkles” in it. This must be done with an explicit map on the texture that produces a new (bumped) normal and hence a new (bumped) reflective vector; this can also be done by introducing turbulence or noise into the normals (see next section)

Environment Mapping It is sometimes desirable to see the surrounding environment reflected off an object; for example, a room might be reflected off the surface of a glass; we can think of the glass an encased in a bubble that is the room or encased by another object; the encasing object is centered at the same place as the reflecting object The mapping will take a viewing direction, which will then give a reflecting direction and then return the color of the proper pixel from the background

Environment Mapping (con’t) Sometimes this is accomplished by mapping a sphere onto the surface (a bubble surrounding the object); there can be distortion at the north and south poles Often a cube, with 6 sides is used: the cube is set up perhaps by taking pictures at 90 degree angles (front, right, back, left) and up and down and then these are put onto the 6 faces of a cube; each face is a square texture; those faces are the projection planes; the viewing direction gives a reflecting direction and its largest absolute value and its sign determines which of the 6 planes is being used

Functional Texture Mappings Texture may also be produced through functions For example, draw the following functional texture which will be 16x16: for y in range(16): for x in range(16): if sin  x)/4>0: tex[x][y]=(0,0,255) else: tex[x][y]=(0,255,0)

Functional Texture Mappings (con’t) There are any other kinds of functions Famous function by Perlin to produce noise Others build on that to produce turbulence, marbling effect, bark, clouds, etc. Look at some of the functions: use some randomness, but want the function to be re- producible; combinations of the cosine function

Problem of Aliasing Go back to our 8x8 texture. We talked about the problem of too many pixels and thus having to map to parts of texels; now consider the problem of a very small polygon that doesn’t have as many pixels as there are texels: what happens now? Notice that this can happen as objects get far away and perspective is used. Consider mapping a 4x4 polygon to the 8x8 texture; or a 3x3 polygon to the 8x8 texture. We are not going to get squares: some of them will be larger; or what happens with a 2x2 polygon or even a 1x1 Consider the general problem of aliasing

Antialiasing One solution is to do some sort of weighted averaging: could be 4 nearest pixels (2x2 array) or 9 nearest (3x3) (called supersampling): the weights are stronger in the middle- all powers of 2; inverse mapping can also use a sort of averaging (or integration) to look at the surrounding area In more general settings often see an averaging to blur jagged lines