0% found this document useful (0 votes)
14 views

Texture Mapping

Texture mapping involves mapping an image onto a 3D object's surface to add surface detail. It works by assigning texture coordinate values (u,v) to vertices and interpolating between them. MIP maps store multiple texture resolutions and allow smooth level of detail as objects move farther away. Texture mapping can add realism and reduce geometric complexity.

Uploaded by

Zhang Xu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Texture Mapping

Texture mapping involves mapping an image onto a 3D object's surface to add surface detail. It works by assigning texture coordinate values (u,v) to vertices and interpolating between them. MIP maps store multiple texture resolutions and allow smooth level of detail as objects move farther away. Texture mapping can add realism and reduce geometric complexity.

Uploaded by

Zhang Xu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Texture Mapping

L20: 1
Why texture?

Detail is expensive to model!


Often the surface of an object is viewed
only from a distance!
We can ‘paint’ the detail on the object
instead of increasing the complexity of
the object

L20: 2
L20: 3
L20: 4
How is it done?

As we draw each pixel of a surface, we


get the local colour from the texture
image.!
So we need a coordinate system on the
surface to find the right part of the
texture.

L20: 5
Just use x, y?

L20: 6
u, v Mapping

L20: 7
Remember shading and normals?

Each vertex carries shading and/or


normal vector values for interpolation.!
Give each vertex u, v values too.!
The interpolation can be done by
software or hardware.

L20: 8
Scan-line interpolation
a

b
p
us u!s
Scan line y = s

us = ub+(uc-ub)(s - by)/(cy - by)!


similarly u!s and up, vp
c
L20: 9
Ways to get u, v

L20: 10
Parametric surfaces

L20: 11
Different uses of texture

L20: 12
Environment maps
Raytraced?

L20: 13
Bump mapping

L20: 14
Bump Mapping Examples

L20: 15
Texture mapping: potential probs.

Undersampling: one pixel maps to an


area covering many texture pixels
(texels)!
Oversampling: many pixels map to an
area contained by only one texel.

L20: 16
Oversampling

L20: 17
Oversampling

L20: 18
Undersampling

L20: 19
20
Undersampling? Use prefiltering

L20: 21
MIP Maps

L20: 22
Multum in Parvo

Start with most detailed texture!


Reduce to half size by combining
(averaging) adjacent four texels!
Continue to minimum!
Choose texture level according to
distance
L20: 23
Can also blend levels

L20: 24
Example

L20: 25
MIPmaps are nifty:

Binary tree contains twice as many


nodes as leaves!
MIPmap is a tree with branch ratio of 4!
MIPmap uses about 34% more memory
than raw texture!
Hardware support through GLU
L20: 26
FYI: scaling level of detail (LoD)
Analogy to MIPmaps:
change geometry with
distance! “impostors”!
Far distance: cubes!
Nearer: “billboards”!
Finally use geometry

L20: 27
Surface and volume texture

2D 3D
L20: 28
L20: 29
Functional Textures

L20: 30

You might also like