Advanced Graphics Lecture Six Subdivision Surfaces Alex Benton, University of Cambridge – Supported in part by Google UK, Ltd.

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 14: Review / Subdivision Ravi Ramamoorthi Slides courtesy.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 10 Ravi Ramamoorthi
Boolean Operations on Subdivision Surfaces Yohan FOUGEROLLE MS 2001/2002 Sebti FOUFOU Marc Neveu University of Burgundy.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Classic Subdivision Schemes. Schemes Catmull-Clark (1978) Doo-Sabin (1978) Loop (1987) Butterfly (1990) Kobbelt (1996) Mid-edge (1996 / 1997)
On Triangle/Quad Subdivision Scott Schaefer and Joe Warren TOG 22(1) 28 – 36, 2005 Reporter: Chen zhonggui
Subdivision Surfaces Introduction to Computer Graphics CSE 470/598 Arizona State University Dianne Hansford.
Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011.
CS Peter Schröder Subdivision I: The Basic Ideas.
Surfaces Chiew-Lan Tai. Surfaces 2 Reading Required Hills Section Hearn & Baker, sections 8.11, 8.13 Recommended Sections 2.1.4, , 3D Computer.
Fractal Mountains, Splines, and Subdivision Surfaces Jordan Smith UC Berkeley CS184.
Normal based subdivision scheme for curve and surface design 杨勋年
Content Subdivision First some basics (control point polygon, mesh)
1 Subdivision Surfaces CAGD Ofir Weber. 2 Spline Surfaces Why use them?  Smooth  Good for modeling - easy to control  Compact (complex objects are.
11/08/00 Dinesh Manocha, COMP258 Subdivision Curves & Surfaces Work of G. de Rham on Corner Cutting in 40’s and 50’s Work of Catmull/Clark and Doo/Sabin.
CS Subdivision I: The Univariate Setting Peter Schröder.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Introduction to Subdivision Surfaces. Subdivision Curves and Surfaces 4 Subdivision curves –The basic concepts of subdivision. 4 Subdivision surfaces.
Computer Graphics Lecture 13 Curves and Surfaces I.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
Smooth Spline Surfaces over Irregular Topology Hui-xia Xu Wednesday, Apr. 4, 2007.
11/30/04© University of Wisconsin, CS559 Fall 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
Bspline/NURBS and Subdivision Surface Computer Graphics Lecture 15 Taku Komura.
Surfaces Lecture 6 (Modelling). Reminder: Homogenous Co-ordinates l2D Translations cannot be encoded using matrix multiplication because points at the.
Subdivision/Refinement Dr. S.M. Malaek Assistant: M. Younesi.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
4/15/04© University of Wisconsin, CS559 Spring 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Creating & Processing 3D Geometry Marie-Paule Cani
V. Space Curves Types of curves Explicit Implicit Parametric.
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Introduction to Subdivision surfaces Martin Reimers CMA, University of Oslo.
Subdivision Schemes Basic idea: Start with something coarse, and refine it into smaller pieces for rendering –We have seen how subdivision may be used.
Non-Uniform Rational B-Splines NURBS. NURBS Surfaces NURBS surfaces are based on curves. The main advantage of using NURBS surfaces over polygons, is.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
Subdivision Surfaces Ref: Subdivision Surfaces in Character Animation, DeRose et. al, SIGGRAPH98.
Lee Byung-Gook Dongseo Univ.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Subdivision Surfaces Greg Humphreys University of Virginia CS 445, Fall 2003.
11/26/02(C) University of Wisconsin Last Time BSplines.
A Note on Subdivision Kwan Pyo Ko Dongseo University
Subdivision Surfaces Dr. Scott Schaefer.
(c) 2002 University of Wisconsin
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Subdivision surfaces.
Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Subdivision Schemes. Center for Graphics and Geometric Computing, Technion What is Subdivision?  Subdivision is a process in which a poly-line/mesh is.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
Advanced Computer Graphics
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
The Variety of Subdivision Schemes
Jeff Ballard Nick Rasmussen
Introduction to Parametric Curve and Surface Modeling
Subdivision Surfaces 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Jeff Ballard Nick Rasmussen
Last Time B-splines Project 3 was made available
Presentation transcript:

Advanced Graphics Lecture Six Subdivision Surfaces Alex Benton, University of Cambridge – Supported in part by Google UK, Ltd

NURBS patches NURBS patches are (n+1) x (m+1), forming a mesh of quadrilaterals. What if you wanted triangles or pentagons? A NURBS dodecahedron? What if you wanted vertices of valence other than four? NURBS expressions for triangular patches, and more, do exist; but they’re cumbersome.

Problems with NURBS patches Joining NURBS patches with Cn continuity across an edge is annoying. What happens to continuity at corners where the number of patches meeting isn’t exactly four? Animation is tricky: bending and blending are doable, but not easy. Sadly, the world is not made up of shapes that can be made from one smoothly-deformed rectangular surface.

Subdivision surfaces Beyond shipbuilding: we want guaranteed continuity, without having to build everything out of rectangular patches. Applications include CAD/CAM, 3D printing, museums and scanning, medicine, movies… The solution: subdivision surfaces. Geri’s Game, by Pixar (1997)

Subdivision surfaces Instead of ticking a parameter t along a parametric curve (or the parameters u,v over a parametric grid), subdivision surfaces repeatedly refine from a coarse set of control points. Each step of refinement adds new faces and vertices. The process converges to a smooth limit surface. (Catmull-Clark in action)

Subdivision surfaces – History de Rahm described a 2D (curve) subdivision scheme in 1947; rediscovered in 1974 by Chaikin Concept extended to 3D (surface) schemes by two separate groups during 1978: Doo and Sabin found a biquadratic surface Catmull and Clark found a bicubic surface Subsequent work in the 1980s (Loop, 1987; Dyn [Butterfly subdivision], 1990) led to tools suitable for CAD/CAM and animation

Subdivision surfaces and the movies Pixar first demonstrated subdivision surfaces in 1997 with Geri’s Game. Up until then they’d done everything in NURBS (Toy Story, A Bug’s Life.) From 1999 onwards everything they did was with subdivision surfaces (Toy Story 2, Monsters Inc, Finding Nemo...) It’s not clear what Dreamworks uses, but they have recent patents on subdivision techniques.

Useful terms A scheme which describes a 1D curve (even if that curve is travelling in 3D space, or higher) is called univariate, referring to the fact that the limit curve can be approximated by a polynomial in one variable (t). A scheme which describes a 2D surface is called bivariate, the limit surface can be approximated by a u,v parameterization. A scheme which retains and passes through its original control points is called an interpolating scheme. A scheme which moves away from its original control points, converging to a limit curve or surface nearby, is called an approximating scheme. Control surface for Geri’s head

How it works Example: Chaikin curve subdivision (2D) On each edge, insert new control points at ¼ and ¾ between old vertices; delete the old points The limit curve is C1 everywhere (despite the poor figure.)

Notation Chaikin can be written programmatically as: …where k is the ‘generation’; each generation will have twice as many control points as before. Notice the different treatment of generating odd and even control points. Borders (terminal points) are a special case.  Even  Odd

Notation Chaikin can be written in vector notation as:

Notation The standard notation compresses the scheme to a kernel: h =(1/4)[…,0,0,1,3,3,1,0,0,…] The kernel interlaces the odd and even rules. It also makes matrix analysis possible: eigenanalysis of the matrix form can be used to prove the continuity of the subdivision limit surface. The details of analysis are fascinating and beyond the scope of this course; check out Malcolm Sabin’s lecture series, “Computer Aided Geometric Design”, over at the CMS. The limit curve of Chaikin is a quadratic B-spline!

Reading the kernel Consider the kernel h=(1/8)[…,0,0,1,4,6,4,1,0,0,…] You would read this as The limit curve is provably C2-continuous.

Making the jump to 3D: Doo-Sabin Doo-Sabin takes Chaikin to 3D: P = (9/16)A + (3/16)B + (3/16)C + (1/16)D This replaces every old vertex with four new vertices. The limit surface is biquadratic, C1 continuous everywhere. P A B C D

Doo-Sabin in action (3) 702 faces (2) 190 faces (0) 18 faces(1) 54 faces

Catmull-Clark Catmull-Clark is a bivariate approximating scheme with kernel h=(1/8)[1,4,6,4,1]. Limit surface is bicubic, C2-continuous /64 Face Vertex Edge

Catmull-Clark Getting tensor again: Vertex rule Face ruleEdge rule

Catmull-Clark in action

Catmull-Clark vs Doo-Sabin Doo-Sabin Catmull-Clark

Extraordinary vertices Catmull-Clark and Doo-Sabin both operate on quadrilateral meshes. All faces have four boundary edges All vertices have four incident edges What happens when the mesh contains extraordinary vertices or faces? Extraordinary vertex: not the assumed degree. For many schemes, adaptive weights exist which can continue to guarantee at least some (non-zero) degree of continuity, but not always the best possible. CC replaces extraordinary faces with extraordinary vertices; DS replaces extraordinary vertices with extraordinary faces. Detail of Doo-Sabin at cube corner

Extraordinary vertices: Catmull-Clark Catmull-Clark vertex rules generalized for extraordinary vertices: Original vertex: (4n-7) / 4n Immediate neighbors in the one-ring: 3/2n 2 Interleved neighbors in the one-ring: 1/4n 2 Image source: “Next-Generation Rendering of Subdivision Surfaces”, Ignacio Castaño, SIGGRAPH 2008

Schemes for simplicial (triangular) meshes Loop scheme: Butterfly scheme: Vertex Edge Vertex Edge Split each triangle into four parts (All weights are /16)

Loop subdivision Loop subdivision in action. The asymmetry is due to the choice of face diagonals. Image by Matt Fisher,

Creases Extensions exist for most schemes to support creases, vertices and edges flagged for partial or hybrid subdivision.

Continuous level of detail For live applications (e.g. games) can compute continuous level of detail, e.g. as a function of distance: Level 5 Level 5.2Level 5.8

Direct evaluation of the limit surface In the 1999 paper Exact Evaluation Of Catmull- Clark Subdivision Surfaces at Arbitrary Parameter Values, Jos Stam (now at Alias|wavefront) describes a method for finding the exact final positions of the CC limit surface. His method is based on calculating the tangent and normal vectors to the limit surface and then shifting the control points out to their final positions. What’s particularly clever is that he gives exact evaluation at the extraordinary vertices. (Non-trivial.)

Bounding boxes and convex hulls for subdivision surfaces The limit surface is the weighted average of the weighted averages of [repeat for eternity…] the original control points. This implies that for any scheme where all weights are positive and sum to one, the limit surface lies entirely within the convex hull of the original control points. For schemes with negative weights: Let L=max t Σ i |N i (t)| be the greatest sum throughout parameter space of the absolute values of the weights. For a scheme with negative weights, L will exceed 1. Then the limit surface must lie within the convex hull of the original control points, expanded unilaterally by a ratio of (L-1).

Splitting a subdivision surface Many iterrogations rely on subdividing and examining the bounding boxes of the smaller facets. Or just chop the geometry in half! Find new bounding boxes: not just the bounding boxes of the control points of the new geometry Need to include all control points from the previous generation, which influence the limit surface in this smaller part. That’ll extend further, beyond the local control points. Need to extend to include all local support. (Top) 5x Catmull-Clark subdivision of a cube (Bottom) 5x Catmull-Clark subdivision of two halves of a cube; the limit surfaces are clearly different.

Ray/surface intersection To intersect a ray with a subdivision surface, we recursively split and split again, discarding all portions of the surface whose bounding boxes / convex hulls do not lie on the line of the ray. Any subsection of the surface which is ‘close enough’ to flat is treated as planar and the ray/plane intersection test is used. This is essentially a binary tree search for the nearest point of intersection. You can optimize by sorting your list of subsurfaces in increasing order of distance from the origin of the ray.

Rendering subdivision surfaces The algorithm to render any subdivision surface is exactly the same as for Bezier curves: “If the surface is simple enough, render it directly; otherwise split it and recurse.” One fast test for “simple enough” is, “Is the convex hull of the limit surface sufficiently close to flat?” Caveat: splitting a surface and subdividing one half but not the other can lead to tears where the different resolutions meet. →

Rendering subdivision surfaces on the GPU Recent work (2005) has shown how to render subdivision surfaces in hardware using the GPU. This subdivision can be done completely independently of geometry, imposing no demands on the CPU. Uses a complex blend of precalculated weights and shader logic Impressive effects in use at id, Valve, etc! Figure from Generic Mesh Renement on GPU, Tamy Boubekeur & Christophe Schlick (2005) LaBRI INRIA CNRS University of Bordeaux, France

Subdivision Schemes—Summary Approximating Quadrilateral (1/2)[1,2,1] (1/4)[1,3,3,1] (Doo-Sabin) (1/8)[1,4,6,4,1] (Catmull-Clark) Mid-Edge Triangles Loop Interpolating Quadrilateral Kobbelt Triangle Butterfly “√3” Subdivision Many more exist, some much more complex This is a major topic of ongoing research

References Catmull, E., and J. Clark. “Recursively Generated B-Spline Surfaces on Arbitrary Topological Meshes.” Computer Aided Design, Dyn, N., J. A. Gregory, and D. A. Levin. “Butterfly Subdivision Scheme for Surface Interpolation with Tension Control.” ACM Transactions on Graphics. Vol. 9, No. 2 (April 1990): pp. 160–169. Halstead, M., M. Kass, and T. DeRose. “Efficient, Fair Interpolation Using Catmull-Clark Surfaces.” Siggraph ‘93. p. 35. Zorin, D. “Stationary Subdivision and Multiresolution Surface Representations.” Ph.D. diss., California Institute of Technology, 1997 Ignacio Castano, “Next-Generation Rendering of Subdivision Surfaces.” Siggraph ’08, Dennis Zorin’s SIGGRAPH course, “Subdivision for Modeling and Animation”,