MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.

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.
Exploration of bump, parallax, relief and displacement mapping
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.
Course Note Credit: Some of slides are extracted from the course notes of prof. Mathieu Desburn (USC) and prof. Han-Wei Shen (Ohio State University). CSC.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Computer Graphics Bing-Yu Chen National Taiwan University.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Textures II Week 8, Wed.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping II April 10, 2003.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004.
Computer Graphics (Spring 2008) COMS 4160, Lecture 19: Texture Mapping Many slides from Greg Humphreys, UVA and Rosalee.
(conventional Cartesian reference system)
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 18: Shading & Texture Mapping Many slides from Greg.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping.
Advanced Texture Mapping May 10, Today’s Topics Mip Mapping Projective Texture Shadow Map.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
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.
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.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
CS 445 / 645 Introduction to Computer Graphics Lecture 18 Shading Shading.
COMP 175: Computer Graphics March 24, 2015
Lecture 15Slide Fall 2002 Texture Mapping Why texture map? How to do it How to do it right Spilling the beans A couple tricks Difficulties with.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and Texture Mapping.
11/11/04© University of Wisconsin, CS559 Fall 2004 Last Time Shading Interpolation Texture mapping –Barycentric coordinates for triangles.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Textures and shadows  Generation  Mipmap  Texture coordinates,
Texture Mapping. Example Mappings Mapping Techniques Consider the problem of rendering a sphere in the examples The geometry is very simple - a sphere.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Lecture 21Slide Fall 2001 Texture-Mapping Tricks Combining Textures Filtering Textures Textures and Shading Bump Mapping Solid Textures.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
CS 638, Fall 2001 Today Project Stage 0.5 Environment mapping Light Mapping.
MIT EECS 6.837, Durand and Cutler Real-Time Shadows.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam October 30, 2003 Shading 1/35 CIS 736 Computer Graphics Lecture 17 of 42 Illumination.
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.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
CS559: Computer Graphics Lecture 27: Texture Mapping Li Zhang Spring 2008 Many slides from Ravi Ramamoorthi, Columbia Univ, Greg Humphreys, UVA and Rosalee.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.

Computer Graphics Texture Mapping
CSE 167 [Win 17], Lecture 18: Texture Mapping Ravi Ramamoorthi
Texture Mapping COMP575/COMP770.
So Far We have assumed that we know: The point The surface normal
(c) 2002 University of Wisconsin
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Advanced Computer Graphics: Texture
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff

MIT EECS 6.837, Durand and Cutler The Problem: Don't want to represent all this detail with geometry

MIT EECS 6.837, Durand and Cutler Procedural Solid (3D) Textures Ken Perlin, SIGGRAPH '85. Write a function: f(x,y,z) → color non-intuitive difficult to match existing texture

MIT EECS 6.837, Durand and Cutler The Quest for Visual Realism

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping –Perspective Correct Interpolation –Illumination –Texture Mapping Difficulties –Projective Texturing Other Mapping Techniques

MIT EECS 6.837, Durand and Cutler Photo-textures

MIT EECS 6.837, Durand and Cutler Texture Mapping Like wallpapering or gift-wrapping with stretchy paper Curved surfaces require extra stretching or cutting

MIT EECS 6.837, Durand and Cutler Texture Coordinates Specify a texture coordinate (u,v) at each vertex Canonical texture coordinates (0,0) → (1,1) Often the texture size is a power of 2 (but it doesn't have to be) How can we tile this texture? (0,0)(1,0) (0,1)

MIT EECS 6.837, Durand and Cutler Tiling Texture seamless tiling (repeating) tiles with visible seams (0,0) (3,0) (0,3) (0,0)(3,0) (0,3)

MIT EECS 6.837, Durand and Cutler Texture Coordinates Specify a texture coordinate (s,t) at each vertex Canonical texture coordinates (0,0) → (1,1) Can we just linearly interpolate the values in screen space? (0,0)(1,0) (0,1)

MIT EECS 6.837, Durand and Cutler What Goes Wrong? texture sourcewhat we getwhat we want

MIT EECS 6.837, Durand and Cutler Looking at One Edge Consider one edge from a given triangle. This edge and its projection onto our viewport lie in a single common plane illustrated below:

MIT EECS 6.837, Durand and Cutler Visualizing the Problem Let's assume that the viewport is located 1 unit away from the center of projection. Notice that uniform steps on the image plane do not correspond to uniform steps along the edge.

MIT EECS 6.837, Durand and Cutler How do we fix it? We can reduce the perceived artifacts of non- perspective correct interpolation by subdividing the model into smaller triangles. Why? However, sometimes the errors become obvious –At "T" joints –When switching between levels-of-detail representations (mipmapping... next time)

MIT EECS 6.837, Durand and Cutler Subdivision

MIT EECS 6.837, Durand and Cutler Subdivision texture sourcewhat we getwhat we want

MIT EECS 6.837, Durand and Cutler Linear Interpolation in Screen Space Compare linear interpolation in screen space to interpolation in 3-space

MIT EECS 6.837, Durand and Cutler Perspective Correct Interpolation We need a mapping from t values to s values: Solve for s in terms of t: Unfortunately, at this point in the pipeline (after projection) we no longer have z. However, we do have w 1 = 1/z 1 and w 2 = 1/z 2, so:

MIT EECS 6.837, Durand and Cutler Questions?

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping –Perspective Correct Interpolation –Illumination –Texture Mapping Difficulties –Projective Texturing Other Mapping Techniques

MIT EECS 6.837, Durand and Cutler Texture Mapping & Illumination Texture mapping can be used to alter some or all of the constants in the illumination equation: as the final color for the pixel, or as the diffuse color, or to alter the normal,... the possibilities are endless! (e.g. GL_DECAL, GL_MODULATE, GL_BLEND,...) Phong's Illumination Model Constant Diffuse ColorDiffuse Texture Color Texture used as LabelTexture used as Diffuse Color

MIT EECS 6.837, Durand and Cutler 2D Texture Mapping Increases the apparent complexity of simple geometry Requires perspective projection correction Specifies variations in shading within a primitive: –Illumination –Surface Reflectance

MIT EECS 6.837, Durand and Cutler Texture Mapping Difficulties Tedious to specify texture coordinates for every triangle Easier to model variations in reflectance than illumination Acquiring textures is surprisingly difficult –Texture image can't have projective distortions –Seamless tiling –Non-repeating textures

MIT EECS 6.837, Durand and Cutler Common Texture Coordinate Mappings Orthogonal Cylindrical Spherical Perspective Projection Texture Chart

MIT EECS 6.837, Durand and Cutler Projective Textures Treat the texture as a light source (a slide projector) No need to specify texture coordinates explicitly A good model for shading variations due to illumination A fair model for reflectance (can use pictures)

MIT EECS 6.837, Durand and Cutler Projective Texture Example Modeling from photograph Using input photos as textures Figure from Debevec, Taylor & Malik

MIT EECS 6.837, Durand and Cutler Texture Chart Pack triangles into a single image

MIT EECS 6.837, Durand and Cutler Questions?

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping Other Mapping Techniques: –Projective Shadows and Shadow Maps –Bump Mapping –Displacement Mapping –Environment Mapping (for Reflections)

MIT EECS 6.837, Durand and Cutler Projective Shadows Image from light sourceBW image of obstacleFinal image Figure from Moller & Haines “Real Time Rendering”

MIT EECS 6.837, Durand and Cutler Shadow Maps Figure from Foley et al. “Computer Graphics Principles and Practice”

MIT EECS 6.837, Durand and Cutler Projective Texturing + Shadow Map Eye’s View Light’s ViewDepth/Shadow Map Images from Cass Everitt et al., “Hardware Shadow Mapping” NVIDIA SDK White Paper

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping Other Mapping Techniques: –Projective Shadows and Shadow Maps –Bump Mapping –Displacement Mapping –Environment Mapping (for Reflections)

MIT EECS 6.837, Durand and Cutler What's Missing? What's the difference between a real brick wall and a photograph of the wall texture-mapped onto a plane? What happens if we change the lighting or the camera position?

MIT EECS 6.837, Durand and Cutler Remember Phong Normal Interpolation? Instead of using the normal of the triangle, interpolate an averaged normal at each vertex across the face

MIT EECS 6.837, Durand and Cutler Bump Mapping Textures can be used to alter the surface normal of an object. This does not change the actual shape of the surface -- we are only shading it as if it were a different shape! Sphere w/Diffuse Texture Swirly Bump MapSphere w/Diffuse Texture & Bump Map

MIT EECS 6.837, Durand and Cutler Bump Mapping The texture map is treated as a single-valued height function. The partial derivatives of the texture tell us how to alter the true surface normal at each point to make the object appear as if it were deformed by the height function.

MIT EECS 6.837, Durand and Cutler Another Bump Map Example Cylinder w/Diffuse Texture Map Bump Map Cylinder w/Texture Map & Bump Map

MIT EECS 6.837, Durand and Cutler Another Bump Map Example

MIT EECS 6.837, Durand and Cutler Questions?

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping Other Mapping Techniques: –Projective Shadows and Shadow Maps –Bump Mapping –Displacement Mapping –Environment Mapping (for Reflections)

MIT EECS 6.837, Durand and Cutler What's Missing? What does a texture- & bump- mapped brick wall look like as you move the viewpoint? What does the silhouette of a bump-mapped sphere look like?

MIT EECS 6.837, Durand and Cutler Displacement Mapping Use the texture map to actually move the surface point. How is this different than bump mapping? The geometry must be displaced before visibility is determined. Is this easily done in the graphics pipeline? In a ray-tracer?

MIT EECS 6.837, Durand and Cutler Displacement Mapping Image from: Geometry Caching for Ray-Tracing Displacement Maps by Matt Pharr and Pat Hanrahan. note the detailed shadows cast by the stones

MIT EECS 6.837, Durand and Cutler Ken Musgrave Displacement Mapping

MIT EECS 6.837, Durand and Cutler Questions?

MIT EECS 6.837, Durand and Cutler Today 2D Texture Mapping Other Mapping Techniques: –Projective Shadows and Shadow Maps –Bump Mapping –Displacement Mapping –Environment Mapping (for Reflections)

MIT EECS 6.837, Durand and Cutler Environment Maps We can simulate reflections by using the direction of the reflected ray to index a spherical texture map at "infinity". Assumes that all reflected rays begin from the same point.

MIT EECS 6.837, Durand and Cutler What's the Best Chart?

MIT EECS 6.837, Durand and Cutler Environment Mapping Example Terminator II

MIT EECS 6.837, Durand and Cutler Questions? Image by Henrik Wann Jensen Environment map by Paul Debevec

MIT EECS 6.837, Durand and Cutler Textures can Alias Aliasing is the under-sampling of a signal, and it's especially noticeable during animation point sampling mipmaps & linear interpolation

MIT EECS 6.837, Durand and Cutler Next Time: Aliasing, Anti-Aliasing & Mipmaps for Texturing