+ All Categories
Home > Documents > Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of...

Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of...

Date post: 25-Jun-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
8
Incremental Rendering of Deformable Trimmed NURBS Surfaces Gary K. L. Cheung [email protected] Rynson W.H. Lau †‡ [email protected] Frederick W.B. Li [email protected] Department of Computer Engineering & Information Technology, City University of Hong Kong, Hong Kong Department of Computer Science, City University of Hong Kong, Hong Kong ABSTRACT Trimmed NURBS surfaces are often used to model smooth and complex objects. Unfortunately, most existing hard- ware graphics accelerators cannot render them directly. Al- though there are a lot of methods proposed to accelerate the rendering of such surfaces, majority of them are based on tessellation, which is developed primarily for handling non-deforming objects. For an object that may deform in run-time, such as clothing, facial expression, human and an- imal character, the tessellation process will need to be per- formed repeatedly while the object is deforming. However, as the tessellation process is very time consuming, interac- tive display of deforming objects is difficult. This explains why deformable objects are rarely used in virtual reality applications. In this paper, we present a efficient method for incremental rendering of deformable trimmed NURBS surfaces. This method can handle both trimmed surface de- formation and trimming curve deformation. Experimental results show that our method performs significantly faster than the method used in OpenGL. Categories and Subject Descriptors I.3.5 [Computational Geometry and Object Model- ing]: Curve, surface, solid, and object representations; I.3.5 [Methodology and Techniques]: Interaction techniques Keywords Deformable objects, NURBS surfaces, trimmed surfaces, real- time rendering 1. INTRODUCTION Deformable objects have been considered as important to virtual reality applications, as they may model clothing, fa- cial expression, human and animal characters. In particular, Non-Uniform Rational B-Splines (NURBS) [4, 16] are often employed to represent such objects as they can be used to produce a variety of shapes simply by manipulating their control points and weights. However, NURBS surfaces are seldom used in interactive applications that demand real- time rendering performance because of their high rendering cost. There have been a lot of work carried out to address this problem. Most of the methods developed are based on tessellation [1, 6, 8, 9, 10, 17]. This tessellation process subdivides the NURBS surfaces into polygons so that the hardware graphics accelerator, if present, may render the polygons in real-time. However, this process is computa- tionally very expensive. As a NURBS surface is deforming, this process must be executed in each frame to reflect the change of the object shape. Since in many real-time ap- plications such as computer games, we may want to have many deformable objects in the environment. Existing ren- dering methods would be difficult to render these objects in real-time. Earlier, we proposed an efficient method for rendering de- forming NURBS surfaces [13]. The method pre-computes a polygon model and a set of deformation coefficients for each deformable NURBS surface. During run-time, it incre- mentally updates the pre-computed polygon model of each deforming surface and progressively refines the resolution of the model according to the change in the surface curvature. We have shown that this method is much more efficient than existing methods. Recently, we have applied this method to develop a distributed virtual sculpting system [14, 15]. We have also extended the method to cover various types of de- formable parametric free-form surfaces [12]. However, we have learnt from our experience that in order to represent real objects, such as human faces with eyes and mouths, many NURBS surfaces need to be used. This is because our method can only support regular NURBS surfaces. To rep- resent an object with holes, we need to combine many regu- lar NURBS surfaces to model a single object. To overcome this limitation, our objective of this project is to extend the method to support trimming [5], which is a technique to allow arbitrary regions of a NURBS surface to be cut out, resulting in a non-regular NURBS surface. In this paper, we describe a method to extend our NURBS rendering method [13] to support trimming. The rest of the paper is outlined as follows. Section 2 provides a brief sur- vey on related work. Section 3 describes how we handle the deformable trimmed NURBS surfaces. Section 4 presents our method for tessellating trimmed NURBS surfaces. Sec- Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. VRST'03, October 1-3, 2003, Osaka JAPAN. Copyright 2003 ACM 1-58113-569-6/03/0010...$5.00
Transcript
Page 1: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

Incremental Rendering ofDeformable Trimmed NURBS Surfaces

Gary K. L. Cheung†

[email protected] W.H. Lau†‡

[email protected] W.B. Li†

[email protected]† Department of Computer Engineering & Information Technology, City University of Hong Kong, Hong Kong

‡ Department of Computer Science, City University of Hong Kong, Hong Kong

ABSTRACTTrimmed NURBS surfaces are often used to model smoothand complex objects. Unfortunately, most existing hard-ware graphics accelerators cannot render them directly. Al-though there are a lot of methods proposed to acceleratethe rendering of such surfaces, majority of them are basedon tessellation, which is developed primarily for handlingnon-deforming objects. For an object that may deform inrun-time, such as clothing, facial expression, human and an-imal character, the tessellation process will need to be per-formed repeatedly while the object is deforming. However,as the tessellation process is very time consuming, interac-tive display of deforming objects is difficult. This explainswhy deformable objects are rarely used in virtual realityapplications. In this paper, we present a efficient methodfor incremental rendering of deformable trimmed NURBSsurfaces. This method can handle both trimmed surface de-formation and trimming curve deformation. Experimentalresults show that our method performs significantly fasterthan the method used in OpenGL.

Categories and Subject DescriptorsI.3.5 [Computational Geometry and Object Model-ing]: Curve, surface, solid, and object representations; I.3.5[Methodology and Techniques]: Interaction techniques

KeywordsDeformable objects, NURBS surfaces, trimmed surfaces, real-time rendering

1. INTRODUCTIONDeformable objects have been considered as important tovirtual reality applications, as they may model clothing, fa-cial expression, human and animal characters. In particular,Non-Uniform Rational B-Splines (NURBS) [4, 16] are oftenemployed to represent such objects as they can be used to

produce a variety of shapes simply by manipulating theircontrol points and weights. However, NURBS surfaces areseldom used in interactive applications that demand real-time rendering performance because of their high renderingcost. There have been a lot of work carried out to addressthis problem. Most of the methods developed are based ontessellation [1, 6, 8, 9, 10, 17]. This tessellation processsubdivides the NURBS surfaces into polygons so that thehardware graphics accelerator, if present, may render thepolygons in real-time. However, this process is computa-tionally very expensive. As a NURBS surface is deforming,this process must be executed in each frame to reflect thechange of the object shape. Since in many real-time ap-plications such as computer games, we may want to havemany deformable objects in the environment. Existing ren-dering methods would be difficult to render these objects inreal-time.

Earlier, we proposed an efficient method for rendering de-forming NURBS surfaces [13]. The method pre-computesa polygon model and a set of deformation coefficients foreach deformable NURBS surface. During run-time, it incre-mentally updates the pre-computed polygon model of eachdeforming surface and progressively refines the resolution ofthe model according to the change in the surface curvature.We have shown that this method is much more efficient thanexisting methods. Recently, we have applied this method todevelop a distributed virtual sculpting system [14, 15]. Wehave also extended the method to cover various types of de-formable parametric free-form surfaces [12]. However, wehave learnt from our experience that in order to representreal objects, such as human faces with eyes and mouths,many NURBS surfaces need to be used. This is because ourmethod can only support regular NURBS surfaces. To rep-resent an object with holes, we need to combine many regu-lar NURBS surfaces to model a single object. To overcomethis limitation, our objective of this project is to extend themethod to support trimming [5], which is a technique toallow arbitrary regions of a NURBS surface to be cut out,resulting in a non-regular NURBS surface.

In this paper, we describe a method to extend our NURBSrendering method [13] to support trimming. The rest of thepaper is outlined as follows. Section 2 provides a brief sur-vey on related work. Section 3 describes how we handle thedeformable trimmed NURBS surfaces. Section 4 presentsour method for tessellating trimmed NURBS surfaces. Sec-

Permission to make digital or hard copies of all or part of this workfor personal or classroom use is granted without fee provided thatcopies are not made or distributed for profit or commercial advantageand that copies bear this notice and the full citation on the first page.To copy otherwise, to republish, to post on servers or to redistribute tolists, requires prior specific permission and/or a fee.VRST'03, October 1-3, 2003, Osaka JAPAN.Copyright 2003 ACM 1-58113-569-6/03/0010...$5.00

noma
48
noma
48
Page 2: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

tion 5 describes how to incremental update trimming curvesand trimmed NURBS surfaces as they deform. Section 6demonstrates the performance of the method through someexperiments. Finally, section 7 briefly concludes the paper.

2. RELATED WORKEfficient rendering of trimmed NURBS surfaces has been achallenging research area for decades. There are many meth-ods proposed for tessellating trimmed NURBS surfaces intopolygons for rendering. In particular, Shantz et al. [18] pro-pose an adaptive forward differencing technique to evaluatethe points on the surface incrementally to produce a poly-gon model for rendering. As the method may adjust theforward differencing step adaptively, it could optimize thenumber of surface points generated according to the surfacecurvature or other approximation criteria. Rockwood et al.[17] propose an alternative method to accelerate the tessel-lation process. It first converts the surface to Bezier patcheswith knot insertion. For those trimmed patches, it furthersubdivides them into a list of uv-monotone patches. Eachpatch is then tessellated into polygons by the coving andtiling process. A variant of this method has been imple-mented in the OpenGL library.

Abi-Ezzi et al. [1] tessellate trimmed NURBS surfaces ina way similar to [17], but it further minimizes the numberof patches needed to be tessellated by culling out the in-visible patches dynamically during run-time. Kumar et al.[9] improve the performance of the tessellation process byavoiding the operation of subdividing Bezier patches into uv-monotone patches. Instead, it directly tessellates the Bezierpatches into polygons for rendering. However, to allow fastback-patch culling, it needs to compute pseudo normal sur-faces for all Bezier patches. In [10], they enhanced theirmethod in [9] by constructing super-surfaces on the Bezierpatches to allow a further reduction in the number of poly-gons of the resulting polygon model.

Unfortunately, all the methods mentioned above cannot han-dle deforming trimmed NURBS surfaces efficiently. Regard-less of the high computational cost of the tessellation pro-cess, it has to be performed repeatedly in every frame as thesurfaces are deforming. On the other hand, if the trimmingcurve is undergoing deformation, methods adopting the uv-monotone approach will even need to re-generate a new setof uv-monotone patches before the tessellation process.

Recently, Kahlesz et al. [8] developed an adaptive tessel-lation method. It recursively subdivides a surface into aquad-tree hierarchy according to some approximation crite-ria. If a leaf quad-tree node is found to be untrimmed, itwill be selected as an output polygon for the resulting poly-gon model. Otherwise, the node is further subdivided forfurther processing or be tessellated by constrained delaunaytriangulation to generate the output polygons. This methodwas further enhanced by building a seam graph structure onthe tessellated trimmed NURBS surfaces for multi- resolu-tion modeling [6]. A seam graph structure is actually aprogressive mesh [7] like structure. It allows the applicationto select an appropriate resolution of the tessellated polygonmodel for rendering. However, the construction of the seamgraph structure is itself an expensive process. Hence, this

method, like most of the other methods, is not suitable forinteractive rendering of trimmed NURBS surfaces.

3. HANDLING OF DEFORMABLETRIMMED NURBS SURFACES

In our earlier work, we developed a technique for efficientrendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain two data structures ofeach surface, the surface model and a polygon model repre-senting the surface model. As the surface deforms, the poly-gon model is not regenerated through tessellation. Instead,it is incrementally updated to represent the deforming sur-face. To handle trimming curves efficiently, we also modelthem in a similar way.

3.1 Handling of the NURBS SurfacesThe polygon model of a surface can be obtained by eval-uating the surface equation with some discrete parametricvalues. If a control point is moved from Pi,j to P i,j with a

displacement vector−→V = P i,j −Pi,j , the incremental differ-

ence between the two polygon models of the surface beforeand after the control point movement is:

S(u, v) − S(u, v)=(P i,j − Pi,j)wi,jNi,p(u)Nj,q(v)∑m

s=0

∑nt=0 ws,tNs,p(u)Nt,q(v)

=αi,j−→V

(1)where S(u, v) and S(u, v) are the polygon models of thesurface before and after the control point movement, re-spectively. αi,j is called the deformation coefficient definedas follows:

αi,j(u, v) =wi,jNi,p(u)Nj,q(v)∑m

s=0

∑nt=0 ws,tNs,p(u)Nt,q(v)

(2)

αi,j is a constant for each particular pair of (u, v). Hence,if the resolution of the polygon model does not change dur-ing the deformation, we may precompute the deformationcoefficients and update the polygon model incrementally asshown in Equation (1).

However, when a surface deforms, its curvature is likelychanged and we need to refine the resolution of the poly-gon model and to compute new deformation coefficients in-crementally according to the change in the surface curva-ture. A NURBS surface is first converted into a set of Bezierpatches using knot insertion [2]. Each Bezier patch is thensubdivided into a polygon model, which is maintained in aquadtree hierarchy, by applying the de Casteljau subdivi-sion formula [3] to the Bernstein polynomials in both u andv directions. We refer to this as the polygon hierarchy. Forexample, in u, we have:

P ri (u) = (1 − u)

wr−1i

wri

P r−1i (u) + u

wr−1i+1

wri

P r−1i+1 (u) (3)

where wri (u)=(1− u)wr−1

i (u) + uwr−1i+1 (u) and r = 1, . . . , n,

i = 0, . . . , n − r. [ wiPi wi ]T are the homogeneous Bezierpoints with Pi ∈ R3, wi are the weights, and n is the degreeof the surface. The v direction has similar recursion.

The difference of Equation (3) before and after the defor-mation can be simplified to get a de Casteljau formula as

noma
49
noma
49
Page 3: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

follows:

αri (u) = (1 − u)αr−1

i (u) + uαr−1i+1 (u) (4)

for r = 1, . . . , n, i = 0, . . . , n−r. Equation (4) indicates thatthe deformation coefficients can be generated incrementallyby the de Casteljau subdivision formula. Hence, if the reso-lution of the polygon model needs to be increased, the newdeformation coefficients can be calculated from adjacent de-formation coefficients stored at existing vertices using thede Casteljau formula. To achieve a better performance, weimplemented this based on the Horner’s formula, of averagecomplexity O(n) as opposed to O(n2) when based on the deCasteljau’s formula.

3.2 Handling of the Trimming LoopsA trimmed NURBS surface is defined by a set of trimmingloops together with the NURBS surface itself. Each trim-ming loop consists of a set of NURBS curves, which aredefined over the parametric space of the NURBS surface. ANURBS curve C(t) may be defined as:

C(t) =n∑

i=0

βi(t)Pi (5)

where Pi denotes the control points. βi(t), similar to thecase of NURBS surfaces, represents the set of deformationcoefficients of the NURBS curve. It is defined as:

βi(t) =wiNi,p(t)∑m

s=0 wsNs,p(t)(6)

To trim a NURBS surface, we subdivide the NURBS curvesagainst the polygon hierarchy of the NURBS surface to formpolylines. By comparing the intersection points between thepolylines and the polygon hierarchy in the parametric space,we may obtain a list of polylines for each quadtree node inthe polygon hierarchy that are inscribed in the node.

4. TESSELLATION OF TRIMMED NODESTo render a trimmed NURBS surface, according to the cur-rent viewing parameters, we select the appropriate quadtreenodes in the polygon hierarchy and tessellate them basedon their types. We classify all the nodes into three types:visible non-trimmed nodes, invisible non-trimmed nodes andtrimmed nodes. For a visible non-trimmed node, we justneed to split it into 2 triangles along its diagonal. For aninvisible non-trimmed node, as it is completely trimmed outby some trimming loop, we would just ignore it and wouldnot render it. For a trimmed node, we further classify itinto one of the three types: convex trimmed node, mono-tonic chain trimmed node and complex trimmed node. Theyare described in the following subsections.

4.1 Convex Trimmed NodesA convex trimmed node is a node with a convex trimmedregion. To classify such a node, we make use of the strongconvex hull property of the NURBS curve definition. Weperform an angle test on the control points of the curvesegment to verify the convexity of the trimmed region in thenode. Once such a node is identified, there are two possiblecases as shown in Figure 1. Either the exterior or the interior

node region is trimmed out by the trimming curve as shownin figures 1(a) and 1(b), respectively. The former representsa convex trimmed node and can be tessellated by a simpletriangulation algorithm. The latter may represent either amonotonic chain trimmed node or a complex trimmed node.

( )a (b)

Figure 1: Note trimming: (a) exterior node re-gion is trimmed out, and (b) interior node regionis trimmed out.

4.2 Monotonic Chain Trimmed NodesA polyline segment is a monotonic chain with respect toaxis L if the polylines of the inscribed trimming curve seg-ment have at most 2 intersections to any L′ perpendicularto L. It is similar to the monotone definition but a mono-tone refers to a polygon while a monotonic chain refers tothe polylines. In our method, the monotonic chain is re-spected to the u and the v axes in the parametric space asuv-monotonic polylines. A monotonic chain trimmed nodeis then a combination of the uv-monotonic polylines and thecorners of the trimmed node as shown in figure 2. By tes-sellating these monotonic regions as a whole, we can bothreduce the number of node subdivisions and minimize thenumber of resulting polygons. As shown in figure 2(a), suchcase exists when there are u-monotonic and v-monotonicpolylines inscribed in a node, in which the monotonic poly-lines are connected at their maxima, umax and vmax, andminima, umin and vmin, as shown in figure 2(b). In otherwords, there are four uv-monotonic polylines in the node,which have the following properties:

umaxumin

vmax

vmin

( )a (b)

Mupper-left Mupper-right

Mlower-left Mlower-right

L1 L2

L3L4

Figure 2: Handling of a monotonic chain trimmednode: (a) determining maxima and minima, and (b)partitioning of the node into four regions accordingto the maxima and minima.

noma
50
noma
50
Page 4: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

In u direction:

∀x{x : (umin ≤ ux ≤ ux+1 ≤ umax) ∧ (ux, ux+1) ∈ Lupper}

∀x{x : (umax ≥ ux ≥ ux+1 ≥ umin) ∧ (ux, ux+1) ∈ Llower}In v direction:

∀y{y : (vmin ≤ vy ≤ vy+1 ≤ vmax) ∧ (vy , vy+1) ∈ Lleft}

∀y{y : (vmax ≥ vy ≥ vy+1 ≥ vmin) ∧ (vy, vy+1) ∈ Lright}where Lupper and Llower denote the upper uv-monotonicpolylines (L1 ∪ L2) and the lower uv-monotonic polylines(L3 ∪ L4), respectively. These polylines are partitioned by{umax, umin}. Lleft and Lright denote the left uv-monotonicpolylines (L1 ∪ L4) and the right uv-monotonic polylines(L2 ∪ L3), respectively. These polylines are partitioned by{vmax, vmin}.

All four uv-monotonic regions share the same properties, ex-cept that they have different orientations. To show how wetessellate the node, we consider the upper-left uv-monotonicregion, Mupper−left, as shown in figure 3. Since a uv-mono-tonic region is convex in nature, a simplest way to tessel-late it is by joining each vertex of the monotonic polylineswithin the region to the nearest corner point of the region.As an example, the nearest corner point of Mupper−left asshown in figure 3 is Pupper−left, which has the coordinate(uleft, vupper). Since the uv-monotonic polylines are in-scribed in the node, we can have u left ≤ umin and vupper ≥vmin. The tessellation is done by adding lines from cor-ner point Pupper−left to each vertex Pi on the uv-monotonicpolylines of Mupper−left.

P (u ,v )i+1 i+1 i+1

P (u ,v )i i i

P (u ,v )upper-left left upper

y

x

Figure 3: Tessellation of the upper-left uv-mono-tonic region.

To show that this tessellation process would work correctly,i.e., the lines added would not cross each other, we considertwo consecutive sample points of a trimming curve segment,i.e., the two end points of a polyline. Refer to figure 3 asan example. The two end points are Pi and Pi+1, withPi+1 being the next point of Pi. The two points form atriangle with Pupper−left and the coordinates of the triangleare (uleft, vupper), (ui, vi) and (ui+1, vi+1). If the orientationof these 3 vertices is always turning left, their determinantshould then be positive. To evaluate the determinant, were-express Pi+1 as (∆x+ui, ∆y +vi), where (∆x, ∆y) is theoffset from Pi to Pi+1. According to the monotone property,∆x and ∆y will always be positive in Mupper−left. The

determinant of the 3 vertices is calculated as follows:∣∣∣∣

ui − uleft (∆x + ui) − uleft

vi − vupper (∆y + vi) − vupper

∣∣∣∣

= [∆y(ui − uleft) + (ui − uleft)(vi − vupper)] −[∆x(vi − vupper) + (ui − uleft)(vi − vupper)]

= ∆y(ui − uleft) − ∆x(vi − vupper) (7)

As uleft ≤ umin and ∆y ≥ 0, the first part, ∆y(ui − uleft),of equation 7 must be positive. In addition, as vupper ≥ vmin

and ∆x ≥ 0, the second part, −∆x(vi − vupper), of equation7 must also be positive. Therefore, the result of equation 7must always be positive.

By combining the 4 uv-monotonic regions together, the re-sult of the tessellation process may become as shown in fig-ure 4. Since this tessellation process requires to identifythe 2 pairs of maxima and minima, the complexity is O(n)bounded. In addition, the process traverses each vertex ofthe polylines at most once, which is also O(n) bounded.However, if a node is identified as a non-monotonic chaintrimmed node, i.e., it is a complex trimmed node, a furthersubdivision is required.

Figure 4: The resultant tessellation of a monotonicchain trimmed node.

4.3 Complex Trimmed NodesWhen a node is identified as neither a convex trimmed nodenor a monotonic chain trimmed node, it is considered asa complex trimmed node. Normally, if a node contains ahighly irregular trimming curve, it is most likely a complextrimmed node. To handle this kind of nodes, we need tofurther subdivide each of them into child nodes. This maylikely also involve subdividing the trimming curve to individ-ual child nodes. Hence, this subdivision process essentiallyreduces the irregularity of the trimming curve and allowsmore and more subnodes to be classified as convex trimmednodes or monotonic chain trimmed nodes for triangulation.On average, each child node contains about one-fourth ofthe original trimming curve. Such a reduction in irregular-ity is very effective. According to our experiments, morethan 80% of nodes in a surface would be subdivided intoconvex trimmed nodes or monotonic chain trimmed nodes.Only 20% of the nodes need to be further subdivided. Fromour experience, most nodes require only 1 or 2 levels of sub-division to partition a complex trimmed node into convextrimmed nodes and/or monotonic chain trimmed nodes.

noma
51
noma
51
Page 5: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

5. OBJECT DEFORMATIONOne of the critical developments in our research is that ourmethod supports real-time deformation of both the trim-ming curves and the trimmed NURBS surfaces. We notethat the deformation of a trimming curve does not affectthe topology or the shape of the trimmed NURBS surface.On the other hand, the deformation of the trimmed NURBSsurface will only affect the shape of the surface itself; it doesnot affect the shape of the trimming curve. As such, bothtypes of deformation are only loosely related to each other,and we can handle each of them separately.

5.1 Trimming Curve DeformationUsually, when a trimming curve is being deformed, only partof the NURBS surface is affected. It will be expensive toperform the retriangulation of the trimming curve againstthe polygon hierarchy of the NURBS surface in every framewhile the trimming curve is deforming. According to thelocal modification property of the NURBS curves, any de-formation driven by moving a control point Pi of a NURBScurve will only affect the curve segment within the para-metric range [ti, ti+p), where p is the order of the trimmingcurve. Hence, we may limit the update operation to withinthis trimming curve segment defined by ti and ti+p. To al-low an efficient update of the corresponding polylines of thecurve segment, we may simply check each of the polylinesto see if its two end points satisfy the following condition:

(ti ≤ tstart ∧ tend ≤ ti+p)

Only those polylines satisfying this condition are affectedby the deformation and hence need to be updated. Oncewe have identified the affected polylines, we would updatethe parametric positions of their vertices. We then performresolution refinement and compute the new sets of defor-mation coefficients for the newly inserted vertices. The up-dated polylines are then remapped to the NURBS surfacefor retessellation.

5.2 Trimmed Surface DeformationWhen a trimmed NURBS surface deforms, the curvature ofthe surface may be affected and the curvature of the trim-ming curves within the deformed region of the surface mayalso be affected. We handle this in a way somewhat simi-lar to how we handle the deformation of the trimming curve.However, the scope of the update is relatively smaller. First,we update the affected region of the NURBS surface. Sec-ond, we update the vertex positions of the affected polylineson the NURBS surface. Third, we perform resolution refine-ment on the affected trimming curve segment. Finally, weretessellate the resulting polylines with the correspondingnodes.

Figure 5 illustrates two examples of resolution refinementof a trimming curve segment C with reference to a node inthe polygon hierarchy, where C(ti) denotes a vertex of thepolylines representing C. In figure 5(a), we assume that thepolylines can no longer approximate C due to the increasein the surface curvature. Hence, we need to increase theresolution of C by inserting vertices C(t2) and C(t4) to thepolylines. On the other hand, if the resolution of C is foundto be too high due to the decrease in the surface curvature asshown in figure 5(b), we may delete vertices C(t2) and C(t4)

to decrease the resolution of C. By observation, an updateto C(t 3) will affect the polylines between C(t1) to C(t5). Infact, C(t1) and C(t5) are the previous vertex and the nextvertex to C(t3), respectively. Hence, C(t1) and C(t5) maybe considered as the updated range of C(t 3). Generallyspeaking, whether a resolution refinement process involvesinserting or deleting vertices, the update range always fallsbetween (max{t : t < ti}, ti) and (ti, min{t : ti < t}).

C(t )1

C(t )2

C(t )3 C(t )4

C(t )5

C(t )1

C(t )2

C(t )3

C(t )4

C(t )5

( )a

Inserting Child Nodes

C(t )1

C(t )2

C(t )3 C(t )4

C(t )5

C(t )1

C(t )2

C(t )3

C(t )4

C(t )5

(b)

Deleting Child Nodes

Figure 5: Resolution refinement of a trimming curvesegment: (a) resolution increase, and (b) resolutiondecrease.

Note that the curvature change of the trimming curve seg-ment due to the deformation of the NURBS surface is usu-ally very small. Hence, only a very small number of verticesmay need to be inserted or deleted from the polylines inorder to maintain a good polygonal representation of thetrimmed surface. Figure 6 shows a trimmed NURBS sur-face before and after deformation. We can see that boththe resolution of the surface itself and the resolution of thetrimming curve are refined according to the change of thesurface curvature.

( )a (b)

Figure 6: Resolution refinement of a trimmedNURBS surface: (a) before deformation, and (b)after deformation.

noma
52
noma
52
Page 6: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

Trimming Curve Deformation Only

0 100 200 300 400 500

Frame Number

0.000

0.020

0.040

0.060

0.080

0.100

0.120

Time (Sec)

OpenGL

Our Methods

Surface Deformation Only

0.000

0.020

0.040

0.060

0.080

0.100

0.120

Time (Sec)

0 100 200 300 400 500

Frame Number

OpenGL

Our Methods

Figure 7: Performance comparison between our method and the method used by OpenGL.

0.000

0.010

0.020

0.030

0.040

0.050Trimming Curve Deformation Only

0 100 200 300 400 500

Frame Number

Time (Sec)

Rendering

Coordinate Update

Tessellation

Surface Deformation Only

0 100 200 300 400 500

Frame Number

0.000

0.010

0.020

0.030

0.040

0.050

Time (Sec)

Rendering

Coordinate Update

Tessellation

Figure 8: Computational costs of individual operations.

6. RESULTS AND DISCUSSIONSWe have implemented the new method in C++ and OpenGL.All the experiments presented here have been performed ona Pentium 4 2.0GHz machine with 256 MB RAM. The de-formation events were triggered by randomly moving either40% of the trimming curve control points, or 5% of the sur-face control points in each frame. Figure 9 shows a hu-man face model that we used to test the proposed renderingmethod. The model is constructed by a single NURBS sur-face containing 837 control points and 9 separate trimmingcurves. The figure shows the model before and after defor-mation, in shaded and wireframe rendering. Figure 10 showsanother test model of a classical teapot after deformation.

To demonstrate the performance of our method, we havecompared it with the method used by OpenGL, i.e., thevariant of Rockwood’s method [17], using the human facemodel shown in figure 9. Figure 7 shows the rendering timesof the two methods, we can see that our method in eachconsecutive frame is roughly 2.5 and 3 times faster thanthe OpenGL method for trimming curve deformation andfor trimmed surface deformation, respectively. The reasonfor this is that as we deform the trimmed surface and thetrimming curves continuously, a complete evaluation is re-quired in each frame for the OpenGL method. However, ourmethod only needs to perform an incremental update to theaffected region and is thus more efficient.

If we compare trimming curve deformation with trimmedsurface deformation as shown in figure 7, we can see thatthe performance of trimming curve deformation is relativelyfluctuating. This is because whenever a trimming curveis deformed, we need to perform the retessellation process.The efficiency of this retessellation process is mainly affectedby the curvature of the trimming curve, since a smoothertrimming curve will generate less polylines. For the ran-domly deforming trimming curves, their curvatures are ex-pected to vary significantly. As a result, the computationtime would be unstable. In contrast, the surface deforma-tion does not generate a massive update of trimmed surfacepatches and hence, the computation time is relatively stable.

Figure 8 shows the performance of individual operationsused in our method. Tessellation refers to the classifica-tion and triangulation of all the trimmed nodes. Coordinateupdate refers to the incremental updating of the trimmingcurves and the trimmed surface. Rendering refers to thetime taken to render all the polygons by the OpenGL enginein each frame. We can see that the tessellation process onlyneeds to be executed occasionally in the surface deformationcase. For trimming curve deformation, as the surface coor-dinates of the polylines cannot be calculated with the de-formation coefficients, they should be recomputed from thecoordinates of the incrementally updated trimming curve.Hence, this process is in general more computationally in-tensive for trimming curve deformation than for trimmed

noma
53
noma
53
Page 7: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

surface deformation. When a trimming curve deforms, weneed to perform re-evaluation on the curve to generate theupdated polylines representing the deformed curve. How-ever, in practice, this process may not significantly degradethe overall rendering performance as the region of the defor-mation, and hence, the effort spent on the update, is usuallyrelatively small compared with the deformation of the wholesurface.

7. CONCLUSIONIn this paper, we have introduced an interactive renderingmethod for deformable trimmed NURBS surfaces. In orderto efficiently update the trimmed NURBS surface and thetrimming curves as the surface and/or the trimming curvesare deforming, we propose a regional update mechanism andan efficient method for dynamically tessellating the NURBSsurface with the trimming curves. We have shown that thenew method for rendering deformable trimmed NURBS sur-faces is more efficient than the method used in OpenGL dur-ing the curve/surface deformation.

8. ACKNOWLEDGMENTSThe work described in this paper was partially supported bytwo SRG grants (Project Numbers: 7001391 and 7001465)and a DAG grant (Project Number: 7100264), all from CityUniversity of Hong Kong.

9. REFERENCES[1] S. Abi-Ezzi and S. Subramaniam. Fast Dynamic

Tessellation of Trimmed NURBS Surfaces. In Proc. ofEurographics ’94, pages 108–126, 1994.

[2] E. Cohen, T. Lyche, and R. Riesenfeld. DiscreteB-splines and Subdivision Techniques inComputer-Aided Geometric Design and ComputerGraphics. Computer Graphics and Image Processing,14, October 1980.

[3] P. de Casteljau. Courbes et Surfaces a Poles. S. A.Andre Citroen, 1959.

[4] G. Farin. NURBS from Projective Geometry toPractical Use. A K Peters, Natick, MA, 1999.

[5] G. Farin and D. Hansford. The Essentials of CAGD.A K Peters, Natick, MA, 2000.

[6] M. Guthe, J. Meseth, and R. Klein. Fast and MemoryEfficient View-Dependent Trimmed NURBSRendering. In Proc. of of Pacific Graphics ’02, pages204–213, June 2002.

[7] H. Hoppe. Progressive Meshes. In Proc. of ACMSIGGRAPH ’96, pages 99–108, August 1996.

[8] F. Kahlesz, A. Balazs, and R. Klein. MultiresolutionRendering By Sewing Trimmed NURBS Surfaces. InProc. of ACM Symposium on Solid Modeling andApplications, pages 281–288, June 2002.

[9] S. Kumar, D. Manocha, and A. Lastra. InteractiveDisplay of Large-Scale NURBS Models. In Proc. ofSymposium on Interactive 3D Graphics, pages 51–58,1995.

[10] S. Kumar, D. Manocha, H. Zhang, and K. Hoff.Accelerated Walkthrough of Large Spline Models. InProc. of Symposium on Interactive 3D Graphics, pages91–101, 1997.

[11] F. Li and R. Lau. Incremental Polygonization ofDeforming NURBS Surfaces. Journal of GraphicsTools, 4(4):37–50, 1999.

[12] F. Li and R. Lau. Real-Time Rendering of DeformableParametric Free-Form Surfaces. In Proc. of ACMVRST, pages 131–138, December 1999.

[13] F. Li, R. Lau, and M. Green. Interactive Rendering ofDeforming NURBS Surfaces. In Proc. of Eurographics’97, pages 47–56, September 1997.

[14] F. Li, R. Lau, and F. Ng. Collaborative DistributedVirtual Sculpting. In Proc. of of IEEE VR’01, pages217–224, March 2001.

[15] F. Li, R. Lau, and F. Ng. VSculpt: A DistributedVirtual Sculpting Environment for CollaborativeDesign. IEEE Trans. on Multimedia (to appear), 2003.

[16] L. Piegl and W. Tiller. The NURBS Book Secondedition. Springer-Verlag, Tyler, TX, 1997.

[17] A. Rockwood, K. Heaton, and T. Davis. Real-TimeRendering of Trimmed Surfaces. In Proc. of ACMSIGGRAPH ’89, volume 23, pages 107–116, 1989.

[18] M. Shantz and S. Chang. Rendering Trimmed NURBSwith Adaptive Forward Differencing. In Proc. of ACMSIGGRAPH ’88, pages 189–198, 1988.

noma
54
noma
54
Page 8: Incremental Rendering of Deformable Trimmed NURBS Surfacesrynson/papers/vrst03.pdf · rendering of deformable NURBS surfaces [11, 13]. The ba-sic idea of this method is to maintain

Figure 9: A human face modeled by a trimmed NURBS surface: (upper) shaded and wireframe beforedeformation, and (lower) shaded and wireframe after deformation on the eyes, mouth and face.

Figure 10: A teapot modeled by a trimmed NURBS surface: shaded and wireframe before deformation.

noma
55
noma
55

Recommended