Texture Mapping. Brian Curless CSE 457 Spring 2016

Similar documents
Texture Mapping. Brian Curless CSE 457 Spring 2015

Texture Mapping. Reading. Implementing texture mapping. Texture mapping. Daniel Leventhal Adapted from Brian Curless CSE 457 Autumn 2011.

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, 8.10,

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, Recommended

Reading. 12. Texture Mapping. Texture mapping. Non-parametric texture mapping. Required. w Watt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8.

Reading. 11. Texture Mapping. Texture mapping. Non-parametric texture mapping. Required. Watt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8.

Reading. 13. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Watt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8.

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

CPSC / Texture Mapping

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Homework #2. Shading, Ray Tracing, and Texture Mapping

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

Reading. 18. Projections and Z-buffers. Required: Watt, Section , 6.3, 6.6 (esp. intro and subsections 1, 4, and 8 10), Further reading:

3D Rasterization II COS 426

Computer Graphics. - Texturing Methods -

CS 431/636 Advanced Rendering Techniques

CS 130 Final. Fall 2015

Textures and normals in ray tracing

Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

CS 5600 Spring

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computer Graphics Introduction. Taku Komura

+ = To Do. Texture Mapping. Adding Visual Detail. Parameterization. Option: Varieties of projections. Computer Graphics. geometry

Texture mapping. Computer Graphics CSE 167 Lecture 9

History of computer graphics

Shading. Flat shading Gouraud shading Phong shading

Complex Shading Algorithms

CS 4620 Program 3: Pipeline

+ = To Do. Adding Visual Detail. Texture Mapping. Parameterization. Option: Varieties of projections. Foundations of Computer Graphics (Fall 2012)

CS 428: Fall Introduction to. Texture mapping and filtering. Andrew Nealen, Rutgers, /18/2010 1

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

CHAPTER 1 Graphics Systems and Models 3

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Lahore University of Management Sciences. CS 452 Computer Graphics

Einführung in Visual Computing

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

COMP environment mapping Mar. 12, r = 2n(n v) v

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

Computer Graphics Disciplines. Grading. Textbooks. Course Overview. Assignment Policies. Computer Graphics Goals I

Graphics Hardware and Display Devices

Lahore University of Management Sciences. CS 452 Computer Graphics

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

Course Title: Computer Graphics Course no: CSC209

CS 325 Computer Graphics

Introduction to Visualization and Computer Graphics

Introduction to Computer Graphics with WebGL

lecture 18 - ray tracing - environment mapping - refraction

Texture and other Mappings

Topics and things to know about them:

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

CS451Real-time Rendering Pipeline

CS5620 Intro to Computer Graphics

CMSC427 Final Practice v2 Fall 2017

Rendering Light Reflection Models

Level of Details in Computer Rendering

Shading. Brian Curless CSE 457 Spring 2017

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

TEXTURE MAPPING. DVA338 Computer Graphics Thomas Larsson, Afshin Ameri

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

Complex Features on a Surface. CITS4241 Visualisation Lectures 22 & 23. Texture mapping techniques. Texture mapping techniques

Chapter 2 A top-down approach - How to make shaded images?

Introduction to 3D Concepts

Rendering and Radiosity. Introduction to Design Media Lecture 4 John Lee

CIS 581 Interactive Computer Graphics

Assignment 6: Ray Tracing

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Wednesday, 26 January 2005, 14:OO - 17:OO h.

Computer Graphics I Lecture 11

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Evolution of Imaging Technology in Computer Graphics. Related Areas

Bump Mapping Which one of these two image has a better visual effect?

CPSC / Illumination and Shading

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Introduction to Computer Graphics 7. Shading

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Overview: Ray Tracing & The Perspective Projection Pipeline

Graphics and Interaction Surface rendering and shading

Lecture outline Graphics and Interaction Surface rendering and shading. Shading techniques. Introduction. Surface rendering and shading

Transcription:

Texture Mapping Brian Curless CSE 457 Spring 2016 1

Reading Required Angel, 7.4-7.10 Recommended Paul S. Heckbert. Survey of texture mapping. IEEE Computer Graphics and Applications 6(11): 56--67, November 1986. Optional 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): 542--547, October 1976. 2

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 A texture can modulate just about any parameter diffuse color, specular color, specular exponent, 3

Implementing texture mapping A texture lives in it own abstract image coordinates paramaterized by (u, v ) in the range ([0..1], [0..1]): It can be wrapped around many different surfaces: With a ray caster, we can do the sphere and cylinder mappings directly (as we will see later). For graphics hardware, everything gets converted to a triangle mesh with associated (u, v ) coordinates. Note: if the surface moves/deforms, the texture goes with it. 4

Texture coordinates on a surface of revolution Recall that for a surface of revolution, we have: Profile curve: C [j ] where j [0..M -1] Rotation angles: [i ] = 2 i /N where i [0..N ] The simplest assignment of texture coordinates would be: Note that you should include the rotation angles for i = 0 and i = N, even though they produce the same points (after rotating by 0 and 2 ). Why do this?? 5

Texture coordinates on a surface of revolution If we wrap an image around this surface of revolution, what artifacts would we expect to see? We can reduce distortion in v. Define: C j C j 1, if j 0 d j = 0, if j 0 and set v to fractional distance along the curve: You must do this for v for the assignment! 6

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? 7

Texture resampling We need to resample the texture: Thus, we seek to solve for: T( ab, ) T i, j x y A common choice is bilinear interpolation: T i, j T[ i, j] T[ i 1, j] x T i, j 1 T[ i, j 1] T[ i 1, j 1] x i x j y i x j i x j T, T, T, 1 T[ i, j] T[ i 1, j] T[ i, j 1] T[ i 1, j 1] 8

Texture mapping and rasterization Texture-mapping can also be handled in rasterization algorithms. Method: Scan conversion is done in screen space, as usual Each pixel is colored according to the texture Texture coordinates are found by Gouraud-style interpolation Note: Mapping is more complicated to handle perspective correctly. 9

Displacement mapping Textures can be used for more than just color. In displacement mapping, a texture is used to perturb the surface geometry itself. Here s the idea in 2D: These displacements animate with the surface In 3D, you would of course have (u, v) parameters instead of just u. Suppose Q is a simple surface, like a cube. Will it take ~ more work to render the modified surface Q? 10

Bump mapping 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 )] What artifacts in the images would reveal that bump mapping is fake? 11

Displacement vs. bump mapping Input texture Rendered as displacement map over a rectangular surface 12

Displacement vs. bump mapping (cont'd) Original rendering Rendering with bump map wrapped around a cylinder Bump map and rendering by Wyvern Aldinger 13

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. 14

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) 15

Solid textures (cont'd) in(x, y, z ) = stripes(x ) shift(x, y, z ) = K noise(x, y, z ) out(x,y, z ) = stripes(x + shift(x, y, z )) Increasing K 16

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 Environment mapping works well when there is just a single object or in conjunction with ray tracing This can be readily implemented (without interreflection) in graphics hardware using a fragment shader, where the texture is stored in a cube map instead of a sphere. With a ray tracer, the concept is easily extended to handle refraction as well as reflection (and interreflection). 17

Summary What to take home from this lecture: 1. The meaning of the boldfaced terms. 2. Familiarity with the various kinds of texture mapping, including their strengths and limitations. 18