1 / 37

CSE 554 Lecture 7: Simplification

CSE 554 Lecture 7: Simplification. Fall 2016. Geometry Processing. Fairing (smoothing) Relocating vertices to achieve a smoother appearance Method: centroid averaging Simplification Reducing vertex count Deformation Relocating vertices guided by user interaction or to fit onto a target.

Download Presentation

CSE 554 Lecture 7: Simplification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 554Lecture 7: Simplification Fall 2016

  2. Geometry Processing • Fairing (smoothing) • Relocating vertices to achieve a smoother appearance • Method: centroid averaging • Simplification • Reducing vertex count • Deformation • Relocating vertices guided by user interaction or to fit onto a target

  3. Why do we care? • Polygon count is a major performance factor • Animation (deformation), rendering, simulation, interaction Space shuttle aerodynamics (NASA) Character animation (Pixar) Ray tracing rendering (POV-Ray)

  4. Simplification (2D) • Replacing a 2D polygon by another with fewer vertices • Preserves the shape and topology of the input polygon

  5. Simplification (2D) • An optimization problem: • Given an input polygon and a target vertex count N • Find the coordinates of N vertices that minimize the distance from the new polygon formed by these vertices and the input polygon 200 vertices 50 vertices

  6. Simplification (2D) • A greedy heuristic: • Iteratively merges two neighboring vertices into one, until the target vertex count is reached • Each merging minimizes the error to the original polygon 200 vertices 50 vertices

  7. After replacement: Simplification (2D) • If I want to replace two vertices with one, where should it be?

  8. After replacement: Simplification (2D) • If I want to replace two vertices with one, where should it be? • Shortest distances to the supporting lines of involved edges

  9. Points and Vectors • Same representation • Different meaning: • Point: a fixed location (relative to {0,0} or {0,0,0}) • Vector: a direction and magnitude • No location (any location is possible) Y 2 x 1 2

  10. Point Operations • Subtraction • Result is a vector • Addition with a vector • Result is a point • Can points add?

  11. Adding Points • Affine combinations • Weighted addition of points where all weights sum to 1 • Result is another point • Same as adding scaled vectors to a point

  12. Adding Points • Affine combinations: examples • Mid-point of two points • Linear interpolation of two points • Centroid of multiple points

  13. Vector Operations • Addition/Subtraction • Result is a vector • Scaling by a scalar • Result is a vector • Magnitude • Result is a scalar • A unit vector: • To make a unit vector (normalization):

  14. More Vector Operations • Dot product (in both 2D and 3D) • Result is a scalar • In coordinates (simple!) • 2D: • 3D: • Matrix product between a row and a column vector

  15. h More Vector Operations • Uses of dot products • Angle between vectors: • Orthogonal test: • Projected length of onto :

  16. More Vector Operations • Cross product (only in 3D) • Result is another 3D vector • Direction: Normal to the plane where both vectors lie (right-hand rule) • Magnitude: • In coordinates:

  17. More Vector Operations • Uses of cross products • Getting the normal vector of the plane • E.g., the normal of a triangle formed by • Computing area of the triangle formed by • Testing if vectors are parallel:

  18. Properties (Sign change!)

  19. Simplification (2D) • Distance to a line • Line represented as a point q on the line, and a perpendicular unit vector (the normal) n • To get n: take a vector {x,y} along the line, n is {-y,x} followed by normalization • Distance from any point p to the line: • Projection of vector (p-q) onto n • This distance has a sign • “Above” or “under” of the line • We will use the distance squared

  20. Simplification (2D) • Closed point to multiple lines • Sum of squared distances from p to all lines (Quadratic Error Metric, QEM) • Input lines: • We want to find the p with the minimum QEM • Since QEM is a convexquadratic function of p, the minimizing p is where the derivative of QEM is zero, which is a linear equation

  21. Row vector Matrix transpose [Eq. 1] Matrix (dot) product 2x2 matrix 1x2 column vector Scalar Simplification (2D) • Minimizing QEM • Writing QEM in matrix form

  22. Simplification (2D) • Minimizing QEM • Solving the zero-derivative equation: • A linear system with 2 equations and 2 unknowns (px,py) • Using Gaussian elimination, or matrix inversion: [Eq. 2]

  23. Simplification (2D) • What vertices to merge first? • Pick the ones whose replacement vertex introduces least QEM error(usually lies in flat areas)  

  24. Simplification (2D) • The algorithm • Step 1: For each edge, compute the best vertex location to replace that edge, and the QEM at that location. • Store that location (called minimizer) and its QEM with the edge.

  25. Simplification (2D) • The algorithm • Step 1: For each edge, compute the best vertex location to replace that edge, and the QEM at that location. • Store that location (called minimizer) and its QEM with the edge. • Step 2: Pick the edge with the lowest QEM and collapse it to its minimizer. • Update the minimizers and QEMs of the re-connected edges.

  26. Simplification (2D) • The algorithm • Step 1: For each edge, compute the best vertex location to replace that edge, and the QEM at that location. • Store that location (called minimizer) and its QEM with the edge. • Step 2: Pick the edge with the lowest QEM and collapse it to its minimizer. • Update the minimizers and QEMs of the re-connected edges.

  27. Simplification (2D) • The algorithm • Step 1: For each edge, compute the best vertex location to replace that edge, and the QEM at that location. • Store that location (called minimizer) and its QEM with the edge. • Step 2: Pick the edge with the lowest QEM and collapse it to its minimizer. • Update the minimizers and QEMs of the re-connected edges. • Step 3: Repeat step 2, until a desired number of vertices is left.

  28. Simplification (2D) • The algorithm • Step 1: For each edge, compute the best vertex location to replace that edge, and the QEM at that location. • Store that location (called minimizer) and its QEM with the edge. • Step 2: Pick the edge with the lowest QEM and collapse it to its minimizer. • Update the minimizers and QEMs of the re-connected edges. • Step 3: Repeat step 2, until a desired number of vertices is left.

  29. Simplification (2D) • Step 1: Computing minimizer and QEM on an edge • Consider supporting lines of this edge and adjacent edges • Compute and store at the edge: • The minimizing location p (Eq. 2) • QEM (substitute p into Eq. 1) • Used for edge selection in Step 2 • QEM coefficients (a, b, c) • Used for fast update in Step 2 Stored at the edge: [Eq. 1]

  30. Simplification (2D) • Step 2: Collapses and updates • Remove the edge and its vertices • Re-connect two neighbor edges to the minimizer of the removed edge • For each re-connected edge: • Increment its coefficients by that of the removed edge • The coefficients are additive! • Re-compute its minimizer and QEM Collapse : new minimizer locations computed from the updated coefficients

  31. Simplification (3D) • The algorithm is similar to 2D • Replace two edge-adjacent vertices by one vertex • Placing new vertices closest to supporting planes of adjacent triangles • Prioritize collapses based on QEM

  32. Simplification (3D) • Distance to a plane (similar to the line case) • Plane represented as a point q on the plane, and a unit normal vector n • For a triangle: n is the cross-product of two edge vectors • Distance from any point p to the plane: • Projection of vector (p-q) onto n • This distance has a sign • “above” or “below” the plane • We use its square

  33. 3x3 matrix 1x3 column vector Scalar Simplification (3D) • Closest point to multiple planes • Input planes: • QEM (same as in 2D) • In matrix form: • Find p that minimizes QEM: • A linear system with 3 equations and 3 unknowns (px,py,pz)

  34. Simplification (3D) • Step 1: Computing minimizer and QEM on an edge • Consider supporting planes of all triangles adjacent to the edge • Compute and store at the edge: • The minimizing location p • QEM[p] • QEM coefficients (a, b, c) The supporting planes for all shaded triangles should be considered when computing the minimizer of the middle edge.

  35. Simplification (3D) Degenerate triangles after collapse • Step 2: Collapsing an edge • Remove the edge with least QEM • Re-connect neighbor triangles and edges to the minimizer of the removed edge • Remove “degenerate” triangles • Remove “duplicate” edges • For each re-connected edge: • Increment its coefficients by that of the removed edge • Re-compute its minimizer and QEM Duplicate edges after collapse Collapse

  36. Simplification (3D) • Example: 5600 vertices 500 vertices

  37. Further Readings • Fairing: • “A signal processing approach to fair surface design”, by G. Taubin (1995) • No-shrinking centroid-averaging • Google citations > 1000 • Simplification: • “Surface simplification using quadric error metrics”, by M. Garland and P. Heckbert (1997) • Edge-collapse simplification • Google citations > 2000

More Related