JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for...

20
1 Introduction Scalar-field-guided adaptive shape deformation and animation Jing Hua, Hong Qin Department of Computer Science, State University of New York at Stony Brook, NY 11794-4400, USA E-mail: {jinghua|qin}@cs.sunysb.edu Published online: 9 December 2003 c Springer-Verlag 2003 In this paper, we propose a novel scalar-field- guided adaptive shape deformation (SFD) technique founded on PDE-based flow con- straints and scalar fields of implicit func- tions. Scalar fields are used as embedding spaces. Upon deformation of the scalar field, a corresponding displacement/velocity field will be generated accordingly, which results in a shape deformation of the embedded ob- ject. In our system, the scalar field creation, sketching, and manipulation are both natural and intuitive. The embedded model is further enhanced with self-optimization capability. During the deformation we can also enforce various constraints on embedded models. In addition, this technique can be used to ease the animation design. Our experiments demonstrate that the new SFD technique is powerful, efficient, versatile, and intuitive for shape modeling and animation. Key words: Shape deformations – Scalar fields – Interaction techniques Correspondence to: Jing Hua Efficient and intuitive shape deformation techniques are vital to the success of geometric modeling, com- puter animation, physical simulation, and other vi- sual computing areas. Free-form deformation (FFD) is one popular technique that meets this need. In essence, an object deformation based on FFD is conducted indirectly by deforming the enclosing space in which the object is defined and embedded. Every vertex of the object has a unique parame- terization that initially defines its position in the space. When the space is altered, it gives rise to the shape deformation of its embedded object based on the initial parameterization. One appealing advan- tage of FFD-based techniques over other traditional modeling/editing methods is that they can be ap- plied to any geometric object since the surrounding space is independent of objects’ mathematical repre- sentations. Therefore, designers do not need to worry about the underlying (perhaps complicated) geo- metric formulation and topological structure of an embedded object when making the desired deforma- tions. Various FFD techniques have been proposed during the past two decades [2, 7–9, 19, 20, 28]. Despite many attractive properties, such as the nat- ural control of space definition, there are several difficulties associated with the current FFD tech- niques. First, while very useful for coarse-scale de- formations of an object, the technique can be time consuming to use for finer-scale deformations [29], where a very dense and customized control lattice shape is usually required [20]. When dealing with a large number of complex control lattices (which define the space), this tends to be cumbersome and counterproductive. Designers have to construct the complex control lattice to define the space embed- ding the object and alter the large number of con- trol lattices to deform the space to make the de- sired deformations of the object. Although the axis- based FFD approaches and the directly manipulated FFD approaches [2, 7, 19] are relatively intuitive and efficient, they can offer only limited deformations. Second, the control lattice is less flexible and can- not easily have very complex topology. It is difficult to perform a large number of distinct deformation types. Third, the traditional FFD operation is gener- ally a single operation applied to static models. Re- finement and optimization can only occur before or after the deformations. For instance, if a low curva- ture region is not subdivided prior to the deforma- tion, the model is no longer capable of representing the deformation accurately. To alleviate this prob- T he Vis ual Com puter (2004) 20:47–66 Digital Object Identifier (DOI) 10.1007/s00371-003-0225-z

Transcript of JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for...

Page 1: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

1 Introduction

Scalar-field-guidedadaptive shapedeformation and animation

Jing Hua,Hong Qin

Department of Computer Science, State University ofNew York at Stony Brook, NY 11794-4400, USAE-mail: {jinghua|qin}@cs.sunysb.edu

Published online: 9 December 2003c© Springer-Verlag 2003

In this paper, we propose a novel scalar-field-guided adaptive shape deformation (SFD)technique founded on PDE-based flow con-straints and scalar fields of implicit func-tions. Scalar fields are used as embeddingspaces. Upon deformation of the scalar field,a corresponding displacement/velocity fieldwill be generated accordingly, which resultsin a shape deformation of the embedded ob-ject. In our system, the scalar field creation,sketching, and manipulation are both naturaland intuitive. The embedded model is furtherenhanced with self-optimization capability.During the deformation we can also enforcevarious constraints on embedded models.In addition, this technique can be used toease the animation design. Our experimentsdemonstrate that the new SFD technique ispowerful, efficient, versatile, and intuitivefor shape modeling and animation.

Key words: Shape deformations – Scalarfields – Interaction techniques

Correspondence to: Jing Hua

Efficient and intuitive shape deformation techniquesare vital to the success of geometric modeling, com-puter animation, physical simulation, and other vi-sual computing areas. Free-form deformation (FFD)is one popular technique that meets this need. Inessence, an object deformation based on FFD isconducted indirectly by deforming the enclosingspace in which the object is defined and embedded.Every vertex of the object has a unique parame-terization that initially defines its position in thespace. When the space is altered, it gives rise to theshape deformation of its embedded object based onthe initial parameterization. One appealing advan-tage of FFD-based techniques over other traditionalmodeling/editing methods is that they can be ap-plied to any geometric object since the surroundingspace is independent of objects’ mathematical repre-sentations. Therefore, designers do not need to worryabout the underlying (perhaps complicated) geo-metric formulation and topological structure of anembedded object when making the desired deforma-tions. Various FFD techniques have been proposedduring the past two decades [2, 7–9, 19, 20, 28].Despite many attractive properties, such as the nat-ural control of space definition, there are severaldifficulties associated with the current FFD tech-niques. First, while very useful for coarse-scale de-formations of an object, the technique can be timeconsuming to use for finer-scale deformations [29],where a very dense and customized control latticeshape is usually required [20]. When dealing witha large number of complex control lattices (whichdefine the space), this tends to be cumbersome andcounterproductive. Designers have to construct thecomplex control lattice to define the space embed-ding the object and alter the large number of con-trol lattices to deform the space to make the de-sired deformations of the object. Although the axis-based FFD approaches and the directly manipulatedFFD approaches [2, 7, 19] are relatively intuitive andefficient, they can offer only limited deformations.Second, the control lattice is less flexible and can-not easily have very complex topology. It is difficultto perform a large number of distinct deformationtypes. Third, the traditional FFD operation is gener-ally a single operation applied to static models. Re-finement and optimization can only occur before orafter the deformations. For instance, if a low curva-ture region is not subdivided prior to the deforma-tion, the model is no longer capable of representingthe deformation accurately. To alleviate this prob-

T he Vis ual Com puter (2004) 20:47–66Digital Object Identifier (DOI) 10.1007/s00371-003-0225-z

Page 2: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

48 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

lem, intermediate steps have to be introduced duringthe deformation steps.In this paper, we propose a novel adaptive shapedeformation technique, or SFD, founded on PDE-based flow constraints and scalar fields of implicitfunctions, that employs a scalar field as the embed-ding space. Users can interactively sketch a scalarfield of an implicit function via a mouse or a 3Dhaptic interface to embed either an entire model ora part of the model. The embedding space basedon scalar field is of diverse types, which implic-itly defines a complicated geometry and an arbi-trary topology. Upon deformation of the embeddingspace (i.e., the modification of scalar field), the ver-tices of the embedded object throughout the entirespace will move in accordance with the enforcedflow constraints, which result in FFDs of the em-bedded object. The deformation velocity of eachvertex on the model is very general and can easilyadopt any user-desired constraints. Our SFD tech-nique greatly generalizes the traditional FFD ap-proaches and affords a larger number of shape de-formations. The SFD space construction, sketching,and manipulation are more natural and easy to usethan previous FFD techniques based on parametricgeometry.Furthermore, to represent deformations more ac-curately, the embedded models are equipped withself-optimization capability. Adaptive subdivisionand mesh optimization are tightly coupled with SFD,supporting versatile multiresolution deformations.Since our SFD can be treated as a time-evolvingprocess (rather than a single operation), it allowsself-adaptive refinement and mesh improvement tointerleave with shape deformation throughout theSFD process. Our algorithm adaptively subdividesthe model into regions that require high resolution.As the SFD deforms an object, the curvature ofthe affected surface is computed and checked tosee if subdivision is necessary. The mesh improve-ment operations, such as the edge-split operation,edge-collapse operation, edge-swap operation, andLaplacian mesh smoothing, are then invoked to op-timize neighborhood shapes, which equalize edgelengths, allowing vertices to distribute themselvesmore evenly during a SFD run. We also incorporatevarious constraints on embedded models that enableour technique to facilitate feature-based design. Ourresults demonstrate that the proposed SFD techniqueis useful and powerful for shape editing and anima-tion design.

2 Related work

2.1 Free-form deformation

A deformation technique developed by Barr [2] usesa set of hierarchical transformations for deformingan object. This technique uses the surface normalvector of the undeformed surface and a transforma-tion matrix to calculate the normal vector of an arbi-trarily deformed smooth surface. Unfortunately, thistechnique restricts the possible definitions of the de-formable space to that of a single coordinate sys-tem and the ways in which the space can be altered.Sederberg and Parry [28] proposed to deform solidgeometry in a free-form manner. The vertices onthe object embedded in the original lattice structureare mapped to the deformed lattice using a trivari-ate Bezier spline. However, the FFD can be accom-plished only with a parallelpiped lattice structure.Coquillart [8] developed the extended free-form de-formation, or EFFD, as an extension of Sederbergand Parry’s technique, which uses nonparallelepiped3D lattices. The goal of this technique is to changethe shape of an existing surface either by bending italong an arbitrarily shaped curve or by adding ran-domly shaped bumps to it. Chang and Rockwood’sapproach [7] deforms an object by repeatedly apply-ing affine transformations in space. But this tech-nique also limits the ways in which the space sur-rounding the curve can be altered. MacCracken andJoy [20] presented a FFD technique that uses ar-bitrary lattices, namely, Catmull-Clark subdivisionvolumes. An underlying model can be deformed byestablishing positions of model points within theconverging sequence of lattices and then tracking thenew positions of these points within the deformed se-quence of lattices. This technique allows a variety ofdeformable regions to be defined and thus a broaderrange of shape deformations to be generated. How-ever, the lattice space definition is laborious and dif-ficult. This technique requires a great deal of CPUtime and memory in general.Recently, Singh and Fiume [29] presented wires forinteractive, geometric deformation. The manipula-tion of wires deforms the surface of an associatedobject near the curves. Crespin [10] presented a FFDtechnique with the use of deformation primitives.Each of them results in a deformation on an associ-ated part of an object. The blending functions asso-ciated with primitives are then used to combine the

Page 3: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 49

deformation introduced by each primitive. However,the combinations for global deformations and localdeformations are different. Jin et al. [16] proposeda constrained local deformation technique based ongeneralized metaballs. Schmitt et al. [27] presenteda shape-driven technique for functionally definedheterogeneous volumetric objects. Fundamentally,the aforementioned four approaches all employedimplicit functions associated with deformation prim-itives (such as curve, point, metaballs, and so on) toconfigure a specific, static pointwise function map-ping to achieve FFD. Unlike those approaches, ourpaper introduces a new SFD technique by establish-ing deformation methods defined on entire scalarfields instead of building a mapping function fromdeformation primitives, even though we also employsimilar primitives to construct scalar fields. In thisway, a larger number of deformation types can beachieved. As the scalar field is modified, a defor-mation of the space is created and a correspondingvelocity field will be generated according to PDE-based flow constraints, which evolves the shape ofthe embedded object or part of the object to deformover time. Therefore, during the deformation pro-cess, the self-optimization process can be substan-tially evolved to maintain the model quality.

2.2 Level set methods and implicit modeling

Our work is also partially related to level set ap-proaches. The level set method was first presentedin [23]. Level set models are deformable implicit sur-faces where the deformation of the surface is con-trolled by a speed function in the level set partialdifferential equation (PDE). Level set methods havebeen successfully applied in image processing, com-puter vision, and visualization. In computer graph-ics, Desbrun et al. [11] and Breen et al. [6] used thismethod for shape morphing, and Whitaker [32] em-ployed this technique for 3D reconstruction. Morerecently, Museth et al. [22] and Bærentzen et al. [1]presented a level set framework for interactively edit-ing implicit surfaces, where they defined a collectionof speed functions that produce a set of surface edit-ing operators. The speed functions describe the ve-locity at each vertex on the evolving surface in the di-rection of the surface normal only. For level set meth-ods, the essential problem is to construct implicitfunctions or implicit models based on application-oriented speed functions. Note that models to be de-

formed must first be converted into volumetric repre-sentation and represented as a single isosurface.To date, most algorithms only focus on a single levelset, such as implicit surface applications [4] or levelset approaches. The isosurface property of implicitfunctions has not been fully utilized. Our SFD ap-proach is the first method to provide deformations ofan existing model by constraining the vertices of themodel to stay on their initial, yet different, level setsof an underlying implicit function.For interactive design of scalar fields, Bloomen-thal et al. [5] used skeleton methods to constructimplicit surfaces. Each skeletal element is associ-ated with a locally defined implicit function. In-dividual functions are blended to form an implicitsurface using a polynomial weighting function thatcan be controlled by users. The blobby model [3],also known as soft object [34], is another populartechnique for the design of implicit surfaces. Im-plicit functions are also used to represent volumes.Recently, Raviv and Elber [25] presented a 3D in-teractive sculpting paradigm that employed a set ofscalar uniform trivariate B-spline functions as objectrepresentations. Users can indirectly sculpt objectsto a desirable shape by directly modifying relevantscalar control coefficients of the underlying func-tions with virtual sculpting tools. Schmitt et al. [26]presented an approach to constructive modeling ofFRep solids [24] defined by real-valued functions us-ing 4D uniform rational cubic B-spline volumes asprimitives. Hua and Qin [13, 14] presented a haptics-based modeling system founded on dynamic spline-based implicit functions and physics-based modelingto directly manipulate any level set of their im-plicit objects. Turk and O’Brien [30] introduced newtechniques for modeling with interpolating implicitsurfaces.

3 SFD space definitionusing scalar field

From a mathematical point of view, there are ba-sically two approaches to formulating geometricsurfaces: parametric forms and implicit forms. Im-plicit forms treat coordinates as functional argu-ments rather than as functional values. In general,surfaces expressed by an implicit form can be formu-lated as:

{X ∈ �3| f(X) = c}. (1)

Page 4: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

50 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

1a 1b 1c

2a 2b 2c

Fig. 1. Panel a shows an implicit function graph as the illustrative height function, and panel b shows its correspondingscalar field as the intensity image. A 2D object (a free-form planar curve or even an arbitrarily defined contour) can beembedded in the 2D scalar field as shown in b and deformed by altering the embedding space as shown in cFig. 2. A polygonal object (a) is embedded in a scalar field (b) and deformed by altering the scalar field (c). Note that onlyb shows a cross-sectional view of the scalar field (see the cutting plane) and a single level set (see the light-blue transparentsphere). Panel c shows the deformed object, where the color indicates the scalar value distribution over the object. Largescalar values in the extremities are indicated by red, while regions with small scalar values are colored yellow

Indeed, when c is 0, we say that f implicitly definesa locus, called an implicit surface. The function f iscalled the implicit function, or the field function, anddefines the scalar field. The implicit surface is some-times called the zero level set of f . The related levelset (also called an isosurface) corresponds to an iso-value c. The function f may be of any mathematicalexpression containing polynomials or nonpolynomi-als. It may also be an arbitrary procedural process(i.e., a black box function) that produces a scalarvalue for a given point in space.In our work, the scalar field can be used as SFDembedding space, which wraps a to-be-deformed ob-ject. Note that, in strong contrast to traditional FFDspace, the SFD space is an implicit-function-basedscalar field instead of a lattice-based geometric ob-ject. Figure 1a shows a 2D implicit function graph,and Fig. 1b is the scalar field corresponding to thefunction. There is a 2D object (in green) embeddedin the scalar field. Note that the green-colored object(in Fig. 1) can be arbitrarily defined, and it need notbe a certain level set of the SFD encompassing space.When the scalar field is deformed (Fig. 1c), the 2Dobject is deformed accordingly. Figure 2 shows a 3D

example. The teacup model is embedded inside a 3Dscalar field. After altering the scalar field, the teacupis significantly deformed. In this paper, we give usersthree ways to construct and manipulate scalar fields.We will discuss them in Sect. 6.

4 Scalar-field-guided shapedeformation

Let us briefly overview our idea of applying scalarfields of implicit function to perform deformationson any existing polygonal models. First, we embedan entire model or a part of the model into a scalarfield and calculate the scalar values at all verticesof that embedded part. Then, during the deformationprocess the vertices are always constrained on thelevel sets where they originally reside by enforcingPDE-based flow constraints. Once users deform theembedding space (i.e., the scalar field), the verticeswill move accordingly, which results in FFD of theembedded object.Since the SFD enforces the policy that the relocatedposition of a vertex X(t) of the deformed object must

Page 5: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 51

a b

Fig. 3. a Ambiguity in determining the vertex motion. b Straight line of flow constraint and the normal velocity componentalong the gradient vector

remain on the same level set when scalar field spaceis deformed, the trajectory of the vertex can be repre-sented as follows:

{X(t)| f(X(t), t) = c}. (2)

The derivative of f(X(t), t) yields

d f(X(t), t)

dt= ∂ f(X(t), t)

∂XdX(t)

dt+ ∂ f(X(t), t)

∂t= 0,

(3)

where ∂ f(X(t),t)∂X is the gradient at X. To simplify the

notation, we represent the gradient using ∇ f andabbreviate f(X(t), t) as f . Therefore, Eq. 3 can berewritten as follows:

∇ f · dX(t)

dt+ ∂ f

∂t= 0. (4)

Note that d X(t)dt and ∂ f

∂X are both vectors. Therefore,there is an ambiguity, and the solution for the ver-tex velocity from Eq. 4 is not unique. As shownin Fig. 3a, the evolution of p at the next time stepcould be p′ or p′′. The velocity d X(t)

dt cannot be solveduniquely with the flow constraint alone. As shown inFig. 3b, the solutions for the velocity are restricted tothe straight line of the flow constraint equation, ∇ f ·d X(t)

dt + ∂ f∂t = 0. Dividing v into (vn, vt, vw), where

n = ∇ f‖∇ f‖ represents the unit principal normal vector

of the isosurface of the scalar field, t represents theunit tangent vector, and w represents the unit binor-mal vector, we know that only the normal velocity,

vn, is perpendicular to the constraint line. So the dotproduct in Eq. 4 retains only the item containing vn.Therefore, we can obtain the velocity of the normalflow as follows:

vn = − 1

‖∇ f‖∂ f

∂tn. (5)

This normal flow scheme is essentially the basis oflevel set methods and has been used widely in sam-pling implicit surfaces [33], computer vision [21],and level-set-based applications [6, 11] for trackingthe target objects. The normal flow scheme con-siders only the evolution velocities along the nor-mals of isosurfaces. It is good for minimizing thesimilarity between the active model and the targetmodel. However, the intermediate deformations arenot natural and are not dealt with or addressed inthe aforementioned work. In essence, the aforemen-tioned work designed the normal velocities vn toevolve the function f .By contrast, our objective is to provide a general SFDtechnique. We compute vertex velocities v based onthe change of f . The motion of the embedded ob-ject inside the scalar field should be natural, versatile,and without strong limitation. Therefore, we needto consider the velocities along three linearly inde-pendent directions simultaneously. In this paper, weconsider the general velocity d X(t)

dt along the three co-ordinate axes, x, y, z, of the 3D space. The generalvelocity is also represented using (vx, vy, vz) or v. Toobtain the unique solution from the flow constraintEq. 4 and also maintain the smoothness motion of

Page 6: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

52 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

the deformed model during the SFD process, we adda further smoothness constraint over the model. Thevertex velocity variation inside a local region is min-imized. This gives rise to minimizing the followingobjective function:

E =∫ (

∇ f ·v+ ∂ f

∂t

)2

+λ(‖∇v‖)2dx, (6)

where λ is a Lagrange multiplier.By discretizing the above objective function, Eq. 6can be minimized iteratively. Consider a vertex k andits adjacent neighboring vertex set Qk in an opti-mized mesh,

Qk = { j|−→jk ∈ M},where M denotes a set of all the edges of the embed-ded model. Note that the mesh of the model will un-dergo an optimization process as described in Sect. 5.The error of the flow constraint approximation is asfollows:

c(k) =(

∂ f

∂xvx(k)+ ∂ f

∂yvy(k)+ ∂ f

∂zvz(k)+ ∂ f

∂t

)2

.

The smoothness of the motion of the local regioncan be computed according to the velocity differencebetween the vertex, k, and its adjacent neighboringones, j ∈ Qk .

s(k) = 1

‖Qk‖∑j∈Qk

[(vx(k)−vx( j))2 + (vy(k)

−vy( j))2 + (vz(k)−vz( j))2],where ‖Qk‖ denotes the number of vertices in Qk.Therefore,

E =∑

k

(c(k)+λs(k)). (7)

The solution, satisfying ∂E∂vx(k)

= 0, ∂E∂vx(k)

= 0, and∂E

∂vx (k) = 0, can minimize the above objective func-tion E. The derivatives of E with respect to vx(k),vy(k), and vz(k) are as follows:

∂E

∂vx(k)= 2

(∂ f

∂xvx(k)+ ∂ f

∂yvy(k)+ ∂ f

∂zvz(k)+ ∂ f

∂t

)

× ∂ f

∂x+2λ(vx(k)−vx(k)),

∂E

∂vy(k)= 2

(∂ f

∂xvx(k)+ ∂ f

∂yvy(k)+ ∂ f

∂zvz(k)+ ∂ f

∂t

)

× ∂ f

∂y+2λ(vy(k)−vy(k)),

∂E

∂vz(k)= 2

(∂ f

∂xvx(k)+ ∂ f

∂yvy(k)+ ∂ f

∂zvz(k)+ ∂ f

∂t

)

× ∂ f

∂z+2λ(vz(k)−vz(k)),

where (vx(k), vy(k), vz(k)) is the average velocity,v(k), of all the adjacent neighboring vertices in Qk ,

v(k) = 1

‖Qk‖∑j∈Qk

v( j). (8)

Therefore, we can obtain the following equations,and (vx, vy, vz) can be solved afterwards. To abbrevi-ate the equations, we omit (k) unambiguously.

(λ+

(∂ f

∂x

)2)

vx + ∂ f

∂x

∂ f

∂yvy + ∂ f

∂x

∂ f

∂zvz

= λvx − ∂ f

∂x

∂ f

∂t,(

λ+(

∂ f

∂y

)2)

vy + ∂ f

∂x

∂ f

∂yvx + ∂ f

∂y

∂ f

∂zvz

= λvy − ∂ f

∂y

∂ f

∂t,(

λ+(

∂ f

∂z

)2)

vz + ∂ f

∂x

∂ f

∂zvx + ∂ f

∂y

∂ f

∂zvy

= λvz − ∂ f

∂z

∂ f

∂t.

By solving the above equation, we can obtain the fol-lowing iterative solution:

[vx, vy, vz]� = [vx, vy, vz]� −µ

[∂ f

∂x,∂ f

∂y,∂ f

∂z

]�,

(9)

where µ =∂ f∂x vx+ ∂ f

∂y vy+ ∂ f∂z vz+ ∂ f

∂t

λ+(

∂ f∂x

)2+(

∂ f∂y

)2+(

∂ f∂z

)2 .

Based on the above formulations, we have designeda dynamic continuous SFD algorithm as follows.

Page 7: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 53

First, generate a desired scalar field that embedsa model to be deformed and initialize the velocities(vx, vy, vz) at all the vertices as 0. After the user al-ters the scalar field, the embedded model begins todeform. During the deformation process, perform thefollowing loop until all the vertices reach the level setthat they originally resided at.At each time step ∆t, do the following:

1. Update the scalar field f(X, t +∆t) at all the ver-tices;

2. Deduce ∂ f∂t = ( f(X, t +∆t)− f(X, t))/∆t;

3. Calculate ∂ f∂X with finite differences;

4. Compute v according to current vertex velocities;5. Deduce v according to Eq. 9;6. Update vertices’ positions by

Xt+∆t = Xt +γ ·v ·∆t;7. Perform SFD model optimization (Sect. 5);8. If f(Xt+∆t , t +∆t) ≈ f(X, t), terminate; other-

wise, advance to next time step and repeat theabove steps.

The SFD essentially is an evolution process thatallows self-adaptive refinement and mesh improve-ment interleaved with the model deformation at eachiteration. In this algorithm, the γ is a step size ofthe vertex evolution, which can be specified by users.This parameter controls how many iterations it takesto meet the stop conditions. When γ is set to 1, theloop almost meets the stop conditions with only onetime step. So the deformation is very much like tra-ditional FFD of the static model in the sense that itmeets the final deformed shape in a single displace-ment step. The refinement and optimization can onlyoccur before or after the deformation. If the modelneeds to be extensively refined or optimized to repre-sent the shape deformation accurately during a singledeformation operation, the value of γ should be setmuch smaller. Thus the model is more likely to be re-fined and optimized during the deformation. Usuallywe set γ to 0.1. Displaying the above sequence con-tinuously, we can obtain an animation showing thedynamic deformation process.

5 SFD model optimization

5.1 Subdivision-based self-adaptiverefinement

Existing adaptive subdivision methods propose onlyto add triangles in high curvature areas and pre-

Fig. 4. Local adaptive subdivision in a high curvatureregion

vent subdividing of low curvature regions dur-ing deformations. While this is also the main in-tent of our method, those adaptive subdivisionschemes apply the subdivision to a static model.This means that if a low curvature region not pre-viously subdivided begins to deform, the model isno longer capable of representing the deformationaccurately.We interleave shape evolution and self-adaptive re-finement within a single deformation. Therefore, itallows the embedded model to represent the defor-mation more accurately during a deformation. Ourmethod can generate additional triangles on the flyand only in regions that require more subdivision.Low curvature regions not previously subdividedstill have the opportunity to be refined during the de-formation. As the SFD deforms an object, the curva-ture of the affected surface is computed and checkedto see if subdivision is necessary. Triangles are addedonly when this criterion is met. Thus our methodadds the triangles only in regions that require ad-ditional subdivision, and in addition all deformedregions are checked to ensure that subdivision oc-curs on the appropriate regions. The local subdivi-sion scheme we used in this paper is shown as Fig. 4.We also incorporate a complementary decimationprocess that merges faces in nearly planar areas andthereby reduces the polygon–mesh complexity (i.e.,the number of vertices, edges, and faces). We triggerdecimation by testing the deviation between surfacenormals at edge endpoints.With the help of the subdivision and the decima-tion, this self-adaptive refinement strategy easilysupports multiresolution deformation of existingmodels.

Page 8: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

54 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

5.2 Mesh improvement

Since our FFD can be a continuous evolution pro-cess, we are able to control the dynamic modelthroughout the deformation process. The mesh qual-ity can be improved and maintained at each timestep. In this paper, we consider three issues: a goodvertex distribution, a proper vertex density, anda good aspect ratio of the triangles. Much researchhas been conducted in this field, e.g., [12, 31], pro-ducing several valuable algorithms.We employ three mesh improvement operations:edge-split, edge-collapse, and edge-swap. Condi-tions under which the operations are valid are dis-cussed in [12]. First, edge-split and edge-collapseare used to keep an appropriate node density. Anedge-split is triggered if the edge is too long. Sim-ilarly, if any two neighboring vertices are too closeto each other, the edge connecting these two verticeswill be collapsed. Essentially, these two operationssplit long edges and delete crowded vertices to en-sure a proper vertex density. Then edge-swap is usedto ensure a good aspect ratio of the triangles. Weswap an edge if doing so will increase the mini-mum inner angle within its adjacent faces. Repeatedapplications of this swap operation always increasethe minimum inner angle and hence result in a con-strained Delaunay triangulation at the end of theprocedure. We also try to keep vertices uniformlydistributed by performing Laplacian smoothing overthe triangulated surface. In practice, these mesh op-timization steps are interleaved with the shape de-formation iterations so that a good computationalmesh is always present. This also helps the iter-ative solve for minimizing the objective functionEq. 7.Ordering the operations this way seems to producethe best mesh at the end of the mesh improvementsteps. The edge-swap operation can clean up afterthe simple edge-split and edge-collapse operations,and the mesh smoothing is then invoked to opti-mize neighborhood shapes. The method of maintain-ing a good computational mesh over a triangulatedsurface is iterative and incremental. This makes itappropriate for use in our scalar-field-guided shapedeformations, in which shape can change graduallyover time. As shown in the flow of the algorithm,interleaving shape evolution and mesh optimizationtends to equalize edge lengths, allowing verticesto distribute themselves more evenly during a SFDrun.

6 SFD Space constructionand deformation

To enable users to employ our SFD technique fex-ibly to perform shape deformations of existingpolygonal objects, our SFD technique is equippedwith three stable, easy-to-use approaches for scalarfield construction and deformation. We will detailthem as follows. Note that topological changes ofisosurfaces of scalar fields do not always lead toself-intersections of the embedded models. Withour scalar field construction and deformation ap-proaches, scalar fields do not change dramatically,and there are fewer opportunities to cause self-intersections of embedded models (we refer to self-intersections as the “unstable scenarios”). Whenself-intersections do happen, a robust method fordealing with topological changes is desired. In addi-tion, when manipulating the scalar field with theseapproaches, the resulting scalar field is continuousand bears the same codomain of the original one.Therefore, we can always compute a unique solutionfor velocities of all the vertices from Eq. 9.

6.1 Sketch-based distance fields

Sketch-based methods for shape design can facilitatethe rapid creation of approximate shapes. Zeleznik etal. [35] showed how a gesture-based modeler couldbe used to simplify conventional CSG-like shape cre-ation. Teddy [15] extended this to more free-formmodels, getting much of its power from its “infla-tion” operation and from an elegant collection of ges-tures for attaching additional parts to a shape, cuttingthe shape, and deforming it. Most recently, Karpenkoet al. [17] presented free-form sketching with varia-tional implicit surfaces. We employ this conceptualdesign for scalar field construction and modifica-tion. More precisely, in this approach the manipu-lated scalar field is actually a signed/unsigned dis-tance field. The sketched stroke, or contour, is thesilhouette of the zero level set of the resulting dis-tance field. This sketching technique can greatly easethe editing of scalar fields for designers/modelers.Strokes are gathered from the mouse as a collectionof points. In our system, the input strokes are 2Dcurves and can be open or closed. If open curves areused, the resulting distance field is unsigned, i.e., nei-ther interior nor exterior is defined. The plane con-taining the 2D curve is called the drawing plane. Un-like the technique used in [15, 17], the constructed

Page 9: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 55

5a 5b

6a 6b

6c 6d

Fig. 5. a A contour is extruded along the perpendicular direction of the drawing plane. b The distance value of a point in thespace is equal to the distance value of its perpendicular foot on the drawing plane

Fig. 6. The embedding space can be generated by sketching contours and modified by adding another stroke. c and d are theresulting distance fields on the drawing plane corresponding to a and b, respectively

zero isosurface does not need to be rounded. There-fore, the inflation in our system is simply for ex-truding the contour along the perpendicular directionof the drawing plane, as shown in Fig. 5a, until itmeets the bounding space or a user-specified bound-ing region.In practice, we store only the 2D distance field on thedrawing plane since other slices of the 3D distancefield along the perpendicular direction are exactly thesame (as shown in Fig. 5a). Therefore, to obtain thedistance value of any point in the space, we can sim-ply project the point onto the drawing plane alongthe perpendicular direction of the drawing plane andthen assign the perpendicular foot’s distance value tothe point (Fig. 5b). This method obviates the need tocompute the entire 3D distance field. As a result, thecomputational expense is greatly reduced.The Euclidean distance to a closed contour canbe calculated and stored for each discrete pointin an image (Fig. 6c,d). We calculate the dis-tance at each required point using methods suchas chamfer distance transforms and vector dis-tance transforms, which propagate known distancesthroughout the image. An interpolation functionis used to determine the distance from any pointlocated within the quad bounded by distances atknown grid points. In practice, distance valueswithin a quad are reconstructed from the four cor-

ner distance values stored per quad using standardbilinear interpolation.Figure 6 demonstrates one of the sketching opera-tions in our system. A designer draws a 2D closedstroke as shown in Fig. 6a. Then, a distance fieldon the drawing plane (Fig. 6c) is generated basedon the stroke. To modify the distance field, the de-signer may draw a stroke starting on the silhouetteof the zero level set of the distance field, brieflyleaving that silhouette and then returning to it. Thissketching results in the deformation of the dis-tance field. Figure 6d shows the deformed distancefield.

6.2 Skeleton-based scalar fields

Our system also allows users to interactively sketchskeletons. Then, the scalar field is generated as theblending of field functions gi of a set of skeletonssi(i = 1, · · · , N),

f(x, y, z) =N∑

i=1

gi(x, y, z), (10)

where the skeletons si can be any geometric prim-itive admitting a well-defined distance function:points, curves, parametric surfaces, simple volumes,

Page 10: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

56 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

7a 7b 7c

8a 8b

Fig. 7. A scalar field is defined by blendingskeletons. Panels a, b, and c show three differ-ent isosurfaces that correspond to three differ-ent isovalues

Fig. 8. The mannequin model is deformed bymanipulating point skeletons. The mesh indi-cates an isosurface of the skeleton-based scalarfield

etc. The field functions gi are decreasing functions ofthe distance to the associated skeleton,

gi(x, y, z) = Gi(d(x, y, z, si)), (11)

where d(x, y, z, si) is the distance between (x, y, z)and si , and Gi can be defined by pieces of polyno-mials or by more sophisticated anisotropic functions.Figure 7 shows three isosurfaces of a skeleton-basedscalar field. The field functions associated with theskeletons are Gaussian functions.Users can interactively sketch skeletons by a mouseor a 3D pointing device and then define a scalarfield according to these skeletons. In general, eachskeletal element is associated with a locally definedimplicit function; individual functions are blendedusing a polynomial weighting function that can becontrolled by designers. Therefore, designers mayenforce global and local control of an underlyingscalar field in three separate ways: (1) defining ormanipulating the skeleton, (2) defining or adjust-ing those implicit functions defined for each skeletalelement, and (3) defining a blending function toweight the individual implicit functions. In our sys-tem, we offer designers the first two ways to modifythe scalar field since they are very easy and intuitiveand require minimal specialized knowledge. Whena designer modifies the scalar field, the embedded

objects are deformed according to our SFD algo-rithm. Figure 8 shows an example. The user definestwo point skeletons. The field functions of the skele-tons are general Gaussian functions (note that otheruser-specified blending functions can be straight-forwardly incorporated into our system without anydifficulties). By repositioning these two skeletonsand reducing the strength of the Gaussian func-tions, the mannequin model is deformed as shownin Fig. 8b.

6.3 Dynamic spline-based scalar fields

Dynamic spline-based implicit functions [14] utilizescalar trivariate B-spline functions as the underlyingshape primitives. Different scalar B-spline patchesdefined over the 3D working space are collected toform a volumetric implicit function that can be usedto represent spaces of complicated geometry and ar-bitrary topology,

f(x, y, z) =N∑

i=1

si(Ti(x, y, z)), (12)

where si represents the i-th scalar B-spline patch andTi is an affine transformation that transforms a pointin the Euclidian space into the parametric domain

Page 11: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 57

9a 9b 9c

10a 10b

Fig. 9. The teapot polygonal model (a) is embeddedin the scalar field defined by a dynamic spline-based implicit function (b) and deformed by chang-ing the scalar field (c). (We only show a single levelset using coarse mesh in b and c)Fig. 10. The sofa model (a) is deformed throughdirect manipulation of a scalar field using a pointforce tool (b)

of the i-th patch. In essence, Eq. 12 is a hierarchi-cal organization of the N scalar B-spline patches.For details about scalar B-spline expressions and thespline-based volumetric implicit functions, pleaserefer to [13].The function dynamically changes since its coeffi-cients are time varying. Users can directly manipu-late the scalar values to evolve the function. Figure 9shows a polygonal model embedded in a scalar fielddefined by a dynamic spline-based implicit functionand deformed by manipulating the scalar field.Please refer to [14] for complete details about dy-namic manipulation of spline-based volumetric im-plicit functions. Here we briefly review the dy-namic manipulation mechanism so that this paperis self-contained. Direct and dynamic manipulationof scalar fields is founded on the above spline-based volumetric implicit functions and powerfulphysics-based modeling. The versatility of the volu-metric modeling permits designers to easily modifyarbitrary scalar fields, while the inherent physicalproperties can offer an intuitive mechanism for di-rect manipulation. The manipulated scalar field canhave complicated geometry and arbitrary topologies.Designers can create any scalar fields from scratchand then deform them. The system provides a largenumber of virtual sculpting tools including geomet-ric tools and force tools. Whenever a sculpting toolis used on the scalar field, the scalar values in theaffected regions will be modified correspondingly.When using geometric tools, the designer starts with

a simple primitive such as a cube or sphere andgradually constructs a more complex model throughsuccessive transformations or a combination of mul-tiple primitives. When using force tools, the designercan directly drag a point or subset of points to changethe scalar field. The system will automatically recon-struct the volumetric implicit function to representthe new, modified scalar field undergoing defor-mation. Therefore, when designers manipulate thescalar field with the system tools, the embeddedobject inside the scalar field will be deformed ac-cording to the change of the scalar field. Figure 10shows the FFD of a polygonal object (sofa) via dy-namic manipulation of the scalar field defined by thespline-based volumetric implicit functions. The useremploys a point force tool to directly manipulate thescalar field as if he/she were directly manipulatingthe embedded model.

7 SFD operations

Given the novel SFD technique and the simple, in-tuitive, and efficient scalar field construction and de-formation approaches, users can easily perform vari-ous SFD operations on existing models. For specificSFD operations, the chosen scalar field manipula-tion approach may have some advantages over theother two available approaches from the perspectiveof user interaction. However, for end users, thoseSFD tools are transparent. They do not need to make

Page 12: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

58 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

11a 11b 11c

12a 12b 12c 12d 12e

13a 13b 13c

Fig. 11. a shows an airplane model with a skeleton. b shows a bending skeleton specified by a designer. c shows the resultingbending deformationFig. 12. Free-form deformations of a 3D nozzle model. a Original model. b Bending. c Shrinking the middle part. d Inflationon both ends. e Shrinking the bottom and topFig. 13. Inflation and shrinking of a spring model. The meshes show two isosurfaces with the same isovalue in two scalarfields in a and b, respectively

the choice of which one to use for a specific opera-tion. We equip those SFD tools with the best scalarfield manipulation approach.For bending operations, users may first draw a set ofskeletons to define the source scalar field. As shownin Fig. 11a, the user draws a set of points (blobs) todefine the scalar field. Then the user moves the po-sitions of several points, as shown in Fig. 11b. Theairplane will bend due to this scalar field modifica-tion. Figure 12b shows another bending operationon a 3D nozzle model. In that operation, the useremploys a curve skeleton instead. The user simplysketches a straight line segment near the center ofthe object and a bending curve to define two distance

fields. The object is then deformed according to thedifference of these two fields.For shrinking and inflation, users can define twosets of skeletons (namely, a source set and a targetset) to define scalar fields. The embedded object willinflate or shrink according to the field deformationfrom the source to the target. Alternatively, users canjust modify some parameters of the source skeletonsto perform the deformation. For the examples shownin Fig. 12c–e, the nozzle model inflates or shrinksin several ways. Also as shown in Fig. 13, the useremploys Gaussian blobs as skeletons. The mesh sur-face in Fig. 13a shows an isosurface of the definedsource scalar field. Figure 13b shows the deformed

Page 13: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 59

14a 14b 14c

15a 15b

Fig. 14. A dinosaur (a) is deformed with the body squeezed (b) and the neck stretched (b). The user also changes theposition of the dinosaur’s neck (c)Fig. 15. Tapering on the ship model

object corresponding to the altered scalar field. Themesh surface denotes an isosurface extracted fromthe target scalar field with the same isovalue of theone shown in Fig. 13a. Figure 13c shows a furtherdeformed model that shrinks the center part of theobject shown in Fig. 13b.For squeezing operations, users may first sketcha closed stroke to define a distance field and thenmodify this distance field by adding another stroke.In this operation, we perform deformation only onthose vertices with positive distance values. For ex-ample, as shown in Fig. 14a, the user first sketchesa closed stroke (in red) around the body of the di-nosaur. The corresponding distance field based onthe sketched stroke is generated using the methoddescribed in Sect. 6.1. Then the user sketches an-other stroke (in green) to deform the distance field.The embedded dinosaur is then squeezed as shown inFig. 14b according to the SFD. Users can also com-pletely sketch another new stroke to define a targetdistance field instead of creating it by modifying theexisting stroke.For stretching, users can use force-based tools [14]to directly drag the embedding scalar field, which isequivalent to dragging the embedded object directly.

In essence, force-based tools alter the scalar fieldalong the force vector, which results in the stretchingeffect of the embedded model along the force vector.For the example shown in Fig. 14a and b, the userselects a vertex around the bottom of the dinosaur’sneck and then drags it along the arrow to producea stretching deformation on the dinosaur’s neck.Users can move part of an object to another lo-cation by using moving operations (e.g., Fig. 14band c). The user sketches a straight line segmentnear the center line of the dinosaur’s neck, which de-fines a source distance field. Then the user draws an-other stroke, with a small rotation, to define a targetfield. The localized dinosaur’s neck is then movedas shown in Fig. 14c due to this field change. Wewill discuss the localization operation in Sect. 8.Currently no physical properties are associated withSFD models. Hence the rigidity issue goes beyondthe scope of this paper, though it is a legitimate re-search concern.Users can perform tapering operations by simplysketching strokes. As shown in Fig. 15, the shipmodel is tapered on the front part. The user firstsketches an open stroke (shown in red). Then the usersketches another one (shown in green). The source

Page 14: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

60 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

17a 17b16a 16b 16c

18a 18b 19a 19b 19c

Fig. 16. a The user paints an image on an object. b A scalar field can be generated according to the user-painted image andspecified height values. c The object is deformed by the generated scalar fieldFig. 17. Panel a shows a grayscale image. A scalar field can be generated from any grayscale image. The gray values ofthe image are used as projective distances along the normals to produce a surface. The scalar value inside the space is theshortest distance to the generated surface. Panel b shows the deformed objectFig. 18. Creasing operation. a Original model and sketched strokes around both sides of the cup. The red strokes are forgenerating the source distance field, while the green strokes are for generating the target distance field. b Two sharp creasesformed on both sides of the cupFig. 19. Deformation using two analytic implicit functions with different parameter configurations. The original model is thedeformed polygonal cup model with creases as shown in Fig. 18b

and target distance fields are generated locally basedon these two strokes. The localized front part is thentapered according to the field change.Users can also easily apply embossing and engrav-ing operations on an object. In these operations,users can paint a grayscale image or use an exist-ing one to define an embedding space on the object.For example, as shown in Fig. 16, the designer paintsa binary image directly on a 3D object. Then a sur-face S is obtained by projecting the sampling pointsof the image along the normal directions with user-specified distances. Our system then generates a lo-cal distance field in the region of interest accordingto the surface. Figure 16a shows letters painted onan object by the designer. Figure 16b shows the gen-erated embedding space according to the specifiedheight, where the color denotes the distance value.The red color indicates the longer distance insidethe space, and the yellow color indicates shorter dis-tance. In embossing and engraving operations, the

source scalar field around the base model is initial-ized to zero everywhere. Therefore, the deformationbased on the zero source scalar field and the locallyconstructed distance field will produce embossingand engraving effects on the embedded models. Fig-ure 16c shows the result after performing the SFDembossing.Figure 17 shows another embossing example us-ing an existing image. Figure 17a is an image ofa global map. Here, a surface S is obtained by pro-jecting the sampling points along the object’s nor-mals with corresponding grayscale values. Our sys-tem then generates a local distance field, where thescalar values are the shortest distances to the sur-face. The source scalar field is also initialized tozero everywhere. As shown in Fig. 17b, this im-age is embossed onto a “soap” shape by using thisspace construction approach together with our SFDtechnique, i.e., the same technique as used in theexample of Fig. 16. If we project the distance field

Page 15: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 61

20a 20b

20c 20d

21a 21b

Fig. 20. Deformation of a point-set object. The dragon model contains 437 645 vertices. a Original point set, deformedseveral times using the SFD operations. The deformed results are shown in b, c, and dFig. 21. Deformation of a volumetric object. The lobster dataset is a CT scanned dataset. a Original isosurface.b Deformed isosurface with bending tail

along the reverse direction, we can also easily per-form engraving operations on the models. Note thatthe used image is similar to the concept of the dis-placement map [18]. The difference is that we donot need to explicitly map the displacement to eachpoint of the base model. The resolution or config-uration of the displacement map can be differentfrom that of the base surfaces. In our approach, oncethe distance field is generated, it can guide the de-formation of the base surface and then produce theembossing or engraving effects. The mesh of thebase surface is optimized and refined during the de-formation to represent the detail of to-be-embossedfeatures.It is very easy to use SFD to make sharp creases onthe embedded models, which is theoretically difficult

with traditional FFD. Users can perform creasingoperations by simply sketching strokes. As shown inFig. 18, the user makes two shape creases on bothsides of the deformed cup model. The user first lo-calizes the region where the creases will be formedand then sketches two open strokes (shown in red)for generating source distance fields. Two unsigneddistance fields are computed based on these twostrokes in the localized regions, which are near theside of the cup model. Further, the user sketches twoother open curves, shown in green. The target un-signed distance fields are generated based on thesetwo curves in the same regions. The SFD forms thesharp creases according to the field change from thesource one to the target one. Note that the creasecan be very sharp. During the creasing deformation

Page 16: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

62 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

22a 22b 22c

23a 23b 23c

Fig. 22. The mannequin model is deformed by using the available deformation operations along with the use of point, curve,normal, and curvature constraints during the design process. In a and b, we produce a bumpy hair-like effectFig. 23. Free-form deformations on the car model with the use of available deformation operations and constraining meth-ods. a Original model. b Deformed model. c Boat-like model deformed from a

some vertices connected by very short edges are col-lapsed at the top of the crease so that the top of thesharpest crease is just composed of a series of edges.In general, this cannot be done using traditional FFDmethods.Generally, our SFD technique can support anytype of deformation provided that the appropri-ate source scalar field and target field are given.Hence users can define two arbitrary implicit func-tions analytically to embed an object to be de-formed. We call one a source implicit function,the other a target implicit function. With SFD,the embedded object will be deformed accord-ing to scalar fields of the specified functions. Asshown in Fig. 19, the object is deformed with theuse of an ellipsoid function as the source func-tion and a hyperboloid function of one sheet asthe target function. With different parameter con-

figurations users can easily produce the deforma-tions (Fig. 19).The SFD operations can be applied to point-setobjects and volumetric datasets in the same fash-ion. Figure 20 shows an example of deformation ofa point-set object. Before deformation, the point-set object needs to undergo preprocessing. For eachvertex of the object, the preprocessing finds theneighboring vertices within a specified distance tothe vertex. This information will be used to calcu-late the average speed among the vertices withina local region (Eq. 8). The point-set surface is ren-dered using splatting. Figure 21 shows an exam-ple of deformation of a volumetric object. We ap-ply the SFD operation on the underlying grid ofthe volumetric dataset. At every time step, the op-eration first results in the change of positions ofthe underlying grid. But the associated density val-

Page 17: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 63

Table 1. Run time for SFD operations on existing polygonalmodels. The number of vertices of the lobster volumetric modeldenotes the size of its underlying sampling grid

Model No. of vertices No. of facesUpdatetime(ms)

Airplane 2965 5706 0.12Car 3307 6556 0.14Cup 3749 7494 0.16Ship 4892 9510 0.23

Nozzle 5845 9877 0.28Mannequin 6737 13 408 0.33Dinosaur 23 984 47 904 1.25Dragon 437 645 N/A 25.58Lobster 104×104×34 N/A 20.44

ues do not change. Therefore, the uniform volu-metric dataset becomes an unstructured one. Thenwe employ a trilinear interpolation and resamplingprocess to distribute the unstructured scalar fieldto a uniform one. The scalar field can be visual-ized and the isosurface of the volumetric objectdeformed.

8 Enforcing geometric constraints

Our technique provides a general deformation mech-anism in the sense that it can easily accommodatevarious geometric constraints on the embedded mod-els. Adding geometric constraints can make our tech-nique more powerful and facilitate feature-based de-sign. To enforce constraints, we can simply augmentthe original objective function E with the constraintenergy Ec,

En = E +ρEc, (13)

where En denotes the new, overall objective func-tion and Ec denotes the additional energy term in-troduced by added constraints. Note that Ec can bea linear combination of several energy functionals.The following list contains discretized versions oftheir corresponding continuous forms to polygonalmeshes.

Position constraint

E pos = (pi − p′i)

2, (pi ∈ P), (14)

where pi represents a point before a deformation,p′

i represents the same point after a deformation, andP denotes the point set of the object.

Curve constraint

Ecurv =∑pi∈C

(pi − p′i)

2, (15)

where C denotes a constraint curve specified by thedesigner. In the implementation, C is discretized intoa set of points.

Normal constraint

Enorm =∑pi∈S

(N(pi)− N(p′i))

2, (16)

where N(pi) denotes the normal at point pi and Sdenotes a set of points inside the region where thenormal is to be preserved.

Curvature preserving

Ecurvature =∑pi∈S

(K(pi)− K(p′i))

2, (17)

where K(pi) denotes the total curvature at point piand S denotes a region where the curvature is to bepreserved.When the locations where the user specifies con-straints do not have vertices of the embedded model,the new vertices at those locations will be inserted.Then the model is optimized several times with thoseconstrained vertices fixed.A standard implicit iterative method can be used tonumerically compute the minimization of the overallobjective function. The advantage of this approachis that it is relatively general and can offer an ac-curate, stable solution even for very large systems.Therefore, it is well suited for our purposes in SFDoperations. The gradient used in this minimizationprocess is numerically approximated using the cen-tral difference of the overall objective function forthe current position of the model vertex with a verysmall perturbation.We can also perform the local SFD operation onpolygonal models by only allowing the movement ofthe vertices, where the scalar value evaluates withina specified scope of the isovalues. For other ver-tices, they will not move during the deformations.Users can specify any implicit function to localizethe part of the models to be deformed. In our pro-totype system, we provide users with three types ofprimitives to localize regions, which include rectan-gular box, cylinder, and sphere. By combining these

Page 18: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

64 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

primitives, users are able to localize any part of em-bedded models.With all the available operations and constrainingmethods, we perform some interesting deformationson the mannequin model, as shown in Fig. 22. Themannequin model is significantly deformed to pro-duce some interesting examples. During the defor-mations, some facial features are maintained throughthe use of constraints. In Fig. 22a and b, we dropthe smoothness constraints in Eq. 6 during the de-formation and allow only the vertex velocities alongthe specified directions to produce a bump-like haireffect. Figure 23 shows another deformation ex-ample on the car model. Figure 23b shows a newracing car model, rebuilt (deformed) from the oldmodel as shown in Fig. 23a. Figure 23c showsa boat deformed directly from the car model shownin Fig. 23a.

9 Implementation

Our system is written in Microsoft Visual C++ andthe rendering is implemented using OpenGL. In oursystem, we incorporate the Phantom 1.0 device fromSensable Technologies into our user interface. Dur-ing the deformation process, users can use a mouseor the Phantom to manipulate the scalar field. Whendirectly manipulating spline-based scalar fields us-ing force tools [14], users can even feel the defor-mation force applied to the deformable model, whichresults in the deformation.We have experimented with our SFD technique ona wide range of PCs with no special hardware. Thosedeformations can be performed on a relatively low-end system in real time. Unlike subdivision-basedFFD techniques, our SFD technique does not requirea large amount of memory. From a theoretical pointof view, the timing achieved depends essentially onthe number of vertices of the models and the eval-uation time of the scalar fields at those vertices. Ona 2.2-GHz PC with 1 GB RAM we have performedthe same inflation deformations on the models. Inthis test, the used scalar field is a simple point skele-ton admitting a Gaussian field function. We haveexamined the timings achieved for a single defor-mation iteration (i.e., one run from step 1 to step 6of our algorithm described in Sect. 4). The recordedtime, which is the CPU time of the single deforma-tion iteration minus the rendering time,is shown inTable 1.

10 Conclusion

In this paper, we have articulated a novel scalar-field-guided shape deformation, or SFD, method-ology founded on PDE-based flow constraints andscalar field functions. The new SFD paradigm isfundamentally different from traditional FFD tech-niques in that we employ scalar fields as SFD embed-ding spaces. A scalar-field-based embedding spaceis of diverse types and its space definition is muchsimpler yet both powerful and intuitive for variousvisual modeling applications. In our prototype sys-tem, we have developed a suite of easy-to-use tech-niques for efficiently constructing and manipulat-ing the space as well as flexibly interacting withvarious geometric shapes. With the SFD method,users can directly sketch the scalar field of an im-plicit function via a mouse or a 3D haptic inter-face to control the deformation of any embeddedmodel. In addition, the embedding space can be ofcomplicated geometry and arbitrary topology. Thedeformation velocity for any model point can beeither very general or constrained subject to user-specified requirements. Therefore, our SFD tech-nique supports a larger number of shape deformationtypes than other techniques. Furthermore, the em-bedded model has self-adaptive and optimization ca-pabilities throughout the SFD process to accommo-date versatile deformations, maintain the mesh qual-ity, and preserve shape features. We have conducteda large number of experiments that demonstrate thatour new SFD technique is powerful, flexible, natu-ral, and intuitive for shape modeling and geometricdesign in animation and interactive graphics.Our current system does not deal with deformationswhere parameterization, such as torsion, is used. Butthis could be easily solved by introducing additionalparameterized variables into pure scalar fields. Atpresent, we are exploring new research in several di-rections. First, the continuity between the deformedpart and the undeformed part is difficult to control.Manual specification from users has been used fre-quently in traditional FFD techniques. It is, however,much more challenging in our system because SFDis essentially a dynamic process. Second, our SFDtechnique is potentially useful for creating animatedcharacters in the film industry and shortening the an-imation design cycle. With a few key frames gener-ated from our SFD technique, it is also possible touse our SFD technique to obtain the “in-between”ones containing the entire motion sequence of ob-

Page 19: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation 65

jects. If we further incorporate physical propertiesand other relevant constraints, realistic simulationand animation can be achieved. Third, in these ap-plications, preventing self-intersections or perform-ing correct topology changes during deformationsshould also be considered. Finally, we would like toenhance all the deformation operations with haptics,so that the user can have realistic, physical, and forcefeedback when manipulating SFD models.

Acknowledgements. The models are courtesy of the 3D CAFE, theGraphics and Imaging Laboratory of the University of Washington,and the Large Geometric Models Archive of the Georgia Institute ofTechnology. This research was supported in part by NSF ITR GrantIIS-0082035, NSF Grant IIS-0097646, and an Alfred P. Sloan Fellow-ship.

References

1. Bærentzen J, Christensen N (2002) Volume sculpting usingthe level-set method. In: Proceedings of the internationalconference on shape modelling and applications, Banff,Canada, 17–22 May 2002. IEEE Press, Los Alamitos, CA,pp 175–182

2. Barr AH (1984) Global and local deformations of solidprimitives. In: Proceedings of SIGGRAPH ’84, Minneapo-lis, United States, 23–27 July 1984. ACM SIGGRAPH,New York, pp 47–58

3. Blinn J (1982) Generalization of algebraic surface drawing.ACM Trans Graph 1(3):235–256

4. Bloomenthal J, Bajaj C, Blinn J, Cani-Gascuel M-P, Rock-wood A, Wyvill B, Wyvill G (1997) Introduction to implicitsurfaces. Morgan Kaufmann, San Francisco

5. Bloomenthal J, Wyvill B (1990) Interactive techniques forimplicit modeling. In: Proceedings of the symposium oninteractive 3D graphics, Snowbird, Uhta, United States, 13–15 March 1990. Comput Graph 25(2):109–116

6. Breen DE, Whitaker RT (2001) A level-set approach for themetamorphosis of solid models. IEEE Trans Vis ComputGraph 7(2):173–192

7. Chang Y-K, Rockwood AP (1994) A generalized de castel-jau approach to 3D free-form deformation. In: Proceedingsof SIGGRAPH ’94, Orlando, Florida, United States, 24–29July 1994. ACM SIGGRAPH, New York, pp 257–260

8. Coquillart S (1990) Extended free-form deformation: asculpting tool for 3D geometric modeling. In: Proceedingsof SIGGRAPH ’90, Dallas, Texas, United States, 6–10 Au-gust 1990. ACM SIGGRAPH, New York, pp 187–196

9. Coquillart S, Jancene P (1991) Animated free-form defor-mation: an interactive animation technique. In: Proceed-ings of SIGGRAPH ’91, Las Vegas, Nevada, United States,28 July – 2 August 1991. ACM SIGGRAPH, New York,pp 23–26

10. Crespin B (1999) Implicit free-form deformations. In: Pro-ceedings of Implicit Surfaces ’99, Bordeaux, France, 13–15September 1999, pp 17–23

11. Desbrun M, Cani-Gascuel M-P (1998) Active implicit sur-face for animation. In: Proceedings of Graphics Interface,Halifax, Canada, 18–20 June 1998, pp 143–150

12. Hoppe H, Derose T, Duchamp T, McDonald J, Stuetzle W(1993) Mesh optimization. In: Proceedings of SIGGRAPH’93, Anaheim, California, United States, 1–6 August 1993.ACM SIGGRAPH, New York, pp 19–26

13. Hua J, Qin H (2001) Haptic sculpting of volumetric implicitfunctions. In: Proceedings of the 9th Pacific conference oncomputer graphics and applications, Tokyo, Japan, 16–18October 2001. IEEE Press, Los Alamitos, CA, pp 254–264

14. Hua J, Qin H (2002) Haptics-based volumetric modelingusing dynamic spline-based implicit functions. In: Proceed-ings of the symposium on volume visualization and graph-ics, Boston, Massachusetts, United States, 28–29 October2002. ACM Press, New York, pp 55–64

15. Igarashi T, Matsuoka S, Tanaka H (1999) Teddy: a skechinginterface for 3D freeform design. In: Proceedings of SIG-GRAPH ’99, Los Angeles, California, United States, 8–13August 1999. ACM SIGGRAPH, New York, pp 409–416

16. Jin X, Li Y, Peng Q (2000) General constrained defor-mations based on generalized metaballs. Comput Graph24(2):219–231

17. Karpenko O, Hughes JF, Raskar R (2002) Free-formsketching with variational implicit surfaces. In: Proceedingsof Eurographics 2002, Saarbrücken, Germany, 2–6 Septem-ber 2002. Comput Graph Forum 21(3):585–594

18. Krishnamurthy V, Levoy M (1996) Fitting smooth surfacesto dense polygon meshes. In: Proceedings of SIGGRAPH’96, New Orleans, Louisiana, United States, 4–9 August1996. ACM SIGGRAPH, New York, pp 313–324

19. Lazarus F, Coquillart S, Jancene P (1994) Axial deforma-tions: an intuitive deformation technique. Comput AidedDes 26(8):607–612

20. MacCracken R, Joy KI (1996) Free-form deformationswith lattices of arbitrary topology. In: Proceedings of SIG-GRAPH ’96, New Orleans, Louisiana, United States, 4–9August 1996. ACM SIGGRAPH, New York, pp 181–188

21. Malladi R, Sethian JA, Vemuri BC (1995) Shape modelingwith front propagation: a level set approach. IEEE TransPatt Anal Mach Intell 17(2):158–175

22. Museth K, Breen DE, Whitaker RT, Barr AH (2002)Level set surface editing operators. In: Proceedings of SIG-GRAPH ’02, San Antonia, Texas, United States, 21–26 July2002. ACM SIGGRAPH, New York, pp 330–338

23. Osher S, Sethian JA (1988) Fronts propagating withcurvature-dependent speed: algorithms based on hamilton-jacobi formulations. J Comput Phys 79:12–49

24. Pasko A, Adzhiev V, Sourin A, Savchenko V (2001) Func-tion representation in geometric modeling: concepts, imple-mentation and applications. Vis Comput 11(8):429–446

25. Raviv A, Elber G (1999) Three dimensioinal freeformsculpting via zero sets of scalar trivariate functions. In: Pro-ceedings of the 5th ACM symposium on solid modeling andapplications, Los Angeles, California, United States, 8–13August 1999. ACM Press, New York, pp 246–257

26. Schmitt B, Pasko A, Schlick C (2001) Constructive mod-eling of frep solids using spline volumes. In: Proceedingsof the 6th ACM symposium on solid modeling and applica-tions, Los Angeles, California, United States, 12–17 August2001. ACM Press, New York, pp 321–322

Page 20: JingHua, HongQinjinghua/publication/jh_tvc_sfd.pdf · niques. First, while very useful for coarse-scale de-formations of an object, the technique can be time consuming to use for

66 J. Hua, H. Qin: Scalar-field-guided adaptive shape deformation and animation

27. Schmitt B, Pasko A, Schlick C (2003) Shape-driven defor-mations of functionally defined heterogeneous volumetricobjects. In: Proceedings of GRAPHITE, Melbourne, Aus-tralia, 11–14 February 2003, pp 321–322

28. Sederberg T, Parry SR (1986) Free-form deformation ofsolid geometric models. In: Proceedings of SIGGRAPH’86, Dallas, Texas, United States, 18–22 August 1986.ACM SIGGRAPH, New York, pp 151–160

29. Singh K, Fiume E (1998) Wires: a geometric deforma-tion technique. In: Proceedings of SIGGRAPH ’98, Or-lando, Florida, United States, 19–24 July 1998. ACM SIG-GRAPH, New York, pp 405–414

30. Turk G, O’Brien JF (2002) Modelling with implicit surfacesthat interpolate. ACM Trans Graph 21(4):855–873

31. Welch W (1995) Serious putty: topological design for vari-ational curves and surfaces. PhD thesis, Carnegie MellonUniversity, Pittsburgh

32. Whitaker R (1998) A level-set approach to 3D reconstruc-tion from range data. Int J Comput Vision 29(3):203–231

33. Witkin A, Heckbert P (1994) Using particles to sample andcontrol implicit surfaces. In: Proceedings of SIGGRAPH’94, Orlando, Florida, United States, 24–29 July 1994.ACM SIGGRAPH, New York, pp 269–278

34. Wyvill G, McPheeters C, Wyvill B (1988) Data structurefor soft objects. Vis Comput 2(4):227–234

35. Zeleznik RC, Herndon K, Hughes J (1996) Sketch: an in-terface for sketching 3D scences. In: Proceedings of SIG-GRAPH ’96, New Orleans, Louisiana, United States, 4–9August 1996. ACM SIGGRAPH, New York, pp 163–170

JING HUA is a Ph.D. can-didate in computer science atthe State University of NewYork (SUNY) at Stony Brook,where he is also a research as-sistant in the SUNYSB Centerfor Visual Computing (CVC).He received his B.E. (1996) inelectrical engineering from theHuazhong University of Scienceand Technology in Wuhan, P.R.China and his M.E. (1999) inpattern recognition and artifi-cial intelligence from the In-stitute of Automation, Chinese

Academy of Sciences in Beijing, P.R. China. In 2001, he re-ceived his M.S. in computer science from SUNY Stony Brook.His research interests include geometric and physics-basedmodeling, scientific visualization, interactive 3D graphics,human-computer interface, and computer vision. He is a stu-dent member of IEEE and ACM. For more information seehttp://www.cs.sunysb.edu/∼jinghua.

DR. HONG QIN is an as-sociate professor of computerscience at SUNY Stony Brook,where he is also a member ofthe SUNYSB Center for VisualComputing. He received his B.S.(1986) and his M.S. (1989) incomputer science from PekingUniversity in Beijing, P.R. Chinaand his Ph.D. (1995) in com-puter science from the Univer-sity of Toronto. From 1989 to1990 he was a research scientistat North China Institute of Com-puting Technologies. From 1990

to 1991 he was a Ph.D. candidate in computer science at theUniversity of North Carolina at Chapel Hill and from 1996 to1997 he was an assistant professor of computer and informationscience and engineering at the University of Florida. In 1997,Dr. Qin was awarded the NSF CAREER Award from the Na-tional Science Foundation (NSF) and in September 2000 wasawarded a newly established NSF Information Technology Re-search (ITR) grant. In December 2000, he received a HondaInitiation Grant Award and in April 2001 was selected as an Al-fred P. Sloan Research Fellow by the Sloan Foundation. He isa member of ACM, IEEE, SIAM, and Eurographics.