0% found this document useful (0 votes)
67 views20 pages

Texture and Bump Mapping

The document discusses texture mapping and bump mapping techniques in computer graphics. Texture mapping involves applying color patterns to surfaces, while bump mapping adds roughness. Various texture mapping methods are described, including two-part mapping involving an intermediate surface. Bump mapping perturbs surface normals to simulate roughness.

Uploaded by

nasrala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views20 pages

Texture and Bump Mapping

The document discusses texture mapping and bump mapping techniques in computer graphics. Texture mapping involves applying color patterns to surfaces, while bump mapping adds roughness. Various texture mapping methods are described, including two-part mapping involving an intermediate surface. Bump mapping perturbs surface normals to simulate roughness.

Uploaded by

nasrala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Department of Applied Mathematics

and Computational Sciences


University of Cantabria
UC-CAGD Group

TEXTURE AND BUMP MAPPING


Andrs Iglesias
e-mail: iglesias@unican.es
Web pages: http://personales.unican.es/iglesias
http://etsiso2.macc.unican.es/~cagd

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

COMPUTER-AIDED GEOMETRIC DESIGN


AND COMPUTER GRAPHICS:

Texture
Motivation

My God! We wont
finish the wall in time.
They arrive before, and
well die!!! What can I
do alone?

I have a trick!! We only


need to apply a single textured
polygon. Something like this:

1 brick,
2 bricks,
3 bricks,
....

Dont
worry!
Im so
strong...

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Today, were going to build


a brick wall. It is easy! Each
ant must take a brick like
this
With some
hundreds of ants well finish
the wall before the battle.
Come on!

Texture
In computer graphics, the fine surface detail on an object is
generated using textures.
Three aspects of texture are generally considered:

Also known as patterns or colour detail


2. Bump mapping: the addition of roughness to
the surface. This is obtained perturbation function
that changes the geometry of the surface.
Also known as roughness
3. Simulating environments: for example, shadows
and lighting using textures.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

1. Texture mapping: the addition of a separately


specified pattern to a smooth surface. After the
pattern is added, the surface remains smooth.

Texture
Texture mapping
The basis of adding texture patterns is mapping:

Texture Space
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Object Space

(u,v)

zo

(xo, yo, zo)


xo

u
yo

Image Space
(xs, ys)

ys
xs

Texture
Texture mapping
Object space mapping:

We map an image onto the surface of an object.

Texture pattern defined in an


orthogonal coordinate system
(u,v) in texture space

The surface is defined in a second


orthogonal coordinate system (x,y,z)
represented in a parametric space

The surface is represented in parametric space (s,t) as: x(s,t), y(s,t), z(s,t)

Therefore, we need to determine the mapping function between the


texture space and the parametric space:

s=f(u,v) , t=g(u,v)
The inverse mapping from parametric space to texture space is:

u=F(s,t) , v=G(s ,t)


2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture mapping
Texture Space

Object Space

Given a particular (x,y,z):


Compute the corresponding (u,v)
shade the surface with the colour pointed to in the image by (u,v)
u=0
v=1

zo

u=1
v=1

u=0
v=1

u=1
v=1

u=1
v=0
u=0
v=0

xo

u
u=0,v=0

yo

u=0
v=0

Texture
Texture mapping
Mapping functions:

s=f(u,v) , t=g(u,v)

s=A u+B
The mapping functions are frequently assumed to be linear: t=C v+D
where the constants A, B, C and D are obtained from the relationship
between known points in the two systems.
zo

zo

u=0
v=1

u=1
v=1

u=1
v=0

xo
yo

u=0
v=0

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

xo
yo

Texturized surface

Texture
Comparing models
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Wireframe surface

Smooth surface

Flat surface

Texturized surface

Texture
Texture mapping
However, linear mapping functions may lead to unsatisfactory results.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Its better to use nonlinear functions (because the mapping between


parametric space and object space is nonlinear).

Texture Space

Object Space

Texture
Texture mapping
Bier, E.A., Sloan, K.R. Two-part Texture Mappings, IEEE Comput. Graph. and Appl.,
Vol. 6, N 9, pp. 40-53, 1986.

Two-part mapping

First, mapping the texture image onto a simple three-dimensional


surface (a plane, a cylinder, a sphere or a box). This is known as
the S mapping.
Then mapping the result onto the final three-dimensional surface.
This is referred to as the O mapping.

(u,v)
Texture Space

T(xi, yi)

Intermediate space

O(xs, ys, zs)


Object space

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Overcomes the mapping problems introducing an easy intermediate


surface.

Texture
Texture mapping
Two-part mapping
For the S mapping the authors described four intermediate surfaces:
1.- A plane at any orientation
To align the texture with the plane
require:

3 rotations + 3 translations
Then, the pattern must be scaled.
Ignoring rotations and translations,
the transformation is given by:

(u,v)
(a xi ,d yi)
a, d - scaling factors
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Image from: SIGGRAPH97 R. J. Wolfe (DePaul University)

Texture
Texture mapping
Two-part mapping
2.- The curved surface of a cylinder (Useful for surfaces of revolution)
where a, d are scaling factors, and
(u,v)
[a r (0) ,d (h-h0)]
0 and h0 position the texture on the
surface of the cylinder of radius r.

Images from: SIGGRAPH97 R. J. Wolfe (DePaul University)

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture
Texture mapping
Two-part mapping

where (, ) are the equatorial and


polar variables for the sphere and:

3.- The surface of a sphere


Using the stereographic projection:

(u,v)=(2p/C,2q/C)

(, )

Images from: SIGGRAPH97 R. J. Wolfe (DePaul University)

C=1+sqrt(1+p2+q2)
p=tan()cos() , q=tan()cos()

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture
Texture mapping
Two-part mapping
4.- The faces of a cube
Interesting enough, since a box is topologically equivalent to an sphere.

Images from: SIGGRAPH97 R.J. Wolfe (DePaul University)

Shortcoming: nonadjacent pieces of the texture are now adjacent both on the box
surface and the final three-dimensional surface, leading to possible discontinuities.
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture
Texture mapping
Two-part mapping
For the O mapping we also have four mapping techniques (which map
the texture from the intermediate surface to the object):
Reflected ray: trace a ray from the viewpoint of the object and then trace the
resulting reflected ray from the object to the intermediate surface. This is in
fact the environment mapping.
Object normal: find the intersection of the normal to the object surface with
the intermediate surface.
Object centroid: intersect the line defined by the centroid of the object and
a point on the object surface with the intermediate surface.
Intermediate surface normal (ISN): trace a ray in the direction of the normal
at a point on the intermediate surface to find its intersection with the object.
Reflected ray is ignored because is viewpoint dependent and not very useful.
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Texture
plane

sphere

cylinder

box

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Images from: SIGGRAPH97 R.J. Wolfe (DePaul University)

Two-part mapping three O mapping x four S mapping = 12 combinations

Texture
Texture mapping
Two-part mapping

Rogers, D.F.. Procedural Elements for Computer Graphics,


2nd. Edition, McGraw-Hill, Boston, 1998.

However, only five mappings are really useful:

Plane

Cylinder

Sphere

Box

Object normal

Redundant

Poor

OK

OK

Object centroid

Redundant

Poor

I.S.N.

slide projector

shrinkwrap

centroid/sphere centroid/box

Redundant

ISN/box

Commercial software already incorporates two-part mapping techniques:

Painter 3D

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Amorphium
Flat
Cylindrical
Spherical

Texture
Bump mapping
Adding texture patterns to smooth surfaces produces smooth surfaces.
Using a rough-textured pattern to add the appearance of roughness to a surface
is not a good idea. Rough-textured surfaces hava a small random component in
the surface normal and hence in the light reflection direction.

Blinn developed a method to for perturbing the surface normal.


At any point of the surface S, the partial derivatives are Su and Sv. The surface
normal n is given by the cross-product: n = Su x Sv
Blinn defined a new surface S as: S(u,v) = S(u,v) + P(u,v)

n
|n|

where P(u,v) is a perturbation function in the direction of the normal to the


original surface. The new normal vector is: n = Su x Sv

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Blinn, J.F., A scan line algorithm for the computer display of parametrically defined
surfaces, Comput. Graph., Vol. 12, 1978 (supplement SIGGRAPH78).

Texture
Bump mapping
n = n +

Pu (n x Sv )
P (S x n)
+ v u
|n|
|n|

normal of the effect of the perturbation on the


unperturbed surface normal (hence, on the
surface
illumination model)
The perturbation P(u,v) can be defined either analytically or as a lookup table.

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

Different effects can be achieved: smoother functions give more regular feature
random function gives rough surface

Image from: SIGGRAPH97 R.J. Wolfe (DePaul University)

The perturbed normal


can be written as:

Texture
Bump mapping
An example:

Note that: Roughening only becomes apparent


Examples of use:
the surface of an orange
texture of a granitic stone
granulated effects
outer cover of a tyre
etc...
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

when the shading model is applied

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy