You are on page 1of 65

Introduction

3D texture mapping
2D texture mapping
Other forms of texture mapping

Graphics 2011/2012, 4th quarter

Lecture 6
Texture mapping

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Introduction

We already learned a lot:


Vectors, basic geometric entities
Intersection of objects
Matrices, transformations
And some shading

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Motivation

For example, we can . . .


use vectors to represent
points
use 3 points to represent
triangles
use matrix multiplication
to transform them
use our (simple) shading
model to put color on
them

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Motivation

For example, we can . . .


use vectors to represent
points
use 3 points to represent
triangles
use matrix multiplication
to transform them
use our (simple) shading
model to put color on
them

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Motivation

For example, we can . . .


use vectors to represent
points
use 3 points to represent
triangles
use matrix multiplication
to transform them
use our (simple) shading
model to put color on
them

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Motivation

Q: But how do we get the


For example, we can . . . colors in between two vertices?
use vectors to represent
points
use 3 points to represent
triangles
use matrix multiplication to
transform them
use our (simple) shading
model to put color on them

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Linear interpolation
Given two vectors ~a, ~b, linear
interpolation is defined as

p~(t) = (1 − t)~a + t~b

with a (scalar) parameter 0 ≤ t ≤ 1.

Note:
If a, b are scalars and t = 1/2
this is usually refered to as
average ;)
If ~a, ~b are color values (r, g, b),
this gives us a smooth transition
from ~a to ~b
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Linear interpolation to color triangles

With this we can linearly


interpolate color
1 between two vertices
2 between two edges

Q: How to do this efficiently?


What about phong shading?
→ We will learn this in a later
lecture

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Texture mapping
Adding lots of detail to our models to realistically depict skin,
grass, bark, stone, etc., would increase rendering times
dramatically, even for hardware-supported projective methods.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Texture mapping
Adding lots of detail to our models to realistically depict skin,
grass, bark, stone, etc., would increase rendering times
dramatically, even for hardware-supported projective methods.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Basic idea

Basic idea of texture mapping:

Instead of calculating color,


shade, light, etc. for each pixel
we just paste images to our
objects in order to create the
illusion of realism

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Different approaches

3D Object
Different approaches exist,
for example 2D vs. 3D:

2D mapping (aka image textures):


paste an image onto the object

3D mapping (aka solid or volume


textures): create a 3D texture
and ”carve” the object

2D texture ←→ 3D texture

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D texture mapping Linear interpolation
2D texture mapping Texture mapping
Other forms of texture mapping

Outline
1 Introduction
Linear interpolation
Texture mapping
2 3D texture mapping
3D stripe textures
Texture arrays
Solid noise
3 2D texture mapping
Basic idea
Spherical mapping
Triangles
4 Other forms of texture mapping
Bump mapping
Displacement mapping
Environment mapping
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Texturing 3D objects

Let’s start with 3D mapping, which is a procedural approach, i.e.


we use a mathematical procedure to create a 3D texture, i.e.

f (x, y, z) = c with c ∈ R3

Then we use the coordinates of


each point in our 3D model to
calculate the appropriate color
value using that procedure, i.e.

f (xp , yp , zp ) = cp

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures

A simple example:
stripes along the X-axis

stripe( xp , yp , zp )
{
if ( sin xp > 0 )
return color0;
else
return color1;
}
}

Note: any alternating function


will do it (sin is slow)

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures

A simple example:
stripes along the X-axis

stripe( xp , yp , zp )
{
if ( sin xp > 0 )
return color0;
else
return color1;
}
}

Note: any alternating function


will do it (sin is slow)

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures

Stripes along the Z-axis:

stripe( xp , yp , zp )
{
if ( sin zp > 0)
return color0;
else
return color1;
}
}

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures

And what happens here?

stripe( xp , yp , zp )
{
if ( sin xp > 0 & sin zp > 0)
return color0;
else
return color1;
}
}

This looks almost like a


checkerboard, and should come in
handy when working on practical
assignment 1.2

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures
Stripes with controllable
width:

stripe( point p, real width )


{
if ( sin(π xp /width) > 0 )
return color0;
else
return color1;
}
}

Try this at home :)


Note that we do not multiply
but divide by width!

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

3D stripe textures

Smooth variation between two


colors, instead of two distinct
ones:

stripe( point p, real width )


{
t = (1 + sin(π xp /width))/ 2
return (1 - t) c0 + t c1
}

Try this at home :)


Note: if that doesn’t look
familiar, check the slides on
linear interpolation again ;)

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Texture arrays

Again: this is often called solid or volumetric texturing.

It is called procedural because


we compute the color values
for a point p ∈ R3 with a
procedure. Carving vs. array lookup

Alternatively, we can do an
array lookup in a 3D array
(using all three coordinates of
p for indexing),
or in a 2D array (using only
two coordinates of p).

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

2D texture arrays

We’ll call the two dimensions to be mapped u and v,


and assume an nx × ny image as texture.
Then every (u, v) needs to be mapped to a color in the image,
i.e. we need a mapping from pixels to texels.
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

2D texture arrays

A standard way is to remove the integer portion of u and v,


so that (u, v) lies in the unit square.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

2D texture arrays

The pixel (i, j) in the nx × ny image for (u, v) is found by

i = bunx c and j = bvny c

bxc is the floor function that give the highest integer value ≤ x.
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Nearest neighbor interpolation

This is a version of nearest-neighbor interpolation, because we take


the color of the nearest neighbor:

c(u, v) = ci,j with i = bunx c and j = bvny c

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Bilinear interpolation

For smoother effects we may use bilinear interpolation:

c(u, v) =
(1−u0 )(1−v 0 )cij +u0 (1−v 0 )c(i+1)j +(1−u0 )v 0 ci(j+1) +u0 v 0 c(i+1)(j+1)

where u0 = unx − bunx c


and v 0 = vny − bvny c

Notice: all weights are between 0


and 1 and add up to 1, i.e.
(1 − u0 )(1 − v 0 ) + u0 (1 − v 0 ) +
(1 − u0 )v 0 + u0 v 0 = 1

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Trilinear interpolation
Using 2D arrays with bilinear interpolation is easily extended to
using 3D arrays with trilinear interpolation:

c(u, v, w) = (1 − u0 )(1 − v 0 )(1 − w0 )cijk

+u0 (1 − v 0 )(1 − w0 )c(i+1)jk

+...

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Using random noise

So far: rather simple textures


(e.g. stripes).

We can create much more


complex (and realistic)
textures, e.g. resembling
wooden structures.

Or we can create some


randomness by adding noice,
e.g. to create the impression
of a marble like structure.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Perlin noise
Goal: create texture with random appearance, but not too random
(e.g., marble patterns, mottled textures as on birds’ eggs)
1st idea: random color at each point
Problem: too much noise, similar to
“white noise” on TV
2nd idea: smoothing of white noise
Problem: bad results and/or
computationally too expensive
3rd idea: create lattice with random
numbers & interpolate between them
Problem: lattice becomes too obvious
Perlin noise makes lattice less obvious by
using three “tricks” . . .
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Perlin noise

Perlin noise is based on the following ideas:


Use a 1D array of random unit vectors
and hashing to create a virtual 3D
array of random vectors;
Compute the inner product of
(u, v, w)-vectors with the random
vectors
Use Hermite interpolation to get rid of
visible artifacts

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Random unit vectors


Random unit vectors are obtained as follows:

vx = 2ξ − 1
vy = 2ξ 0 − 1
vz = 2ξ 00 − 1
where ξ, ξ 0 , and ξ 00 are random numbers in [0, 1].
Notice that −1 ≤ vi ≤ 1, so we get vectors in the unit cube.

If (vx2 + vy2 + vz2 ) < 1, we


normalize the vector and keep it;
otherwise not. Why?
Perlin reports that an array with
256 such random unit vectors
works well with his technique.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Hashing

We use this 1D array of random unitvectors to create a


(pseudo-)random 3D array of random unitvectors, using the
following hashing function:

Γijk = G(φ(i + φ(j + φ(k))))

where G is our array of n random vectors, and φ(i) = P [i mod n]


where P is an array of length n containing a permutation of the
integers 0 through n − 1.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Hashing

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Hashing

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Perlin noise

Perlin noise is based on the following ideas:


Use a 1D array of random unit
vectors
and hashing to create a virtual
3D array of random vectors;
Compute the inner product of
(u, v, w)-vectors with the
random vectors
Use Hermite interpolation to get
rid of visible artifacts

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Hermite interpolation
With our random vectors and hashing function in place, the noise
value n(x, y, z) for a point (x, y, z) is computed as:

bxc+1 byc+1 bzc+1


X X X
n(x, y, z) = Ωijk (x − i, y − j, z − k)
i=bxc j=byc k=bzc

where
Ωijk (u, v, w) = ω(u)ω(v)ω(w)(Γijk · (u, v, w))

and
2|t|3 − 3|t|2 + 1 if |t| < 1

ω(t) =
0 otherwise
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Hermite interpolation

Characteristics of hermite interpolation


(or “why this creates better noise than linear”):

Linear interpolation: Hermite interpolation:


linear weights, i.e. cubic weights, i.e.
ω∼t ω ∼ t3

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Summary

Perlin noise:
Virtual 3D array &
hashing
Scalar product with
random unit vector
Hermite interpolation

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
3D stripe textures
3D texture mapping
Texture arrays
2D texture mapping
Solid noise
Other forms of texture mapping

Outline
1 Introduction
Linear interpolation
Texture mapping
2 3D texture mapping
3D stripe textures
Texture arrays
Solid noise
3 2D texture mapping
Basic idea
Spherical mapping
Triangles
4 Other forms of texture mapping
Bump mapping
Displacement mapping
Environment mapping
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

2D texture mapping
Now let’s look at 2D mapping,
which maps an image onto an
object (cf. wrapping up a gift)

Instead of a procedural, we use


a lookup-table approach here,
i.e. for each point in our 3D
model, we look up the
appropriate color value in the
image.

How do we do this? Again,


let’s look at some simple
examples.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Spherical texture mapping

How do we map a rectangular image onto a sphere?

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Spherical texture mapping


Example: use world map and sphere to create a globe

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Spherical texture mapping

We have seen the parametric equation of a sphere with radius r


and center c:

x = xc + r cos φ sin θ
y = yc + r sin φ sin θ
z = zc + r cos θ

Given a point (x, y, z) on the surface of the sphere, we can find θ


and φ by

θ = arccos z−z
r
c

φ = arctan x−x
y−yc
c

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Spherical texture mapping


For each point (x, y, z) we have

θ = arccos z−z
r
c

φ = arctan x−x
y−yc
c

Since both u and v must range from [0, 1], and


(θ, φ) ∈ [0, π] × [−π, π], we must convert:

u = φ mod 2π

v = π−θ
π

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Texturing triangles
(0.8, 0.7)
Mapping an image onto a triangle is
done by specifying (u, v) coordinates
for the vertices.

So, our triangle vertices (0.1, 0.9) (0.6, 0.1)


~a = (xa , ya ),
~b = (xb , yb ),
~c = (xc , yc )
become
~a∗ = (ua , va ),
~b∗ = (ub , vb ),
~c∗ = (uc , vc )

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Texturing triangles
Remember that barycentric (0.8, 0.7)
coordinates are very useful for
interpolating over a triangle –
and related textures ;)

p~(β, γ) = ~a + β(~b − ~a) + γ(~c − ~a) (0.1, 0.9) (0.6, 0.1)


now becomes
u(β, γ) = ua + β(ub − ua ) + γ(uc − ua )
v(β, γ) = va + β(vb − va ) + γ(vc − va )

We get the texture coordinates by


linearly interpolating the vertex
coordinates over β, γ for
0 ≤ β + γ ≤ 1.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Texturing triangles
(0.8, 0.7)

Again, we can use bilinear


interpolation to avoid artifacts.

Note that the area and shape of the (0.1, 0.9) (0.6, 0.1)
triangle don’t have to match that of
the mapped triangle.

Also, (u, v) coordinates for the


vertices may lie outside the range
[0, 1] × [0, 1].

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Texturing triangles
Be careful with perspective, because objects further away appear
smaller, so linear interpolation can lead to artifacts:

To avoid this, we have to consider the depth of vertices with


respect to the viewer.
Perspective projection is covered in a later lecture.
Fortunately, this is supported by modern hardware and APIs.
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

MIP-mapping

If viewer is close:
Object gets larger →
Magnify texture
“Perfect” distance:
Not always “perfect” match
(misalignment, etc.)
If viewer is further away:
Object gets smaller → Minify
texture
Problem with minification:
efficiency (esp. when whole
texture is mapped onto one pixel!)

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

MIP-mapping

Solutions: MIP maps


Pre-calculated, optimized
collections of images based
on the original texture
Dynamically chosen based on
depth of object (relative to
viewer)
Supported by todays
hardware and APIs

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Basic idea
3D texture mapping
Spherical mapping
2D texture mapping
Triangles
Other forms of texture mapping

Outline
1 Introduction
Linear interpolation
Texture mapping
2 3D texture mapping
3D stripe textures
Texture arrays
Solid noise
3 2D texture mapping
Basic idea
Spherical mapping
Triangles
4 Other forms of texture mapping
Bump mapping
Displacement mapping
Environment mapping
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Bump mapping
One of the reasons why we apply
texture mapping:
Real surfaces are hardly flat but
often rough and bumpy. These
bumps cause (slightly) different
reflections of the light.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Bump mapping

Instead of mapping an image or noise


onto an object, we can also apply a
bump map, which is a 2D or 3D
array of vectors. These vectors are
added to the normals at the points
for which we do shading calculations.

The effect of bump mapping is an


apparent change of the geometry of
the object.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Bump mapping
Major problems with bump mapping: silhouettes and shadows

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Displacement mapping

To overcome this shortcoming, we


can use a displacement map. This is
also a 2D or 3D array of vectors, but
here the points to be shaded are
actually displaced.
Normally, the objects are refined
using the displacement map, giving
an increase in storage requirements.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Displacement mapping

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Environment mapping
Let’s look at image textures again:

If we can map an image of the environment to an object ...


Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Environment mapping

... why not use this to make objects


appear to reflect their surroundings
specularly?

Idea: place a cube around the object,


and project the environment of the
object onto the planes of the cube in
a preprocessing stage; this is our
texture map.

During rendering, we compute a


reflection vector, and use that to
look-up texture values from the cubic
texture map.
Graphics 2011/2012, 4th quarter Lecture 06: texture mapping
Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Environment mapping

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

And now?
In case you didn’t notice: it’s halftime :)

. . . so let’s sit back and have a


break before we continue.

Lifted, copyrighted by Pixar/Disney


(but you find various versions of it on YouTube)

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

What’s next?
The midterm exam!

Time and date:


Friday, 25.5.11
9:00 - 12:00 h
Zaal: EDUC-GAMMA

Note: no responsibility is taken for the correctness of this


information. For final information about time and room see
http://www.cs.uu.nl/education/vak.php?vak=INFOGR

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

The midterm exam


What do I have to do?

Come in time
Bring a pen (no pencil)
Bring your student id
And know the answers ;)

Note: You may not use books, notes, or any electronic equipment
(including cell phones!).

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

The midterm exam


The exam covers lectures 1-5 and tutorials 1-3.

If you ...
... followed the lectures
... read the textbook
... and actively did the
exercises

... you should be fine.

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping


Introduction
Bump mapping
3D texture mapping
Displacement mapping
2D texture mapping
Environment mapping
Other forms of texture mapping

Important dates

Today (Tue, 15.5.)


Only one tutorial (room 61)
Thu, 17.5.
No tutorial and lecture (holiday)
Tue, 22.5.
Lecture 7 and “Thursday tutorial”
Thu, 24.5.
No tutorial(?) and lecture
Fri, 25.5.
Midterm exam

Graphics 2011/2012, 4th quarter Lecture 06: texture mapping

You might also like