Comput. & Graphics, Vol. 18, No. 4, pp. 571-586, 1994 Copyright (g) 1994 Elsevier Science Ltd Printed in Great Britain 0097-8493/94 $6.00 + .00
Pergamon
0097-8493(94)E0052-Y Technical Section
SPACE DEFORMATION MODELS SURVEY DOMINIQUE BECHMANN Centre de Recherche en Informatique, Universit6 Louis Pasteur, 7 rue Ren6 Descartes, 67084 Strasbourg Cedex, France Abstract--Recent research has provided highly interactive and intuitive deformation methods for modeling. In this paper, we first present a survey of deformation techniques independent of the underlying object representation. We distinguish the techniques where a user controls the deformation by manipulating the object directly from those specified through a user-defined deformation tool (lattice, axis, etc.). We explain how to control the position, the size, and the boundary of the deformed area as well as the shape of the deformation. Then, the comparison of these techniques shows that they all fall into a unique mathematical formalism involving a ~" to ~n mapping. Starting from that, we establish the links between these models by studying the change from one formulation to the other. In result of this study, we demonstrate that all these techniques can be viewed as various expressions of a unique mathematical formalism. I. INTRODUCTION
The field of geometric modeling includes both the definition of the geometric model and the development of deformation methods. This survey is about deformation techniques. Most deformation techniques are closely related to the object representation, such as the deformation of B-splines surfaces [ 3, 12, 15 ] or hypersurfaces [ 17 ] obtained by moving control points. On the contrary, more recent works propose interactive deformation techniques independent of the underlying representation of the object. Due to this independence, these methods can easily be integrated into most existing modelers or animation systems[4, 11]. The survey proposed here is restricted to these techniques independent of the underlying model. Among those, we distinguish those using a deformation tool [ 10, 18, 19, 21 ] from those working directly on the object [ 6, 16 ]. The claim of this article is to answer two questions: What are the deformations that are possible to reach using these techniques and what are the links between them? The earliest use of these deformation methods is found in 1984 [ 2 ]. Transformation such as scaling, rotating, tapering, twisting, bending, etc. has been defined using an ~ 3 to ~ 3 mapping. In spite of the fact that arbitrary shaped deformations are not possible, it is a very efficient method. Free-form deformation techniques defined by Sederberg and Parry in 1986 [ 21 ] introduce a deformation tool called lattice. A lattice is represented by a trivariate volume regularly subdivided and defined by a threedimensional array of control points. The object that has to be deformed is embedded inside the lattice. The transformation is applied to the lattice and the embedded object is modified accordingly. Several applications relying on free-form deformation[9, 14] showed the power of the method. Extended free-form deformation, its first extension [ 10 ] works on the same mathematical foundations but increases the power of the modeling system by using any shape of initial lattices or com571
bining them. Rational free-form deformation [18 ] provides a slightly different mathematical model but does not provide a major change of the modeling capabilities. These models provide powerful tools to deform objects in particular when the desired deformation is obtained by moving a set of control points of the lattice. All these models require editing a lattice to match a specific object and deforming it to produce the desired deformation. This process may prove difficult, particularly when the object's shape does not fall into a simple combination of predefined lattices, and when the deformation is so complex that the correspondence between the lattice deformation and the object deformation is not straightforward. In 1991, the space deformation model defined by Bowel and B e c h m a n n [ 6 ] provides direct manipulations of the object. Intermediate tools, such as lattices, are no longer required. The deformation of the object is simply specified by the displacement of arbitrary selected points called constraints. The size and the boundary of a bounding box centred around each constraint point allows control of the extent of the deformation. Depending on this extent, the whole object can be included (global deformation ) or only a limited area around the constraint point (local deformation ). A large range of deformation shapes such that arbitrary shaped bumps can be designed using this technique. Particular deformation (move, turn, roll, jump, etc. )[ 5 ] are encapsulated in high-level operations. In 1992, the direct free-form deformation model [ 16 ] still deforms an object according to a lattice but the lattice deformation is computed from the displacement of object points. Actually, the computation of the lattice deformation [ 16 ] and the computation of space deformation [ 6 ] from the displacement of points are based on the same mathematical foundations. In Section 2, deformation techniques requiring a deformation tool are presented. In Section 3, those directly defined on the object are explained. In Section 4, the transition from one model to the other is set
572
D. BECHMANN
out. In Section 5, a discussion explains the links between these models and concludes that they fall into a unique mathematical formalism. 2. DEFORMATION TECHNIQUES REQUIRING A DEFORMATION TOOL Deformation models requiring a deformation tool, such as a lattice or an axis, are presented in this section. Using these techniques the deformation of an object is computed from the deformation applied to the deformation tool. These models involve a mapping represented by the deformation function D: ~ 3 ._~ ~ 3 that associates with each point U its new position D ( U ) . Let U = (ul, u2, u3) and D ( U ) = ( D l ( u l ) , D2(u2), D3 (u3)) represent, respectively, the Cartesian coordinates of a point U and its new position D ( U ) after the deformation. 2. I . Free-form d e f o r m a t i o n
The deformation tool used for the free-form deformation technique [ 21 ] is a parallelepipedical volume called lattice. The lattice is a trivariate volume defined by an array of(p1 + 1 )(P2 + I )(P3 + 1 ) control points Pij,, (see Fig. 1 ). To deform an object the user deforms the lattice by moving its control points. Any point lying inside the lattice is deformed according to the lattice deformation. In particular, the deformation of an object inside the lattice follows the displacement of the lattice control points. Before deforming the lattice, each point of the object should be associated to the lattice. Let U = (ul, u2, u3) be the Cartesian coordinates of a point in the global coordinate system (O, X, Y, Z ) , and U = (u~, u~, u~) be its coordinates in the lattice coordinate system ( Uo, R, S, T). The transformation of U from its global coordinates to its lattice coordinates is obtained from:
u;
=
s A T( U -
Uo)
u~ =
SAT.R
RA
T(URAT.S
u~ =
Uo)
R AS(URAS.
Vo) T
where A represents the vectorial product and • the scalar product. The lattice coordinates of a point lying inside the lattice are such that: 0 -< u'~ -< l, 0 -< u~ -< l, 0 -< u~ -< 1. The Cartesian coordinates of any point lying inside the lattice can be expressed as:
/qj/ !
!
f
z
Fig. 1. Parallelepipedical lattice.
U
=
Pl Z
P2 Z
P3 Z
, Pi,j,kBip l ( u l t) B j p2 ( u 2t) B k/)3 (U3)
i - 0 j=0 k=0
where the P;,j,kare the (p~ + 1) (P2 q- 1) (P3 + 1) control points with 0 < i < Pl, 0 _
D(U) = Z
P2
P3
Z
Z Pi,j,kB; ' P ' ( u ; ) B jp2 ( u 2,) B kp3 (u3). ,
i-0 j=0 k-0
Due to the Bernstein polynomials properties, the displacement of one control point influences the whole space inside the lattice. Thus, the lattice exactly corresponds to the deformed area. However, the deformation is applied only to the points of the object lying inside the lattice. Global deformations are obtained when the whole object lies inside the lattice (see Fig. 2) since the displacement of a unique control point modifies the whole object. To localize the deformation, the technique consists in shrinking the size of the lattice. Thus, local deformations are obtained when only a limited part of the object lies inside the lattice (see Fig. 2). In that case, the lattice intersects with the object. To preserve the continuity of the object's surface, the control points lying on the face of the initial lattice intersecting the object should not move. To preserve the continuity of the tangent or the curvature, stronger constraints are imposed on the lattice control points. The deformation of the object (or its part included inside the lattice) "follows" the displacement of the control points of the lattice. Thus, it is not easy to get a precise displacement of a given point of the object. The user proceeds using a trial and error process to obtain the desired deformation. The shape of the polynomials defines the shape of the deformation inside the lattice. To summarize, the deformed area is the volume embedding the interior of the lattice. To modify its size or its position the user modifies the lattice. The boundary of the deformed area is a parallelepiped since the initial lattice is limited to a parallelepipedical volume. This technique is particularly well-suited to global deformation. On the contrary, a given displacement of an object point is hard to obtain. 2.2. E x t e n d e d f r e e - f o r m deJormation Extended free-form deformation ( E F F D ) [ 10 ] extends the FFD technique to allow nonparallelepipedical lattices. In particular, elementary or composite prismatic lattices are defined. Elementary prismatic lattices are obtained by moving or merging control points of * B~(u) = (ai)ui( 1 - u) ~ i
Space deformation models survey
573
i'
I 'l
f
;
I
:
'v
l/Jr
[/
l"
f
(a)
(b) Fig. 2. Global (a) or local (b) detbrmations.
a parallelepipedical lattice. For example, the cylindrical lattice ( see Fig. 3 ) is obtained by welding two opposite faces of a parallelepipedical lattice and by merging all control points of the cylinder axis. Composite prismatic lattices are defined as several elementary lattices welded together. The welding operation is realised by merging the control points of each lattice. Some continuity problems may occur, especially when several control points are merged together. As continuity constraints would be penalizing for this technique, the authors insure lattice continuity only for the simplest cases. Nonprismatic lattices can also be used. However, the use of complex lattices can lead to unpredictable results. In addition, elementary lattices are composed by several "chunks" where a chunk is a trivariate volume represented by a tensor product of Bernstein polynomials of degree three. Such a chunk is defined by 4 , 4 , 4 control points. To compute the deformation due to an elementary lattice, the coordinates of the object points in the lattice parameter space are computed. First, the chunk where the point is supposed to lie is determined. Then, the coordinates inside the chunk are computed using Newton approximation. Finally, the deformation of a point inside a given chunk is defined by: 3
3
3
D(U) = Z Z Z P:,j,kB3,(u;) B ~(u~)B3(u;). i=0
/=0
k=O
where the B~, B3, B 3 are Bernstein polynomials of degree three and the P:,j,k are the 4 , 4 , 4 control points with 0 < i _< 3, 0 _
The definition of elementary lattices in chunks provides a local control of the deformation. Indeed, the displacement of a given control point modifies only the points lying inside the corresponding chunk. Thus, it is possible to localize a deformation by modifying the number of subdivisions of the lattice. However, the subdivision process is not easy to understand for a user not familiar with the Bernstein polynomials. Unfortunately, no intuitive tools are provided to control the deformed area: its size, its position and its boundary. The deformed area corresponds exactly to the volume of the lattice only when every chunk is modified. Then, the user controls the deformed area by editing the position, the size and the boundary of the lattice. As with parallelepipedical lattices, the deformation could also be local when only a limited part of the object lies inside the lattice. To conclude, the deformed area corresponds to the volume embedding the interior of the modified chunks but no intuitive tools are provided to control it. Thus, this technique is recommended for global deformation obtained when every chunk is modified through the deformation. Only in that case, the user controls the deformed area by manipulating the lattice. Due to that, local deformation obtained by moving a few control points would seem hard for the user to predict. 2.3. Rational free-form deJbrmation Rational free-form deformation [ 18 ] is an other extension of FFD. It allows incorporation of weights defined at each control point of the parallelepipedical lattice. However, when the weights at each control point are unity, the deformations are equivalent to the FFD. To control the deformation, the user either moves the lattice control points or modifies their associated weights. The coordinates of a point are computed in the lattice parameter space before editing the lattice control points. Then, the deformed point is computed from: /91
D(U) =
/92 ~,
p3 ~-
t
/91
/92
/93
v22 i=0
Fig. 3. Elementary prismatic lattice: the cylinder,
pl
t
192
¢
P3
z, Pi.,.kW, j.kBi (ul)B: (u2)Bk (U;)
z=O j=O k=O
14}.j,kB,~ ' ( u 'I)Bj/9:(lt2)Bk , /93(//3) ,
j=O k = O
where Wi.j.k represents the weight associated to the
D. BECHMANN
574
control point P~,j.k with 0 < i < p~, 0 < j _
D(U) = T2R2(TIRI)-IU where T~ is the translation matrix of vector OAt and T2 is the translation matrix of vector OA 'c. The shape of the deformation is linked to the axis deformation. The only deformations that can be obtained are specified by bending or stretching the axis. In addition, scaling and twisting operations are possible by associating to each point of the axis a scale and a twist factors before and after the deformation. Finally, the axial deformation of a point is defined by:
D( U) = T2S214Z2R2(T I S I W I R I ) - I U
where the matrix W~ of twisting angle 0~ and the matrix Sj of scaling factor X~ are specified at each point At., of the axis, and the matrix W2 of angle 02 and the matrix $2 of factor X2are applied to the deformed object points associated to A b. Axial deformation influences the whole three-dimensional space, although it is applied only to the point representing an object. In order to localize the deformed area, a zone of influence is introduced to defined the portion of the three-dimensional space to be deformed. A general cylinder around the axis is proposed to define the deformed area. It defines the size, the position, and the boundary of the deformed area. 2.5. Comparison ( f d~[brmation techniques requiring
a &qbrmation tool To compare these deformation techniques requiring a deformation tool, the emphasis is set on the interaction techniques as well as on the mathematical formalism. In the implementation of the free-form deformation technique, the deformation tool is restricted to a parallelepipedical lattice defined by trivariate Bernstein polynomials. First of all, the user has to choose the number of controls points along each direction of the lattice and to place the lattice around the whole object (see Figs. 5, 7 ) or around a limited part of it according with the type of deformation he wishes to achieve. Since the lattice corresponds to the deformed area, to localize a deformation only a limited part of the object is embedded inside the lattice. The user deforms the object by moving the initial lattice control points. The deformed lattice is obtained (see Figs. 6, 8) and the system automatically computes the coordinates of each object's point in the lattice parameter space. Then, the computation of the object's deformation from the deformed lattice is straightforward. This technique is welladapted to global deformations (see Figs. 11, 12). On the contrary, local deformations may lead to continuity problems on the surface of the deformed object where the lattice intersects with the object (see Figs. 9, 10). Extended free-form deformation is an extension based on the same mathematical formulation. But the deformation tool is a complex lattice composed by several lattices of any shape, each one being itself composed by a set of elementary volumes called chunks. The user either chooses a prismatic lattice (see Figs. 13, 15) under a set ofpredefined ones (cylinder, sphere,
(a)
(b) Fig. 4. The object and its axis before (a) and after (b) the deformation.
Space deformation models survey
575
Fig. 5. A parallelepipedical lattice composed by 3 . 3 * 3 control points is positioned on a cylinder,
Fig. 6. Global deformation of the cylinder is obtained due to the displacement of one control point of the lattice.
Fig. 7. A parallelepipedical lattice composed by 4*4*4 control points is positioned on a cylinder,
Fig. 8. Global deformation of the cylinder is obtained due to the displacement of 8 control points of the lattice.
Fig. 9. Local deformation of the cylinder is obtained since a limited part of the cylinder is inside the lattice. The continuity of the tangent of the surface where it intersects with the lattice is not preserved.
Fig. 10. Local delbrmation of the cylinder is obtained since a limited part of the cylinder is inside the lattice. The continuity of the tangent of the surface is preserved since the user only moved the appropriate control points.
!
Fig. 11. A parallelipipedical lattice composed by 9 . 2 * 2 control points is positioned on a cylinder,
Fig. l 2. Global deformation of the cylinder is obtained due to the displacement of each control point of the lattice.
Fig. 13. A cylindrical lattice is positioned on a planer surface. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH "90.ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permis'sion.
Fig. 14. The deformed lattice and the deformed surface. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH '90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 15. A cylindrical lattice is positioned on a surface of revolution. Form "Extended free-from deformation" by S. CoquiUart, 1990, SIGGRAPH "90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 16. The deformed lattice and the deformed surface. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH "90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 17. An ~'S" lattice is positioned on a sphere to imprint an "S" shape on to the surface of the sphere. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH "90, A CM Comp. Graph. 24 (4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 18. The deformed lattice and the deformed surface. From "Extended free-form deformation" by S. Coquillart, 1990, S1GGRAPH "90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 19. An "8" lattice composed by 3 elementary lattices is positioned on a planar surface. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH "90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
Fig. 20. The deformed lattice and the deformed surface. From "Extended free-form deformation" by S. Coquillart, 1990, SIGGRAPH "90, ACM Comp. Graph. 24(4), 187-196. Copyright 1990 by ACM SIGGRAPH. Reprinted by permission.
577
Space deformation models survey etc. ) or builds a composite lattice by merging several ones (see Fig. 19). To imprint a given shape on to the surface of an object, the user has to build the appropriate lattice (see Fig. 17). As within free-form deformation, the user moves the control points, and the object or a part of it moves accordingly (see Figs. 14, 16, 18, 20). Before applying the deformation, the coordinates of each point of the object inside each lattice parameter space are computed. The deformed area corresponds to a set of chunks of the lattice. Unfortunately, no visual support indicates to the user the extent of the deformation due to the displacement of a given control point. In addition, to localize a deformation, the number of subdivisions of the initial lattice has to be edited. Thus, to build the appropriate lattice may prove difficult. Rational free-form deformation is another extension of free-form deformation: a weight is associated to the each control point of the parallelepipedical lattice. The deformed area is the parallelepipedical lattice. The interaction technique is similar to the one described for the free-form deformation. In order to deform the embedded object the user moves the control points and modifies their associated weights. This process may prove difficult since these weights are not intuitive parameters (see Fig. 21 ). Free-form deformation, extended free-form deformation, and rational free-form deformation techniques rely on the same mathematical formulation. The deformed area as well as the shape of the deformation inside the detbrmed area depends on the polynomials. The deformed area is either the whole lattice or a part of it. To localize a deformation, the initial lattice should either include a limited part of the object or its subdivision in chunks has to be modified. In that case, no specific tools are provided to control the deformed area.
Axial deformation has a different deformation tool. The deformation of any point in space is computed from the displacement of the points of the axis. The user builds the initial axis, moves it to define the final axis, defines the twisting angle and the scaling factor at each point of the axis. In addition, if the user wishes to localize the deformation, the radius of the generalized cylinders around the axis is edited. This technique is restricted to stretching, bending, scaling, and twisting operations. The mathematical formulation also involves a ~ 3 to ~ 3 mapping but is completely different from the free-form deformation formulation. Finally, all these techniques require the editing process of the initial and the final deformation tool. 3. DIREC'I'LY SPECIFIED DEFORMATION TECHNIQUES Two deformation models such that the object is manipulated directly are described in this section: the first one is referred to as space deformation and the second referred to as direct free-form deformation. 3.1. 77re space dt~/brmation The foundation of the space deformation model discovered by Borrel and Bechmann in 199016] as well as the latest extensions[4, 5, 7] are reviewed in this section. Within D O G M E (Deformation Of Geometric Models Editor), a deformation in E" is d e f n e d by a function d: ~ " -~ ~ " that associates with each point U = ( t q , tt2 . . . . . tin) its displacement A U = (Au~, Au2 . . . . . Au,,). Then, we have: A U - d( U ) - ( d , ( u ~ ) . d2(u2) . . . . .
d,(un)).
The function ddefines the deformation of the whole space since it expresses the transformation of any point in D". Although the whole space is deformed, the de-
Fig. 21. Bottom left: A parallelepipedicai lattice is positioned on the surface. One control point is moved and a global deformation of the object is obtained. Bottom right: The same deformation is obtained on to the surface of the object by changing the weight of a control point (without moving any control point From "Simulation of facial muscle actions based on rational free-form deformations" by P. Kalra, A. Mangili, N. M. Thalmann and D. Thalmann, 1992, Eurographics '92, Comp. Graph. Forum 2( 3). C59-C69. Copyright 1992 by Eurographics. Reprinted by permission.
578
D. BECHMANN
formation can be applied to a selected set of points only. Consider an object represented by a set of points with topological relations. The deformation modifies the position of the points independently of their topology. This property is common to previous space deformation methods as well. Using space deformation, the displacement of any point in space is computed so as to achieve constraints. A constraint is simply the displacement vector of an arbitrary selected point called constraint point. In particular, a constraint point can be an object point. Then, it is trivial to achieve exact placement of object points. The system can satisfy as many constraints as the user enters unless two opposite constraints are applied to a unique point in space. In that case, the system computes the best approximation to the solution. The deformation function d in ~" is expressed as the composition of a function g: ~ --~ ~P and a function f : ~P ~ ~'~ with a linear transformation T: ~ ~ --~ ~", such that: d(U)= (n*l)
M
f(g(U))
(n,m)
(m*l)
where f i s called the extrusion function, g is a parameterizing function and M is the matrix of T. The dimensions of the matrix M, of the functions l a n d d, are written underneath the system. The parameterizing function g transforms the Cartesian coordinates of U into a p-dimensional parameter space. The deformation is characterized by the extrusion function f, the parameterizing function g and the matrix M. Once f and g have been chosen, the deformation depends only on the matrix M. The matrix M is computed so as to achieve the constraints. The resolution method is based on pseudo-inverses [ 8, 13 ]. The shape of the deformation around each constraint point depends on the extrusion function f. Local deformation around the constraint point is obtained using B-splines polynomials for example. Due to the local support of the B-splines polynomials only a limited area ofspace is deformed. Furthermore, the shape of the extrusion function is imprinted on the deformed area. Using B-splines of a degree greater or equal to two, the shape of the resulting deformation is very intuitive and smooth. Arbitrary shaped bumps can easily be designed using this technique. It is also possible to
simulate the deformation of a given material (wood, iron, clay, etc.) with the appropriate extrusion function. On the contrary, the whole space can be influenced by a constraint using power basis polynomials [ 6 ]. In that case, global deformation is obtained. The user could either choose the function f a m o n g a predefined set of functions or interactively build the appropriate one. A bounding box centred at each constraint point visualizes the extent of the deformation (see Fig. 22). The user interactively manipulates it to localize the deformation or to modify its shape. The size of the bounding box is linked to the support of the extrusion function. The boundary of the bounding box depends on the formulation of the extrusion function f a n d on the parameterizing function g as the rest of this section shows. 3.1.1. Simple formulation. The simple formulation [7 ] for the extrusion function distinguishes the contribution of each of the m components of the vector f ( g ( U ) ) . A different function fi is defined for each component ( 1 _< r < m):
fl (gl (U)) \
Usually, a different function f~(gr(U)) is associated to each constraint. We can think ofg~(U) as transforming the coordinates of U into a local coordinate system of the constraint. When replacing each f function by a B-splines polynomial centred at the constraint point C,, the deformed area around each constraint is a sphere (see Fig. 23 ). 3.1.2. Simple product formulation. The simple product formulation [4] of the extrusion function f offers a precise control of the deformation along each local coordinate due to its formulation as a product of p functions, one for each coordinate: f ( g( U)) = f t (uj)" • "fS(us)" • "fP(Up) w i t h f ' : ~ --~ ~m. We can think of g(U) as transforming the coordinates of U into a local coordinate system of p-axis. In
•.~
(a)
,~
~;
(b)
Fig. 22. The object's deformation specified by one constraint and its associated bounding box before (a) and after (b) the deformation.
Space deformation models survey
x
579
"
X
(a)
•
(ilbT::::/
(b)
Fig. 23. On the left (a), the spherical deformed area obtained with the simple formulation. On the right (b), such deformations applied on 3D to a grid. that case, the function g(U) is represented by a matrix of dimension p , n . A different function gr(U) could also be associated to each constraint point C~. Thus, each function f~(us) particularizes the contribution along a given axis of the local coordinate system. In addition, a different function f~(us) is associated to each constraint point Cr and to each axis of the local coordinate system such that:
Thus, the simple product extrusion function f i s composed by m . p functions f~(us). Replacing each f~ function by a B-splines polynomial defines a parallelepiped'around each constraint point (see Fig. 24). In that case, the deformed area that is visualized by a bounding box centred at the constraint point Cr, is linked to the support of the B-splines polynomials. To control the size of the deformed area, the user interactively manipulates the bounding box (see Fig. 24). In the mean time, the system modifies the corresponding support of the functions and computes the appropriate parameterizing function. The user can also rotate the bounding box around a constraint point (see Fig. 25). The computation of the corresponding parameterizing function is not visible to the user. It is also possible to rotate each axis of a local coordinate system independently. Then, the shape of the bounding box is modified as illustrated on Fig. 25. Furthermore, a complex polyhedral bounding box can be obtained (see Fig. 25 ) by adding axis to the local coordinate system[ 5 ].
3.1.3. Tensor product formulation. The tensor product formulation [6] of the extrusion function distinguishes the contribution of each coordinate uk and each component i:
f(g(U)) = J " ( u , ) @. • .@f~(u~) @. • .@fP(u.) withfS: ~ ~ IR'~sand ® representing the tensor product. The bounding box is defined in the same way as using the simple product formulation. In addition, with the tensor product formulation, the system is underconstrained and there is an infinity of deformations satisfying the constraints as the last part of this section will explicate. 3.1.4. Parameterizing function. Using the parameterizing function g any shape of bounding box can be defined. Indeed, a free-form volume is simply a function of three parameters. The parameterizing function g: ~n __~ ~p transforms the Cartesian coordinates of point U = (u~, u2 . . . . . u,) to its corresponding coordinates in the parameter space U = (u;, u~ . . . . . u~). In particular, the Cartesian coordinates could be transformed in the parameter space of a given volume. Then, the boundary of resulting bounding box is given by the free-form volume. A different parameterizing function gr: ~ ~ ppr can also be defined for each component r with 1 _< r _< m to define a different bounding box around each constraint. In any case, the parameterizing function is automatically computed. 3.1.5. Solving the system. Finally, let us explain how to compute the matrix M from the displacement in R n (called constraint) of arbitrary selected points in ~" (called constraint points). For a given extrusion function J a n d a given parameterizing function g the n by m projection matrix M is obtained by solving the system below obeying n,. constraints:
580
D. BECHMANN y
R2
R1 y~
~
X
R1
(a)
(b)
Fig. 24. On the left (a), the parallelepipedical deformed area obtained with the simple product formulation. On the right (b), such deformations applied on 3D to a grid.
y~
112
\
y~
q :~
X RI
(a)
(b)
Fig. 25. On the left (a), the polyhedrical deformed area obtained with rotating or adding axis. On the right (b), such deformations applied on 3D to a grid.
Space deformation models survey d(G) = Mf(g(C~))
for
s = 1. . . . .
nc
where Cs is a constraint point and d(Cs) its associated constraint. The resolution method based on pseudoinverses [ 8, 13 ] calculates the projection matrix M to achieve the set of constraints. The system of nc equations can be rewritten as: d(Cs)' = f ( g ( C s ) ) ' M '
for
s = 1. . . . . nc
581
3.2. Direct J?ee-form de lbrmation As the techniques reviewed in Section 2, direct freeform deformation (DFFD)[16] also consists in embedding the object that has to be deformed inside a trivariate lattice defined by an array of control points. The object deformation follows the lattice deformation but the displacements of the lattice control points are computed from actions such that: "move this point of the object to there." The matrix of the displacements of the lattice control points is computed from the following equations:
All equations can be considered together: ~Q =
D = XM t
with
(n,.* 3)
B
~P
(n,.*m)(m*3)
where AQ is the matrix of the displacement of n,. selected objects points, B is a matrix composed of Bsplines polynomials, Ap is the matrix of the displacements of the lattice control points. The dimension of each matrix is written underneath the system. The matrix AP is computed from the equation: ~p = B+AQ
being an nc by n matrix and
being an nc by m matrix. Depending on the dimension m and the rank of the matrix M, there can be: • one solution (m = nc = rank(X)), • an infinity of solutions ( m > nc) or, • no solutions at all since Xcannot always be inverted. Using the simple formulation and the simple product formulation for the extrusion function the system has a unique solution since m = no. An infinity of solutions is obtained when using the tensor product formulation (m ~ no). Instead of the inverse of X, we use its pseudoinverse X + [6, 9], and thus the general solution is given by: M' = X+D + (I-
X+X)~
with ~ a m . 4 arbitrary matrix The term X +D provides the best approximation of the solution: X + is equal to X -~ when the inverse exists; alternatively it is the least square solution minimizing the elements of the matrix M. The operator (I - X + X ) is a projection on the kernel of X, which ensures that, regardless of ~, the result is a solution of the system (i.e., obeying the set of constraints). More details can be found in [6].
where B ÷ is the pseudo-inverse. Using direct free-form deformation it is trivial to achieve exact placement of object points. The computation of the deformed lattice satisfying the displacement of object points is transparent to the user. However, the displacement of a given object point drags the surrounding points. Recall that the lattice is defined by trivariate Bsplines polynomials. Due to their local properties, the displacement of one control point influences a limited space area. The shape of the B-splines polynomials is imprinted in the area surrounding a given displaced point. The size, the position, and the boundary of the deformed area are strongly linked to the distribution of the control points of the lattice. Thus, to control the locality of the deformation, the user has to modify the initial lattice. No tools are offered to the user to control the deformed area. Due to that, part of the advantages of the direct manipulation are lost. 3.3. Comparison of directly specified techniques In this section, the space deformation is compared with the direct free-form deformation. Before providing a formal proof that both models are equivalent, intuitive clues about their similarity are given. In addition, for both techniques, implementation issues and interactive techniques are discussed. Space deformation satisfies constraints where a Constraint is the displacement of an arbitrary selected point. Direct free-form deformation is computed so as to achieve actions such as moving an object point to a given position. It is clear that both conditions are identical in the particular case where a constraint is defined on an object point. Using both techniques, the shape of the deformation is linked to the choice of the polynomial function. Both
582
D. BECHMANN
formulations compute the displacement of any point in space. Then, to achieve the constraints the space deformation model computes a matrix M while the direct free-form deformation model computes the displacement of the lattice control points. But with no restriction, the components of the matrix M can be interpreted as the displacement of virtual control points lattice. Furthermore, the matrix M is the least square solution minimizing the elements of the matrix M. Translated on to the displacement of virtual control points, it simply means that the fewest virtual control points are moved. Now, let us introduce a formal proof of the similarity of both models. Let us consider the particular case of three-dimensional space deformations (n - 3). Let us consider a space deformation such that the constraint points are object points. This condition is not too restrictive since a deformation is meant to be applied on object points anyway. Then, using space deformation techniques the matrix M satisfying the constraints is computed by solving the following system satisfying the constraints: D
=
X
Mt
(n<,m)(m,3)
(n<, 3)
while using direct free-form deformation techniques the matrix of the control points displacements AQ is computed from: AQ
=
(n,.* 3)
B
Ap
(no*m) (rn* 3)
where the dimension of each matrix is written underneath the system. First, let us simply observe that in the formulation of both systems the dimension of each matrix are the same, just the notation changes. Indeed, it is obvious that the matrix of constraints D is equal to the matrix of displacements of object points AQ. The similarity between X and B is also immediate with the following remarks. Consider the matrix X as defined using tensor product formulation (see Section 3.1.). The parameterizing function g could transform the Cartesian coordinates of a point to its corresponding coordinates in the parameter space of a virtual trivariate lattice:
.f(g(C))
= f ~ ( x : , ),,, z : ) .
Then, by replacing each function j'~ by the product of three functions (one for each coordinate), we get: .f(g( C:) ) = .f ~ ( x v ) f j~( y v ) f k(z,,). 3
When the B-splines polynomials are taken for the extrusion function, we have: ./~(g(C~)) = Bi (x~)B)( y,)Bk(z,)
(the degree of the B-splines polynomials is omitted to simplify the notations). Finally, the matrix B as defined in [16] is obtained by denoting:
b• = B,(xt,)Bj(y~)Bk(z~). This proves that the matrix X is equal to the matrix B under the choices taken earlier. Finally, the similarity between M and AP is obtained by considering the matrix M as the variation of the position of the virtual control points lattice. Actually, the computation of both matrices is done using pseudoinverses. To summarize, under some assumptions, the mathematical formalism of the space deformation model includes the direct free-form deformation model. Furthermore, as discussed now, the interactive specification of the deformation is more intuitive with the space deformation model. In the implementation of direct free-form deformation, the deformed area is a parallelepiped lattice defined by a trivariate B-splines tensor product. Before manipulating the object, the user is required to define this lattice: First, he chooses the number of subdivisions of the initial lattice along each direction and then he places it around the object. Due to that, the advantages of a direct manipulation are lost. In addition, if the user wishes to modify the locality of the deformation, he has to modify the number of subdivisions of the initial lattice. On the contrary, the user of the space deformation implementation directly enters the constraints that define the deformation (see Figs. 26, 30). By default, BSplines polynomials define the shape of the deformation but it is possible to choose a wide variety of other extrusion functions or even to build one with a curve editor. The deformed area around each constraint could be visualized. Its shape and its size are interactively controlled (see Figs. 27-29 and Figs. 31-33). Indeed, the user chooses the shape of the bounding box (sphere, parallelepiped, polyhedron, etc.)with a function key and interactively controls it size along each direction with dials. With both techniques, the computation of the pseudo-inverse matrix that satisfies the constraints is very efficient. Within space deformation, the deformed area is perfectly identified, so the system only recomputes the points of the object lying inside a bounding box. Thus, there is no efficiency problems to obtain the deformation in real time. 4. C O M P A R I S O N BETWEEN DIRECTLY SPECIFIED TECHNIQUES AND DEFORMATION TECHNIQUES REQUIRING A DEFORMATION T O O L
In this section, we compare the direct manipulation techniques and the deformation techniques requiring a deformation tool according to their mathematical formalisms and their interaction techniques. Since the direct free-form deformation (DFFD) model is a particular case of the space deformation model (DOGME), it is predictable that the space de-
Space deformation models survey
583
Fig. 26. One constraint (yellow segment) is defined on the cylinder. The deformed area around the constraint is a sphere.
Fig. 27. The resulting deformed surface of the cylinder.
Fig. 28. The user interactively changed the extent of the defi3rmation by modifying the radius of" the sphere,
Fig. 29. A more local deformation is obtained by reducing the radius of the sphere.
Fig. 30. One constraint (yellow segment) is defined on the cylinder. The deformed area around the constraint is a parallelepiped.
Fig. 31. The resulting deformed surface of the cylinder.
Fig. 32. The user interactively changes the size of the deformed area along each direction of the parallelepiped by modifying the corresponding radius.
Fig. 33. A different size of the deformed area around the constraint.
584
D. BECHMANN
formation model leads to flee-form deformation techniques as well. To demonstrate this, we provide a formal transformation from the space deformation formulation ( D O G M E ) to the flee-form formulation. Starting from the general space deformation model formulation, we have:
d(U) : M f ( g(U)) The parameterizing function g can be defined such that the Cartesian coordinates of a point U = (uj, u2, u3) is transformed to its corresponding coordinates U = ( u ~, u ~, u ~) in a virtual lattice parameter space. We have:
d(U) = M f ( u ; , u~, u~) For the extrusion function, we choose the tensor product formulation:
d(U) = M f l ( u ~ ) ® f2(u~) ® f 3 ( u ] ) Each function f k is a mk* 1 vector. The vector resulting from the tensor product is of size mjmzm3 * 1. The matrix M is of size n . m where m = m~m2m3. Let Ms = M~.j.k be the s-th column of the matrix M. The system can be rewritten using a matricial formulation:
Pl
P2
D(U) = E E
P3
E Pi',y,k'Bi' ' p, ( u j,) B j,p2(uz)Bk,(U;). , p3
i'=0 j'=0 k'=0
We have demonstrated that the flee-form deformation formulation is obtained from the space deformation model where the matrix M is interpreted as the displacement of the control points of a virtual lattice. A similar transformation leads to the extended free-form deformation and 'to the rational free-form deformation formulations. Finally, only the axial deformation technique, also involving a ff~3 to ~ 3 mapping, is based on a different mathematical formulation. Since the mathematical formalism is unique, the classification of the deformation techniques into those requiring a deformation tool and those directly specified, is mainly justified by the different interaction process to define the deformation. The first ones require an editing technique to build the initial and the final deformation tools. On the contrary, with direct techniques the user simply enters the constraints and, if he wishes to, modifies some parameters such that the extent of the deformation around a constraint or the shape of the deformation. Unfortunately, the direct flee-form deformation also requires the editing of a deformation tool. Thus, according to the interaction techniques, this model is at this point hardly classified as a directly specified deformation technique.
d(U)
X
Mid,k f ] (1~/1)fj ' 2( u 2, ) f k(u3) 3 ,
l~i~ml l~j~m 2 l~k~m 3
This formulation can be rewritten as a triple sum: ml
m2
m3 1
t
2
,'
3
;
d(U) = Z Z Z M i j . k f i ( u l ) f j ( u 2 ) f k(u3) i=1 j=l
k=l
For a Bernstein polynomial extrusion function f ~r, we have: ml
m2
m3
d(U) = Z Z Z Mi,j,kB,(u;)Bj(u;)Bk(u;) i=l j = l
k=l
where the degree of the Bernstein polynomials is omitted to simplify the notations. By a well known property of Bernstein, each point U inside a trivariate Bernstein volume can be expressed as: ml
m2
m3
U = ~ ~ ~ ei.j.kBi(u'l)Bj(u~)Bk(u;) i=1 j = l
k=l
Then, we have: ml
D(U) = •
m2
m3
~, E (Pi,j,~ + Mi,j,k)Bi(u~)Bj(u~)Bk(u;)
/=1 j=l
k=l
Denoting P:.j.k = Pi,j,k + M~,j,k, i' = i -- 1, j ' = j -- l, k ' = k - 1, Pl = m~ - 1, P2 = m2 - 1, P3 = m3 - 1, we obtain the free-form deformation formulation:
5. D I S C U S S I O N
In Section 4, we have shown that the flee-form deformation models [ 10, 16, 21 ] are obtained from the space deformation model [ 6 ] with the matrix M interpreted as a matrix of displacement vector oftbe control points. Thus, all these techniques can be viewed as various expressions of a unique mathematical formalism. Since the mathematical model defining this deformation techniques is the same, the choice should be motivated by the type of deformation the user wishes to obtain. Table 1 shows for which kind of deformations the different models are appropriate. For example, it is much easier to obtain exact displacement of object points using directly specified deformation than by manipulating a deformation tool. Directly specified deformation techniques are particularly well suited to imprint arbitrary shaped bumps. Deformation with a lattice seems to be appropriate if it involves a regular set of control points. Axial deformation is well-adapted to bending or stretching. The shape of the deformation is the same with both models since it is simply linked to the polynomials (Bernstein, B-splines, etc.). However, the extrusion function of the space deformation model that defines the shape of the deformation is not restricted to polynomials. Thus, although these models are meant to provide flee-form deformation, physical properties on the deformed object can be obtained with an appropriate choice for the extrusion function. The extent of the deformation is predictable in both methods. However, to control the position, the size
Space deformation models survey
585
Table 1. Which kind of deformations for which deformation model?
FFD EFFD RFFD AXIAL DOG M E DFFD
Global deformation
Local deformation
Precise displacement
Yes Yes Yes Yes Yes Yes
Not appropriate Yes Not appropriate Possible Yes Yes
No No No No Yes Yes
Others
Bending, stretching, scaling, twisting Arbitrary. shaped bumps
Table 2. Control of the deformed area for each implementation. The deformed area is:
Its shape is a:
FFD EFFD RFFD AXIAL DOGME
The lattice Some chunks of the lattice The lattice The whole space or a generalized cylinder The bounding box around each constraint
DFFD
Some chunks of the lattice
Parallelepiped Prism or any shape Parallelepiped Generalized cylinder Sphere, parallelepiped, polyhedron or any shape Parallelepiped
and the boundary of the deformed area, space deformation provides a more flexible tool than free-form deformation. For each implementation of the deformation models (first column), Table 2 indicates which entity defines the deformed area (second column ), describes its shape (third c o l u m n ) , and also indicates if the deformed area could be visualized and if its size is easily modified (fourth c o l u m n ) . Indeed, within space deformation only the points lying inside the bounding box move. The bounding box allows to control the extent of the deformation. It corresponds exactly to the deformed area, On the contrary, using free-form deformation[10, 16, 18, 21], although only the portion of space inside the lattice is considered, no mention is made of the deformed area. Actually, when the lattice is defined by a trivariate Bernstein polynomial, its volume defines the deformed area. However, with a different polynomial basis such as B-splines, the size and the boundary of the deformed area when moving one control point depends on various parameters such as the number of control points of the lattice, their distribution through space and the degree of the polynomials. Thus, it is hardly predictable for a user not familiar with the effect of control point displacements. Consider the versatility of these techniques. They involve a mapping that defines the deformation of any point in space. Although the whole space is deformed, we can choose to apply the deformation to a selected set of points. In particular, these points can represent an object. For example, an object defined by a set of topological relations is deformed by moving the position of its points independently of the topological relations. The position of the object points is modified but their topological structure is preserved. Thus, it can be applied to any object with such a representation and can easily be integrated in any existing modeling system based on these representations. However, when deforming a parametric surface, the result is different
Is it visualized? Yes No Yes Possible Yes No
when deforming its control points or its sample points. Furthermore, when deforming the sample points of an implicit surface its implicit formulation is lost. Finally, these space deformation techniques provide a fruitful research domain: various extensions are currently under study such as those preserving physical properties (surface [ 20 ] or volume [ 1] preserving deformation ) or the animation [4, 5, 11 ]. The comparison of these techniques have shown that they are equivalent in terms of their three-dimensional formulation. However, the N-dimensional space deformation model provides a v e ~ flexible animation design tool based on the four-dimensional deformation of space and time. .4cknowledgements--I am grateful to Yves Bertrand, Sabine Coquillart, and Daniel Thalmann for providing Figs. 5-21. Figures 13-20 are reprinted with permission of ACM SIGGRAPH and the Fig. 21 is reprinted with permission of Eurographics. REFERENCES
1. F. Aubert, DdJbrnTations d'objets gl volume constant, M.Sc. dissertation, U niversit6 Louis Pasteur, Strasbourg ( 1993). 2. A. H. Barr, Global and local deformations of solid primitives. SlGGP~4PtI'84, ACM Comp. Graph. 18 (3). 2130 (1984). 3. D. Bechmann, The de/inition and handling q/j?ee:lbrm primitives, Ph.D. dissertation. Universit6 Louis Pasteur. Strasbourg (1989). 4. D. Bechmann and N. Dubreuil, Animation through space and time based on a space deformation model, Third Eurographics "92 Animation & Simulation Workshop, Cambridge, (United Kingdom), September 1992. Visualization Comp. Anim. 4(3), 165-184 (1993). 5. D. Bechmann and N. DubreuiL Order controlled freeform animation, Fourth Eurographics '93 Animation and Simulation H)~rks'hop, Barcelona, Spain (September 1993). 6. P. Borrel and D. Bechmann, Deformation of N-dimensional objects, Symposium on Solid Modeling Foundations and CAD/CAM Applications, ACM Press, Austin.
586
7. 8. 9.
10. I 1.
12. 13. 14.
D. BECHMANN Texas, J une 1991, Int. J. Computational GeometryAppl. 1(4), 427-453 ( 1991 ). P. Borrel and A. Rappoport, Simple constrained deformations (Scodef) for geometric modeling and design. IBM Res. Rep. Comp. Sci. ( 1991 ). T. L. Bouillon and P. L. Odell, Generalized Inverse Matrices, Wiley Interscience, New York ( 1971 ). J. E. Chadwick, D. R. Hauman and R. E. Parent, Layered construction for deformable animated characters. SIGGRAPH'89, ACM Comp. Graph. 23(3), 243-252 (1989). S. Coquillart, Extended free-form deformations: A sculpturing tool for 3D geometric modeling. SIGGRAPH'90, ACM Comp. Graph. 24(4), 187-196 (1990). S. Coquillart and P. Janc~ne, Animated free-form deformations: An interactive animation technique. SIGGRAPH'91, ACM Comp. Graph. 25(4), 23-26 (1991). D. Forsey and R. Barthels, Hierarchical B-spline refinement. SIGGRAPH'88, ACM Comp. Graph. 22(4), 205212 (1988). T. N. E. Greville, Some applications of the pseudo-inverse of a matrix. SIAMRev. ll, 15-22 (1960). J. Griessmair and W. Purgathofer, Deformation of solids
with trivariate B-splines. Comp. & Graph. 14(3/4), 491500 (1990). 15. U. GiJdiikbay and B. Ozgiic, Free form solid modeling using deformations, EUROGRAPHICS'89, North-Holland, Amsterdam, 137-148 (1989). 16. W. M. Hsu, J. F. Hughes and H. Kaufman, Direct manipulation on free-form deformation. S1GGRAPH'92, ACM Comp. Graph~ 26(2), 177-184 (1992). 17. K. Joy, Utilizing parametric hyperpatch methods for modeling and display of free-form solids, Symposium on
Solid Modeling Foundations and CAD~CAM Applications. ACM Press, Austin, TX, 245-254 ( 1991 ). 18. P. Kalra, A. Mangili, N. M. Thalmann and D. Thalmann, Simulation of facial muscle actions based on rational freeform deformation. EUROGRAPHICS'92. Comp. Graph. Forum 2(3), C59-C69 (1992). 19. F. Lazarus, S. Coquillart and P. Janc~ne, D6formations axiales interactives. GROPLAN '92, 117-124 (1992). 20. P. Pebay, Drformations d'objets ,~surface constante, M.Sc. dissertation, Universit6 Louis Pasteur, Strasbourg (1992). 21. T. W. Sederberg and S. R. Parry, Free-form deformation of solid geometric models. SIGGRAPH'86, ACM Comp. Graph. 20(4), 151-160 (1986).