Bump Map 1. High Field Function: H(u, v) New Normal : N’

Slides:



Advertisements
Similar presentations
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Advertisements

Michael I. Gold NVIDIA Corporation
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Chapter 9: Vector Differential Calculus Vector Functions of One Variable -- a vector, each component of which is a function of the same variable.
Topics in Computer Graphics Spring Application.
The gradient as a normal vector. Consider z=f(x,y) and let F(x,y,z) = f(x,y)-z Let P=(x 0,y 0,z 0 ) be a point on the surface of F(x,y,z) Let C be any.
Tangent Vectors and Normal Vectors. Definitions of Unit Tangent Vector.
Bump Mapping CSE 781 Roger Crawfis.
MAT Math. Tools II Tangent Plane and Normal Suppose the scalar field  =  ( x, y, z, t) at time t o, the level surfaces are given by  ( x, y,
CSE 681 Texture mapping - other methods Environmental mapping Bump mapping.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
CDS 301 Fall, 2009 Scalar Visualization Chap. 5 September 24, 2009 Jie Zhang Copyright ©
CS4395: Computer Graphics 1 Bump Mapping Mohan Sridharan Based on slides created by Edward Angel.
ARCH 481 3d Modeling and Rendering lecture four: texture maps.
Objects in 3D – Parametric Surfaces Computer Graphics Seminar MUM, summer 2005.
CS CS 175 – Week 4 Triangle Mesh Smoothing Discrete Differential Geometry.
X y z Point can be viewed as intersection of surfaces called coordinate surfaces. Coordinate surfaces are selected from 3 different sets.
12.3 Surface Area of a Pyramids and Cones Slant Height ( l )
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
Scalar Visualization Chap. 5 September 23, 2008 Jie Zhang Copyright ©
Chapter 10 Vector Calculus
Basic Assembly Constraints and Concepts
CS 480/680 Computer Graphics Shader Applications Dr. Frederick C Harris, Jr. Fall 2011.
Chapter 2 Section 2.4 Lines and Planes in Space. x y z.
Parametric Surfaces and their Area Part II. Parametric Surfaces – Tangent Plane The line u = u 0 is mapped to the gridline C 2 =r(u 0,v) Consider the.
CS 445 / 645: Introductory Computer Graphics Light.
GAM532 DPS932 – Week 2 Vertex Shaders. The Shader Pipeline Vertex Processing Primitive Assembly / Processing Rasterization Fragment Process Pixel Output.
Sec 15.6 Directional Derivatives and the Gradient Vector
Geometric Modeling using Polygonal Meshes Lecture 3: Discrete Differential Geometry and its Application to Mesh Processing Office: South B-C Global.
Shader Applications Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Section 15.6 Directional Derivatives and the Gradient Vector.
Shapes Digital Image Synthesis Yung-Yu Chuang 10/05/2006 with slides by Pat Hanrahan.
1 OGRE Programming Intermediate Tutorial: Volume Selection.
OpenGL Shading Language
3D Objects in WebGL Loading 3D model files. Announcement Midterm exam on 12/2 –No Internet connection. –Example code and exam questions will be on USB.
Bump Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
OpenGL Vertex Arrays OpenGL vertex arrays store vertex properties such as coordinates, normal vectors, color values and texture coordinates. These properties.
Shapes Digital Image Synthesis Yung-Yu Chuang 10/1/2008 with slides by Pat Hanrahan.
Advanced Texture Mapping Bump Mapping & Environment Mapping (Reflection)
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
The idea (in 2D) texture index position from visible position (float) Geometry positions that corresponds to integer texel positions Change surface position.
Vectors – The Cross Product Lecture 13 Wed, Sep 24, 2003.
Calculus Continued Tangents and Normals Example Find the equations of the tangent and normal to the graph of at the point where.
Extended Work on 3D Lines and Planes. Intersection of a Line and a Plane Find the point of intersection between the line and the plane Answer: (2, -3,
Computer Graphics Imaging
Extras Qs Ex 1: Two cars are travelling on intersecting roads. The first car is travelling northeast at 35 km/h. The second car begins 7 km north of the.
Vectors and the Geometry of Space
Vector-Valued Functions and Motion in Space
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Introduction to Computer Graphics with WebGL
© University of Wisconsin, CS559 Fall 2004
Cross Products Lecture 19 Fri, Oct 21, 2005.
C H A P T E R 3 Vectors in 2-Space and 3-Space
Chapter IX Bump Mapping
Digital Image Synthesis Yung-Yu Chuang 10/4/2005
By the end of Week 3: You would learn how to solve many problems involving lines/planes and manipulate with different coordinate systems. These are.
13.7 day 2 Tangent Planes and Normal Lines
Computer Animation Texture Mapping.
Finding Direction Angles of Vectors
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
Introduction to Computer Graphics with WebGL
Chapter XIV Normal Mapping
Texture mapping - other methods
Advanced Texture Mapping
Texture Mapping Jung Lee.
Basic Assembly Constraints
Presentation transcript:

Bump Map 1

High Field Function: H(u, v) New Normal : N’

Modify Normal 3 Original Surface normal Bump Map ∂H ∂u Gradient T N N’ Modified Normal

Tangent 4 World Space : R 3 Texture Space : R 2 T B U V

5 World Space :∆PTexture Space : (∆u, ∆v) ∆u ∆v T B ∆P Assume Surface is a Plane

Solve The Vector: T, B Triangle vertex position: P 0, P 1, P 2 Triangle vertex texture coordinates : C 0 (U 0, V 0 ), C 1 (U 1, V 1 ), C 2 (U 2, V 2 ) Let vec3 P 10 = P 1 - P 0 vec3 P 20 = P 2 – P 0 vec2 C 10 = C 1 - C 0 = (U 1 -U 0, V 1 -V 0 ) = ( U 10,V 10 ) vec2 C 20 = C 2 – C 0 = (U 2 -U 0, V 2 -V 0 ) = ( U 20,V 20 ) Solve P 10 = U 10 T + V 10 B P 20 = U 20 T + V 20 B

=>

The Code void ComputeTangentBasis( const vec3& P1, const vec3& P2, const vec3& P3, const vec2& UV1, const vec2& UV2, const vec2& UV3, vec3 &tangent, vec3 &bitangent ) { vec3 Edge1 = P2 - P1; vec3 Edge2 = P3 - P1; vec2 Edge1uv = UV2 - UV1; vec2 Edge2uv = UV3 - UV1; float cp = Edge1uv.x * Edge2uv.y – Edge2uv.x * Edge1uv.y; if ( cp != 0.0f ) { float mul = 1.0f / cp; tangent = (Edge1 * Edge2uv.y + Edge2 * -Edge1uv.y) * mul; bitangent = (Edge1 * -Edge2uv.x + Edge2 * Edge1uv.x) * mul; }