Computer Graphics. - Spline and Subdivision Surfaces - Hendrik Lensch. Computer Graphics WS07/08 Spline & Subdivision Surfaces

Similar documents
Scan Conversion & Shading

Scan Conversion & Shading

Introduction. Basic idea of subdivision. History of subdivision schemes. Subdivision Schemes in Interactive Surface Design

Some Tutorial about the Project. Computer Graphics

Harmonic Coordinates for Character Articulation PIXAR

Interpolation of the Irregular Curve Network of Ship Hull Form Using Subdivision Surfaces

S1 Note. Basis functions.

Reading. 14. Subdivision curves. Recommended:

A Geometric Approach for Multi-Degree Spline

Wavefront Reconstructor

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al.

Hermite Splines in Lie Groups as Products of Geodesics

Modeling, Manipulating, and Visualizing Continuous Volumetric Data: A Novel Spline-based Approach

12/2/2009. Announcements. Parametric / Non-parametric. Case-Based Reasoning. Nearest-Neighbor on Images. Nearest-Neighbor Classification

Interactive Rendering of Translucent Objects

Very simple computational domains can be discretized using boundary-fitted structured meshes (also called grids)

Radial Basis Functions

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

A Five-Point Subdivision Scheme with Two Parameters and a Four-Point Shape-Preserving Scheme

Simplification of 3D Meshes

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Machine Learning: Algorithms and Applications

Research Article Quasi-Bézier Curves with Shape Parameters

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation

Image Representation & Visualization Basic Imaging Algorithms Shape Representation and Analysis. outline

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

Lecture 5: Multilayer Perceptrons

High-Boost Mesh Filtering for 3-D Shape Enhancement

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

A New Solid Subdivision Scheme based on Box Splines

Complex Filtering and Integration via Sampling

Global Illumination: Radiosity

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

1 Linear and Nonlinear Subdivision Schemes in Geometric Modeling

High resolution 3D Tau-p transform by matching pursuit Weiping Cao* and Warren S. Ross, Shearwater GeoServices

Smoothing Spline ANOVA for variable screening

2D Raster Graphics. Integer grid Sequential (left-right, top-down) scan. Computer Graphics

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

Collision Detection. Overview. Efficient Collision Detection. Collision Detection with Rays: Example. C = nm + (n choose 2)

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009)

Shape Control of the Cubic Trigonometric B-Spline Polynomial Curve with A Shape Parameter

K-means and Hierarchical Clustering

3D MODEL DEFORMATION ALONG A PARAMETRIC SURFACE

A Newton-Type Method for Constrained Least-Squares Data-Fitting with Easy-to-Control Rational Curves

Multiblock method for database generation in finite element programs

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009)

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Shape Preserving Positive and Convex Data Visualization using Rational Bi-cubic Functions

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

Line Clipping by Convex and Nonconvex Polyhedra in E 3

GSLM Operations Research II Fall 13/14

Surface Mapping One. CS7GV3 Real-time Rendering

Constrained Shape Modification of B-Spline curves

Electrical analysis of light-weight, triangular weave reflector antennas

Adaptive Fairing of Surface Meshes by Geometric Diffusion

Biostatistics 615/815


In the planar case, one possibility to create a high quality. curve that interpolates a given set of points is to use a clothoid spline,

Haptic Sculpting of Volumetric Implicit Functions

Multi-stable Perception. Necker Cube

Ecient Computation of the Most Probable Motion from Fuzzy. Moshe Ben-Ezra Shmuel Peleg Michael Werman. The Hebrew University of Jerusalem

An Accurate Evaluation of Integrals in Convex and Non convex Polygonal Domain by Twelve Node Quadrilateral Finite Element Method

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Injective Shape Deformations Using Cube-Like Cages

Efficient Distributed File System (EDFS)

The B-spline Interpolation in Visualization of the Three-dimensional Objects

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram

S.P.H. : A SOLUTION TO AVOID USING EROSION CRITERION?

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics

LECTURE : MANIFOLD LEARNING

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

Interactive Multiresolution Surface Viewing

Contours Planning and Visual Servo Control of XXY Positioning System Using NURBS Interpolation Approach

Polyhedral Compilation Foundations

THE PULL-PUSH ALGORITHM REVISITED

Vectorization of Image Outlines Using Rational Spline and Genetic Algorithm

Algorithm for directional projection of parametric curves onto B-spline surfaces

Interpolatory Subdivision Curves with Local Shape Control

Curve Representation for Outlines of Planar Images using Multilevel Coordinate Search

Feature Reduction and Selection

Image Fusion With a Dental Panoramic X-ray Image and Face Image Acquired With a KINECT

Smooth Approximation to Surface Meshes of Arbitrary Topology with Locally Blended Radial Basis Functions

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

Support Vector Machines

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Outline. Discriminative classifiers for image recognition. Where in the World? A nearest neighbor recognition example 4/14/2011. CS 376 Lecture 22 1

Multi-Resolution Geometric Fusion

Outline. Self-Organizing Maps (SOM) US Hebbian Learning, Cntd. The learning rule is Hebbian like:

Fitting & Matching. Lecture 4 Prof. Bregler. Slides from: S. Lazebnik, S. Seitz, M. Pollefeys, A. Effros.

Structure from Motion

Modelling of curves and surfaces in polar. and Cartesian coordinates. G.Casciola and S.Morigi. Department of Mathematics, University of Bologna, Italy

The Theory and Application of an Adaptive Moving Least. Squares for Non-uniform Samples

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers

Local Quaternary Patterns and Feature Local Quaternary Patterns

Hierarchical clustering for gene expression data analysis

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Applications of DEC:

Data Foundations: Data Types and Data Preprocessing. Introduction. Data, tasks and simple visualizations. Data sets. Some key data factors?

Adaptive Selection of Rendering Primitives for Point Clouds of Large Scale Environments

Transcription:

Computer Graphcs - Splne and Subdvson Surfaces - Hendrk Lensch

Overvew Last Tme Image-Based Renderng Today Parametrc Curves Lagrange Interpolaton Hermte Splnes Bezer Splnes DeCasteljau Algorthm Parameterzaton 2

B-Splnes Goal Splne curve wth local control and hgh contnuty Gven Degree: n Control ponts: P 0,..., P m (Control polygon, m n+1) Knots: t 0,..., t m+n+1 (Knot vector, weakly monotonc) The knot vector defnes the parametrc locatons where segments jon B-Splne Curve P( t) = m = 0 N n ( t) P Contnuty: C n-1 at smple knots C n-k at knot wth multplcty k

B-Splne Bass Functons Recursve Defnton ) ( ) ( ) ( otherwse 0 f 1 ) ( 1 1 1 1 1 1 1 0 t N t t t t t N t t t t t N t t t t N n n n n n n + + + + + + + + = < < = 0 1 2 3 4 5 0 1 2 3 4 5 N 0 0 N 1 0 N 2 0 N 3 0 N 4 0 N 0 1 N 1 1 N 2 1 N 3 1 Unform Knot vector

B-Splne Bass Functons Recursve Defnton Degree ncreases n every step Support ncreases by one knot nterval

B-Splne Bass Functons Unform Knot Vector All knots at nteger locatons UBS: Unform B-Splne Example: cubc B-Splnes B = N n n Local Support = Localzed Changes Bass functons affect only (n+1) Splne segments Changes are localzed P = n d n Degree 2

B-Splne Bass Functons Convex Hull Property Splne segment les n convex Hull of (n+1) control ponts Degree 2 (n+1) control ponts le on a straght lne curve touches ths lne n control ponts concde curve nterpolates ths pont and s tangental to the control polygon (e.g. begnnng and end)

Normalzed Bass Functons Bass Functons on an Interval n Partton of unty: N ( t) = 1 Knots at begnnng and end wth multplcty Interpolaton of end ponts and tangents there Converson to Bézer segments va knot nserton

deboor-algorthm Evaluatng the B-Splne Recursve Defnton of Control Ponts Evaluaton at t: t l < t < t l+1 : {l-n,..., l} Due to local support only affected by (n+1) control ponts Propertes Affne nvarance Stable numercal evaluaton All coeffcents > 0 r r n r r r n r r P t P t P t t t t t P t t t t t P = + = + + + + + + + + + ) ( ) ( ) ( ) (1 ) ( 0 1 1 1 1 1 n n d t P = ) (

Knot Inserton Algorthm smlar to deboor Gven a new knot t t l t < t l+1 : {l-n,..., l} T*= T {t} New representaton of the same curve over T* Applcatons Refnement of curve, dsplay Consecutve nserton of three knots at t=3 nto a cubc B-Splne Frst and last knot have multplcty n T=(0,0,0,0,1,2,4,5,6,6,6,6), l=5 + + = + = = + + = 1 1 0 1 ) (1 ) ( ) ( 1 * * 1 0 * l l n l n l t t t t a P a P a P P t N t P n m n

Converson to Bézer Splne B-Splne to Bézer Representaton Remember: Curve nterpolates pont and s tangental at knots of multplcty n In more detal: If two consecutve knots have multplcty n The correspondng splne segment s n Bézer from The (n+1) correspondng control polygon form the Bézer control ponts

NURBS Non-unform Ratonal B-Splnes Homogeneous control ponts: now wth weght w P =(w x, w y, w z, w )= w P = = = = = = = = = m n n n m n m n m n m n w t N w t N t R P w t R w t N P w t N P P t N t P 0 0 0 0 0 ) ( ) ( ) ( mt, ) ( ) ( ) ( ) ( ) (

NURBS Propertes Pecewse ratonal functons Weghts Hgh (relatve) weght attract curve towards the pont Low weghts repel curve from a pont Negatve weghts should be avoded (may ntroduce sngularty) Invarant under projectve transformatons Varaton-Dmnshng-Property (n functonal settng) Curve cuts a straght lne no more than the control polygon does

Examples: Cubc B-Splnes

Knots and Ponts multplcty = n at begnnng and end strctly monotonous knot vector knots or ponts replcated [00012345678999] [0123456789] [P 0, P 1,P 2,P 3,P 4,P 5,P 6, P 7,P 8,P 9,P 0,P 1,P 2 ]

Splne Surfaces

Parametrc Surfaces Same Idea as wth Curves P: R 2 R 3 P(u,v) = (x(u,v), y(u,v), z(u,v)) T R 3 (also P(R 4 )) Dfferent Approaches Trangular Splnes Sngle polynomal n (u,v) va barycentrc coordnates wth respect to a reference trangle (e.g. B-Patches) Tensor Product Surfaces Separaton nto polynomals n u and n v Subdvson Surfaces Start wth a trangular mesh n R 3 Subdvde mesh by nsertng new vertces Dependng on local neghborhood Only pecewse parameterzaton (n each trangle)

Tensor Product Surfaces Idea Create a curve of curves" Smplest case: Blnear Patch Two lnes n space P P 1 2 ( v) = (1 v) P ( v) Connected by lnes P( u, v) = (1 u) P (1 u)((1 v) P00 + vp10) + u((1 v) P Bézer representaton (symmetrc n u and v) P( u, v) = (1 v) P =, j= 0 Control mesh P j 1 B 1 00 01 1 ( u) B + vp + vp ( v) + up 1 j 10 11 ( v) P j 2 ( v) = P 10 01 v P 00 u P 01 + vp 11 ) P 11

Tensor Product Surfaces General Case Arbtrary bass functons n u and v Tensor Product of the functon space n u and v Commonly same bass functons and same degree n u and v P( u, v) = = 0 j= 0 Interpretaton Curve defned by curves P( u, v) = Symmetrc n u and v m n B m ( u) B m n B ( u) = 0 j= 0 n j P ( v) ( v) P j B j ( v) Pj 14243

Matrx Representaton Smlar to Curves Geometry now n a tensor (m x n x 3) Degree u: m v: n Along the dagonal (u=v): m+n Not nce Trangular Splnes ( ) T T V UV n n n nn m T monom V U v v G G G G u u V U v u P U B G B G 00 0 0 1 1 ), ( = = = M L M O M L L

Tensor Product Surfaces Propertes Derved Drectly From Curves Bézer Surface: Surface nterpolates corner vertces of mesh Vertces at edges of mesh defne boundary curves Convex hull property holds Smple computaton of dervatves Drect neghbors of corners vertces defne tangent plane Smlar for Other Bass Functons

Tensor Product Surfaces Modfyng a Bézer Surface

Tensor Product Surfaces Representng the Utah Teapot as a set contnuous Bézer patches http://www.holmes3d.net/graphcs/teapot/

Operatons on Surfaces decausteljau/deboor Algorthm Once for u n each column Once for v n the resultng row Due to symmetry also n other order Smlarly we can derve the related algorthms Subdvson Extrapolaton Dsplay...

Ray Tracng of Splne Surfaces Several approaches Tessellate nto many trangles (usng decasteljau or deboor) Often the fasted method May need enormous amounts of memory Recursve subdvson Smply subdvde patch recursvely Delete parts that do not ntersect ray (Prunng) Fxed depth ensures crack-free surface Bézer Clppng [Sederberg et al.] Fnd two orthogonal planes that ntersect n the ray Project the surface control ponts nto these planes Intersecton must have dstance zero Root fndng Can elmnate parts of the surface where convex hull does not ntersect ray Must deal wth many specal cases rather slow

Hgher Dmensons Volumes Splne: R 3 R Volume densty Rarely used Splne: R 3 R 3 Modfcatons of ponts n 3D Dsplacement mappng Free Form Deformatons (FFD) FFD

Subdvson Surfaces

Modelng How do we... Represent 3D objects n a computer? Construct such representatons quckly and/or automatcally wth a computer? Manpulate 3D objects wth a computer? 3D Representatons provde the foundatons for Computer Graphcs Computer-Aded Geometrc Desgn Vsualzaton Robotcs, Dfferent methods for dfferent object representatons

3D Object Representatons Raw data Range mage Pont cloud Polygon soup Surfaces Mesh Subdvson Parametrc Implct Solds Voxels BSP tree CSG

Range Image Range mage Acqured from range scanner E.g. laser range scanner, structured lght, phase shft approach Structured pont cloud Grd of depth values wth calbrated camera 2-1/2D: 2D plus depth

Pont Cloud Unstructured set of 3D pont samples Often constructed from many range mages

Polygon Soup Unstructured set of polygons

3D Object Representatons Raw data Pont cloud Range mage Polygon soup Surfaces Mesh Subdvson Parametrc Implct Solds Voxels BSP tree CSG

Mesh Connected set of polygons (usually trangles)

Parametrc Surface Tensor product splne patches Careful constrants to mantan contnuty

Subdvson Surface Coarse mesh & subdvson rule Defne smooth surface as lmt of sequence of refnements

Implct Surface Ponts satsfyng: F(x,y,z) = 0

3D Object Representatons Raw data Pont cloud Range mage Polygon soup Surfaces Mesh Subdvson Parametrc Implct Solds Voxels BSP tree CSG

Voxels Unform grd of volumetrc samples Acqured from CAT, MRI, etc.

BSP Tree Bnary space partton wth sold cells labeled Constructed from polygonal representatons

CSG Constructve Sold Geometry Herarchy of boolean set operatons (unon, dfference, ntersect) appled to smple shapes

Motvaton Splnes Tradtonally splne patches (NURBS) have been used n producton for character anmaton. Dffcult to sttch together Mantanng contnuty s hard Dffcult to model objects wth complex topology Subdvson n Character Anmaton Tony Derose, Mchael Kass, Ten Troung (SIGGRAPH 98) (Ger s Game, Pxar 1998)

Motvaton Splnes (Bézer, NURBS, ) Easy and commonly used n CAD systems Most surfaces are not made of quadrlateral patches Need to trm surface: Cut of parts Trmmng NURBS s expensve and often has numercal errors Very dffcult to stch together separate surfaces Very hard to hde seams

Why Subdvson Surfaces? Subdvson methods have a seres of nterestng propertes: Applcable to meshes of arbtrary topology (non-manfold meshes). No trmmng needed Scalablty, level-of-detal. Numercal stablty. Smple mplementaton. Compact support. Affne nvarance. Contnuty Stll less tools n CAD systems (but mprovng quckly)

Types of Subdvson Interpolatng Schemes Lmt Surfaces/Curve wll pass through orgnal set of data ponts. Approxmatng Schemes Lmt Surface wll not necessarly pass through the orgnal set of data ponts.

Example: Ger s Game Subdvson surfaces are used for: Ger s hands and head Clothes: Jacket, Pants, Shrt Te and Shoes (Ger s Game, Pxar 1998)

Subdvson Construct a surface from an arbtrary polyhedron Subdvde each face of the polyhedron The lmt wll be a smooth surface

Subdvson Curves and Surfaces Subdvson curves The basc concepts of subdvson. Subdvson surfaces Important known methods. Dscusson: subdvson vs. parametrc surfaces. Based on sldes Courtesy of Ad Levn, Tel-Avv U.

Curves: Corner Cuttng

Corner Cuttng 3 : 1 1 : 3

Corner Cuttng

Corner Cuttng

Corner Cuttng

Corner Cuttng

Corner Cuttng

Corner Cuttng

Corner Cuttng A control pont The lmt curve The control polygon

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme 1 : 1 1 : 1

The 4-Pont Scheme 1 : 8

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme

The 4-Pont Scheme A control pont The lmt curve The control polygon

Subdvson Curves Non nterpolatory subdvson schemes Corner Cuttng Interpolatory subdvson schemes The 4-pont scheme

Basc Concepts of Subdvson Defnton A subdvson curve s generated by repeatedly applyng a subdvson operator to a gven polygon (called the control polygon). The central theoretcal questons: Convergence: Gven a subdvson operator and a control polygon, does the subdvson process converge? Smoothness: Does the subdvson process converge to a smooth curve?

Surfaces Subdvson Schemes A control net conssts of vertces, edges, and faces. Refnement In each teraton, the subdvson operator refnes the control net, ncreasng the number of vertces (approxmately) by a factor of 4. Lmt Surface In the lmt the vertces of the control net converge to a lmt surface. Topology and Geometry Every subdvson method has a method to generate the topology of the refned net, and rules to calculate the locaton of the new vertces.

Subdvson Schemes There are dfferent subdvson schemes Dfferent methods for refnng topology Dfferent rules for postonng vertces Interpolatng versus approxmatng

Trangular Subdvson For control nets whose faces are trangular. Old vertces New vertces Every face s replaced by 4 new trangular faces. The are two knds of new vertces: Green vertces are assocated wth old edges Red vertces are assocated wth old vertces.

Loop Subdvson Scheme Works on trangular meshes Is an Approxmatng Scheme Guaranteed to be smooth everywhere except at extraordnary vertces.

Loop s Scheme Locaton of New Vertces Every new vertex s a weghted average of the old vertces. The lst of weghts s called the subdvson mask or the stencl A rule for new red vertces α n /n α n /n A rule for new green vertces 1 α n /n 1-α n 3 3 α n /n α n /n 1 2π αn = 40 3+ 2cos 64 n Orgnal 2 α n 3 n > 3 8 = 3 n = 3 16 Warren 1 n - the vertex valence

Loop Subdvson Boundares Subdvson Mask for Boundary Condtons 1 2 1 2 1 8 6 8 1 8 Edge Rule Vertex Rule

Subdvson as Matrces Subdvson can be expressed as a matrx S mask of weghts w. S mask s very sparse Never Implement ths way! Allows for analyss Curvature Lmt Surface = = 0 2 1 0 1 0 11 10 01 00 ˆ ˆ ˆ ˆ 0 0 0 0 0 ˆ p p p p p p p w w w w w P P S n nj mask M M L O M M L L S mask Weghts Old Control Ponts New Ponts

The Orgnal Control Net

After 1st Iteraton

After 2nd Iteraton

After 3rd Iteraton

The Lmt Surface The lmt surfaces of Loop s subdvson have contnuous curvature almost everywhere

Quadrlateral Subdvson Works for control nets of arbtrary topology After one teraton, all the faces are quadrlateral. Old vertces New vertces Old edge Old face Every face s replaced by quadrlateral faces. The are three knds of new vertces: Yellow vertces are assocated wth old faces Green vertces are assocated wth old edges Red vertces are assocated wth old vertces.

Catmull Clark s Scheme Step 1 Step 2 Step 3 1 Frst, all the yellow vertces are calculated 1 1 1 1 Then the green vertces are calculated usng the values of the yellow vertces 1 1 1 1 Fnally, the red vertces are calculated usng the values of the yellow vertces 1 1 1 1 1 1 w n 1 1 1 1 n - the vertex valence w n = n( n 2)

The Orgnal Control Net

After 1st Iteraton

After 2nd Iteraton

After 3rd Iteraton

The Lmt Surface The lmt surfaces of Catmull-Clarks s subdvson have contnuous curvature almost everywhere

Edges and Creases Most surface are not smooth everywhere Edges & creases Can be marked n model Weghtng s changed to preserve edge or crease Generalzaton to sem-sharp creases (Pxar) Controllable sharpness Sharpness (s) = 0, smooth Sharpness (s) = nf, sharp Achevable through hybrd subdvson step Subdvson ff s==0 Otherwse parameter s decremented

Adaptve Subdvson Not all regons of a model need to be subdvded. Idea: Use some crtera and adaptvely subdvde mesh where needed. Curvature Screen sze Make trangles < sze of pxel Vew dependence Dstance from vewer Slhouettes In vew frustum Careful! Must avod cracks subdv crack

Edges and Creases Increasng sharpness of edges

Edges and Creases Can be changed on a edge by edge bass

Texture mappng Sold color pantng s easy, already defned Texturng s not so easy Usng polygonal methods can result n dstorton Soluton Assgn texture coordnates to each orgnal vertex Subdvde them just lke geometrc coordnates Introduces a smooth scalar feld Used for texturng n Ger s jacket, ears, nostrls

Advanced Topcs Herarchcal Modelng Store offsets to vertces at dfferent levels Offsets performed n normal drecton Can change shape at dfferent resolutons whle rest stays the same Surface Smoothng Can perform flterng operatons on meshes E.g. (Wegthed) averagng of neghbors Level-of-Detal Can easly adjust maxmum depth for renderng

Wrapup: Subdvson Surfaces Advantages Smple method for descrbng complex surfaces Relatvely easy to mplement Arbtrary topology Local support Guaranteed contnuty Mult-resoluton Dffcultes Intutve specfcaton Parameterzaton Intersectons