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

3 Texture Representations

Uploaded by

xaniho5780
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)
10 views

3 Texture Representations

Uploaded by

xaniho5780
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/ 38

Texture Representations

Instructor:
Evangelos Kalogerakis
Graphics Representations
Part I: Image representations
Part II: Shape representations
• Polygon Meshes
• Parametric Surfaces
• Voxel grids or adaptive grids (octrees)
• Point clouds
• Implicit functions
Part III: Textures
Textures: add visual details
Make a surface look more colorful and realistic!
One option is to ...
Set material color per vertex for meshes
(or per voxel in voxel grids, or per point in point clouds...)
High-res texture, low-res geometry
Let’s say you want to design a crate
High-res texture, low-res geometry
If you set a material color per vertex, you’ll get this:
High-res texture, low-res geometry
Texture and geometry resolution do not necessarily coincide.
High-res texture, low-res geometry
In fact, it is NOT necessary to have a highly detailed
polygon mesh. Designing accurate geometry is hard!
High-res texture, low-res geometry
BUT you can have high-res textures based on photos or
image editing. This is the key to success in many games.
Where do textures come from?
Usually photographs or synthesized images e.g.:

wood metal
Advantages of using 2D images as textures...

Easy to find/store/edit 2D images,


easily change surface appearance
Advantages of using 2D images as textures...

Also easily animate surface appearance.

A fountain in the game “World of


Warcraft”
Problem: mapping between 2D and 3D…
However, images are defined in 2D. Our shapes are 3D.

2D textures 3D model
We need a way to flatten a 3D
surface...

Polygon Mesh
We need a way to flatten a 3D
surface...

Polygon Mesh Flattened mesh


every vertex now is associated
with a 2D coordinate in image
(texture space)
We need a way to flatten a 3D
surface...

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a 2D coordinate in image
(texture space)
The reason I showed Mr Checkerboard
... is that flattening a mesh causes distortions!
(note: unless your mesh is a developable surface)

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a color from the 2D
checkerboard image
Angle Distortions
In texture space, all corners had right angles...

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a color from the 2D
checkerboard image
Angle Distortions
Is the angle here 90 degrees?

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a color from the 2D
checkerboard image
Area Distortions
In texture space, all rectangles were of the same size.

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a color from the 2D
checkerboard image
Area Distortions
Are the areas of rectangles the same?

Polygon Mesh Flattened mesh Mr


every vertex now is associated Checkerboard
with a color from the 2D
checkerboard image
Surface parameterization
For polygon meshes, there is no predefined way to flatten
the surface, thus we have to compute it!
Simple approach – planar projection
Simple approach – spherical projection
Simple approach – cylindrical projection
Simple approaches
For every 3D point p:
• Planar projection along xy plane of size (w,h)
[up, vp] = ( px / w, py / h)

• Spherical projection on unit sphere


(transform cartesian to spherical coordinates)

[up, vp] = ( φ, θ )

• Cylindrical projection on unit cylinder with


height h & its axis is aligned with the z-axis
(transform cartesian to cylindrical coordinates)
[up, vp] = (φ, pz / h)
More complex approaches
Optimization problem… solve for u-v coordinates of every vertex
to minimize distortion

Energy(u1, v1,…, up, vp) = some measure of distortion


Isometric mappings

The mapping is isometric


(length preserving) when
the length of any arc on the
surface S is preserved on the
mapped domain Ω.
Conformal mappings

The mapping is conformal


(angle preserving) when
the angle of intersection of
every pair of intersecting arcs
on the surface S is preserved
on the mapped domain Ω.
Equiareal mappings

The mapping is equireal


(area preserving) when
the area of an area element
on the surface S is preserved
on the mapped domain Ω.
isometric  conformal + equiareal

Theorem: every isometric mapping is conformal and


equiareal and vice versa.

Most often we prefer isometric parametrizations.

However, a surface in general cannot be flattened


isometrically (unless it is developable surface)

In practice, we go for conformal or equiareal, or some


balance of both.
Conformal vs "near"-isometric

Conformal Minimal Stretch


Conformal vs "near"-isometric

Conformal Minimal Stretch


Texture atlas
In general, you do not need to compute the parametrization
for the whole surface.
Cut it into pieces, and flatten each piece separately!

Texture atlas
Bump mapping
Instead of modulating surface color, a texture can be defined
to simulate surface perturbations along the normal
Displacement mapping

You can even change the


geometry, by treating the
texture as an offset map
to the vertex position
(displacement mapping)
Combine
texture + bump + displacement mapping
3D Textures
Instead of using a 2D image, we can instead use a 3D volumetric
image: f(x, y, z) = [red green blue]
No need to flatten the mesh. Specify 3D texture coordinates per
vertex. Lots of memory might be required.

You might also like