University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping.

Slides:



Advertisements
Similar presentations
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Computer graphics & visualization Global Illumination Effects.
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.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
3D Graphics Rendering and Terrain Modeling
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Computer Graphics Bing-Yu Chen National Taiwan University.
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
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.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Computer Graphics - Class 10
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
(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.
Texture mapping. Adds realism to computer graphics Texture mapping applies a pattern of color Bump mapping alters the surface Mapping is cheaper than.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
Shading Languages By Markus Kummerer. Markus Kummerer 2 / 19 State of the Art Shading.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
CS559: Computer Graphics Lecture 27: Texture Mapping Li Zhang Spring 2008 Many slides from Ravi Ramamoorthi, Columbia Univ, Greg Humphreys, UVA and Rosalee.
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.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and 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.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric surfaces.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Ray Tracing.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Game Programming 06 The Rendering Engine

1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Vector Graphics Digital Multimedia Chap 이병희
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Subdivision surfaces.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
CSE 681 Texture Mapping: Solid Texturing. CSE 681 Texture Mapping Visual complexity on demand Vary display properties over object Location on object used.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Projections and Z-buffers.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1

Texture Mapping cgvr.korea.ac.kr.
3D Graphics Rendering PPT By Ricardo Veguilla.
Texture Mapping COMP575/COMP770.
Chapter 14 Shading Models.
Chapter IX Bump Mapping
CS-378: Game Technology Lecture #4: Texture and Other Maps
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Chapter 14 Shading Models.
Advanced Computer Graphics: Texture
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Jung Lee.
Presentation transcript:

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 2 Reading Required Watt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8. Recommended Paul S. Heckbert. Survey of texture mapping. IEEE Computer Graphics and Applications 6(11): , November Optional Watt, the rest of Chapter 8 Woo, Neider, & Davis, Chapter 9 James F. Blinn and Martin E. Newell. Texture and reflection in computer generated images. Communications of the ACM 19(10): , October 1976.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 3 What adds visual realism? Geometry only Phong shading Phong shading + Texture maps

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 4 Texture mapping Texture mapping (Woo et al., fig. 9-1) Texture mapping allows you to take a simple polygon and give it the appearance of something much more complex. Due to Ed Catmull, PhD thesis, 1974 Refined by Blinn & Newell, 1976 Texture mapping ensures that “all the right things” happen as a textured polygon is transformed and rendered.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 5 Non-parametric texture mapping With “non-parametric texture mapping”: Texture size and orientation are fixed They are unrelated to size and orientation of polygon Gives cookie-cutter effect

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 6 With “parametric texture mapping,” texture size and orientation are tied to the polygon. Idea: Separate “texture space” and “screen space” Texture the polygon as before, but in texture space Deform (render) the textured polygon into screen space A texture can modulate just about any parameter – diffuse color, specular color, specular exponent, … Parametric texture mapping

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 7 Implementing texture mapping A texture lives in it own abstract image coordinates parameterized by (u,v) in the range ([0..1], [0..1]): It can be wrapped around many different surfaces: Computing (u,v) texture coordinates in a ray tracer is fairly straightforward. Note: if the surface moves/deforms, the texture goes with it.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 8 Mapping to texture image coords The texture is usually stored as an image. Thus, we need to convert from abstract texture coordinate: (u,v) in the range ([0..1], [0..1]) to texture image coordinates: (u tex,v tex ) in the range ([0.. w tex ], [0.. h tex ]) Q: What do you do when the texture sample you need lands between texture pixels?

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 9 Texture resampling We need to resample the texture: A common choice is bilinear interpolation:

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 10 Solid textures Q: What kinds of artifacts might you see from using a marble veneer instead of real marble? One solution is to use solid textures: Use model-space coordinates to index into a 3D texture Like “carving” the object from the material One difficulty of solid texturing is coming up with the textures.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 11 Solid textures (cont'd) Here's an example for a vase cut from a solid marble texture: Solid marble texture by Ken Perlin, (Foley, IV-21)

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 12 Displacement mapping Textures can be used for more than just color. In displacement mapping, a texture is used to perturb the surface geometry itself: These displacements “animate” with the surface Q: Do you have to do hidden surface calculations on Q? ~

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 13 In bump mapping, a texture is used to perturb the normal: Use the original, simpler geometry, Q(u), for hidden surfaces Use the normal from the displacement map for shading: N = normal[Q(u)] Q: What artifacts in the images would reveal that bump mapping is a fake? Bump mapping ~ ~

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 14 Bump mapping example Texture #1 (diffuse color) Texture #2 (bump map) Rendered Image

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 15 Displacement vs. bump mapping Input texture Rendered as displacement map over a rectangular surface

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 16 Displacement vs. bump mapping (cont'd) Original rendering Rendering with bump map wrapped around a cylinder Bump map and rendering by Wyvern Aldinger

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 17 Environment mapping In environment mapping (also known as reflection mapping), a texture is used to model an object's environment: Rays are bounced off objects into environment Color of the environment used to determine color of the illumination Really, a simplified form of ray tracing Environment mapping works well when there is just a single object – or in conjunction with ray tracing Under simplifying assumptions, environment mapping can be implemented in hardware. With a ray tracer, the concept is easily extended to handle refraction as well as reflection.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 18 Combining texture maps Using texture maps in combination gives even better effects. Diffuse color Environment map (not necessary in ray tracer) Specular coefficient Material properties (coefficients in shading equation)

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 19 Can define material by program A ‘surface shader’ computes the color of each ray that hits the surface. Example: Renderman surface shader /* * Checkerboard */ surface checker(float Kd=.5, Ka=.1) { float smod = mod(10*s, 1); float tmod = mod(10*t, 1); if (smod < 0.5) { if (tmod < 0.5) Ci=Cs; else Ci=color(0,0,0); } else { if (tmod < 0.5) Ci=color(0,0,0); else Ci=Cs; } Oi = Os; Ci = Oi*Ci*( Ka*ambient() + Kd*diffuse(faceforward(normalize(N),I))); }

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 20 How do we anti-alias textures? We could just super-sample. But textures (and shader programs) are a special case; we can use true area integration! - Approximate footprint as parallelogram - Determine this approximate footprint using discrete differences

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 21 Cost of filtering can be reduced Store a pyramid of pre-filtered images: During texture lookup, read from appropriate level of the pyramid.

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 22 Next time: Hierarchical modeling How do we represent translation and rotation of complex objects using hierarchies of transformations? (Easy in principle, tough to get right in practice) Read: Angel, sections [reader pp ] OpenGL Programming Guide, chapter 3 [available online]online