Download presentation

Presentation is loading. Please wait.

Published byJesse Dickerson Modified over 2 years ago

1
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs283/fa10

2
To Do Assignment 1, Due Oct 7. Should have made some serious progress by end of week This lecture reviews quadric error metrics and some points regarding implementation

3
Resources Garland and Heckbert SIGGRAPH 97 paper Garland website, implementation notes (in thesis) Notes in this and previous lectures

4
Surface Simplification: Goals (Garland) Efficiency (70000 to 100 faces in 15s in 1997) High quality, feature preserving (primary appearance emphasized rather than topology) Generality, non-manifold models, collapse disjoint regions

5
Simplifications Pair contractions in addition to edge collapses Previously connected regions may come together

6
Algorithm Outline

7
Quadric Error Metrics Based on point-to-plane distance Better quality than point-to-point a b c dadadada dbdbdbdb dcdcdcdc

8
Background: Computing Planes Each triangle in mesh has associated plane For a triangle, find its (normalized) normal using cross products Plane equation?

9
Quadric Error Metrics Sum of squared distances from vertex to planes:

10
Quadric Error Metrics Common mathematical trick: quadratic form = symmetric matrix Q multiplied twice by a vector

11
Quadric Error Metrics Simply a 4x4 symmetric matrix Storage efficient: 10 floating point numbers per vertex Initially, error is 0 for all vertices

12
Quadric Error Metrics 2 nd degree polynomial in x, y and z Level surface (v T Qv = k) is a quadric surface Ellipsoid, paraboloid, hyperboloid, plane etc.

14
Quadric Visualization Ellipsoids: iso-error surfaces Smaller ellipsoid = greater error for a given motion Lower error for motion parallel to surface Lower error in flat regions than at corners Elongated in “cylindrical” regions

15
Using Quadrics Approximate error of edge collapses Each vertex v has associated quadric Q Error of collapsing v 1 and v 2 to v’ is v’ T Q 1 v’+v’ T Q 2 v’ Quadric for new vertex v’ is Q’=Q 1 +Q 2

16
Using Quadrics Find optimal location v’ after collapse:

17
Using Quadrics Find optimal location v’ after collapse:

18
Algorithm Outline

19
Algorithm Summary Compute the Q matrices for all the initial vertices Select all valid pairs Compute the optimal contraction target v vor each valid pair. The error v T (Q 1 +Q 2 )v of this target vertex becomes the cost of contracting that pair Place all pairs in a heap keyed on cost with minimum cost pair on the top Iteratively remove the least cost pair, contract this pair, and update the costs of all valid pairs of interest

20
Final Algorithm

21
Results Original 1k tris 100 tris Quadrics

22
Results Original 250 tris, edge collapses only 250 tris Quadrics

23
Additional Details Preserving boundaries/discontinuities (weight quadrics by appropriate penalty factors) Preventing mesh inversion (flipping of orientation): compare normal of neighboring faces, before after Has been modified for many other applications E.g. in silhouettes, want to make sure volume always increases, never decreases Take color and texture into account (followup paper) See paper, other more recent works for details

24
Implementation Tips Incremental, test, debug, simple cases Find good data structure for heap etc. May help to visualize error quadrics if possible Challenging, but hopefully rewarding assignment

25
Questions? Issues or questions? All the material for assignment covered Start early, work hard Rest of unit NURBs (today if time permits) Subdivision (next lecture)

26
Outline Rational Splines Quadratic rational splines NURBs (briefly) Parametric patches (briefly)

27
Parametric Polynomial Curves A parametric polynomial curve of order n: Advantages of polynomial curves Easy to compute Infinitely differentiable everywhere

28
Rational Splines Can’t represent certain shapes (e.g. circles) with piecewise polynomials Wider class of functions: rational functions Ratio of polynomials Can represent any quadric (e.g. circles) exactly Mathematical trick: homogeneous coordinates Ratio of 2 polynomials in 3D equivalent to single polynomial in 4D

29
Rational Splines Example: creating a circular arc with 3 control points (0,0) (0,1)(1,1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: circular arc (???)

30
Standard deCasteljau Standard deCasteljau A B

31
Rational deCasteljau A B

32
Homogeneous deCasteljau Non-rational splines simply have all weights set to 1 instead

33
Outline Rational Splines Quadratic rational splines NURBs (briefly) Parametric patches (briefly)

34
Evaluation: Rational Splines Add an extra weight coordinate Multiply standard coords of control point by weight (essentially the same as the use of homogeneous coords) Apply standard deCasteljau or other evaluation alg. Divide by final value of weight coordinate Essentially the same as perspective division/dehomogenize Rational because of final division: Rational polynomial at the end (ratio of two polynomials)

35
Quadratic Bezier Curve Example: quarter-circle arc, weight midpoint Smaller w: pulled away from middle control point Larger w: pulled towards middle control point (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

36
Quadratic Bezier Curve General Bezier Formula for quadratic? (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

37
Dependence of curve on w For w very large, curve pulled toward middle control point, get a section of a hyperbola For w = 1 (standard spline), standard parabola For w < 1, positive, curve moves away from middle control point For w = 0, curve becomes a straight line When is curve part of a circle? (homework)

38
Mid-Point (t = ½ ?)

39
W very large (0,0;1) (0,1;>>1)(1,1;1)

40
W = 1 (non-rational spline) (0,0;1) (0,1;1)(1,1;1) Polynomial spline: parabolic arc

41
W < 1 (0,0;1) (1,1;1) Rational spline: result depends on w (0,1;w)

42
W = 0 (0,0;1) (1,1;1) Straight Line (0,1;w)

43
Outline Rational Splines Quadratic rational splines NURBs (briefly) Parametric patches (briefly)

44
NURBS Non-uniform (vary time interval per segment) Rational B-Splines Can model a wide class of curves and surfaces Same convenient properties of B-Splines Still widely used in CAD systems

45
Polar Forms: Cubic Bspline Curve -2 –1 0 –1 0 1 0 1 2 1 2 3 For Uniform B-splines, uniform knot vector (below) For non-uniform, only require non-decreasing, not necessarily uniform (can be arbitrary) Uniform knot vector: -2, -1, 0, 1, 2,3 Labels correspond to this

46
NURBS

47
Outline Rational Splines Quadratic rational splines NURBs (briefly) Parametric patches (briefly)

48
Parametric Patches Each patch is defined by blending control points FvDFH Figure 11.44

49
Parametric Patches Point Q(u,v) on the patch is the tensor product of curves defined by the control points Watt Figure 6.21 Q(u,v) Q(0,0) Q(1,0) Q(0,1) Q(1,1)

50
Parametric Bicubic Patches Point Q(u,v) defined by combining control points with polynomial blending functions: Where M is a matrix describing the blending functions for a parametric cubic curve (e.g., Bezier, B-spline, etc.)

51
Summary Splines still used commonly for modeling Start with simple spline curves (Bezier, uniform non-rational B-splines) Discussed extension to rational curves (add homogeneous coordinate for rational polynomial) Brief discussion of NURBs: widely used Brief discussion of Parametric patches for modeling surfaces (rather than curves)

Similar presentations

OK

A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.

A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on accounting standards in india Ppt on sources of energy for class 8 Ppt on advertising techniques Convert pptx to ppt online free Ppt on market friendly statements Ppt on 60 years of indian parliament latest Ppt on polluted ganga Ppt on bill gates as a leader Ppt on asian continent videos Download ppt on networking