CS4395: Computer Graphics 1 Bump Mapping Mohan Sridharan Based on slides created by Edward Angel.

Slides:



Advertisements
Similar presentations
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
Advertisements

Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Michael I. Gold NVIDIA Corporation
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
Chapter 11: Advanced Rendering Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Shading II CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
University of New Mexico
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Mohan Sridharan Based on slides created by Edward Angel GLSL I 1 CS4395: Computer Graphics.
Environmental Mapping CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Texture Mapping Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Designing Parametric Cubic Curves
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
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.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
Texture Mapping (cont.) Jian Huang, CS 594, updated in Fall’08.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
CS 480/680 Computer Graphics Shader Applications Dr. Frederick C Harris, Jr. Fall 2011.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 445 / 645: Introductory Computer Graphics Light.
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.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
CS418 Computer Graphics John C. Hart
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Shader Applications Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Bump Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Advanced Texture Mapping Bump Mapping & Environment Mapping (Reflection)
Schedule Update GP 4 – Tesselation/Cg GDS 4 – Subdiv Surf. GP 5 – Object Modeling Lab: Mini-proj Setup GDS 5 – Maya Modeling MCG 6 – Intersections GP 6.
Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Chapter 1: Introduction to Graphics. 2 What is computer graphics.
University of New Mexico
Texture Mapping.
Computer Graphics Texture Mapping
Bump Mapping -1 Three scales of detail on an object
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
So Far We have assumed that we know: The point The surface normal
CSC461: Lecture 23 Shading Computation
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Meshes
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Illumination and Shading
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Advanced Texture Mapping
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Introduction to Meshes
Presentation transcript:

CS4395: Computer Graphics 1 Bump Mapping Mohan Sridharan Based on slides created by Edward Angel

Introduction Mapping methods: – Texture mapping. – Environmental (reflection) mapping: Variant of texture mapping. – Bump mapping: Solves flatness problem of texture mapping. CS4395: Computer Graphics 2

Examples CS4395: Computer Graphics 3

Modeling an Orange Consider modeling an orange. Texture map a photo of an orange onto a surface: – Captures dimples. – Will not be correct if we move viewer or light. – We have shades of dimples rather than their correct orientation. We need to perturb normal across surface of object and compute a new color at each interior point. CS4395: Computer Graphics 4

Bump Mapping (Blinn) Consider a smooth surface: CS4395: Computer Graphics 5 n p

Rougher Version CS4395: Computer Graphics 6 n’n’ p p’

Equations CS4395: Computer Graphics 7 p u =[ ∂x/ ∂u, ∂y/ ∂u, ∂z/ ∂u] T p(u,v) = [x(u,v), y(u,v), z(u,v)] T p v =[ ∂x/ ∂v, ∂y/ ∂v, ∂z/ ∂v] T n = (p u  p v ) / | p u  p v |

Tangent Plane CS4395: Computer Graphics 8 pupu pvpv n

Displacement Function CS4395: Computer Graphics 9 p’ = p + d(u,v) n d(u,v) is the bump or displacement function. |d(u,v)| << 1

Perturbed Normal CS4395: Computer Graphics 10 n’ = p’ u  p’ v p’ u = p u + (∂d/∂u)n + d(u,v)n u p’ v = p v + (∂d/∂v)n + d(u,v)n v If d is small, we can neglect last term.

Approximating the Normal CS4395: Computer Graphics 11 n’ = p’ u  p’ v ≈ n + (∂d/∂u)n  p v + (∂d/∂v)n  p u The vectors n  p v and n  p u lie in the tangent plane. Hence the normal is displaced in the tangent plane. Must pre-compute the arrays ∂d/ ∂u and ∂d/ ∂v Finally, we perturb the normal during shading.

Image Processing Suppose that we start with a function d(u,v). We can sample it to form an array D=[d ij ]. Then ∂d/ ∂u ≈ d ij – d i-1,j and ∂d/ ∂v ≈ d ij – d i,j-1 Embossing: multi-pass approach using accumulation buffer. CS4395: Computer Graphics 12

How to do this? The problem is that we want to apply the perturbation at all points on the surface. Cannot solve by vertex lighting (unless polygons are very small). Really want to apply to every fragment. Can not do that in fixed function pipeline. But can do with a fragment program – later CS4395: Computer Graphics 13