cs 395: adv. computer graphics week 5:modeling ii subdivision and simplification watt : chapter 2.5...

20
CS 395: Adv. Computer CS 395: Adv. Computer Graphics Graphics Week 5:Modeling II Week 5:Modeling II Subdivision and Subdivision and Simplification Simplification Watt : Chapter 2.5 Watt : Chapter 2.5 Jack Tumblin Jack Tumblin [email protected] [email protected]

Post on 20-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

CS 395: Adv. Computer GraphicsCS 395: Adv. Computer Graphics

Week 5:Modeling IIWeek 5:Modeling IISubdivision and Subdivision and

SimplificationSimplification

Watt : Chapter 2.5Watt : Chapter 2.5

Jack TumblinJack [email protected]@cs.northwestern.edu

Shape ManipulationShape Manipulation

How can we:How can we:

• Simplify a shape? 10Mpoly Simplify a shape? 10Mpoly 500 poly? 500 poly?

• Check Visibility? Check Visibility? discard many Mpolys never seen?discard many Mpolys never seen?

• Make a shape from a ‘cloud’ of points? Make a shape from a ‘cloud’ of points?

• Warp from Shape A to Shape B?Warp from Shape A to Shape B?

Model Simplification Model Simplification

The idea:The idea:– It should look the same, but…It should look the same, but…

– have fewer polys.have fewer polys.

–In general, it works!In general, it works!

–Only limited user control.Only limited user control.

–Some surface mappings handled poorly.Some surface mappings handled poorly.

Watson 2000Watson 2000

Model SimplificationModel Simplification

Many 3D Models are too big to: Many 3D Models are too big to:

• Display interactively Display interactively

• DisplayDisplay at all (!) at all (!)

Sources:Sources:• 3D scanning – Laser Time-of-Flight Reflectometry3D scanning – Laser Time-of-Flight Reflectometry• Visualization of scientific data Visualization of scientific data • Huge CAD/CAM efforts:Huge CAD/CAM efforts:

– 100+ man-years: plants, ships and planes 100+ man-years: plants, ships and planes

• Procedural models: grass, trees, cities, etc.Procedural models: grass, trees, cities, etc.

Edge Collapse / Vertex SplitEdge Collapse / Vertex Split

Elemental Simplify Operation (by consensus)Elemental Simplify Operation (by consensus)

‘‘Edge Collapse’Edge Collapse’

•choose edgechoose edge•2 old 2 old 1 new vertex1 new vertex•update edges, facesupdate edges, faces

‘‘Vertex Split’Vertex Split’

•choose edge pairchoose edge pair•1 old1 old2new vertices2new vertices•update edges, facesupdate edges, faces

Model Simplification Model Simplification

Basic approach:Basic approach:– Choose a simplifier: (e.g. edge collapse)Choose a simplifier: (e.g. edge collapse)– Choose a quality measure; Choose a quality measure;

(a 'cost' for the operator)(a 'cost' for the operator)– Use a greedy algorithm: Use a greedy algorithm:

(edge collapse example)(edge collapse example)• Sort edges by costSort edges by cost• Loop until simple enough:Loop until simple enough:• Collapse least-cost edgeCollapse least-cost edge• Re-sort affected nearby edgesRe-sort affected nearby edges

Combinatoric ExplosionCombinatoric Explosion

How many different ways to simplify? How many different ways to simplify? TOO MANY! TOO MANY!

• (# of vertex removal sequences) *(valence)(# of vertex removal sequences) *(valence)• Recall that valence== #edges that end at a vertex. Recall that valence== #edges that end at a vertex.

• or formally, O(N! * N/E) or formally, O(N! * N/E)

• Also; O(N) new vertex placementsAlso; O(N) new vertex placements

Good Simplification Quality metrics needed!Good Simplification Quality metrics needed!

Simplification HierarchySimplification Hierarchy

What is it?What is it?• Binary Tree of Edge CollapsesBinary Tree of Edge Collapses• Graph node==vertex, Graph Edge==collapse Graph node==vertex, Graph Edge==collapse • Leaf node==original mesh vertex;Leaf node==original mesh vertex;• Parent node == new vertex from edge collapseParent node == new vertex from edge collapse

Why use it?Why use it?• Can pre-compute itCan pre-compute it• Load entire graph (cheap)Load entire graph (cheap)• Graph Cut quickly selects Graph Cut quickly selects

a pre-computed,a pre-computed,locally - simplified modellocally - simplified model

Local SimplificationLocal Simplification

Many PolygonsMany Polygons(far from the(far from thegraph root)graph root)

Few PolygonsFew Polygons(near the graph root)(near the graph root)

Model Simplification: Taxonomy IModel Simplification: Taxonomy I

Quick Taxonomy of simplifying methods:Quick Taxonomy of simplifying methods:• Spatial Clustering:Spatial Clustering:

– Merge chosen clusters of verts, edges, facesMerge chosen clusters of verts, edges, faces– Earliest (Rossignac); Earliest (Rossignac); – easy, very fast, but poor qualityeasy, very fast, but poor quality

• Pairwise merge algorithms: Pairwise merge algorithms: – Merge adjacent face pair, edge pair, Merge adjacent face pair, edge pair,

or vertex pair or vertex pair (edge collapse: Hoppe,Garland)(edge collapse: Hoppe,Garland)– Slower, but often best qualitySlower, but often best quality– Can be tricky for non-triangle faces Can be tricky for non-triangle faces ..

Model Simplification:Taxonomy IIModel Simplification:Taxonomy II

• Pruning algorithms: Pruning algorithms: – vertex deletion (& delete adjacent edges)vertex deletion (& delete adjacent edges)

– edge deletion (& delete empty vertices)edge deletion (& delete empty vertices)

– face deletion (& replace with a vertex)face deletion (& replace with a vertex)

– too crude; changes too large!too crude; changes too large!

– Opinion:Opinion: Research community Research community converged on converged on edge collapseedge collapse; only edge ; only edge collapse matters anymore!collapse matters anymore!

Related ProblemsRelated Problems

• Level of detail (LOD) Level of detail (LOD) – Simplified models in interactive display Simplified models in interactive display

• Measuring visual fidelity Measuring visual fidelity – Which simplifier best preserves Which simplifier best preserves

the visual appearance? the visual appearance?

• Surface fitting:Surface fitting:– 3D scanner gives a cloud of points3D scanner gives a cloud of points

– How do we make a surface model? How do we make a surface model?

Related ProblemsRelated Problems

• Mesh Zippering (Turk & Levoy 1996) Mesh Zippering (Turk & Levoy 1996) – Make multiple partial scans Make multiple partial scans – Fit surface to each scan (fairly simple) Fit surface to each scan (fairly simple) – Choose two partial scans Choose two partial scans – Align them using iterated closest points Align them using iterated closest points – Join the surfaces topologically Join the surfaces topologically – Tune the local geometry; compare to point cloud Tune the local geometry; compare to point cloud

• Critique +: widely used Critique +: widely used – -- didn’t address reflectance & surface properties -- didn’t address reflectance & surface properties – -- what about parametric surfaces?-- what about parametric surfaces?

Surface fittingSurface fitting

Surface fitting: Find surface from a cloud of pointsSurface fitting: Find surface from a cloud of points

ExampleExample

1 2

3

13,000 points13,000 points

Hoppe ‘94

Related ProblemsRelated ProblemsShape comparison ProblemShape comparison Problem• How can we sort & and query for shapes? How can we sort & and query for shapes?

– Define a shape-labeling function: we want...Define a shape-labeling function: we want...– Compact, low-dimensional identifier (string?)Compact, low-dimensional identifier (string?)– invariant to scaling, rotation, & ‘minor details’invariant to scaling, rotation, & ‘minor details’

(defined as...?) (defined as...?)

• (Osada, Funkhouser et al):(Osada, Funkhouser et al):– sprinkle model with randomly placed pointssprinkle model with randomly placed points– find distance between random point pairsfind distance between random point pairs– collect a histogram of these distancescollect a histogram of these distances

E.g. volume of tetrahedron between four model points E.g. volume of tetrahedron between four model points

Use it to create a shape distribution Use it to create a shape distribution Make a lot of random samples of shape function Make a lot of random samples of shape function Form a histogram Form a histogram Fit a piecewise linear probability distribution function Fit a piecewise linear probability distribution function Result, a vector with N integers Result, a vector with N integers Compare shape distributions Compare shape distributions Use existing function comparison approaches Use existing function comparison approaches They use Minkowski sum: They use Minkowski sum: Shape distr A, B Shape distr A, B sum((A-B)^N)^(1/N) sum((A-B)^N)^(1/N) Critique Critique +: Good for rough classification +: Good for rough classification -: Not good at details -: Not good at details Subproblems Subproblems

What is a good shape function? What is a good shape function? How to query? How to query?

Related ProblemsRelated Problems

Shape comparison ProblemShape comparison Problem

• How can we sort & and query for shapes? How can we sort & and query for shapes? – Define a shape-labeling function: we want...Define a shape-labeling function: we want...– Compact, low-dimensional identifier (string?)Compact, low-dimensional identifier (string?)– invariant to scaling, rotation, & ‘minor details’invariant to scaling, rotation, & ‘minor details’

(defined as...?) (defined as...?)

• (Osada, Funkhouser et al. 2001):(Osada, Funkhouser et al. 2001):– sprinkle model with randomly placed pointssprinkle model with randomly placed points– find distance between random point pairsfind distance between random point pairs– collect a histogram of these distancescollect a histogram of these distances

Other Shape ManipulationsOther Shape Manipulations

Deforming Polygonal Shapes:Deforming Polygonal Shapes:

• ‘‘Bones’ and skin Bones’ and skin

• Space Warp(don't bend object; bend space)Space Warp(don't bend object; bend space)

• 'Growing Skin’ (Markosian99)'Growing Skin’ (Markosian99)– Particle System, Force-Field guide mesh growthParticle System, Force-Field guide mesh growth

Implicit surfaces (bend space)Implicit surfaces (bend space)

'Growing Skin’ (Markosian99)'Growing Skin’ (Markosian99)

• Start with an underlying ‘skeleton’Start with an underlying ‘skeleton’• Particle System guides ‘skin’ growth on itParticle System guides ‘skin’ growth on it

• Skin:spring-mass system with drag, stiffness, etc.Skin:spring-mass system with drag, stiffness, etc.

'Growing Skin’ (Markosian99)'Growing Skin’ (Markosian99)

• Start with an underlying ‘skeleton’Start with an underlying ‘skeleton’• Particle System, force field guides ‘skin growth’ on it.Particle System, force field guides ‘skin growth’ on it.

• Skin:spring-mass system with drag, stiffness, etc.Skin:spring-mass system with drag, stiffness, etc.

FrontFrontBackBack

Markosian1999Markosian1999

3D Morphing3D MorphingChange shape Change shape AA to shape to shape BB (Turk/O’Brien99) (Turk/O’Brien99)