computer graphics
play

Computer Graphics - Spline and Subdivision Surfaces - Hendrik - PowerPoint PPT Presentation

Computer Graphics - Spline and Subdivision Surfaces - Hendrik Lensch Computer Graphics WS07/08 Spline & Subdivision Surfaces Overview Last Time Image-Based Rendering Today Parametric Curves Lagrange Interpolation


  1. Ray Tracing of Spline Surfaces • Several approaches – Tessellate into many triangles (using deCasteljau or deBoor) • Often the fasted method • May need enormous amounts of memory – Recursive subdivision • Simply subdivide patch recursively • Delete parts that do not intersect ray (Pruning) • Fixed depth ensures crack-free surface – Bézier Clipping [Sederberg et al.] • Find two orthogonal planes that intersect in the ray • Project the surface control points into these planes • Intersection must have distance zero � Root finding � Can eliminate parts of the surface where convex hull does not intersect ray • Must deal with many special cases – rather slow Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  2. Higher Dimensions • Volumes – Spline: R 3 → R • Volume density • Rarely used – Spline: R 3 → R 3 • Modifications of points in 3D • Displacement mapping • Free Form Deformations (FFD) FFD Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  3. Subdivision Surfaces Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  4. Modeling • How do we ... – Represent 3D objects in a computer? – Construct such representations quickly and/or automatically with a computer? – Manipulate 3D objects with a computer? • 3D Representations provide the foundations for – Computer Graphics – Computer-Aided Geometric Design – Visualization – Robotics, … • Different methods for different object representations Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  5. 3D Object Representations • Raw data • Solids – Range image – Voxels – Point cloud – BSP tree – Polygon soup – CSG • Surfaces – Mesh – Subdivision – Parametric – Implicit Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  6. Range Image • Range image – Acquired from range scanner • E.g. laser range scanner, structured light, phase shift approach – Structured point cloud • Grid of depth values with calibrated camera • 2-1/2D: 2D plus depth Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  7. Point Cloud • Unstructured set of 3D point samples – Often constructed from many range images Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  8. Polygon Soup • Unstructured set of polygons Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  9. 3D Object Representations • Raw data • Solids – Point cloud – Voxels – Range image – BSP tree – Polygon soup – CSG • Surfaces – Mesh – Subdivision – Parametric – Implicit Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  10. Mesh • Connected set of polygons (usually triangles) Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  11. Parametric Surface • Tensor product spline patches – Careful constraints to maintain continuity Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  12. Subdivision Surface • Coarse mesh & subdivision rule – Define smooth surface as limit of sequence of refinements Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  13. Implicit Surface • Points satisfying: F(x,y,z) = 0 Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  14. 3D Object Representations • Raw data • Solids – Point cloud – Voxels – Range image – BSP tree – Polygon soup – CSG • Surfaces – Mesh – Subdivision – Parametric – Implicit Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  15. Voxels • Uniform grid of volumetric samples – Acquired from CAT, MRI, etc. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  16. BSP Tree • Binary space partition with solid cells labeled – Constructed from polygonal representations Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  17. CSG – Constructive Solid Geometry • Hierarchy of boolean set operations (union, difference, intersect) applied to simple shapes Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  18. Motivation • Splines – Traditionally spline patches (NURBS) have been used in production for character animation. • Difficult to stitch together – Maintaining continuity is hard • Difficult to model objects with complex topology Subdivision in Character Animation Tony Derose, Michael Kass, Tien Troung (SIGGRAPH ’98) (Geri’s Game, Pixar 1998) Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  19. Motivation • Splines (Bézier, NURBS, …) – Easy and commonly used in CAD systems – Most surfaces are not made of quadrilateral patches • Need to trim surface: Cut of parts – Trimming NURBS is expensive and often has numerical errors – Very difficult to stich together separate surfaces – Very hard to hide seams Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  20. Why Subdivision Surfaces? • Subdivision methods have a series of interesting properties: – Applicable to meshes of arbitrary topology (non-manifold meshes). – No trimming needed – Scalability, level-of-detail. – Numerical stability. – Simple implementation. – Compact support. – Affine invariance. – Continuity – Still less tools in CAD systems (but improving quickly) Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  21. Types of Subdivision • Interpolating Schemes – Limit Surfaces/Curve will pass through original set of data points. • Approximating Schemes – Limit Surface will not necessarily pass through the original set of data points. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  22. Example: Geri’s Game • Subdivision surfaces are used for: – Geri’s hands and head – Clothes: Jacket, Pants, Shirt – Tie and Shoes (Geri’s Game, Pixar 1998) Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  23. Subdivision • Construct a surface from an arbitrary polyhedron – Subdivide each face of the polyhedron • The limit will be a smooth surface Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  24. Subdivision Curves and Surfaces • Subdivision curves – The basic concepts of subdivision. • Subdivision surfaces – Important known methods. – Discussion: subdivision vs. parametric surfaces. Based on slides Courtesy of Adi Levin, Tel-Aviv U. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  25. Curves: Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  26. 1 : 3 Computer Graphics WS07/08 – Spline & Subdivision Surfaces Corner Cutting 1 : 3

  27. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  28. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  29. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  30. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  31. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  32. Corner Cutting Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  33. Corner Cutting A control point The limit curve The control polygon Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  34. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  35. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  36. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces 1 : 1 1 : 1

  37. The 4-Point Scheme 1 : 8 Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  38. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  39. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  40. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  41. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  42. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  43. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  44. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  45. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  46. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  47. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  48. The 4-Point Scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  49. The 4-Point Scheme The limit curve A control point The control polygon Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  50. Subdivision Curves Non interpolatory subdivision schemes • Corner Cutting Interpolatory subdivision schemes • The 4-point scheme Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  51. Basic Concepts of Subdivision • Definition – A subdivision curve is generated by repeatedly applying a subdivision operator to a given polygon (called the control polygon). • The central theoretical questions: – Convergence: Given a subdivision operator and a control polygon, does the subdivision process converge? – Smoothness: Does the subdivision process converge to a smooth curve? Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  52. Surfaces Subdivision Schemes • A control net consists of vertices, edges, and faces. • Refinement – In each iteration, the subdivision operator refines the control net, increasing the number of vertices (approximately) by a factor of 4. • Limit Surface – In the limit the vertices of the control net converge to a limit surface. • Topology and Geometry – Every subdivision method has a method to generate the topology of the refined net, and rules to calculate the location of the new vertices. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  53. Subdivision Schemes • There are different subdivision schemes – Different methods for refining topology Different rules for positioning vertices • – Interpolating versus approximating Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  54. Triangular Subdivision • For control nets whose faces are triangular. New vertices Old vertices Every face is replaced by 4 new triangular faces. The are two kinds of new vertices: • Green vertices are associated with old edges • Red vertices are associated with old vertices. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  55. Loop Subdivision Scheme • Works on triangular meshes • Is an Approximating Scheme • Guaranteed to be smooth everywhere except at extraordinary vertices. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  56. Loop’s Scheme • Location of New Vertices – Every new vertex is a weighted average of the old vertices. The list of weights is called the subdivision mask or the stencil A rule for new red vertices A rule for new green vertices 1 α n /n α n /n α n /n 3 3 1- α n α n /n α n /n 1 ⎧ 3 > n 3 ⎪ ⎛ ⎞ ⎪ 2 ⎛ π ⎞ ⎛ ⎞ 8 α = ⎨ 1 ⎜ 2 ⎟ α = − ⎜ + ⎟ ⎜ ⎟ 40 3 2 cos ⎜ ⎟ n ⎜ ⎟ ⎪ 3 n ⎝ ⎠ ⎝ ⎠ = 64 n n 3 ⎝ ⎠ ⎪ ⎩ 16 n - the vertex valence Original Warren Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  57. Loop Subdivision Boundaries • Subdivision Mask for Boundary Conditions 1 1 1 1 6 2 2 8 8 8 Vertex Rule Edge Rule Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  58. Subdivision as Matrices • Subdivision can be expressed as a matrix S mask of weights w . – S mask is very sparse – Never Implement this way! – Allows for analysis • Curvature • Limit Surface = ˆ S P P mask ⎡ ⎤ ˆ p ⎡ ⎤ ⎡ ⎤ 0 L w w 0 ⎢ ⎥ p 00 01 0 ⎢ ⎥ ⎢ ⎥ ˆ p ⎢ ⎥ 1 L w w 0 p ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = 10 11 1 ˆ p ⎢ ⎥ ⎢ ⎥ 2 M M O ⎢ ⎥ M 0 ⎢ ⎥ ⎢ ⎥ M ⎢ ⎥ ⎢ L ⎥ 0 0 w ⎣ ⎦ ⎣ ⎦ p ⎢ ⎥ nj n ⎣ ˆ ⎦ p 0 S mask Weights Old New Control Points Points Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  59. The Original Control Net Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  60. After 1st Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  61. After 2nd Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  62. After 3rd Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  63. The Limit Surface The limit surfaces of Loop’s subdivision have continuous curvature almost everywhere Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  64. Quadrilateral Subdivision • Works for control nets of arbitrary topology – After one iteration, all the faces are quadrilateral. Old vertices New vertices Old face Old edge Every face is replaced by quadrilateral faces. The are three kinds of new vertices: • Yellow Yellow vertices are associated with old faces faces • Green vertices are associated with old edges • Red vertices are associated with old vertices. Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  65. Catmull Clark’s Scheme Step 1 Step 2 Step 3 First, all the yellow Then the green vertices Finally, the red vertices vertices are are calculated using the are calculated using the calculated values of the yellow values of the yellow vertices vertices 1 1 1 1 1 1 1 1 1 w n 1 1 1 1 1 1 1 1 1 1 n - the vertex valence = ( − w n n n 2 ) Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  66. The Original Control Net Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  67. After 1st Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  68. After 2nd Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  69. After 3rd Iteration Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  70. The Limit Surface The limit surfaces of Catmull-Clarks’s subdivision have continuous curvature almost everywhere Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  71. Edges and Creases • Most surface are not smooth everywhere – Edges & creases – Can be marked in model • Weighting is changed to preserve edge or crease • Generalization to semi-sharp creases (Pixar) – Controllable sharpness – Sharpness (s) = 0, smooth – Sharpness (s) = inf, sharp – Achievable through hybrid subdivision step • Subdivision iff s==0 • Otherwise parameter is decremented Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  72. Adaptive Subdivision • Not all regions of a model need to be subdivided. • Idea: Use some criteria and adaptively subdivide mesh where needed. – Curvature – Screen size • Make triangles < size of pixel – View dependence • Distance from viewer • Silhouettes • In view frustum – Careful! crack • Must avoid “cracks” subdiv Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  73. Edges and Creases • Increasing sharpness of edges Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  74. Edges and Creases • Can be changed on a edge by edge basis Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  75. Texture mapping • Solid color painting is easy, already defined • Texturing is not so easy – Using polygonal methods can result in distortion • Solution – Assign texture coordinates to each original vertex – Subdivide them just like geometric coordinates • Introduces a smooth scalar field – Used for texturing in Geri’s jacket, ears, nostrils Computer Graphics WS07/08 – Spline & Subdivision Surfaces

  76. Advanced Topics • Hierarchical Modeling – Store offsets to vertices at different levels – Offsets performed in normal direction – Can change shape at different resolutions while rest stays the same • Surface Smoothing – Can perform filtering operations on meshes • E.g. (Weigthed) averaging of neighbors • Level-of-Detail – Can easily adjust maximum depth for rendering Computer Graphics WS07/08 – Spline & Subdivision Surfaces

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend