+ All Categories

Meshes

Date post: 07-Jan-2016
Category:
Upload: caine
View: 36 times
Download: 0 times
Share this document with a friend
Description:
Meshes. faces. vertices. Triangular Mesh (or mesh). A mesh is a set of adjacent triangles. edges. Topological properties of a mesh. Two Manifold or not yes if each edge is shared by max 2 faces two manifold = good not two manifold = bad - PowerPoint PPT Presentation
Popular Tags:
22
Meshes
Transcript
Page 1: Meshes

Meshes

Page 2: Meshes

Triangular Mesh (or mesh) A mesh is a set of adjacent triangles

facesvertices

edges

Page 3: Meshes

Topological properties of a mesh

Two Manifold or not– yes if each edge is shared by max 2 faces

• two manifold = good• not two manifold = bad• most algorithms on meshes assume it

is two-manifold

NOYES

Page 4: Meshes

Topological properties of a mesh

Closed or open– When closed, each edge is shared by

exactly two faces

Page 5: Meshes

Topological properties of a mesh

Coherent orientation– Is it possible to assign to each face an

orientation so that the overall assignment is coherent?

– Coherent orientation = coherent normals!A

1

23

1

23

Opposite direction, coherent edgeBC

D

Page 6: Meshes

How can we define a mesh?

A mesh is a set of adjacent triangles How can we define it? Direct way:

– An array of triangles– and for each triangle three vertices– and for each vertex three coordinate

Page 7: Meshes

How can we define a mesh? Indexed mode

– Ordered list of vertices• for each vertex its position

– Ordered list of faces• for each face, 3 indices to vertices

Page 8: Meshes

What about the attributes? Can be defined:

– per vertex• Define an attribute for each vertex

– per face• Define an attribute for each face

– per wedge (vertex of face)• Define three attributes for each face

Most common attributes:– color– Texture coordinates– Normals

Page 9: Meshes

Example: PLY format

Digital format for meshes Can be either binary, or ASCII (text)

– binary: more compact and easy to machine-read

– ascii: human-readable with a text-editor In both cases, it starts with an ASCII header.

Page 10: Meshes

cube.ply

Example: PLY format

ply

format ascii 1.0

comment a simple cube

element vertex 8

property float x

property float y

property float z

element face 12

property list uchar int vertex_indices

end_header

Page 11: Meshes

LetterL.off

Example: OFF format

1 5 10 5 14 3 2 1 04 5 4 3 04 6 7 8 94 6 9 10 114 0 1 7 64 1 2 8 74 2 3 9 84 3 4 10 94 4 5 11 104 5 0 6 11

OFF12 10 400 0 03 0 03 1 01 1 01 5 00 5 00 0 13 0 13 1 11 1 1

# vertices

# faces # edges

x,y,z2nd vertex

first face:4 vertices:with indices3, 2, 1 and 0

index 0

index 3

index 2index 1

Page 12: Meshes

Mesh: common tasks Given a mesh: compute the bounding box

– Very useful in many applications, e.g. collisions

– How to compute it?– We cycle on the vertices:

compute the max and the min of all x, y and z

Page 13: Meshes

Mesh: common tasks Given a mesh: compute the normals per

vertex– How?1 Set all the vertex normals to 0

2 cycle on each face:compute the normalnormalize itadd it to the vertex normal

3 cycle on each vertex:normalize the normal

Page 14: Meshes

More difficult tasks Compute a Bounding sphere Stripification Parametrize Automated simplification Detail recovery ...

Page 15: Meshes

More difficult tasks Stripification

– Organize the triangles in triangle strips• As long as possible

Page 16: Meshes

More difficult tasks Parameterization assign a pair of texture coordinates to each wedge When there are seams (lines appearing in two separate

images)– replicate the vertices– Save the texture coordinates for each wedge

v

Page 17: Meshes

More difficult tasks Automated simplification

• Parameters: A maximal error or a given number of faces

automatically

mesh semplificata2K triangles

mesh originale500K triangles

Page 18: Meshes

Automated simplificationp e r f o r m a n c e

q u a l i t y

Page 19: Meshes

Automated simplification

LOD 1 LOD 2 LOD 3 LOD 4

A hierarchy of Levels of Detail

To be used when viewer is

nearby

To be used when viewer is

far away

Page 20: Meshes

Detail preservation (or texture for geometry)

Idea:– Synthesize a texture– To compensate for the detail lost during

simplification

Page 21: Meshes

500ktriangles

2ktriangles

Automatedsimplification

2k triangles, with texture mapping

rendering

Ad-hoc createdTEXTUREdetail

recovery

Page 22: Meshes

simplified2K triangles

originale500K triangles

simplified but textured2K triangles


Recommended