REAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT

Size: px
Start display at page:

Download "REAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT"

Transcription

1 REAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT By TIANYUN NI A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA

2 c 2008 Tianyun Ni 2

3 To my family, especially my father and to all of whom have lent encouragement and support during the time spent on this research 3

4 ACKNOWLEDGMENTS I wish to express my sincerest thanks to the chair of my dissertation committee, Dr. Jörg, Peters, for working with me throughout this long enterprise. 4

5 TABLE OF CONTENTS ACKNOWLEDGMENTS LIST OF TABLES LIST OF FIGURES ABSTRACT CHAPTER 1 INTRODUCTION page 1.1 Motivation Problem Statement Modern GPU Pipeline and Current Trends Representations in Surface Modeling Subdivision Surfaces Parametric Patches Bezier technique Related work A NEW SCHEME FOR SURFACE CONSTRUCTION Contribution The Conversion Algorithm The Conversion Rules for a Type-1 Quad The Conversion Rules for a Type-2, or Type-3 Quad Derivation of the coefficients of a c-patch Derivation of λ 0 and λ Derivation of b 211 and b Derivation of b Smoothness Verification Complexity Analysis Number of Patches Cost of Patch Construction Cost of Surface Evaluation Approximation Catmull-Clark Subdivision Surface Water-Tight Surface Verification Discussion GPU IMPLEMENTATION Overview pass Approach

6 3.3 1-pass Approach Coordinate System Transformation Water-Tight Evaluation Conclusion RESULTS Shape Quality Performance Displacement Mapping Morphing and Animation Conclusion PATCH CONVERSIONS FOR MESHES WITH TRI/QUAD/PENT FACETS DISCUSSION AND FUTURE WORK Future GPU API Volume Preservation Adaptive Tessellation REFERENCES BIOGRAPHICAL SKETCH

7 LIST OF TABLES Table page 4-1 ALU operations for evaluation at (u, v) Performance results Performance of the 1-pass implementation

8 LIST OF FIGURES Figure page 1-1 Polygonal modeling Problem statement DirectX 10 pipeline stages DirectX 10 pipeline The primitives The notations of input mesh The three possible configurations The Catmull-Clark stencils The subdivision schemes The suggested rendering passes Future GPU architecture The subdivision schemes Derivation of c-patch Vertex computation Surface conversion Computing control points v, e, f and t, the projection of e Patch-based computation Patch computation The re-parameterization of λ to meet G 1 at the vertex Coefficients b 211 and b 121 of c-patch is derived on top of a ghost patch The choice of middle point in c-patch The center of a bi-cubic patch can be evaluated by the linear combination of the boundary coefficients C 1 transition between a triangular and a bicubic patch G 1 transition between two triangular patches

9 3-1 2-Pass implementation Pass conversion Pass conversion Pass implementation (u, v) on an irregular quad Water-tight Evaluation Shape quality comparison Catmull-Clark approximation comparison Ordinary patches and extraordinary patches GPU smoothed quad surfaces with displacement mapping Close-up of the frog. The refined mesh is water-tight Displacement mapping on the frog model Shape comparison Shape comparison Real time animation on the Sword model Real time animation on the Frog model Asynchronous animation of nine Frogs The reasons for using Tr/Quad/Pent Meshes A quad/tri/pent model Patch representations Triangular representation

10 Abstract of Dissertation Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy REAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT Chair: Jörg, Peters Major: Computer Engineering By Tianyun Ni August 2008 Increased realism in interactive graphics and gaming requires complex smooth surfaces to be rendered at ever higher frame rates. In particular, representations used to model surfaces offline, such as spline and subdivision surfaces, have to be modified or reorganized to allow for efficient usage of the graphics processing unit and its SIMD (Single Instruction, Multiple Data) parallelism. This dissertation presents a novel algorithm for converting quad meshes on the GPU to smooth, water-tight surfaces at the highest speed documented so far. The conversion reproduces bi-cubic splines wherever possible and closely mimics the shape of the Catmull-Clark subdivision surface by c-patches where a vertex has a valence different from 4. The smooth surface is piecewise polynomial and has well-defined normals everywhere. 10

11 CHAPTER 1 INTRODUCTION This chapter introduces the challenges that motivate the dissertation, gives a detailed literature review, positions of the research relative to the current state of the art. and an overview of the modern GPU pipeline. 1.1 Motivation In graphics, 3D objects are approximated by polyhedral meshes of great complexity. For example, a game character can consist of tens of thousands of polygons (Figure 1-1). Increased realism in interactive gaming demands such meshes to be animated and rendered in real-time. There are essentially two major approaches in the literature which serve this purpose: Polygonal Modeling and Higher-order Surface Modeling. There are two scenarios of animations: Morphing and Skinning. Morphing is used to change one image into another through a seamless transition. Skinning is a common technique to deform characters [20, 23, 24, 32]. The animated mesh, referred as a skin, is deformed based on the pose of an underlying skeleton. In Polygonal Modeling (Figure 1-1), skinning and morphing are applied to a high-detail mesh created by an artist. Most games currently use this approach. This technique involves redundant work due to minimal sharing in Polygonal Modeling representation. In addition, a large number of vertices in a complex mesh must be fed into the graphics pipeline via the GPU s memory bus, which is a potential bottleneck. Figure 1-1. Polygonal Modeling: currently the popular animation approach in games. 11

12 The alternative approach, Surface Modeling, animates a coarse mesh (Figure 1-2). Subdivision surfaces and parametric patches, as two popular high-order surface representations, both support level of detail rendering (see Section 1.4). Highly-detailed 3D models are produced by displacement mapping [11]. Displacement mapping adds fine details in form of scalar fields on the smooth surface defined by the coarse mesh. As a specific instance, Lee [27] proposes Displaced Subdivision Surface to represent a detailed surface model as a scalar value displacement over a smooth surface domain. This approach reduces the number of vertices that must be read and animated in each frame because complex geometric details are generated on the GPU. The runtime cost now includes the conversion process from the coarse input mesh to the final complex mesh. The conversion process involves surface construction, evaluation and displacement mapping. Figure 1-2. Each high-detail mesh in Surface Modeling is represented by a coarse control mesh with a displacement map. The coarse control mesh is first converted to a smooth surface. Then the surface is tessellated and the vertices are perturbed in the normal directions based on the corresponding value in the displacement map. Last, the normal at each vertex of the refined highly-detailed mesh is updated. In summary, the advantages of Surface Modeling are 1. lower computation cost of animation because skinning is done on the coarse mesh, not the final dense mesh; 2. memory and bandwidth savings by encoding most detail as one-dimensional displacements rather than three-dimensional vectors; 12

13 3. support of refinement level on the fly; 4. customization of archetypes: we can model different 3D models with the same coarse mesh, changing only the displacement map; 5. support of adaptive tessellation: evaluation does not have to be on a uniform grid. The disadvantages of Surface Modeling is that modern GPUs cannot render such surface directly. The surface must be converted into triangles or quads through a process of tessellation and evaluation. Therefore, Surface Modeling becomes more attractive as a real-time technique only if the conversion is more cheaply than the cost of reading and animating a high-polygon mesh. Our goal is to design such a scheme on the GPU. 1.2 Problem Statement Meshes consist of pure quadrilateral facets are common in modeling for animation. Any polyhedral mesh can be converted into such a quad mesh by one step of mesh refinement. But a good designer creates meshes with the quad-restriction in mind so that no global refinement is necessary. We therefore focus on quadrilateral meshes and aim to derive a set of efficient rules directly on the GPU (Figure 1-2, the red dotted rectangle) that produce surfaces with good visual quality. Specifically the resulting surfaces should 1. generate a small number of low degree polynomials; 2. possess smooth geometry (no extra cost for smooth shading); 3. closely approximate Catmull-Clark surfaces (a standard modeling tool); 4. are water-tight (no pixel drops out); 5. map well to the graphics pipeline and leverage the strengths of GPU computation. 13

14 1.3 Modern GPU Pipeline and Current Trends A graphics processing unit (GPU) is a dedicated graphics rendering device. Its SIMD architecture has evolved substantially over the last decade. This highly parallel structure makes it more effective than general-purpose CPUs for a range of algorithms. Modern GPUs expose a programmable parallel stream processing pipeline as a series of short programs called shaders. During the last five years, major graphics software libraries such as OpenGL and DirectX are used to program the GPU via shaders on a programmable pipeline, which has mostly superseded the older fixed-function pipeline. The two most popular graphics software libraries, DirectX and OpenGL, currently both specify APIs for three types of shaders: vertex, geometry, and pixel shader. The shaders in DirectX10 system [4](Figure 1-4 ) share a common core that accesses up to 128 memory buffers and 16 parameter (constant) buffers. Vertex and pixel shaders use a one-in, one-out data processing model. In contrast, the geometry shader has a limited ability to amplify or reduce primitive count and thus is able to change meshes. Figure 1-3 shows the input Figure 1-3. The input and output of each pipeline stage in DirectX 10 system and output of each pipeline stage. The more detailed explanation of each stage is as follows: 14

15 Figure 1-4. DirectX 10 Pipeline 1. The Input Assembler (IA) gathers vertex data to set up vertex and index buffers. Vertex buffers contain per-vertex data while index buffers define geometry primitives as integer indices into vertex buffers. Indexing helps avoid redundant computations of the same vertex. 2. The vertex shader (VS) typically processes vertex-based operations such as changing the position and normal of a single vertex. The computations in this stage are local. Each vertex only has its own information and does not communicate with other vertices. The VS is most commonly used to transform vertices from object space to clip space. 3. The geometry shader (GS) processes the vertices of a single primitive. A primitive can be a point, a line segment, a triangle, a point with adjacency, a line segment with adjacency, and a triangle with adjacency (Figure 1-5). Due to the availability of the primitive vertices up to 6 vertices for a triangle with adjacency), the computations in the stage are less local than those on the VS and PS. The GS can emit additional primitives. This new amplification feature, introduced in DirectX10, adds more flexibility and makes a number of algorithms [1] possible to be implemented on the GPU, such as mesh refinement, shadow volumes, dynamic particle systems, etc. The geometry shader output may be fed to the rasterizer stage and/or to a vertex buffer in memory via the stream output stage. 15

16 4. The rasterizer (TR) is a fixed-function stage generating fragments by filling in the polygons sent through the graphics pipeline. Clipping, culling, perspective divide, viewport transform, primitive set-up, scissoring, depth offset also happen in the stage. 5. The pixel shader (PS) operates on one fragment at a time. Usually scene lighting and pixel-related effects such as bump mapping and color tone mapping occur in the PS. 6. The output merger (OM) takes a fragment from PS and performs traditional stencil and depth testing operations as well as render target blending to generate a final pixel on the screen. Figure 1-5. The six primitives used in GS The future GPU pipeline [29, 48] is expected to provide a Tessellation Unit, combined with new shader stages for patch conversion and evaluation of tessellated high-order surfaces. The Tessllator provides a solution to adaptive refinement on the graphics hardware. Based on userprovided tessellation factors per edge, the tessellator adaptively creates a sampling pattern of the underlying parametric domain and automatically generates a set of parametric domains. In addition, two special shaders are introduced to the next-generation GPU pipeline. The patch shader converts an input mesh to a set of patches. The evaluation shader takes the (u, v) output of the tessellator and evaluates the patch at (u, v). This future GPU architecture also allows the GPU to exploit more parallelism because multiple arithmetic units can be running the same evaluation shader. Moreover tessellation occurs on the GPU and overcomes the bottleneck of bus bandwidth caused by model complexity. The new GPU design indicates Surface Modeling is the trend for real-time graphics. 16

17 1.4 Representations in Surface Modeling In Computer Graphics, surfaces are represented by polyhedral meshes. A polyhedral mesh is a collection of vertices, edges and facets. The valence of the vertex is the number of its incident edges. Each facet is an n-sided polygon. In a triangular (or quadrilateral) mesh, n equals 3 (or 4 respectively). An arbitrary mesh has n-sided polygons where the value of n is arbitrary. The difference between Regular and Irregular Vertices are explained in Figure 1-6. Figure 1-7 illustrates three possible types of a facet. Figure 1-6. Tri- and Quadrilateral meshes and facet types 1,2,3. Figure 1-7. The three possible configurations. Type-1 Quad is regular. Type-2 or 3 is irregular. Parametric patches and subdivision surfaces are major tools for modeling freeform surfaces with arbitrary topology. A more intuitive way for inexperienced users to create shape by drawing curves, or sketch is also available [22, 36] Subdivision Surfaces Subdivision surfaces, as part of standard modeling packages (e.g., 3DMax, Maya, Softimage, Mirai, Lightwave, etc.), have proven to be a useful modeling tool. Subdivision schemes were first introduced by [10, 12, 31]. They generate a smooth surface through mesh refinement 17

18 process. This method begins with a coarse mesh that approximates a 3d model, known as a control mesh. Each vertex in the control mesh is called a control point. Control points influence the shape of the limit surface. The mesh is refined after each subdivision step by inserting new vertices into the mesh, refining existing point positions, and updating the connectivity. The positions of the new vertices in the mesh are computed by the averaging rules that apply to the positions of nearby old vertices. The averaging rules are different from scheme to scheme (see a comparison in Figure 1-9), and it is these rules that determine the properties of the surface. The graphs that illustrates the rules are called stencils. The binary subdivision splits each edge into 2 while ternary subdivision split each edge into 3. Usually each subdivision scheme has at most three types of rules: vertex stencil, edge stencil, and face stencil. For example, the stencils of Catmull-Clark subdivision is shown in Figure 1-8. The refinement rules includes stencils for smooth surface as well as special rules for creating sharped or semi-sharped features. Each refinement step produces a denser mesh than the previous one. The limit subdivision surface is the surface produced from this process after infinitely many times of refinements. In practical use however, this algorithm is only applied a limited, and usually four, number of times. Figure 1-8. The stencils used in Catmull-Clark subdivision. These stencils define the rules to derive the new vertices that lie on the old vertices, edges, and facets. A realization of tessellation-on-the-fly for Loop subdivision surfaces was proposed in [33]. Pulli [44] implemented Loop s subdivision scheme with additions by Hoppe et al [19]. Bischoff [3] proposed a forward-differencing method that only requires a constant amount of memory regardless of subdivision step. DeRose [13] generalized the infinitely sharp creases of [19] to obtain semi-sharp creases. Hoppe [19] extended Loop s scheme by introducing 18

19 Figure 1-9. Classification of common Subdivision Schemes. subdivision rules that lead to a piecewise smooth surface with features such as creases, corners, darts, and conical vertices. Adaptive subdivision can dramatically speed up the performance because the level of detail(lod) is updated based on dynamic distance with the camera as well as the complexity of each part of the model. Adaptive refinement is previously implemented using quad-tree data structure [50]. Each level of the tree represents one refinement level of the mesh. However, it is difficult to map the recursive non-uniform tree structure to parallel computation. Bunnell [9] provides code for adaptive refinement. Even though this code was optimized for an earlier generation GPUs, this implementation adaptively renders the subdivision surfaces in real-time on current hardware. Lai and Cheng [26] implemented adaptive Catmull-Clark subdivision. A hardware architecture support for adaptive refinement is proposed by [5] The implementation of subdivision surfaces on the GPU can be roughly categorized into three groups: (I) recursive evaluation [9, 13, 28, 44, 46]; (II) direct evaluation [45, 47]; (III) pre-tabulated basis function composition [6, 7]. Recursive evaluation is the most intuitive way, but not the most efficient approach. Stam [47] directly evaluates subdivision surfaces at 19

20 arbitrary parameter values. However, Stam s method can not evaluate a mesh that contains Type-3 quads. Moreover, the required projection of control points into the eigen space is too complex for large meshes on the GPU. The weakness of [6, 7, 9, 46] is not able to convert a mesh with Type-3 quads either. To get rid of those quads usually means applying at least one Catmull- Clark subdivision step on the CPU and four-fold data transfer to the GPU. In more detail, Shiue implements recursive Catmull-Clark subdivision using several passes via the pixel shader, using textures for storage and spiral-enumerated mesh fragments for maximizing parallelism [46]. Bolz tabulates the subdivision nodal functions up to a given density and linearly combine them in the GPU [6, 7]. The number of nodal functions equals the number of the vertices of the input mesh. One of the obvious advantages of subdivision surfaces is they can model surfaces of arbitrary topological type. Also because of static refinement rule for each scheme subdivision surfaces are easy to implement. Although subdivision surfaces have been known for nearly twenty years, their use has been hindered in realtime applications such as games because recursive refinement is neither memory efficient nor performance efficient. Multiple passes are required to render a visually smooth surface. Moreover, approximately 4-fold of geometry increase after each subdivision step causes heavy memory traffic on the bus between the CPU and the GPU Parametric Patches Since current and impending GPU configurations favor short explicit surface definitions over recursively defined surfaces, the alternative Patch-based refinement has been advocated for fast rendering. Parametric patches (short as PP) are rendered directly in terms of their polynomial representations, as opposed to a collection of approximating facets. Generally speaking, PP converts control meshes to a set of patches that are parametric piecewise polynomials. PP schemes can conveniently fit into a 2-pass implementation on the current graphics pipeline (Figure 1-10). The two rendering passes are combined to one pass in a future GPU pipeline (Figure 1-11) [48]. 20

21 Figure The animation, Displacement Mapping(DM) take place in VS of the first pass, and second pass respectively. The first pass converts the deformed control mesh to its parametric patch representations. In the following pass, the details are added using DM after the evaluation of the produced patches from previous pass. The overall speed of a PP scheme is influenced by both the complexity of patches and the number of patches. For shape measurements, a desired PP scheme ensures at least G 1 continuity across the adjacent patches and is a close approximation of subdivision surfaces. One of the biggest challenge is to ensure the smoothness everywhere over the patches. Peters explained how to solve the vertex enclosure problem and geometric continuity in [39, 41]. GPU-based evaluation of trimmed NURBs surfaces is proposed in [16, 25]. Peters [40] used an approximation to the limit surface of Doo-Sabin subdivision to get a quickly convergent series of approximations to the volume of the enclosed subdivision surface. The difficult problem of filling n-sided holes is recently solved by [21, 42]. Bajaj et al. [2] introduced A-patches in tri-variate BB form with few free parameters to adjust the shape both locally and globally. In [15], the free-form surface is represented in either NURBS form or as cubic triangular Bézier patches An explicit spline representation of smooth free-form surfaces is to form the basis of an interactive sculpting environment. In the spirit of the Tessllator, Boubekeur [8] 21

22 Figure One possible pass on the future graphics rendering pipeline, describes a generic refinement pattern for Surface Modeling (tessellation + displacement) on any programmable GPU Bezier technique The Bézier form is a parametric surface representation and was first developed in 1972 by the French engineer Pierre Bézier. A comprehensive overview of the Bézier form can be found in [43]. A Bézier patch is a defined by control points. A Bézier surface, as a set of Bézier patches, are piecewise polynomials. They are visually intuitive and mathematically convenient due to the following properties: 1. Affine invariance: Applying an affine transformation to a control mesh applies it to the corresponding Bézier patch as well. 2. The convex hull property: A Bézier patch lies completely within the convex hull of its control points, and therefore also completely within the bounding box of its control points in any given Cartesian coordinate system. There are two types of Bézier patch: 22

23 A tensor product patch in Bézier form of degree m by n is defined as: g(u, v) := m i=0 n ( m g ij i j=0 ) ( ) n u i (1 u) m i v j (1 v) n j. j where (u, v) is a barycentric coordinate on the domain of [0, 1] [0, 1]. A triangular Bézier patch of degree n is defined as: b(s, t, w) := i+j+k=n i,j,k 0 b ijk n! i!j!k! si t j w k. where (s, t, w) are the barycentric coordinates on a triangle domain Related work For quadrilateral input meshes, it is well known that Type-1 quads can be converted into degree 3 by 3 patches in tensor-product Bézier form by the standard B-spline to Bézier conversion rules [14]. Therefore, any two adjacent patches derived from ordinary quads will join C 2. The interesting aspect is the conversion of Type-2 and Type-3 quads. A number of techniques(see a comparison in Figure 1-12) exist to smooth out quad meshes. Peters [38] generates NURBS output, that could be rendered, for example by the GPU algorithm of [17]. But this has not been implemented. The method of [30] generates one bicubic patch per quad following the shape of Catmull-Clark surfaces. Since these bicubic patches typically do not join smoothly, Loop and Schaefer compute two additional patches whose cross product approximates the normal of the bicubic patch. As pointed out in [49], this trompe l oeil represents a simple solution when true smoothness is not needed. Comparing the number of operations in construction and evaluation, the method of [30] should run at comparable speeds to our GPU quad mesh smoothing. Our method [37] designs a c-patch for converting an irregular quad. The resulting c-patches form a G 1 surface. The alternative algorithm proposed by [35] uses a bi-5 Bézier patch for each irregular quad. 23

24 Figure This figure compares existing PP schemes in terms of how well they meet the performance and shape measurements. geom=geometry patches, tan=tangent patches. 24

25 CHAPTER 2 A NEW SCHEME FOR SURFACE CONSTRUCTION 2.1 Contribution This thesis proposes a set of rules for converting a quadrilateral mesh to a surface consisting of bi-cubic splines wherever possible. Each irregular quad (Figure 1-7) is converted to a novel C 1 surface patch (short c-patch). The surface closely mimics the shape of the Catmull-Clark subdivision surface and is constructed entirely by local parallel operations on the GPU. The resulting surface is piecewise polynomial and has well-defined normals everywhere. The evaluation avoids pixel dropout. A c-patch is a C 1 piecewise polynomial patch with cubic boundary. It is defined by 24 coefficients whose instantiation for a smooth surface is given in Section xxx below and indicated in Figure 2-1. A c-patch has an alternative representation as four triangular, total degree 4 patches in Bernstein-Bezier form (Figure 2-5 right). Figure 2-1. The c-patch coefficients. For i = 0, 1, 2, 3, the boundary coefficients v i and e i j defined by vertex neighborhoods(figure 2-4 specifies the formulas). The interior coefficients b i 211, bi 121, bi 112 (figure 2-6), where i = 0..3, j = 0..n i, and n i is the valence of v i. 2.2 The Conversion Algorithm Here we give the detailed algorithm for converting the quad mesh into coefficients that define a smooth surface of low degree. Essentially, the conversion from a mesh to a patch 25

26 Figure 2-2. Smoothing the vertex neighborhood according to Figure 2-4. The center point p, its direct neighbors p 2j and diagonal neighbors p 2j+1 form a vertex neighborhood, j = 0..n 1. Figure 2-3. a) A quad neighborhood defining a surface piece. b) A bicubic patch with 4 4 control points. This patch is the output if the quad is regular, and used to determine the shape of a c-patch c) if the quad is irregular. A c-patch is defined by 4 6 control points displayed as and can alternatively, for analysis, be represented as four C 1 -connected triangular pieces of degree 4 with degree 3 outer boundaries identical to the bicubic patch boundaries. 26

27 consists of computing new points near a vertex using the knowledge of the vertex neighborhood. A vertex neighborhood consists of a mesh point p and mesh points p k, k = 0,...,2N 1 of all quads surrounding p (Figure 2-2). the union of the four vertex neighborhoods is a the quad neighborhood(figure 2-3, A.) that defines a patch. In our scheme, the patch is either a tensor product bi-cubic Bézier patch, or a c-patch The Conversion Rules for a Type-1 Quad Recall that a quad is Type-1 if all four vertices have 4 neighbors. Type-1 quads are considered regular in the literature. Such a facet will be converted into a degree 3 by 3 patch in tensor-product Bézier form by the standard B-spline to Bézier conversion rules [14]. Therefore, any two adjacent patches derived from Type-1 quads will join C 2. Figure 2-3 illustrates the derivation process from a quad to a Bi-cubic Bézier patch. The conversion rules are shown in Figure 2-4. Figure 2-4. Computing control points v, e, f and t, the projection of e, at a vertex of valence N from the mesh points p ( j of a vertex neighborhood; the subscripts are modulo 2N. By default, σ N := c N ) (c N + 9)(c N + 1) /16, the subdominant eigenvalue of Catmull-Clark subdivision. A vertex v computed according to Figure 2-4 is the limit point of Catmull-Clark subdivision as explained, for example, in [18]. The rules for e j and f j are the standard rules for converting a uniform bicubic tensor-product B-spline to its Bézier representation. The points t j are a projection of e j into a common tangent plane (see e.g. [15]). The default scale factor σ is the subdominant eigenvalue of Catmull-Clark subdivision. We note that for N = 4, e j+2 = 2v e j and σ = 1/2 so that the projection leaves the tangent control points invariant as 27

28 t j = e j : for N = 4, t j = v (e j e j+2 ) = v + (e j v) = e j. (2 1) In the next stage, we combine information from four vertex neighborhoods, as shown in Figure 2-5, to populate a tensor-product patch g of degree 3 by 3 in Bézier form [14]: g(u, v) := 3 k=0 3 ( ) ( ) 3 3 g kl u k (1 u) 3 k v l (1 v) 3 l. k l l=0 The patch is defined by its 16 control points g kl. The formulas of Figure 2-4 make this patch the Bézier representation of a bicubic spline in B-spline form. For example, in the notation of Figure 2-5, (g k0 ) k=0,..3 = (v 0, t 0 0, t1 1, v1 ). Figure 2-5. Patch construction. On the left, four vertex neighborhoods with vertices v i each contribute one sector to assemble the 4 4 coefficients of the Bézier patch g, for example g 00 = v 0, g 10 = e 0 0, g 11 = f 0, g 30 = v 1, g 31 = e 1 0 (we use superscripts to indicate vertices). On the right, the same four sectors are used to determine a c-patch if the underlying quad is extraordinary. The indices of the control points of g and b i are shown. Note that only a subset of the coefficients of the four triangular pieces b i is actually computed to define the c-patch. The full set of coefficients displayed here is only used to analyze the construction. The indexing of 15 coefficients of a quartic triangular patch is shown on the right. We use this labeling throughout the dissertation. 28

29 2.2.2 The Conversion Rules for a Type-2, or Type-3 Quad Type-2 and Type-3 quads are known as irregular. The irregular quads have at least one and possibly up to four vertices with valence other than 4. For each irregular quad, the conversion involves two steps: 1. Apply regular rules defined in Figure 2-4 to generate v i and e i j shown in Figure 2-1 left. 2. Then apply rules in Figure 2-6 to yield b i 211, bi 121, bi 112 shown in Figure 2-1 right. We use the bicubic patch to outline the shape as we replace it by a c-patch (Figure 2-3, c). A c-patch has the right degrees of freedom to cheaply and locally construct a smooth surface. We introduce the c-patch in terms of a well-known Bézier form of a polynomial piece b i of total degree 4 [14]: b i (u 1, u 2 ) := k+l+m=4 k,l,m 0 b i klm 4! k!l!m! uk 1 ul 2 (1 u 1 u 2 ) m. (2 2) The c-patch is equivalent to the union of four b i, i = 0, 1, 2, 3 of total degree 4, but defined by only 4 6 c-coefficients constructed in Figures 2-4 and 2-6: v i, t i 0, t i 1, b i 211, b i 121, b i 112, i = 0, 1, 2, 3. These 24 c-coefficients imply the missing interior control points of the representation (2 2) by C 1 continuity between the triangular pieces: for j = 0, 1, 2, 3 and i = 0, 1, 2, 3, b i 3 j,0,1+j = b i 1 0,3 j,1+j := (bi 3 j,1,j + b i 1 1,3 j,j )/2; (2 3) and the boundary control points b i kl0 are implied by degree-raising [14]: b i 400 := vi, b i 310 := (vi + 3t i 0 )/4, bi 220 := (ti 0 + ti+1 1 )/2, b i 130 := (v i+1 + 3t i+1 1 )/4, b i 040 := v i+1. (2 4) For all objects with boundaries, the boundary rules are simply the derivation of cubic Bézier curves defined by (v i, t i 0, t i+1 1, v i+1 ). Basis functions corresponding to the 24 c-coefficients of the 29

30 Figure 2-6. Formulas for the 4 3 interior control points that, together with the vertex control points v i and the tangent control points t i j, define a c-patch. See also Figures 2-11 and Here ci := cos 2π N i, s i := sin 2π N i and superscripts are modulo 4. By default, g := ( 3 i=0 vi + 3(e i 0 + ei 1 ) + 9fi )/64, the central point of the ordinary patch. c-patch can be read off by setting one c-coefficient to one and all others to zero and then applying (2 3) and (2 4). 2.3 Derivation of the coefficients of a c-patch When a c-patch sector b meets a c-patch sector a (Figure 2-12), the following equation must hold to preserve G 1 continuity across the boundary between b and a, λ(u) 1 b(u, 0) = 2 b(u, 0) + 1 a(0, u), (2 5) where, with denoting the scalar, respectively three scalar products for the vectors, λ(u) := (λ 0, λ 1 ) (u, 1 u) 1 b(u, 0) := 3(U 0, 2U 1, U 2 ) (u 2, u(1 u), (1 u) 2 ) 2 b(u, 0) := 4(v 0, 3v 1, 3v 2, v 3 ) (u 3, u 2 (1 u), u(1 u) 2, (1 u) 3 ) 1 a(0, u) := 4(w 0, 3w 1, 3w 2, w 3 ) (u 3, u 2 (1 u), u(1 u) 2, (1 u) 3 ) 30

31 Equation (2 5) can be rewritten in a collection of the following simplified forms in terms of U i, v i, w i. 3λ 0 U 0 = 4v 0 + 4w 0 (2 6) 6λ 0 U 1 + 3λ 1 U 0 = 12(v 1 + w 1 ) (2 7) 3λ 0 U 2 + 6λ 1 U 1 = 12(v 2 + w 2 ) (2 8) 3λ 1 U 2 = 4v 3 + 4w 3 (2 9) Derivation of λ 0 and λ 1 The scalar λ 0 is derived from (2 6). (2 9) sets the constraint for λ 1. Let U 0 := (1, 0), V 0 := (cos 2π n 0, sin 2π n 0 ), and W 0 := (cos 2π n 0, sin 2π n 0 ). (Figure 2-7) We know u 0 = 3 4 U 0, u 3 = 3 4 U 2 from degree raising. v 0 + w 0 = 1 2 (3 4 V U 0) (3 4 W U 0) = 3 4 (1 + cos 2π n 0, 2 = 3 2π (1 + cos, 0) 4 n 0 Hence, 4(v 0 + w 0 ) = 3(1 + cos 2π n 0 )U 0 λ 0 = (1 + cos 2π n 0 ). 2π sin n 0 ) (1 + cos 2π n 0, 2 2π sin n 0 ) 2 = 3 2π (1 + cos )U 0 (2 10) 4 n 0 Similarly, because V 3 = (1 cos 2π n 1, sin 2π n 1 ) and W 3 = (1 cos 2π n 1, sin 2π n 1 ), Hence, λ 1 = (1 cos 2π n 1 ). 4(v 3 + w 3 ) = 3(1 cos 2π n 1 )U 2 (2 11) Derivation of b 211 and b 121 To derive the formulas for b i 211 and its symmetric counterpart bi 121 note that the formulas must guarantee a smooth transition between b i and its neighbor patch on an adjacent quad, 31

32 Figure 2-7. The re-parameterization of λ to meet G 1 at the vertex regardless whether the adjacent quad is regular or irregular. That is, the formulas are derived to satisfy simultaneously two types of smoothness constraints (see Section 2.4). From Equation Triangular patches Ghost patch Figure 2-8. Coefficients b 211 and b 121 of c-patch is derived on top of a ghost patch. (2 7), we obtain b a 211 = 1 2 λ 0U λ 1U 0 + 2b 310 (2 12) To get a second constraint and determine b 211 uniquely, we consider the values b 211 and a 211 if each ghost patch in terms of sin averages (Figure 2-8): 4s 0 (b 211 b 310 ) + 4s 1 (b 211 b 220 ) = 3(b 11 b 10 ) yields b 211 = 4s 0b s 1 b (f 0 0 t0 0 ) 4(s 0 + s 1 ) (2 13) 32

33 Similarly, Therefore, Together with Equation (2 12), a 211 = 4s 0b s 1 b (f 0 n 0 1 t0 0 ) 4(s 0 + s 1 ) b 211 a 211 = 3(f0 0 e0 0 ) 2(s 0 + s 1 ) b 211 = b λ 0(t 1 1 t0 0 ) λ 1(t 0 0 v 0) + 3(f0 0 e0 0 ) 4(s 0 + s 1 ) (2 14) (2 15) (2 16) Equation (2 8) implies b a 121 = 1 4 λ 0U λ 1U 1 + 2b 130 (2 17) Using the similar approach as deriving b 211, we yield 4s 0 (b 121 b 220 ) + 4s 1 (b 121 b 130 ) = 3(b 21 b 20 ) yields Similarly, (2 18) and (2 19) (2 18) and (2 20) b 121 = 4s 1b s 0 b (f 1 0 t 1 1) 4(s 0 + s 1 ) a 121 = 4s 1b s 0 b (f 1 1 t1 1 ) 4(s 0 + s 1 ) b 121 a 121 = 3(f1 0 e 1 1) 2(s 0 + s 1 ) (2 18) (2 19) (2 20) b 121 = b λ 0(v 1 t 1 1 ) λ 1(t 1 1 t0 0 ) + 3(f1 0 e 1 1) 4(s 0 + s 1 ) (2 21) The formulas (2 21) and (2 21) are the same as shown in Figure Derivation of b 112 By contrast, b i 112 is not pinned down by continuity constraints. We could choose each bi 112 arbitrarily without changing the formal smoothness of the resulting surface. However, we opt for increased smoothness at the center of the c-patch and additionally use the freedom to closely mimic the shape of Catmull-Clark subdivision surfaces, as we did earlier for vertices. First, we 33

34 approximately satisfy four C 2 constraints across the diagonal boundaries at the central point b 004 (Figure 2-9) by enforcing b b b b b b q = 1 b b2 121 q, (2 22) 2 b b3 121 q b b q where q := i=0 (bi 211 bi 121 ). The perturbation by q is necessary, since the coefficient matrix of the C 2 constraints is rank deficient. After perturbation, the system can be solved with the last equation implied by the first three. We add the constraint that the average of b i 112 matches g := g( 1, 1 ), the center position of the bicubic patch. 2 2 Figure 2-9. Dark lines cover the control points involved in the C 2 constraints (2 22). The points on dashed lines are implied by averaging b b b b = 1 2 b b1 121 q b b2 121 q b b q 8g g lies on the Bicubic patch at u = 0.5 and v = 0.5. The Bicubic control points are given except interior 4 points, because all the control points on the boundaries are calculated. We can 34

35 use a mask of determining Bézier control points from a uniform bicubic B-spline surface. Figure 2-10(a) is a mask for b 11. For other interior points, we can use a symmetric mask. Figure The center of a bi-cubic patch can be evaluated by the linear combination of the boundary coefficients. Figure 2-10(b) shows a mask for the evaluation of Bicubic patch at (0.5, 0.5). g = 1 64 (b b b 02 + b b b b b 13 +3b b b b 23 + b b b 32 + b 33 ) Now, we can solve for the b i 112, i = 0, 1, 2, 3 and obtain the formula of Figure Smoothness Verification In this section we formally verify the following lemma. For the purpose of the proof, we view the c-patch in its equivalent representation as four Bézier patches of total degree 4. Lemma 1. Two adjacent polynomial pieces a and b defined by the rules of Section 2.2 (Figure 2-4, Figure 2-6, (2 3), (2 4)) meet at least (i) C 2 if a and b correspond to two regular quads; (ii) C 1 if a and b are adjacent pieces of a c-patch; (iii) C 1 if a and b correspond to two quads, exactly one of which is regular; (iv) with tangent continuity if a and b correspond to two different irregular quads; Proof. (i) If a and b are bicubic patches corresponding to regular quads, they are part of a bicubic spline with uniform knots and therefore meet C 2. (ii) If a and b are adjacent pieces of a c-patch then Equations (2 3) enforce C 1 continuity. 35

36 For the remaining cases, let b be a triangular piece. Let u the parameter corresponding to the quad edge between b 400 = v 0, where u = 0 and the valence is N 0 and b 040 = v 1 where u = 1 and the valence is N 1 (Figures 2-11 for (iii) and 2-12 for case (iv)). By construction, the common boundary b(u, 0) = a(0, u) is a curve of degree 3 with Bézier control points (v 0, t 0 0, t1 1, v1 ) so that bicubic patches on regular quads and triangular patches on irregular quads match up exactly. Denote by 1 b the partial derivative of b along the common boundary and by 2 b the partial derivative in the other variable. Since b(u, 0) = a(0, u), we have 1 b(u, 0) = 2 a(0, u). The partial derivative in the other variable of a is 2 a. We will verify that the following conditions hold, that imply tangent continuity: if one quad is ordinary (case (iii)), 1 b(u, 0) = 2 2 b(u, 0) + 1 a(0, u); (2 23) if both quads are extraordinary (case (iv)), ( (1 u)λ0 + uλ 1 ) 1 b(u, 0) = 2 b(u, 0) + 1 a(0, u), (2 24) where λ 0 := 1 + c 0, λ 1 := 1 c 1, and c i := cos( 2π N i ). Both equations, (2 23) and (2 24), equate vector-valued polynomials of degree 3 (we write 1 b(u, 0) in degree-raised form [14]). The equations hold, if and only if all Bézier coefficients are equal. Off hand, this means checking four vector-valued equations for each of (2 23) and (2 24). However, in both cases, the setup is symmetric with respect to reversal of the direction in which the boundary b(u, 0) is traversed. That means, we need only check the first two equations (2 23 ) and (2 23 ) of (2 23) and the first two equations (2 24 ) and (2 24 ) of (2 24). We verify these equations by inserting the formulas of Figures 2-4 and 2-6. To verify (2 23), the key observation is that N 0 = N 1 = 4 if one quad is ordinary. Hence c 0 = c 1 = 0 and s 0 = s 1 = 1 (cf. Figure 2-6) and t i j = ei j. Therefore, for example (cf. Figure 36

37 Figure C 1 transition between a triangular and a bicubic patch. 2-11) 2 2 b(0, 0) = 2 4(b 301 v 0 ) = (e0 0 + e0 1 2 = 3(e e0 1 ) 6v0, v 0 ) where the factor 3 4 stems from raising the degree from 3 to 4; and the second Bézier coefficient of 1 b(u, 0) (in degree-raised form) and of 2 2 b(u, 0) are respectively (cf. Figure 2-11) 3 (e0 0 v0 ) + 2(e 1 1 e0 0 ) 3 2 4(b 211 b 310 ) = 8( e1 1 e0 0 4 and + e0 0 v f0 e 0 0 ). 8 Then, comparing the first two Bézier coefficients of 1 b(u, 0) and 2 2 b(u, 0) + 1 a(0, u) yields equality and establishes C 1 continuity: 3(e 0 0 v0 ) = 3(e 0 0 }{{} + e0 1 ) 6v0 3(e 0 1 }{{} v0 ) }{{} 1 b(0,0) 2 2 b(0,0) 1 a(0,0) ( ) (e 0 0 v 0 ) + 2(e 1 1 e 0 0) = 2(e 1 1 e 0 0) + (e 0 0 v 0 ) + 3(f 0 e 0 0) 3(f 0 e 0 0). ( ) The equations for (2 24) are similar, except that we need to replace e j by t j and keep in mind that, by definition, (t 0 n 0 1 v 0 ) + (t 0 1 v 0 ) = 2c 0 (t 0 0 v 0 ). 37

38 Figure G 1 transition between two triangular patches. Hence, for example, 2 b(0, 0) + 1 a(0, 0) = 4(b 301 v 0 + a 301 v 0 ) = c0 (t 0 0 v 0 ). The first of the four coefficient equations of (2 24) then simplifies to 3(1 + c 0 )(t 0 0 v 0 ) = 4(b a 301 2v 0 ) = 3( t0 1 + t0 0 2 v 0 + tn t 0 0 v 0 ) 2 = (2c0 (t 0 0 v 0 ) + 2(t 0 0 v 0 )). ( ) Noting that terms (f 0 e 0 0)/(8(s 0 + s 1 )) in the expansions of b 211 and a 211 cancel, the second coefficient equation is 6λ 0 (t 1 1 t 0 0) + 3λ 1 (t 0 0 v 0 ) = 12(b a 211 2b 310 ) = 12 2(1 + c0 ) 4 (t 1 1 t0 0 ) (1 c1 ) (t v0 ). ( ) It is easy to read off that the equalities hold. So the claim of smoothness is verified. 38

39 2.5 Complexity Analysis Number of Patches The conversion scheme yields the minimum set of patches because (1) no initial refinement for input coarse mesh is needed; (2) each quadrilateral facet of the coarse mesh corresponds to only one patch. Namely, the total number of patches equals to the number of facets in the mesh. The patch complexity of various schemes are compared in Figure The low cost of construction and evaluation makes c-patches an attractive representation, not just on the GPU Cost of Patch Construction The separation into vertex and patch construction means that the number of scaled vertex additions (adds) per patch is independent of the valence. The cost of computing the control points per patch, (i.e.), with the cost of vertex computations distributed, is 4 ( ) = 32 adds per bicubic construction and computing t j from t 0 and t 1 and determining b i 211, b i 121 and b i 112 according to Figure 2-6 amounts to an additional 4 ( ) = 104 adds per c-patch. Each c-patch has 24 coefficients. This compares favorably to, say [30] where coefficients are generated Cost of Surface Evaluation The patch can be evaluated at any parametric domain (u, v) using de Casteljau s algorithm. A tensor product Bi-cubic Bézier patch is defined by 16 control points. The evaluation at (u, v) needs 42 vector-vector additions, 42 scaler-vector multiplications, and 42 scaler-scaler operations. Similarly the evaluation of a c-patch at (u, v) requires 40 vector-vector additions and 60 scaler-vector multiplications. In terms of evaluation cost, a c-patch has roughly the same cost as a bicubic patch does. 39

40 2.6 Approximation Catmull-Clark Subdivision Surface Since Catmull-Clark subdivision is a standard modeling tool, our scheme is designed to approximate Catmull-Clark Subdivision Surface. In fact, the resulting Bi-cubic patches completely agree with the Catmull-Clark Subdivision Surface except in the immediate neighborhood of irregular mesh vertices. In such a neighborhood they join at least with tangent continuity and interpolate the limit of the irregular mesh vertex. Furthermore, the center of c-patch interpolates the center point of the correspondent Catmull-Clark limit surface due to the choice of the c-patch coefficient b Water-Tight Surface Verification Patches are evaluated independently. If the generated vertices along the boundary from the adjacent patches do not match exactly, the refined mesh will have a hole in it. There are three configurations for adjacent patches: (1) both are Bi-3 patches, (3) both are c-patches, (2) one of them is Bi-3 patch. The coefficients defining the shared boundary curve are derived by the averaging rules defined in Figure 2-4. Since additions are commutative, the generation of all boundary coefficients are independent of the evaluation of the choice of patch. In other words, no round off error and cracking are possible for the first case. The boundary coefficients of a c-patch are computed by the same rules in Figure 2-4, therefore water-tightness are also achieved for the lateral two cases. Note that computation of the cubic boundaries shared by a bicubic and a c-patch is mathematically identical. 2.8 Discussion The introduction of triangular patches to model quad patches is somewhat unconventional, but has been used in an I3D paper before [15]. Also [49] is based on triangular patches. Evaluation and normal computation of degree 4 triangular patches is comparable in cost to 40

41 tensor-product bicubic patches: in the triangular case we have to average 15 control points, in the tensor-product case 16. Triangular patches may deserve more attention in OpenGL. 41

42 CHAPTER 3 GPU IMPLEMENTATION 3.1 Overview We implemented the conversion scheme using C++ on DirectX 10 pipeline. We compute vertex neighborhoods according to Figure 2-4 in the vertex shader and use the geometry shader primitive triangle with adjacency to accumulate the coefficients of the bicubic patch or compute a c-patch according to Figure 2-6. We implemented conversion plus rendering in two variants: a 1-pass and a 2-pass scheme pass Approach Figure pass implementation detailed in Figure 3-2. The first pass converts, the second renders. Note that the geometry shader only computes at most 24 coefficients per patch and does not create (amplify to) evaluation point primitives. 42

43 Figure Pass conversion: VS=vertex shader, GS=geometry shader, PS=pixel shader. VS Out of Pass 1 outputs N points f j for one vertex (hence the subscript) and GS In of Pass 1 retrieves four points f i, each generated by a different vertex of the quad (hence the superscript). The 2-pass implementation constructs the patches in the first pass using the vertex shader and the geometry shader and evaluates positions and normals in the second pass. Pass 1 streams out only the 4 6 coefficients of a c-patch and not the 4 ( ) Bézier control points of the equivalent triangular pieces. The data amplification necessary to evaluate takes place by instancing a (u, v)-grid on the vertex shader in the second pass. That is, we do not stream back large data sets after amplification. Position and normal are computed on the (u, v) domain [0..1] 2 43

44 of the bicubic or of the c-patch (not on any triangular domains). We pre-tessellate the quad domain, and store the results in a set of textures with different resolution. If a tessellation factor is chosen to be m, the texture with (m + 1) by (m + 1) parametric values will be sent to the vertex shader in the subsequent evaluation pass. Given the pre-tessellated domain with a patch identifier, the vertex shader loads the appropriate control points and evaluates the patch. Figure 3-2 lists the input, output and the computations of each pipeline stage. Figure 3-1 illustrates this association of computations and resources. In order to avoid pricy branching in HLSL(High Level Shader Language) and optimize the performance, specialized shaders are actually written for patch constructions and evaluation based on the patch type pass Approach In the 1-pass implementation, the evaluation immediately follows conversion in the geometry shader, using the geometry shader s ability to amplify, (i.e.), output multiple point primitives for each facet (Figure 3-4). While a 1-pass implementation sounds more efficient than a 2-pass implementation, DX10 limits data amplification in the geometry shader so that the maximal evaluation density is 8 8 per quad. Moreover, maximal amplification in the geometry shader slows the performance. We observed a minimum of 25% better performance of the 2-pass implementation. Figure 3.3 lists the data flow on the graphics pipeline. 3.4 Coordinate System Transformation When we evaluate normal and position of an irregular quad at (u, v), we need first transform the tessellated domain value from a Cartesian coordinate (u, v) to a barycentric coordinate (s, t, w). Figure 3-5 illustrates how to locate which of four triangles where (u, v) lies on. In this way, we minimize number of comparisons and take care of the shared vertices. We make (0.0, 0.0), (1.0, 0.0), (0.5, 0.5) only belong to T 1, (1.0, 1.0) only belongs to T 2, and (0.0, 1.0) only belongs to T 4. 44

45 Figure Pass conversion: VS=vertex shader, GS=geometry shader, PS=pixel shader. GS amplifies the geometry and evaluates the patches. Figure 3-4. At present, the 1-pass conversion-and-rendering must place patch assembly and evaluation on the geometry shader. This is not efficient. 45

46 (0.0,1.0) (1.0,1.0) T3 T4 (0.5,0.5) T2 v T1 (0.0,0.0) (1.0,0.0) u Figure 3-5. (u, v) on an irregular quad. 3.5 Water-Tight Evaluation The HLSL code in Figure 3-6 shows that the same cubic curve is evaluated along the boundary. An explicit if- statement in the evaluation guarantees the exact same ordering of computations since boundary coefficients are only computed once, Figure 3-6. Water-tight Evaluation 46

47 3.6 Conclusion The presented approach fits well into a GPU pipeline. In both approaches, we compute v, e, f and t using its vertex neighborhood and the rules in Figure 2-4 in the vertex shader. Each vertex has 2n + 1 vertices in its vertex neighborhood, where n is the valence. This information is stored in a texture. With a vertex ID and its valence, all vertices in its neighborhood can be retrieved in counter-clockwised order. In the geometry shader, the patch is finalized and assembled. Overall, the 2-pass implementation has better performance because of small streamout, short geometry shader code and minimal amplification on the geometry shader. 47

48 CHAPTER 4 RESULTS 4.1 Shape Quality Our algorithm produces C 1 surfaces and they closely approximate Catmull-Clark subdivision surfaces. We compare our algorithm with [30] on the closeness to Catmull-Clark surfaces. We measure how the surface is close to Catmull-Clark surface by comparing both geometric difference and normal angle difference. Figure 4-1 compares the smoothed quad mesh surfaces with densely refined Catmull-Clark subdivision surfaces based on the same mesh. Both geometric distance, as percent of the local quad size, and normal distance, in degrees of variation, are compared. Especially after displacement, large models rendered by subdivision and quad smoothing appear visually indistinguishable. The relatively small examples, without displacement, shown in Figure 4-1 and the close up in Figure 4-5 are also important to support our observation that c-patches do not create shape problems compared to a single bicubic patch: despite the lower degree and internal C 1 join, their visual appearance is remarkably similar to that of bicubic patches. The comparison with ACC-patches [30] is shown in 4-2. Figures 4-3, 4-4 show the generated smooth surface by our algorithm and the surface after applying displacement mapping respectively. Figure 4-1. Comparison between the Catmull-Clark (CC) subdivision limit surface and the smoothed quad mesh surface for the same input. 48

49 Figure 4-2. Comparison of ACC-patch and C-patch in terms of approximation of Catmull-Clark subdivision surfaces for the same input. Figure 4-3. GPU smoothed quad surfaces: orange patches correspond to ordinary quads, blue patches to extraordinary quads. Figure 4-4. GPU smoothed quad surfaces with displacement mapping. 49

50 4.2 Performance We compiled and executed the implementation on the latest graphics cards of both major vendors under DirectX10 and tested the performance for several industry-sized models. Two surface models and models with displacement mapping are shown in Figure 4-3 and 4-4 respectively. Table 4 summarizes the performance of the 2-pass algorithm for different granularities of evaluation. The frog model, in particular, provides a challenge due to the large number of extraordinary patches. The Frog Party shown in Figure 4-11 currently renders at 50 fps for uniform evaluation for N=9, (i.e.), on a 9 9 grid. That is, the implementation converts quads, of which 59% are extraordinary, and renders of 1 million polygons 50 times per second. On the same hardware, we measured Bunnell s efficient implementation (distribution accompanying [9]) featuring the single frog model, (i.e.), 1/9th of the work of the Frog Party, running at 44 fps with three subdivisions (equivalent to tessellation factor N=9). That is, Table 4-1. A a total degree 4 patch and a bicubic patch have the same evaluation cost at (u, v) in terms of ALU operations. evaluation for a c-patch ALU vector ops position 55 normal 3 other 1 total 59 evaluation for a bicubic patch ALU vector ops position 56 normal 3 other 0 total 59 Table 4-2. Frames per second for some standard test meshes with each patch evaluated on a grid of size N N; eqs = percentage of extraordinary quads. Sword and Frog are shown in Figure 4-3, Head in Figure 4-1. Mesh Frames per second (verts,quads, eqs) N = Sword (140,138, 38%) Head (602,600, 100%) Frog (1308,1292, 59%)

51 Figure 4-5. Close-up of the frog. The refined mesh is water-tight. Table 4-3. Performance of the 1-pass implementation. Mesh Slower 1-pass implementation N = Sword Head Frog GPU smoothing of quad meshes is an order of magnitude faster. Compared to [46], the speed up is even more dramatic. While the comparison is not among equals since both [46] and [9] implement recursive Catmull-Clark subdivision, it is nevertheless fair to observe that the speedup is at least partially due to our avoiding stream back after amplification (data explosion due to refinement). We expect that more careful storage of vertex neighborhoods, in retrieving order, will further improve our use of texture cache and thereby improve the frames per second (fps) count. 4.3 Displacement Mapping Displacement mapping is a technique for adding geometric details on the mesh with a height map. It is different from Bump Mapping or Normal Mapping in the sense that it changes the geometry by moving vertices often along their normal directions according to the value in the 51

52 height map. The change of real geometry, not just normal for instance in Bump Mapping, permits self-occlusion. Figure 4-6 shows the displacement mapping on the frog model which consists of 330k facets. The size of height map is 1024 by Figure 4-6. Displacement mapping on the frog model In order to perturb normals after displacement mapping, we need D u and D v bump mapping value. The equation to calculate new normals is as follows. S = P + D n (4 1) where, S is the displacement of the point P, D is the displacement and n is the normal of P. Then the new normal is calculated by the cross product of S u and S v. S u = P u + D u n + D n u (4 2) S v = P v + D v n + D n v (4 3) Note that n u and n v are the derivatives of the normalized normal n. n u = n u n(n u n) n (4 4) where n u = P uu P v + P u P uv 4.4 Morphing and Animation We implement morphing using the 2-pass approach. The animated sequence of the input meshes in form of textures are fed into the Input Assembler of the first pass each frame. The morphed patches are constructed during the first pass. Fine details are added in the second pass. The screen shots in Figures 4-9, 4-10, 4-11 illustrate real time displacement and animation. 52

53 Figure 4-7. Comparison of the c-patch scheme with PN-Triangles(also called N-patch), ACC-patch, and Catmull-Clark subdivision Figure 4-8. comparison of the c-patch scheme with PN-Triangles(also called N-patch), ACC-patches, and Catmull-Clark subdivision 53

54 Figure 4-9. Real time animation on the Sword model. Figure Real time animation on the Frog model. Figure Asynchronous animation of nine Frogs. 54

55 4.5 Conclusion Smoothing quad meshes on the GPU offers an alternative to highly refined facet representations transmitted to the GPU and is preferable for interactive graphics and integration with complex morphing and displacement. We advertised a 2-pass scheme, since, as we argued, the DX10 geometry shader is not well suited for the data amplification for evaluation after conversion. The 1-pass scheme outlined in Section 3 may become more valuable with availability of a dedicated hardware tesselator [29, 48]. Such a tesselator will make amplification more efficient and support adaptive tessellation (which is why we only discussed uniform tessellation in Section 3). Such a hardware amplification will also benefit the 2-pass approach in that the (u, v) domain tessellation, fed into the second pass will be replaced by the amplification unit. 55

56 CHAPTER 5 PATCH CONVERSIONS FOR MESHES WITH TRI/QUAD/PENT FACETS Our conversion algorithm can be generalized to work for arbitrary meshes. The generalized algorithm [34] provides an elegant solution for meshes with Tri/Quad/Pent Facets. Removing restrictions on vertex valences and allowing meshes with triangles, quadrilaterals, and pentagons vastly simplifies a designer s task and enriches the design space of meshes for smooth surfaces: while quads naturally model the flow of (parallel) feature lines and are therefore the main facet type in models, triangular facets allow merging lines while pentagonal facets allow to starting new lines (Figure 5-1) without creating T-corners or forcing refinement of intermediate models to satisfy connectivity or quad-layout constraints. Essentially, designers can re-use the whole range of polyhedral models they are used to. We modified the algorithm for converting quad meshes to a generalized method for a mesh with Tr/Quad/Pent facets. The generalized scheme converts such a polyhedral model to a surface with everywhere well-defined normal and C 2 in regular mesh regions with quad-grid connectivity. Figure 5-2 shows an example of the resulting surfaces. Note that the facets are limited to triangles, quads and pentagons due to current GPU Figure 5-1. (a) Retaining the density of feature lines while varying their number. (b),(c) Axe handle detail using a triangle and a pentagon to transition between detailed and coarser areas. constraints and to avoid unnecessary notational, technical and shape complexity. An irregular facet with k sides is converted into a k-patch. A k-patch is a generalization of a c-patch. It is a piecewise degree 4 C 1 spline patch with k cubic boundaries. A k-patch is defined by 6k + 1 control points indicated as in Figure 5-3(b),(c). That is, the k-patch corresponding to a triangular, quadrilateral or pentagonal facet is defined by a total of 19, 24 or 31 points respectively. 56

57 Figure 5-2. The generalized scheme converts a mesh with Tri/Quad/Pent Facets to a smooth surface consisting of bi-cubic patches (yellow), k-patch with k = 3 (green), k = 4 (red), and k = 5 (gray). Figure 5-3. (a) An ordinary facet is converted to a bi-cubic patch with 16 control points g ij. (b),(c) An extraordinary facet with k sides is converted to a k defined by 6k + 1 control points shown as. The k can be viewed as k C 1 -connected degree-4 triangular patches i, i = 0... k 1 with cubic outer boundaries. Figure 5-4. The triangular sectors are listed in counter-clockwise order with a modulo-k superscript. (a) 14 control points from three consecutive sectors of a k-patch define (b) a single patch in triangular Bézier-form. 57

Smooth Surfaces from 4-sided Facets

Smooth Surfaces from 4-sided Facets Smooth Surfaces from -sided Facets T. L. Ni, Y. Yeo, A. Myles, V. Goel and J. Peters Abstract We present a fast algorithm for converting quad meshes on the GPU to smooth surfaces. Meshes with 1,000 input

More information

Subdivision Surfaces

Subdivision Surfaces Subdivision Surfaces 1 Geometric Modeling Sometimes need more than polygon meshes Smooth surfaces Traditional geometric modeling used NURBS Non uniform rational B-Spline Demo 2 Problems with NURBS A single

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry More smooth Curves and Surfaces Christopher Dyken, Michael Floater and Martin Reimers 10.11.2010 Page 1 More smooth Curves and Surfaces Akenine-Möller, Haines

More information

On Smooth Bicubic Surfaces from Quad Meshes

On Smooth Bicubic Surfaces from Quad Meshes On Smooth Bicubic Surfaces from Quad Meshes Jianhua Fan and Jörg Peters Dept CISE, University of Florida Abstract. Determining the least m such that one m m bi-cubic macropatch per quadrilateral offers

More information

Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches

Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches Charles Loop Microsoft Research Scott Schaefer Texas A&M University April 24, 2007 Technical Report MSR-TR-2007-44 Microsoft Research

More information

Efficient GPU Rendering of Subdivision Surfaces. Tim Foley,

Efficient GPU Rendering of Subdivision Surfaces. Tim Foley, Efficient GPU Rendering of Subdivision Surfaces Tim Foley, 2017-03-02 Collaborators Activision Wade Brainerd Stanford Matthias Nießner NVIDIA Manuel Kraemer Henry Moreton 2 Subdivision surfaces are a powerful

More information

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop Approximate Catmull-Clark Patches Scott Schaefer Charles Loop Approximate Catmull-Clark Patches Scott Schaefer Charles Loop Catmull-Clark Surface ACC-Patches Polygon Models Prevalent in game industry Very

More information

Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation

Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation Charles Loop Microsoft Research Scott Schaefer Texas A&M University Tianyun Ni NVIDIA Ignacio Castaño NVIDIA Goal Real-Time

More information

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2013 3D Object Representations Raw data Point cloud Range image Polygon soup Surfaces Mesh Subdivision Parametric Implicit Solids Voxels

More information

UNIVERSITY OF CALGARY. Subdivision Surfaces. Advanced Geometric Modeling Faramarz Samavati

UNIVERSITY OF CALGARY. Subdivision Surfaces. Advanced Geometric Modeling Faramarz Samavati Subdivision Surfaces Surfaces Having arbitrary Topologies Tensor Product Surfaces Non Tensor Surfaces We can t find u-curves and v-curves in general surfaces General Subdivision Coarse mesh Subdivision

More information

Subdivision Surfaces

Subdivision Surfaces Subdivision Surfaces 1 Geometric Modeling Sometimes need more than polygon meshes Smooth surfaces Traditional geometric modeling used NURBS Non uniform rational B-Spline Demo 2 Problems with NURBS A single

More information

Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches

Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches CHARLES LOOP Microsoft Research and SCOTT SCHAEFER Texas A&M University We present a simple and computationally efficient algorithm

More information

Subdivision Curves and Surfaces: An Introduction

Subdivision Curves and Surfaces: An Introduction Subdivision Curves and Surfaces: An Introduction Corner Cutting De Casteljau s and de Boor s algorithms all use corner-cutting procedures. Corner cutting can be local or non-local. A cut is local if it

More information

3D Modeling Parametric Curves & Surfaces

3D Modeling Parametric Curves & Surfaces 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2012 3D Object Representations Raw data Point cloud Range image Polygon soup Solids Voxels BSP tree CSG Sweep Surfaces Mesh Subdivision

More information

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016 Computergrafik Matthias Zwicker Universität Bern Herbst 2016 Today Curves NURBS Surfaces Parametric surfaces Bilinear patch Bicubic Bézier patch Advanced surface modeling 2 Piecewise Bézier curves Each

More information

1. Introduction. 2. Parametrization of General CCSSs. 3. One-Piece through Interpolation. 4. One-Piece through Boolean Operations

1. Introduction. 2. Parametrization of General CCSSs. 3. One-Piece through Interpolation. 4. One-Piece through Boolean Operations Subdivision Surface based One-Piece Representation Shuhua Lai Department of Computer Science, University of Kentucky Outline. Introduction. Parametrization of General CCSSs 3. One-Piece through Interpolation

More information

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification Last Time? Adjacency Data Structures Curves & Surfaces Geometric & topologic information Dynamic allocation Efficiency of access Mesh Simplification edge collapse/vertex split geomorphs progressive transmission

More information

Computergrafik. Matthias Zwicker. Herbst 2010

Computergrafik. Matthias Zwicker. Herbst 2010 Computergrafik Matthias Zwicker Universität Bern Herbst 2010 Today Curves NURBS Surfaces Parametric surfaces Bilinear patch Bicubic Bézier patch Advanced surface modeling Piecewise Bézier curves Each segment

More information

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011) Lecture 4: Processing Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Today Key per-primitive operations (clipping, culling) Various slides credit John Owens, Kurt Akeley,

More information

Physically-Based Modeling and Animation. University of Missouri at Columbia

Physically-Based Modeling and Animation. University of Missouri at Columbia Overview of Geometric Modeling Overview 3D Shape Primitives: Points Vertices. Curves Lines, polylines, curves. Surfaces Triangle meshes, splines, subdivision surfaces, implicit surfaces, particles. Solids

More information

Curve Corner Cutting

Curve Corner Cutting Subdivision ision Techniqueses Spring 2010 1 Curve Corner Cutting Take two points on different edges of a polygon and join them with a line segment. Then, use this line segment to replace all vertices

More information

Subdivision Curves and Surfaces

Subdivision Curves and Surfaces Subdivision Surfaces or How to Generate a Smooth Mesh?? Subdivision Curves and Surfaces Subdivision given polyline(2d)/mesh(3d) recursively modify & add vertices to achieve smooth curve/surface Each iteration

More information

Subdivision Surfaces. Homework 1: Last Time? Today. Bilinear Patch. Tensor Product. Spline Surfaces / Patches

Subdivision Surfaces. Homework 1: Last Time? Today. Bilinear Patch. Tensor Product. Spline Surfaces / Patches Homework 1: Questions/Comments? Subdivision Surfaces Last Time? Curves & Surfaces Continuity Definitions Spline Surfaces / Patches Tensor Product Bilinear Patches Bezier Patches Trimming Curves C0, G1,

More information

Curves and Surfaces 2

Curves and Surfaces 2 Curves and Surfaces 2 Computer Graphics Lecture 17 Taku Komura Today More about Bezier and Bsplines de Casteljau s algorithm BSpline : General form de Boor s algorithm Knot insertion NURBS Subdivision

More information

Motivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline

Motivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline MGB 005 Agenda Motivation Tessellation Basics DX Tessellation Pipeline Instanced Tessellation Instanced Tessellation in DX0 Displacement Mapping Content Creation Compression Motivation Save memory and

More information

Normals of subdivision surfaces and their control polyhedra

Normals of subdivision surfaces and their control polyhedra Computer Aided Geometric Design 24 (27 112 116 www.elsevier.com/locate/cagd Normals of subdivision surfaces and their control polyhedra I. Ginkel a,j.peters b,,g.umlauf a a University of Kaiserslautern,

More information

Smooth Patching of Refined Triangulations

Smooth Patching of Refined Triangulations Smooth Patching of Refined Triangulations Jörg Peters July, 200 Abstract This paper presents a simple algorithm for associating a smooth, low degree polynomial surface with triangulations whose extraordinary

More information

Subdivision overview

Subdivision overview Subdivision overview CS4620 Lecture 16 2018 Steve Marschner 1 Introduction: corner cutting Piecewise linear curve too jagged for you? Lop off the corners! results in a curve with twice as many corners

More information

Information Coding / Computer Graphics, ISY, LiTH. Splines

Information Coding / Computer Graphics, ISY, LiTH. Splines 28(69) Splines Originally a drafting tool to create a smooth curve In computer graphics: a curve built from sections, each described by a 2nd or 3rd degree polynomial. Very common in non-real-time graphics,

More information

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November Surfaces for CAGD FSP Tutorial FSP-Seminar, Graz, November 2005 1 Tensor Product Surfaces Given: two curve schemes (Bézier curves or B splines): I: x(u) = m i=0 F i(u)b i, u [a, b], II: x(v) = n j=0 G

More information

Subdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link)

Subdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link) Advanced Computer Graphics (Spring 03) CS 83, Lecture 7: Subdivision Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs83/sp3 Slides courtesy of Szymon Rusinkiewicz, James O Brien with material from Denis

More information

Rendering Subdivision Surfaces Efficiently on the GPU

Rendering Subdivision Surfaces Efficiently on the GPU Rendering Subdivision Surfaces Efficiently on the GPU Gy. Antal, L. Szirmay-Kalos and L. A. Jeni Department of Algorithms and their Applications, Faculty of Informatics, Eötvös Loránd Science University,

More information

Computer Graphics Curves and Surfaces. Matthias Teschner

Computer Graphics Curves and Surfaces. Matthias Teschner Computer Graphics Curves and Surfaces Matthias Teschner Outline Introduction Polynomial curves Bézier curves Matrix notation Curve subdivision Differential curve properties Piecewise polynomial curves

More information

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework assignment 5 due tomorrow, Nov

More information

Technical Report. Removing polar rendering artifacts in subdivision surfaces. Ursula H. Augsdörfer, Neil A. Dodgson, Malcolm A. Sabin.

Technical Report. Removing polar rendering artifacts in subdivision surfaces. Ursula H. Augsdörfer, Neil A. Dodgson, Malcolm A. Sabin. Technical Report UCAM-CL-TR-689 ISSN 1476-2986 Number 689 Computer Laboratory Removing polar rendering artifacts in subdivision surfaces Ursula H. Augsdörfer, Neil A. Dodgson, Malcolm A. Sabin June 2007

More information

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo 9 - Designing Surfaces Triangular surfaces A surface can be discretized by a collection of points and triangles Each triangle is a subset of a plane Every point on the surface can be expressed as an affine

More information

u 0+u 2 new boundary vertex

u 0+u 2 new boundary vertex Combined Subdivision Schemes for the design of surfaces satisfying boundary conditions Adi Levin School of Mathematical Sciences, Tel-Aviv University, Tel-Aviv 69978, Israel. Email:fadilev@math.tau.ac.ilg

More information

Using Semi-Regular 4 8 Meshes for Subdivision Surfaces

Using Semi-Regular 4 8 Meshes for Subdivision Surfaces Using Semi-Regular 8 Meshes for Subdivision Surfaces Luiz Velho IMPA Instituto de Matemática Pura e Aplicada Abstract. Semi-regular 8 meshes are refinable triangulated quadrangulations. They provide a

More information

Direct Rendering of Trimmed NURBS Surfaces

Direct Rendering of Trimmed NURBS Surfaces Direct Rendering of Trimmed NURBS Surfaces Hardware Graphics Pipeline 2/ 81 Hardware Graphics Pipeline GPU Video Memory CPU Vertex Processor Raster Unit Fragment Processor Render Target Screen Extended

More information

Joe Warren, Scott Schaefer Rice University

Joe Warren, Scott Schaefer Rice University Joe Warren, Scott Schaefer Rice University Polygons are a ubiquitous modeling primitive in computer graphics. Their popularity is such that special purpose graphics hardware designed to render polygons

More information

Non-Uniform Recursive Doo-Sabin Surfaces (NURDSes)

Non-Uniform Recursive Doo-Sabin Surfaces (NURDSes) Non-Uniform Recursive Doo-Sabin Surfaces Zhangjin Huang 1 Guoping Wang 2 1 University of Science and Technology of China 2 Peking University, China SIAM Conference on Geometric and Physical Modeling Doo-Sabin

More information

B-spline Curves. Smoother than other curve forms

B-spline Curves. Smoother than other curve forms Curves and Surfaces B-spline Curves These curves are approximating rather than interpolating curves. The curves come close to, but may not actually pass through, the control points. Usually used as multiple,

More information

G 2 Interpolation for Polar Surfaces

G 2 Interpolation for Polar Surfaces 1 G 2 Interpolation for Polar Surfaces Jianzhong Wang 1, Fuhua Cheng 2,3 1 University of Kentucky, jwangf@uky.edu 2 University of Kentucky, cheng@cs.uky.edu 3 National Tsinhua University ABSTRACT In this

More information

For each question, indicate whether the statement is true or false by circling T or F, respectively.

For each question, indicate whether the statement is true or false by circling T or F, respectively. True/False For each question, indicate whether the statement is true or false by circling T or F, respectively. 1. (T/F) Rasterization occurs before vertex transformation in the graphics pipeline. 2. (T/F)

More information

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics jintaeks@gmail.com Division of Digital Contents, DongSeo University. April 2016 Long time ago Before Windows, DOS was the most popular

More information

Normals of subdivision surfaces and their control polyhedra

Normals of subdivision surfaces and their control polyhedra Normals of subdivision surfaces and their control polyhedra I. Ginkel, a, J. Peters b, and G. Umlauf a, a University of Kaiserslautern, Germany b University of Florida, Gainesville, FL, USA Abstract For

More information

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018 CS354 Computer Graphics Surface Representation IV Qixing Huang March 7th 2018 Today s Topic Subdivision surfaces Implicit surface representation Subdivision Surfaces Building complex models We can extend

More information

Hardware Displacement Mapping

Hardware Displacement Mapping Matrox's revolutionary new surface generation technology, (HDM), equates a giant leap in the pursuit of 3D realism. Matrox is the first to develop a hardware implementation of displacement mapping and

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

Curves. Computer Graphics CSE 167 Lecture 11

Curves. Computer Graphics CSE 167 Lecture 11 Curves Computer Graphics CSE 167 Lecture 11 CSE 167: Computer graphics Polynomial Curves Polynomial functions Bézier Curves Drawing Bézier curves Piecewise Bézier curves Based on slides courtesy of Jurgen

More information

Lecture IV Bézier Curves

Lecture IV Bézier Curves Lecture IV Bézier Curves Why Curves? Why Curves? Why Curves? Why Curves? Why Curves? Linear (flat) Curved Easier More pieces Looks ugly Complicated Fewer pieces Looks smooth What is a curve? Intuitively:

More information

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a coordinate system and then the measuring of the point with

More information

Central issues in modelling

Central issues in modelling Central issues in modelling Construct families of curves, surfaces and volumes that can represent common objects usefully; are easy to interact with; interaction includes: manual modelling; fitting to

More information

Subdivision Surfaces. Homework 1: Questions on Homework? Last Time? Today. Tensor Product. What s an illegal edge collapse?

Subdivision Surfaces. Homework 1: Questions on Homework? Last Time? Today. Tensor Product. What s an illegal edge collapse? Homework 1: Questions/Comments? Subdivision Surfaces Questions on Homework? Last Time? What s an illegal edge collapse? Curves & Surfaces Continuity Definitions 2 3 C0, G1, C1, C 1 a b 4 Interpolation

More information

Subdivision Surfaces. Homework 1: Questions/Comments?

Subdivision Surfaces. Homework 1: Questions/Comments? Subdivision Surfaces Homework 1: Questions/Comments? 1 Questions on Homework? What s an illegal edge collapse? 1 2 3 a b 4 7 To be legal, the ring of vertex neighbors must be unique (have no duplicates)!

More information

2D Spline Curves. CS 4620 Lecture 13

2D Spline Curves. CS 4620 Lecture 13 2D Spline Curves CS 4620 Lecture 13 2008 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes [Boeing] that is, without discontinuities So far we can make things with corners

More information

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 Lecture 25: Bezier Subdivision And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 1. Divide and Conquer If we are going to build useful

More information

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D From curves to surfaces Parametric surfaces and solid modeling CS 465 Lecture 12 2007 Doug James & Steve Marschner 1 So far have discussed spline curves in 2D it turns out that this already provides of

More information

Curve and Surface Basics

Curve and Surface Basics Curve and Surface Basics Implicit and parametric forms Power basis form Bezier curves Rational Bezier Curves Tensor Product Surfaces ME525x NURBS Curve and Surface Modeling Page 1 Implicit and Parametric

More information

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Curves University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Representations 3 basic representation strategies: Explicit: y = mx + b Implicit: ax + by + c

More information

Design considerations

Design considerations Curves Design considerations local control of shape design each segment independently smoothness and continuity ability to evaluate derivatives stability small change in input leads to small change in

More information

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail Computer Graphics CS 54 Lecture 1a Curves, Tesselation/Geometry Shaders & Level of Detail Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines

More information

Bezier Curves, B-Splines, NURBS

Bezier Curves, B-Splines, NURBS Bezier Curves, B-Splines, NURBS Example Application: Font Design and Display Curved objects are everywhere There is always need for: mathematical fidelity high precision artistic freedom and flexibility

More information

Subdivision surfaces for CAD: integration through parameterization and local correction

Subdivision surfaces for CAD: integration through parameterization and local correction Workshop: New trends in subdivision and related applications September 4 7, 212 Department of Mathematics and Applications, University of Milano-Bicocca, Italy Subdivision surfaces for CAD: integration

More information

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Project 3 due tomorrow Midterm 2 next

More information

3D Modeling techniques

3D Modeling techniques 3D Modeling techniques 0. Reconstruction From real data (not covered) 1. Procedural modeling Automatic modeling of a self-similar objects or scenes 2. Interactive modeling Provide tools to computer artists

More information

Hierarchical Grid Conversion

Hierarchical Grid Conversion Hierarchical Grid Conversion Ali Mahdavi-Amiri, Erika Harrison, Faramarz Samavati Abstract Hierarchical grids appear in various applications in computer graphics such as subdivision and multiresolution

More information

Smooth Bi-3 Spline Surfaces with fewest knots

Smooth Bi-3 Spline Surfaces with fewest knots Smooth Bi-3 Spline Surfaces with fewest knots Jianhua Fan, Jörg Peters Department of CISE, University of Florida, USA 3603 Abstract Converting a quadrilateral input mesh into a C 1 surface with one bi-3

More information

12.3 Subdivision Surfaces. What is subdivision based representation? Subdivision Surfaces

12.3 Subdivision Surfaces. What is subdivision based representation? Subdivision Surfaces 2.3 Subdivision Surfaces What is subdivision based representation? Subdivision Surfaces Multi-resolution (Scalability) One piece representation (arbitrary topology) What is so special? Numerical stability

More information

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 CSE 167: Introduction to Computer Graphics Lecture #13: Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 4 due Monday Nov 27 at 2pm Next Tuesday:

More information

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006 Curves and Curved Surfaces Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006 Outline for today Summary of Bézier curves Piecewise-cubic curves, B-splines Surface

More information

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple Curves and surfaces Escaping Flatland Until now we have worked with flat entities such as lines and flat polygons Fit well with graphics hardware Mathematically simple But the world is not composed of

More information

Polar Embedded Catmull-Clark Subdivision Surface

Polar Embedded Catmull-Clark Subdivision Surface Polar Embedded Catmull-Clark Subdivision Surface Anonymous submission Abstract In this paper, a new subdivision scheme with Polar embedded Catmull-Clark mesh structure is presented. In this new subdivision

More information

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into 2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

More information

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside Blending Functions Blending functions are more convenient basis than monomial basis canonical form (monomial

More information

Free-Form Deformation and Other Deformation Techniques

Free-Form Deformation and Other Deformation Techniques Free-Form Deformation and Other Deformation Techniques Deformation Deformation Basic Definition Deformation: A transformation/mapping of the positions of every particle in the original object to those

More information

2D Spline Curves. CS 4620 Lecture 18

2D Spline Curves. CS 4620 Lecture 18 2D Spline Curves CS 4620 Lecture 18 2014 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes that is, without discontinuities So far we can make things with corners (lines,

More information

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg COMPUTER AIDED GEOMETRIC DESIGN Thomas W. Sederberg January 31, 2011 ii T. W. Sederberg iii Preface This semester is the 24 th time I have taught a course at Brigham Young University titled, Computer Aided

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

2.11 Particle Systems

2.11 Particle Systems 2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced

More information

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Parametric Curves University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Representations 3 basic representation strategies: Explicit: y = mx + b Implicit: ax + by + c

More information

Fast Parallel Construction of Smooth Surfaces from Meshes with Tri/Quad/Pent Facets

Fast Parallel Construction of Smooth Surfaces from Meshes with Tri/Quad/Pent Facets Eurographics Symposium on Geometry Processing 2008 Pierre Alliez and Szymon Rusinkiewicz (Guest Editors Volume 27 (2008, Number 5 Fast Parallel Construction of Smooth Surfaces from Meshes with Tri/Quad/Pent

More information

IMAGE-BASED RENDERING

IMAGE-BASED RENDERING IMAGE-BASED RENDERING 1. What is Image-Based Rendering? - The synthesis of new views of a scene from pre-recorded pictures.!"$#% "'&( )*+,-/.). #0 1 ' 2"&43+5+, 2. Why? (1) We really enjoy visual magic!

More information

Advanced Modeling 2. Katja Bühler, Andrej Varchola, Eduard Gröller. March 24, x(t) z(t)

Advanced Modeling 2. Katja Bühler, Andrej Varchola, Eduard Gröller. March 24, x(t) z(t) Advanced Modeling 2 Katja Bühler, Andrej Varchola, Eduard Gröller March 24, 2014 1 Parametric Representations A parametric curve in E 3 is given by x(t) c : c(t) = y(t) ; t I = [a, b] R z(t) where x(t),

More information

Intro to Curves Week 1, Lecture 2

Intro to Curves Week 1, Lecture 2 CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2 David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University Outline Math review Introduction to 2D curves

More information

Example: Loop Scheme. Example: Loop Scheme. What makes a good scheme? recursive application leads to a smooth surface.

Example: Loop Scheme. Example: Loop Scheme. What makes a good scheme? recursive application leads to a smooth surface. Example: Loop Scheme What makes a good scheme? recursive application leads to a smooth surface 200, Denis Zorin Example: Loop Scheme Refinement rule 200, Denis Zorin Example: Loop Scheme Two geometric

More information

Removing Polar Rendering Artifacts in Subdivision Surfaces

Removing Polar Rendering Artifacts in Subdivision Surfaces This is an electronic version of an article published in Journal of Graphics, GPU, and Game Tools, Volume 14, Issue 2 pp. 61-76, DOI: 10.1080/2151237X.2009.10129278. The Journal of Graphics, GPU, and Game

More information

Finite curvature continuous polar patchworks

Finite curvature continuous polar patchworks Finite curvature continuous polar patchworks Kȩstutis Karčiauskas 0, Jörg Peters 1 0 Vilnius University, 1 University of Florida Abstract. We present an algorithm for completing a C 2 surface of up to

More information

Feature Adaptive GPU Rendering of Catmull-Clark Subdivision Surfaces

Feature Adaptive GPU Rendering of Catmull-Clark Subdivision Surfaces Feature Adaptive GPU Rendering of Catmull-Clark Subdivision Surfaces Matthias Nießner University of Erlangen-Nuremberg and Charles Loop Microsoft Research and Mark Meyer and Tony DeRose Pixar Animation

More information

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li. Fall 2014 CSCI 420: Computer Graphics 4.2 Splines Hao Li http://cs420.hao-li.com 1 Roller coaster Next programming assignment involves creating a 3D roller coaster animation We must model the 3D curve

More information

MA 323 Geometric Modelling Course Notes: Day 36 Subdivision Surfaces

MA 323 Geometric Modelling Course Notes: Day 36 Subdivision Surfaces MA 323 Geometric Modelling Course Notes: Day 36 Subdivision Surfaces David L. Finn Today, we continue our discussion of subdivision surfaces, by first looking in more detail at the midpoint method and

More information

Local Modification of Subdivision Surfaces Based on Curved Mesh

Local Modification of Subdivision Surfaces Based on Curved Mesh Local Modification of Subdivision Surfaces Based on Curved Mesh Yoshimasa Tokuyama Tokyo Polytechnic University tokuyama@image.t-kougei.ac.jp Kouichi Konno Iwate University konno@cis.iwate-u.ac.jp Junji

More information

Recursive Subdivision Surfaces for Geometric Modeling

Recursive Subdivision Surfaces for Geometric Modeling Recursive Subdivision Surfaces for Geometric Modeling Weiyin Ma City University of Hong Kong, Dept. of Manufacturing Engineering & Engineering Management Ahmad Nasri American University of Beirut, Dept.

More information

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

Advanced Graphics. Subdivision Surfaces. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd Advanced Graphics Subdivision Surfaces Alex Benton, University of Cambridge A.Benton@damtp.cam.ac.uk Supported in part by Google UK, Ltd NURBS patches aren t the greatest NURBS patches are nxm, forming

More information

08 - Designing Approximating Curves

08 - Designing Approximating Curves 08 - Designing Approximating Curves Acknowledgement: Olga Sorkine-Hornung, Alexander Sorkine-Hornung, Ilya Baran Last time Interpolating curves Monomials Lagrange Hermite Different control types Polynomials

More information

and the crooked shall be made straight, and the rough ways shall be made smooth; Luke 3:5

and the crooked shall be made straight, and the rough ways shall be made smooth; Luke 3:5 ecture 8: Knot Insertion Algorithms for B-Spline Curves and Surfaces and the crooked shall be made straight, and the rough ways shall be made smooth; uke 3:5. Motivation B-spline methods have several advantages

More information

Ray Casting of Trimmed NURBS Surfaces on the GPU

Ray Casting of Trimmed NURBS Surfaces on the GPU Ray Casting of Trimmed NURBS Surfaces on the GPU Hans-Friedrich Pabst Jan P. Springer André Schollmeyer Robert Lenhardt Christian Lessig Bernd Fröhlich Bauhaus University Weimar Faculty of Media Virtual

More information

Lecture 9: Introduction to Spline Curves

Lecture 9: Introduction to Spline Curves Lecture 9: Introduction to Spline Curves Splines are used in graphics to represent smooth curves and surfaces. They use a small set of control points (knots) and a function that generates a curve through

More information

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL International Edition Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL Sixth Edition Edward Angel Dave Shreiner Interactive Computer Graphics: A Top-Down Approach with Shader-Based

More information