Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping.

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
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Exploration of bump, parallax, relief and displacement mapping
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Textures II Week 8, Wed.
Advanced Texture and Lighting
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
Status – Week 277 Victor Moya.
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
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 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: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
3D Programming Concepts How objects are described in 3D and Rendering Pipelines – A conceptual way of thinking of the steps involved of converting an abstract.
Computer Graphics Texture Mapping Eriq Muhammad Adams
CS 638, Fall 2001 Admin Grad student TAs may have had their accounts disabled –Please check and the lab if there is a problem If you plan on graduating.
2IV60 Computer Graphics set 10: Texture mapping Jack van Wijk TU/e.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Textures and shadows  Generation  Mipmap  Texture coordinates,
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Course: Computer Graphics Presented by Fan Chen
Mapping method Texture Mapping Environmental mapping (sphere mapping) (cube mapping)
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.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Texture Mapping. 2 Motivation A typical modern graphics card can handle 10s of millions of polygons a second. How many individual blades of grass are.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Texture Mapping Drawing Pictures on Polygons. Texture Mapping.
TEXTURES & OTHER GOODIES Computer Graphics. glTexCoord2f(...); + =
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Module 06 –environment mapping Module 06 – environment mapping Module 06 Advanced mapping techniques: Environment mapping.
Details of Texture Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 1, 2003.
OpenGL Vertex Arrays OpenGL vertex arrays store vertex properties such as coordinates, normal vectors, color values and texture coordinates. These properties.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Texture Mapping CEng 477 Introduction to Computer Graphics.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Texturing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Ying Zhu Georgia State University
How to Bump Map a Skinned Polygonal Model
Bump Mapping -1 Three scales of detail on an object
The Graphics Rendering Pipeline
© University of Wisconsin, CS559 Fall 2004
Chapter IX Bump Mapping
3D Game Programming Texture Mapping
Textures II Week 10, Mon Mar 22
Last Time Presentation of your game and idea Environment mapping
Illumination and Shading
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Jung Lee.
Presentation transcript:

Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping

Module 05 –Bump mapping Module 05 – Bump mapping Overview  Multitexturing  Texture units  Bump mapping

Module 05 –Bump mapping Module 05 – Bump mapping Multitexturing  When you map a texture to polygon, you apply only one texture to it.  It's actually possible to apply several textures to the same polygon through a series of texture operations. This is called multitexturing.  Multiple textured objects rendered in a single pass:  Lightmaps  Fog  Bump mapping  Multitexturing makes use of a series of texture units. Each texture unit represents a single texture application, and when you perform multitexturing, each texture unit passes its results to the next texture unit.

Module 05 –Bump mapping Module 05 – Bump mapping Texture units (1)  Each texture unit has a set of states associated with it that allows it to keep settings separate from the other texture units. Each texture unit has its own texture environment, texture matrix stack, texture coordinate generation states, and texture image and filtering parameters.  The latter texture units are usually derived from the texture object that is bound to the texture unit  In addition, each of the texture targets (GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D and GL_TEXTURE_CUBE_MAP) are enabled or disabled on a per-texture-unit basis.

Module 05 –Bump mapping Module 05 – Bump mapping Texture units (2)  Default texture unit is texture unit 0.  Texture unit pipeline:

Module 05 –Bump mapping Module 05 – Bump mapping Texture units (4) Code Example: Texture1 and texture2 are handles to valid texture objects for 2D textures. The following code binds them to texture unit 0 and texture unit 1: glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D): glBindTexture(GL_TEXTURE_2D, texture1); glActiveTexture(GL_TEXTURE1); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture2);

Module 05 –Bump mapping Module 05 – Bump mapping Bump mapping (1)  Bump mapping is a technique that presents the illusion of greater detail to the viewer by using a texture map to perturb the normal vector at each pixel.  High-resolution information about how the normal vector is perturbed is stored in a two-dimensional array of three-dimensional vectors called a bump map or normal map.  Each vector in the bump map represents the direction in which the normal vector should point relative to the interpolated normal vector at a point inside the face of a triangle.  A bump map is typically constructed by extracting normal vectors from a height map whose contents represent the height of a flat surface at each pixel.

Module 05 –Bump mapping Module 05 – Bump mapping Bump mapping (2)  To derive the normal vector corresponding to a particular pixel in the height map, we first calculate tangents in the s and t directions, which are based on the difference in height between adjacent pixels.  Corresponding normal vector N(i,j) is:  This process is computationally very expensive in real time

Module 05 –Bump mapping Module 05 – Bump mapping Bump mapping (3)  To achieve quite the same result as lighting calculation at each pixel based on perturbed normal vectors, we can use OpenGL multitexturing, diffuse lighting and picture emboss effect, provided by image editor like Adobe Photoshop.  Example: += Default texture Embossed textureBump-mapped texture

Module 05 –Bump mapping Module 05 – Bump mapping Final result

Module 05 –Bump mapping Module 05 – Bump mapping Practice Open: Lab05 / BumpMapping / BumpMapping.sln