Texture Mapping. Brian Curless CSE 457 Spring 2015

Similar documents
Texture Mapping. Brian Curless CSE 457 Spring 2016

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.

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

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 10

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

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

CS 431/636 Advanced Rendering Techniques

Shading. Flat shading Gouraud shading Phong shading

Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

Computer Graphics. - Texturing Methods -

CPSC / Texture Mapping

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

CS 130 Final. Fall 2015

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

Texture mapping. Computer Graphics CSE 167 Lecture 9

CS 5600 Spring

Complex Shading Algorithms

History of computer graphics

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

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

CS 4620 Program 3: Pipeline

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

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

Texture and other Mappings

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

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

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

Introduction to Visualization and Computer Graphics

Interpolation using scanline algorithm

Computer Graphics Introduction. Taku Komura

Textures and normals in ray tracing

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

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

CHAPTER 1 Graphics Systems and Models 3

Lahore University of Management Sciences. CS 452 Computer Graphics

Introduction to Computer Graphics with WebGL

Rendering Light Reflection Models

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

Level of Details in Computer Rendering

Topics and things to know about them:

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

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

Einführung in Visual Computing

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

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

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

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

Lahore University of Management Sciences. CS 452 Computer Graphics

CS 4620 Midterm, March 21, 2017

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

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

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

CS5620 Intro to Computer Graphics

CIS 581 Interactive Computer Graphics

CS451Real-time Rendering Pipeline

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

Course Title: Computer Graphics Course no: CSC209

CMSC427 Final Practice v2 Fall 2017

CS5620 Intro to Computer Graphics

Graphics Hardware and Display Devices

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

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

CPSC / Illumination and Shading

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Texture. Texture Maps

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

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Texture. Detail Representation

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

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

Shading. Brian Curless CSE 457 Spring 2017

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

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

Mia Round Corners Node

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

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

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


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

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

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

Light Reflection Models

Computergrafik. Matthias Zwicker. Herbst 2010

9. Illumination and Shading

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

lecture 18 - ray tracing - environment mapping - refraction

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Evolution of Imaging Technology in Computer Graphics. Related Areas

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Transcription:

Texture Mapping Brian Curless CSE 457 Spring 2015 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 (s, t ) 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 z-buffers, everything gets converted to a triangle mesh with associated (s, t ) coordinates. Note: if the surface moves/deforms, the texture goes with it. 4

Texture coordinates on a surface of revolution 5

Mapping to texture image coords The texture is usually stored as an image. Thus, we need to convert from abstract texture coordinate: (s, t ) in the range ([0..1], [0..1]) to texture image coordinates: (s tex, t 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? 6

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

Texture mapping and the z-buffer Texture-mapping can also be handled in z-buffer 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! 8

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 (s, t ) parameters instead of just s. Suppose Q is a simple surface, like a cube. Will it take ~ more work to render the modified surface Q? 9

Bump mapping In bump mapping, a texture is used to perturb the normal: Use the original, simpler geometry, Q(s), for hidden surfaces Use the normal from the displacement map for shading: ~ ~ N = normal[q(s)] What artifacts in the images would reveal that bump mapping is fake? 10

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

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

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

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

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 15

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) 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). 16

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