SlideShare una empresa de Scribd logo
1 de 35
Texture






Motivation: to model realistic objects need
surface detail: wood grain, stone roughness,
scratches that affect shininess, grass, wall
paper.
Use geometry, model surface detail with
polygons; good for large scale detail, too
expensive otherwise.
Improvement: map an image of the details
onto simple geometry
1
The wall

2
The wall

3
The Wall: Brick

4
The Wall: Checkers

5
Texture Mapping
y
z

x

geometry

t

screen

image
s

6
Texture Mapping


Images and geometry flow through
separate pipelines that join at the
rasterizer


“complex” textures do not affect geometric
complexity

vertices

geometry pipeline
rasterizer

image

pixel pipeline
7
Texture mapping




Texture mapping: adding surface detail by
mapping texture patterns to the surface
Technique developed by Catmull (1974), Blinn
and Newell (1976).

8
Texture mapping methods







2D texture mapping: paint 2D pattern
onto the surface
Environmental (reflection) mapping
Bump mapping: Disturb surface normal
to fool shading algorithms
Procedural texture mapping, 3D texture

9
More Examples

10
Environment Mapping

11
2D texture mapping overview
Texture array is a 2D image pattern
 With elements texels
 Value at a texel affects surface
appearance
 The “texture map” determines how the
pattern lies on the surface

12
2D texture mapping overview
Rendering uses the texture mapping
 Find surface that is front most at current pixel
 Find the surface patch corresponding to the
pixel
 Find the part of the texture pattern
corresponding to the surface patch
 Use that part of the texture pattern in setting
the pixel color
13
14
2D texture mapping







Source: 2D pattern from drawing, photo,
procedure
Destination: any surface, easier if surface
given in parametric form
The map from 2D texture coord; to 3D object
Texture mapping transformation: 2D screen
coord;  3D object coord;  2D texture
coord; and back (see previous slide)

15
Mapping the 2D texture to the surface







The map: 2D texture(s,t)  3D object(x,y,z)
Mapping onto triangle is not difficult
Mapping onto triangular mesh is more difficult
(have to handle texture discontinuity)
Mapping onto parametric surface is easier
Alternative: use an intermediate parametric
surface (cylinder, sphere)

16
Mapping a Texture



t
0, 1

Based on parametric texture coordinates
glTexCoord*() specified at each vertex
Texture Space
1, 1

(s, t) = (0.2, 0.8)
A

a

b
0, 0

Object Space

c

(0.4, 0.2)
B
1, 0

s

C
(0.8, 0.4)
17
Mapping texture onto parametric surface


Point on the parametric surface

p : x = x(u , v), y = y (u , v), z = z (u , v)

18
Mapping texture onto parametric surface using
liner map



The map from texture to the parametric
coord using invertible linear map between
the texture space (s,t) and the domain (u,v)

p : x = x(u , v), y = y (u , v), z = z (u , v)

u = as + bt + c
v = ds + et + f
19
Mapping texture onto parametric surface,
example

Does not take into account curvature of surface
Equal size texture patches are stretched to fit various areas

20
Mapping texture to a surface using an
intermediate surface


Two-step mapping




Map the texture to a simple intermediate
surface (sphere, cylinder, cube)
Map the intermediate surface (with the
texture) onto the surface being rendered

21
Two-step mapping example

parametric form cylinder: x = r cos(2 PI u)
y = r sin(2 PI u)
z=vh
0<=u,v<=1
first step: u = s, v = t
• sphere
• cube
•

22
Two-step mapping example

Second-step: map intermediate surface to the
surface being rendered
• Various strategies: a, b, c
•

23
The texture mapping transformation

24
Texture mapping transformation

Consider surface visible at current pixel.
Find the patch on the surface that corresponds to it.
•Map screen coord of pixel corners back to object
•Find texels that map to the surface patch
•If multiple texels lie on patch combine them:
weighted avg; supersampling with postfiltering
25
2DTexture mapping in OpenGL
Pixel pipeline

Texture map done at rasterization stage
26
Environment Mapping

Yoshihiro Mizutani and
Kurt Reindel
27
Environment Mapping II




Put texture on a highly reflective object
by picking up texture from the
environment in which the object is
absorbed/occupied.
Realized as two-step process




Project the environment (excluding the
object) onto an intermediate surface.
Place object back, and map texture from
intermediate surface to object

28
Environment Mapping III: methods




Sphere mapping
Cube mapping

29
Sphere Mapping



Blinn and
Newell’s method:
for each environment mapped
pixel compute the (viewer)
reflection vector

Technical Brief: Perfect
reflections and Specular ….

30
Cubic mapping


Introduced by Greene in 1986.


Put a camera in the environment center and then
project the environment onto the sides of a cube
centered at the camera position.

31
BUMP Mapping


Bump mapping is a technique in computer graphics for
simulating bumps and wrinkles on the surface of an object. This
is achieved by perturbing the surface normal of the object and
using the perturbed normal during lighting calculations. The
result is an apparently bumpy surface rather than a smooth
surface although the surface of the underlying object is not
actually changed. Bump mapping was introduced by Blinn in
1978.

32
Bump mapping




2D Texture map creates odd looking rough
surfaces
Bump mapping: texture map that alters
surface normals.





Use texture array to set a function which perturbs
surface normals
Altered normals match a bumpy surface
Applying illumination model to the new normals
shades the bumps correctly
33
Bump mapping
Bump map is in texture array: d(s,t) << 1
• p point on the surface corresponding to texture
coordinates s,t.
• N the normal at p
• p’
the bump point for p
p’ = p + d(s,t)N
We actually do not “bump” the surface, just the
normal at p .
• N’ the normal at p’ . This normal used by the
illumination model at p .
•

34
Bump mapping

How to get N’ :
• given two vectors tangent to the bumpy
surface, N’ is their cross product
• The two vectors follow from the partial
derivatives of the p’ equation wrt u,v
p’ = p + d(s,t)N
These partial derivatives expressed in terms
of the derivatives of d(s,t) as s,t change
•

35

Más contenido relacionado

La actualidad más candente

COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"Ankit Surti
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer GraphicsSanu Philip
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface DetectionAmitBiswas99
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_openglManas Nayak
 
illumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukarillumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukarsyedArr
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unitaravindangc
 
Animation in Computer Graphics
Animation in Computer GraphicsAnimation in Computer Graphics
Animation in Computer GraphicsRinkuNahar
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversionMohd Arif
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmJyotiraman De
 
Scan line method
Scan line methodScan line method
Scan line methodPooja Dixit
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewingRabin BK
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
3D Display Method
3D Display Method3D Display Method
3D Display MethodKhaled Sany
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer GraphicsSanu Philip
 

La actualidad más candente (20)

COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
 
visible surface detection
visible surface detectionvisible surface detection
visible surface detection
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface Detection
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
 
illumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukarillumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukar
 
Polygon mesh
Polygon  meshPolygon  mesh
Polygon mesh
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
 
3 d display methods
3 d display methods3 d display methods
3 d display methods
 
Animation in Computer Graphics
Animation in Computer GraphicsAnimation in Computer Graphics
Animation in Computer Graphics
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Scan line method
Scan line methodScan line method
Scan line method
 
Shading methods
Shading methodsShading methods
Shading methods
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewing
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
3D Display Method
3D Display Method3D Display Method
3D Display Method
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 

Destacado

Texture mapping
Texture mappingTexture mapping
Texture mappingLexikehl
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
DPI 1 and DPI 2 Texture Mapping
DPI 1 and DPI 2 Texture MappingDPI 1 and DPI 2 Texture Mapping
DPI 1 and DPI 2 Texture MappingMrLawler
 
Abbott's Textual Analysis : Software Engineering 2
Abbott's Textual Analysis : Software Engineering 2Abbott's Textual Analysis : Software Engineering 2
Abbott's Textual Analysis : Software Engineering 2wahab13
 
A visualization-oriented 3D method for efficient computation of urban solar r...
A visualization-oriented 3D method for efficient computation of urban solar r...A visualization-oriented 3D method for efficient computation of urban solar r...
A visualization-oriented 3D method for efficient computation of urban solar r...Jianming Liang
 
Multi Degree Spline
Multi Degree SplineMulti Degree Spline
Multi Degree SplineNikhil Tare
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10fungfung Chen
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2Sisir Ghosh
 

Destacado (20)

Texture mapping
Texture mappingTexture mapping
Texture mapping
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
DPI 1 and DPI 2 Texture Mapping
DPI 1 and DPI 2 Texture MappingDPI 1 and DPI 2 Texture Mapping
DPI 1 and DPI 2 Texture Mapping
 
Abbott's Textual Analysis : Software Engineering 2
Abbott's Textual Analysis : Software Engineering 2Abbott's Textual Analysis : Software Engineering 2
Abbott's Textual Analysis : Software Engineering 2
 
A visualization-oriented 3D method for efficient computation of urban solar r...
A visualization-oriented 3D method for efficient computation of urban solar r...A visualization-oriented 3D method for efficient computation of urban solar r...
A visualization-oriented 3D method for efficient computation of urban solar r...
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Multi Degree Spline
Multi Degree SplineMulti Degree Spline
Multi Degree Spline
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
 
Ch03lect2 ud
Ch03lect2 udCh03lect2 ud
Ch03lect2 ud
 
Ch07lect1 ud
Ch07lect1 udCh07lect1 ud
Ch07lect1 ud
 
Ch03lect1 ud
Ch03lect1 udCh03lect1 ud
Ch03lect1 ud
 
Ch05lect1 ud
Ch05lect1 udCh05lect1 ud
Ch05lect1 ud
 
Ch08lect2 ud
Ch08lect2 udCh08lect2 ud
Ch08lect2 ud
 
Ch08lect3 ud
Ch08lect3 udCh08lect3 ud
Ch08lect3 ud
 
Ch09lect2 ud
Ch09lect2 udCh09lect2 ud
Ch09lect2 ud
 
Ch09lect1 ud
Ch09lect1 udCh09lect1 ud
Ch09lect1 ud
 
Ch08lect1 ud
Ch08lect1 udCh08lect1 ud
Ch08lect1 ud
 
Ch02lect1 ud
Ch02lect1 udCh02lect1 ud
Ch02lect1 ud
 
Ch01lect1 ud
Ch01lect1 udCh01lect1 ud
Ch01lect1 ud
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 

Similar a Texture mapping

Bump Mapping Unparametrized Surfaces on the GPU
Bump Mapping Unparametrized Surfaces on the GPUBump Mapping Unparametrized Surfaces on the GPU
Bump Mapping Unparametrized Surfaces on the GPUBrooke Hodgman
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - TexturesMichael Heron
 
ImageSegmentation (1).ppt
ImageSegmentation (1).pptImageSegmentation (1).ppt
ImageSegmentation (1).pptNoorUlHaq47
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.pptAVUDAI1
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.pptDEEPUKUMARR
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determinationPatel Punit
 
Localization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometricLocalization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometricIAEME Publication
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxyaswanthnaik27
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUEScscpconf
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfnagwaAboElenein
 
Interactive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space TechniquesInteractive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space Techniquescodevania
 
Stixel based real time object detection for ADAS using surface normal
Stixel based real time object detection for ADAS using surface normalStixel based real time object detection for ADAS using surface normal
Stixel based real time object detection for ADAS using surface normalTaeKang Woo
 
Math behind the kernels
Math behind the kernelsMath behind the kernels
Math behind the kernelsRevanth Kumar
 
The uplift model terrain generator
The uplift model terrain generatorThe uplift model terrain generator
The uplift model terrain generatorijcga
 
Part 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptxPart 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptxKhalil Alhatab
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxKhalil Alhatab
 
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)Mark Kilgard
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptxshubham loni
 

Similar a Texture mapping (20)

Normal mapping
Normal mappingNormal mapping
Normal mapping
 
Bump Mapping Unparametrized Surfaces on the GPU
Bump Mapping Unparametrized Surfaces on the GPUBump Mapping Unparametrized Surfaces on the GPU
Bump Mapping Unparametrized Surfaces on the GPU
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - Textures
 
ImageSegmentation (1).ppt
ImageSegmentation (1).pptImageSegmentation (1).ppt
ImageSegmentation (1).ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Localization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometricLocalization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometric
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptx
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
Interactive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space TechniquesInteractive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space Techniques
 
Stixel based real time object detection for ADAS using surface normal
Stixel based real time object detection for ADAS using surface normalStixel based real time object detection for ADAS using surface normal
Stixel based real time object detection for ADAS using surface normal
 
Math behind the kernels
Math behind the kernelsMath behind the kernels
Math behind the kernels
 
The uplift model terrain generator
The uplift model terrain generatorThe uplift model terrain generator
The uplift model terrain generator
 
Part 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptxPart 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptx
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptx
 
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
 

Último

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 

Último (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Texture mapping

  • 1. Texture    Motivation: to model realistic objects need surface detail: wood grain, stone roughness, scratches that affect shininess, grass, wall paper. Use geometry, model surface detail with polygons; good for large scale detail, too expensive otherwise. Improvement: map an image of the details onto simple geometry 1
  • 7. Texture Mapping  Images and geometry flow through separate pipelines that join at the rasterizer  “complex” textures do not affect geometric complexity vertices geometry pipeline rasterizer image pixel pipeline 7
  • 8. Texture mapping   Texture mapping: adding surface detail by mapping texture patterns to the surface Technique developed by Catmull (1974), Blinn and Newell (1976). 8
  • 9. Texture mapping methods     2D texture mapping: paint 2D pattern onto the surface Environmental (reflection) mapping Bump mapping: Disturb surface normal to fool shading algorithms Procedural texture mapping, 3D texture 9
  • 12. 2D texture mapping overview Texture array is a 2D image pattern  With elements texels  Value at a texel affects surface appearance  The “texture map” determines how the pattern lies on the surface 12
  • 13. 2D texture mapping overview Rendering uses the texture mapping  Find surface that is front most at current pixel  Find the surface patch corresponding to the pixel  Find the part of the texture pattern corresponding to the surface patch  Use that part of the texture pattern in setting the pixel color 13
  • 14. 14
  • 15. 2D texture mapping     Source: 2D pattern from drawing, photo, procedure Destination: any surface, easier if surface given in parametric form The map from 2D texture coord; to 3D object Texture mapping transformation: 2D screen coord;  3D object coord;  2D texture coord; and back (see previous slide) 15
  • 16. Mapping the 2D texture to the surface      The map: 2D texture(s,t)  3D object(x,y,z) Mapping onto triangle is not difficult Mapping onto triangular mesh is more difficult (have to handle texture discontinuity) Mapping onto parametric surface is easier Alternative: use an intermediate parametric surface (cylinder, sphere) 16
  • 17. Mapping a Texture   t 0, 1 Based on parametric texture coordinates glTexCoord*() specified at each vertex Texture Space 1, 1 (s, t) = (0.2, 0.8) A a b 0, 0 Object Space c (0.4, 0.2) B 1, 0 s C (0.8, 0.4) 17
  • 18. Mapping texture onto parametric surface  Point on the parametric surface p : x = x(u , v), y = y (u , v), z = z (u , v) 18
  • 19. Mapping texture onto parametric surface using liner map  The map from texture to the parametric coord using invertible linear map between the texture space (s,t) and the domain (u,v) p : x = x(u , v), y = y (u , v), z = z (u , v) u = as + bt + c v = ds + et + f 19
  • 20. Mapping texture onto parametric surface, example Does not take into account curvature of surface Equal size texture patches are stretched to fit various areas 20
  • 21. Mapping texture to a surface using an intermediate surface  Two-step mapping   Map the texture to a simple intermediate surface (sphere, cylinder, cube) Map the intermediate surface (with the texture) onto the surface being rendered 21
  • 22. Two-step mapping example parametric form cylinder: x = r cos(2 PI u) y = r sin(2 PI u) z=vh 0<=u,v<=1 first step: u = s, v = t • sphere • cube • 22
  • 23. Two-step mapping example Second-step: map intermediate surface to the surface being rendered • Various strategies: a, b, c • 23
  • 24. The texture mapping transformation 24
  • 25. Texture mapping transformation Consider surface visible at current pixel. Find the patch on the surface that corresponds to it. •Map screen coord of pixel corners back to object •Find texels that map to the surface patch •If multiple texels lie on patch combine them: weighted avg; supersampling with postfiltering 25
  • 26. 2DTexture mapping in OpenGL Pixel pipeline Texture map done at rasterization stage 26
  • 28. Environment Mapping II   Put texture on a highly reflective object by picking up texture from the environment in which the object is absorbed/occupied. Realized as two-step process   Project the environment (excluding the object) onto an intermediate surface. Place object back, and map texture from intermediate surface to object 28
  • 29. Environment Mapping III: methods   Sphere mapping Cube mapping 29
  • 30. Sphere Mapping  Blinn and Newell’s method: for each environment mapped pixel compute the (viewer) reflection vector Technical Brief: Perfect reflections and Specular …. 30
  • 31. Cubic mapping  Introduced by Greene in 1986.  Put a camera in the environment center and then project the environment onto the sides of a cube centered at the camera position. 31
  • 32. BUMP Mapping  Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object. This is achieved by perturbing the surface normal of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a smooth surface although the surface of the underlying object is not actually changed. Bump mapping was introduced by Blinn in 1978. 32
  • 33. Bump mapping   2D Texture map creates odd looking rough surfaces Bump mapping: texture map that alters surface normals.    Use texture array to set a function which perturbs surface normals Altered normals match a bumpy surface Applying illumination model to the new normals shades the bumps correctly 33
  • 34. Bump mapping Bump map is in texture array: d(s,t) << 1 • p point on the surface corresponding to texture coordinates s,t. • N the normal at p • p’ the bump point for p p’ = p + d(s,t)N We actually do not “bump” the surface, just the normal at p . • N’ the normal at p’ . This normal used by the illumination model at p . • 34
  • 35. Bump mapping How to get N’ : • given two vectors tangent to the bumpy surface, N’ is their cross product • The two vectors follow from the partial derivatives of the p’ equation wrt u,v p’ = p + d(s,t)N These partial derivatives expressed in terms of the derivatives of d(s,t) as s,t change • 35

Notas del editor

  1. Motivation: -- object/picture often has parts -- model once/instantiate multiple times -- modify only a part
  2. Textures are images that can be thought of as continuous and be one, two, three, or four dimensional. By convention, the coordinates of the image are s, t, r and q. Thus for the two dimensional image above, a point in the image is given by its (s, t) values with (0, 0) in the lower-left corner and (1, 1) in the top-right corner. A texture map for a two-dimensional geometric object in (x, y, z) world coordinates maps a point in (s, t) space to a corresponding point on the screen.
  3. The advantage of texture mapping is that visual detail is in the image, not in the geometry. Thus, the complexity of an image does not affect the geometric pipeline (transformations, clipping) in OpenGL. Texture is added during rasterization where the geometric and pixel pipelines meet.
  4. Contouring: 1D texture Contour curves drawn on an object can provide valuable information about the object&apos;s geometry. Such curves may represent height above some plane (as in a topographic map) that is either fixed or moves with the object [Sabella 88]. Alternatively, the curves may indicate intrinsic surface properties, such as geodesics or loci of constant curvature. Contouring is achieved with texture mapping by first defining a one-dimensional texture image that is of constant color except at some spot along its length. Then, texture coordinates are computed for vertices of each polygon in the object to be contoured using a texture coordinate generation function. This function may calculate the distance of the vertex above some plane (Figure 4), or may depend on certain surface properties to produce, for instance, a curvature value. Modular arithmetic is used in texture coordinate interpolation to effectively cause the single linear texture image to repeat over and over. The result is lines across the polygons that comprise an object, leading to contour curves. A two-dimensional (or even three-dimensional) texture image may be used with two (or three) texture coordinate generation functions to produce multiple curves, each representing a different surface characteristic. Environment Mapping
  5. When you want to map a texture onto a geometric primitive, you need to provide texture coordinates. The glTexCoord*() call sets the current texture coordinates. Valid texture coordinates are between 0 and 1, for each texture dimension, and the default texture coordinate is ( 0, 0, 0, 1 ). If you pass fewer texture coordinates than the currently active texture mode ( for example, using glTexCoord1d() while GL_TEXTURE_2D is enabled ), the additionally required texture coordinates take on default values.