Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Advanced Computer Graphics

- 3D Modeling
Modeling
} Spline curves, surfaces: 70s – 80s
} Utah teapot: Famous 3D model

} More recently: Triangle meshes often acquired from


real objects
3D Objects (triangular mesh)

How can this object be represented in a computer?


3D Objects (spline patches)

This one?
3D Objects (Volumes)

How about this one?


3D Objects (CSG)

This one?
Types of 3D object data
} Polygonal meshes for complex real-world objects
} Spline patches from modeling programs
} Volume data or voxels (e.g. visible human project)
} CSG (Constructive Solid Geometry): Machine parts
} And a few more

All have advantages, disadvantages. Increasingly,


meshes are easiest to use and simplest
Comparisons
} Efficient hardware rendering (meshes simple)
} Manipulation (edit, simplify, compress etc.)
} Splines easiest originally, but now many algorithms for
polygon meshes
} Acquisition or Modeling
} Splines, CSG originally used for modeling
} But increasingly, complex meshes acquired from real world
} Simplicity (meshes win big here)
Point Cloud
} Unstructured samples
} Advantage: simplicity
} Disadvantage: no
information on
adjacency / connectivity
} Have to use e.g.
k-nearest neighbors
Cyberware whole body 3D scanner
3D Scanning with Camera
} Scanning with a camera array
} Generate a point cloud
} Capture textures
BIM (Building Information Management)
Polygon Soup
} Unstructured set of polygons:
} Often the output of interactive modeling systems
} Often sufficient for rendering, but not other operations
Mesh
Connected set of polygons (usually triangles)
} May not be closed
} Representation (simplest): Vertices, Indexed Face Set
Subdivision Surface
} Coarse mesh + subdivision rule
} Smooth surface is limit of refinements

Zorin & Schroder


Current Research Trend
} All representations described are widely used, and topics of
current research
} Triangle meshes perhaps most common
} Subdivision surfaces commonly used in movies, …
} Point clouds becoming increasingly relevant

} Replace older representations in many cases (parametric,


spline patches, CSG, etc.)
Implicit Surfaces (Level Set)
} Points satisfying: F(x,y,z) = 0

Implicit Model
Why Implicit Surfaces?
} Function usually sampled regularly (voxel grid)

+ Can guarantee that model is hole-free


+ Easy to change topology
- Algorithms must traverse volume: slow
- More space required
Implicit Sruface

< Morphing >

< Signed Distance Field>


Voxels
} Uniform grid of occupancy, density, etc.
} Often acquired from CT, MRI, etc.

Stanford Graphics Laboratory


Constructive Solid Geometry
} Hierarchy of boolean operations (union, difference,
intersect) applied to simple shapes
} Often used for mechanical CAD modeling
Scene Graph
} Union of objects at leaf nodes

Bell Laboratories
avalon.viewpoint.com
Mesh Representation
Motivation
} A polygonal (triangular) mesh is a collection of
polygons (triangles)
} We want to do operations on these triangles
} E.g. walk across the mesh for simplification
} Display for rendering
} Computational geometry
} Best representations (mesh data structures)?
} Compactness
} Generality
} Simplicity for computations
} Efficiency
Mesh Data Structures
Desirable Characteristics 1
} Generality – from most general to least
} Polygon soup
} Only triangles
} 2-manifold ® ≤ 2 triangles per edge
} Orientable ® consistent CW / CCW winding
} Closed ® no boundary
} Compact storage
2-Manifold Definition
} A surface is a 2-manifold if and only if for each
point x on the surface there exists an open ball with
center x and sufficiently small radius so that the
intersection of this ball and the surface can be
continuously deformed to an open disk.
Non-Manifold mesh
} Manifold conditions (Mesh)
(1) Each edge is incident to only one or two faces and
(2) the faces incident to a vertex form a closed or an open
fan

} The following examples are not manifold meshes!


Mesh Definitions
} The orientation of a face is a cyclic order of the incident
vertices.

} The orientation of two adjacent faces is compatible, if the


two vertices of the common edge are in opposite order

} A manifold mesh is orientable if any two


adjacent faces have compatible orientation.
Mesh Data Structures
Desirable characteristics 2
} Efficient support for operations:
} Given face, find its vertices
} Given vertex, find faces touching it
} Given face, find neighboring faces
} Given vertex, find neighboring vertices
} Given edge, find vertices and faces it touches
} These are adjacency operations important in mesh
simplification and many other applications
Outline
} Independent faces
} Indexed face set
} Adjacency lists
} Winged-edge
Independent Faces
Faces list vertex coordinates
} Redundant vertices
} No connectivity information

F1 Face Table
F0: (x0,y0,z0), (x1,y1,z1), (x2,y2,z2)
F2 F1: (x3,y3,z3), (x4,y4,z4), (x5,y5,z5)
F0 F2: (x6,y6,z6), (x7,y7,z7), (x8,y8,z8)
Indexed Face Set
} Faces list vertex references – “shared vertices”
} Commonly used (e.g. OFF file format itself)
} Augmented versions simple for mesh processing
v2 v4
Vertex Table Face Table
v0: (x0,y0,z0) F0: 0, 1, 2
F1 v1: (x1,y1,z1) F1: 1, 4, 2
F2 v2: (x2,y2,z2) F2: 1, 3, 4
F0 v3: (x3,y3,z3)
v4: (x4,y4,z4)
v0 v1 v3
Note CCW ordering
Efficient Algorithm Design
} Can sometimes design algorithms to compensate for
operations not supported by data structures
} Example: per-vertex normals
} Average normal of faces touching each vertex
} With indexed face set, vertex ® face is O(n)
} Naive algorithm for all vertices: O(n2)
} Useful to augment with vertex ® face adjacency
} For all vertices, find adjacent faces as well
} Can be implemented while simply looping over faces
Full Adjacency Lists
} Store all vertex, face, Edge Adjacency Table
and edge adjacencies e0: v0, v1; F0,Æ; e2,e1,Æ,Æ
e1: v1,v2; F0,F1; e0,e2,e6,e5


v2 e6
v4
Face Adjacency Table
F0: v0,v1,v2; F1,Æ,Æ; e0,e1,e2
e5
e2 F1 F1: v1,v4,v2; Æ,F0,F2; e6,e1,e5
e1 e4
F2: v1,v3,v4; Æ,F1,Æ; e4,e5,e3
F2
F0
Vertex Adjacency Table
e0 e3 v0: v1,v2; F0; e0,e2
v0 v1 v3
v1: v3,v4,v2,v0; F2,F1,F0; e3,e5,e1,e0


Full adjacency: Issues
} Garland and Heckbert claim they do this
} Easy to find stuff
} Issue is storage
} And updating everything once you do something like
an edge collapse for mesh simplification
} I recommend you implement something simpler (like
indexed face set plus vertex to face adjacency)
Partial Adjacency Lists
} Store some adjacencies,
use to derive others Edge Adjacency Table
e0: v0, v1; F0,Æ; e2,e1,Æ,Æ
} Many possibilities… e1: v1,v2; F0,F1; e0,e2,e6,e5


v2 e6
v4
Face Adjacency Table
F0: v0,v1,v2; F1,Æ,Æ; e0,e1,e2
e5
e2 F1 F1: v1,v4,v2; Æ,F0,F2; e6,e1,e5
e1 e4
F2: v1,v3,v4; Æ,F1,Æ; e4,e5,e3
F2
F0
Vertex Adjacency Table
e0 e3 v0: v1,v2; F0; e0,e2
v0 v1 v3
v1: v3,v4,v2,v0; F2,F1,F0; e3,e5,e1,e0


Winged Representations
} Idea is to associate information with edges
} Compact Storage
} Many operations efficient
} Allow one to walk around mesh
} Usually general for arbitrary polygons (not triangles)
} But implementations can be complex with special
cases relative to simple indexed face set++ or partial
adjacency table
Winged Edge
} Most data stored at edges
Edge Adjacency Table
} Vertices, faces point to e0: v0, v1; F0,Æ; e2,e1,Æ,Æ
one edge each e1: v1,v2; F0,F1; e0,e2,e6,e5


v2 e6
v4
Face Adjacency Table
F0: v0,v1,v2; F1,Æ,Æ; e0,e1,e2
e5
e2 F1 F1: v1,v4,v2; Æ,F0,F2; e6,e1,e5
e1 e4
F2: v1,v3,v4; Æ,F1,Æ; e4,e5,e3
F2
F0
Vertex Adjacency Table
e0 e3 v0: v1,v2; F0; e0,e2
v0 v1 v3
v1: v3,v4,v2,v0; F2,F1,F0; e3,e5,e1,e0


Winged Edge
} provide the greatest flexibility in dynamically
changing the mesh geometry
} split and merge operations can be done quickly
} large storage requirements and increased complexity
due to maintaining many indices.

You might also like