HIERARCHICAL MULTI-RESOLUTION MODEL
For Fast Energy Minimization of Virtual Cloth
Le Thanh Tung and Andr
´
e Gagalowicz
INRIA Rocquencourt, France
Keywords:
Hierarchical multi-resolution, gradient conjugate, virtual cloth prepositionning, energy minimization, collision
detection.
Abstract:
In this paper we present a method for fast energy minimization of virtual garments. Our method is based upon
the idea of multi-resolution particle system. When garments are approximately positioned around a virtual
character, their spring energy may be high, which will cause instability or at least long execution time of the
simulation. An energy minimization algorithm is needed; if a fixed resolution is used, it will require many
iterations to reduce its energy. Even though the complexity of each iteration is O(n), with a high resolution
mass-spring system, this minimization process can take a whole day. The hierarchical method presented in this
paper is used to reduce significantly the execution time of the minimization process. The garments are firstly
discretized in several resolutions. Once the lowest resolution particles system is minimized (in a short time),
a higher resolution model is derived, then minimized. The procedure is iterated up to the highest resolution.
But at this stage, the energy to minimize is already much lower so that minimization takes a reasonable time.
1 INTRODUCTION
With advances in computer graphics over the last few
decades, virtual garment simulation became popular
in many applications, from movie industry to fashion
and textile. Many papers in the area of virtual cloth-
ing have been published, from simplified cloth models
(Jerry, 1986), (C.Feynman, 1986), to more accurate
ones (Baraff and Witkin, 1998) (Lafleur et al., 1991)
(Choi and Ko, 2002) (Philippe Decaudin, 2006), some
surveys and comparisons of recent researches are
available in (Hing N.Ng, 1996), (House and Breen,
2000). A virtual garment is normally represented by
its two-dimensional patterns. These patterns can be
used to produce real garments in the textile industry
(CAD systems), or produced by a fashion designer.
More information is needed to be added to the 2D
patterns in order to produce garments. The automatic
pre-positioning of a garment around a digital body
is a difficult and challenging problem as we have to
sew the different pieces correctly. Some approaches
for dressmaking have been proposed. Some have
been introduced in the literature (Lafleur et al., 1991),
(Clemens Gross, 2003). In this approach, 2D patterns
are positioned by hand around the body and then,
sewing is performed automatically. We developed an
automatic virtual dressing system (T. Le Thanh, 2005)
which can be used easily by a normal user who wants
to try garments virtually. This technique proposes a
2D manipulation method which will be coupled to a
3D mapping technique allowing to reach the final po-
sitioning. Even though this method gives a fully au-
tomatic pre-positioning, the springs used in the parti-
cle system are usually very deformed, which implies a
very hight energy that the system has to dissipate; this
requires a very small time step in the simulator lead-
ing to a long simulation time, so that an energy mini-
mization algorithm for the particle system is needed.
In this paper we introduce an efficient method for
the energy minimization using hierarchical decompo-
sition. The garment is firstly discretized in various
resolutions (from lowest to highest). Then the lowest
resolution particles system is minimized using a local
minimization algorithm, since the complexity of this
algorithm is O(n), it requires a short time to perform
the minimization. Next, a higher resolution of the gar-
453
Thanh Tung L. and Gagalowicz A. (2007).
HIERARCHICAL MULTI-RESOLUTION MODEL - For Fast Energy Minimization of Virtual Cloth.
In Proceedings of the Second International Conference on Computer Vision Theory and Applications - IU/MTSV, pages 453-458
Copyright
c
SciTePress
ment is reconstructed from the previous minimization
result and the spring deformation are further reduced.
This procedure is iterated until the highest resolution
garment is minimized.
1.1 Related Work
Hierarchy decomposition methods have been pro-
posed to accelerate simulation for deformable objects
using finite element methods (Demetri Terzopou-
los and Fleischer, 1987), subdivision frameworks
(Steve Capell, 2002b), skeleton driven deformations
(Steve Capell, 2002a), physically based subdivisions
(Chouraqui and Elber, 1996), multi-resolution colli-
sion handlings (Nitin Jain, 2005), etc. Multi-level
optimization algorithms have also been proposed in
(Dave Hutchinson, 1996) to accelerate the perfor-
mance of a nonlinear optimizer. Li and Volkov in (Li
and Volkov, 2005) also introduce an adaptive method
to refine and simplify the cloth meshes locally.
Energy minimization for mass/spring systems
is used to avoid an expensive computation. As
physically-based methods require a large computation
time to compute equation 1 at each time step (See
(Baraff and Witkin, 1998)):
(M h
f
v
h
2
f
x
)4v = h( f
0
+ h
f
x
v
0
) (1)
the simulation of a complex nonlinear and hystereti-
cal garment can require a whole day to a week (in an
early work of Breen). To avoid the use of the simu-
lator to minimize the energy of the mass/spring sys-
tem, we propose a fast geometrical minimization al-
gorithm. Adopting the idea of multi-resolution, we
introduce an efficient method to decompose the gar-
ment in several resolutions; each resolution can be re-
constructed easily from another one. Once the energy
of the lowest resolution has been minimized, we then
reconstruct the next one from this one and its mini-
mization is applied. This process loops until the high-
est resolution has been minimized.
The remainder of this paper is organized as fol-
lows: Section 2 describes input data used in our algo-
rithm. Section 3 details the principle of energy min-
imization for mass/spring systems. We present our
multi-resolution technique for virtual garment simu-
lation in Section 4, by explaining the decomposition
of garments keeping their boundaries untouched. Sec-
tion 5 briefly presents the method used for collision
detection in our system. We finally give some results
validating our approach in Section 6, before conclud-
ing in Section 7.
2 INPUT DATA
Figure 1: Input garment shape (left, middle) and output re-
sult using simulator (right).
The shape of the virtual garment is reconstructed
from a set of 2D patterns; these patterns come from
a CAD system or are created by a designer. In gen-
eral, a mass/spring system is used to model the me-
chanical behavior of cloth. Any virtual cloth mod-
eled by a mass/spring system can be applied to our
method. The input to the technique presented in this
paper is simply the output of the technique presented
in (T. Le Thanh, 2005). Such an input is visualized
on the left and middle part of figure 1. The garment
is already positioned around the body but its energy is
very high (the garment is highly deformed compared
to the final result - See the right of figure 1). There-
fore a long computation time is required to obtain an
acceptable result (stable position of the garment).
0 1 2 3 4 5 6 7 8
x 10
4
10
−3
10
−2
10
−1
10
0
10
1
Time (Seconds)
Error (cm)
Simul 10mm Error/Time
Figure 2: Simulation time (average spring error in cm) con-
vergence after 80,000 seconds, spatial resolution 10mm.
The discrete resolution of the cloth used in our
work varies from 50mm to 5mm. These resolutions
are nowadays used in most physically-based simula-
tion systems. The higher the resolution, the better the
garment is modeled, but the computing times grows
exponentially.
3 ENERGY MINIMIZATION
Garment models are modeled as triangular or rectan-
gular grids, with points of finite mass at the intersec-
tions of the grids and the mass points are joined by
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
454
springs having no mass but modeling various mechan-
ical behaviors of cloth (tension, shear, bending ....).
The energy of the garment is estimated by the aver-
age elongation of all the springs of the system. We
will calculate the energy of the whole garment from
a set of equations and determine the shape of the gar-
ment by moving the points to achieve a minimum en-
ergy state. The reconstruction from 2D patterns to 3D
shape can be denoted as a function:
F : R
2
R
3
or (u, v) (x, y, z)
where each particle P
i
of the garment has its 2D co-
ordinates (u
i
, v
i
) and 3D coordinates (x
i
, y
i
, z
i
). We
denote by r
i j
the spring connecting P
i
and P
j
. The
equilibrium length of r
i j
is its length in 2D coordi-
nates denoted by L
i j
, its current length is its length in
3D coordinates denoted by l
i j
. The energy equation
of the garment shape can be represented as follows :
E
total
= E
ten
+ E
sh
+ E
bend
+ E
grav
(2)
Where E
ten
is the energy due to tension, E
sh
to
shear, E
bend
, the bending energy, and the gravitational
energy is E
grav
. In fact, springs strongly resist the
deformations. We aim to develop an equation so
that the elasticity energy is high when the spring is
stretched or compressed. There is a lot of research
in cloth modeling, (David E.Breen, 1994) propose a
Kawabata model, some models of cloth ((Baraff and
Witkin, 1998), (Lafleur et al., 1991)) use a linear
model for fast simulation. Kawabata model gives a
more realistic cloth simulation but it has a drawback:
its computation time. For energy minimization pur-
poses, we used successfully the function:
Er
i j
= C
s
k
i j
(
l
i j
L
i j
1)
2
(3)
where Er
i j
is the energy of the spring r
i j
. C
s
is an elas-
ticity constant. The function E
elast
, the part of E
total
corresponding to tension and shear is calculated by
summing over all springs:
E
elast
=
r
i j
M
e
Er
i j
= C
s
r
i j
M
e
k
i j
(
l
i j
L
i j
1)
2
(4)
where M
e
is the set of tension and shear springs, k
i j
is
the stiffness constant of the spring r
i j
. Observing that
the tension energy of cloth is always much higher than
the bending energy, we can approximate the bending
along an edge AB by a virtual spring connecting two
points of two triangles sharing the edge AB. (See Fig-
ure 3).
This presentation of the bending force makes
E
bend
simple to compute. E
bend
is simplified as:
E
bend
=
r
i j
M
b
Er
i j
= C
b
r
i j
M
b
k
i j
(
l
i j
L
i j
1)
2
(5)
0 Lij lij
0
E(rij)
Structural spring
Shear spring
Bending
spring
Figure 3: Springs structure and energy function.
where M
b
is the set of bending springs. The parti-
cle’s energy due to gravity is simply defined as:
E
grav
= C
g
N
i=0
m
i
gh
i
= C
g
N
i=0
m
i
g(z
i
Z
0
) (6)
where N is the number of particles, m
i
is the weight of
particle P
i
. C
g
, Z
0
are a density constant and the ref-
erence altitude of the system respectively. The energy
of the cloth shape can be represented as:
E
total
= C
s
r
i j
M
e
k
i j
(
l
i j
L
i j
1)
2
+C
b
r
i j
M
b
k
i j
(
l
i j
L
i j
1)
2
(7)
+C
g
N
i=0
m
i
g(z
i
Z
0
)
In fact, we store these springs in only one array M =
M
e
M
b
, each spring has its own stiffness constant,
E
total
is calculated as:
E
total
=
1
2
r
i j
M
k
i j
(
l
i j
L
i j
1)
2
+C
g
N
i=0
m
i
g(z
i
Z
0
)
(8)
Note that E
total
is defined as a continuous function, if
we let a
i j
=
l
i j
L
i j
and call E as E
total
, the partial differ-
ential equation of the total energy can be easily calcu-
lated:
E
x
i
=
r
i j
V
i
k
i j
(x
i
x
j
)(
a
i j
1
a
i j
L
2
i j
) (9)
E
y
i
=
r
i j
V
i
k
i j
(y
i
y
j
)(
a
i j
1
a
i j
L
2
i j
) (10)
E
z
i
=
r
i j
V
i
k
i j
(z
i
z
j
)(
a
i j
1
a
i j
L
2
i j
) +C
g
m
i
g (11)
where V
i
is the set of springs connected to particle P
i
.
We used the conjugate gradient method to determine
the minimum of E
total
(William H. Press, 1992). The
result is given in figure 5.
HIERARCHICAL MULTI-RESOLUTION MODEL - For Fast Energy Minimization of Virtual Cloth
455
4 MULTI-RESOLUTION FOR
THE ENERGY MINIMIZATION
As presented in figure 5, the computation time for
a small resolution garment is much faster than for a
high one, but the error reached remains much higher.
The problem we want to solve is to decrease substan-
tially the computing time to reach the same minimum
as that one of the highest resolution.
Multi-resolution methods are presented in many
papers as (Li and Volkov, 2005), (Dave Hutchinson,
1996), but they are restricted to the case of sim-
ple triangular meshes to model cloth. The triangular
mesh can be easily decomposed in several child tri-
angles to obtain a new unified mesh. However, these
methods cannot be applied in the case of our model
(T. Le Thanh, 2005; Provot, 1995), where the connec-
tivity of springs is more complex.
Figure 4: Multi-resolution of a shirt garments.
We developed a new decomposition method that
can work independently of the cloth structure. The
main idea is to predefine the 2D garments in several
resolutions beforehand. We then determine the corre-
spondences of each particle in a given resolution with
other particles in other resolutions. Given a 3D cloth
particle at a certain resolution, we can calculate its lo-
cation in another resolution without difficulty.
Each garment is discretized in N resolutions. Its
shape S at level n with n = 1..N is denoted by S
n
. The
shape is defined by a set of particles {P
n
}, springs
{R
n
} and triangles mesh {T
n
} : S
n
(P
n
, R
n
, T
n
). For
each particle p P
n
, we find a triangle t
i
T
n1
so
that the distance from p to t
i
is minimum:
distance(p, t
i
) =
0 if t
i
contains p
|po
i
| if t
i
does not contain p
where o
i
is the gravity center of t
i
. The correspon-
dence between p and t
i
is computed by employing
a positional constraint method. We call p
0
, p
1
and
p
2
the particles of triangle t
i
, the barycentric coordi-
nates of p on t
i
are (w
0
, w
1
, w
2
). The particle is re-
constructed so that its barycentric coordinates on the
triangle t
i
does not change. When the cloth shape S
n1
is minimized, the new position of particle p is calcu-
lated as follows :
p = w
0
p
0
+ w
1
p
1
+ w
2
p
2
(12)
In order to reconstruct S
n
from S
n1
, we have to
know the correspondences of all particles of S
n
on the
triangles of S
n1
. The most time consuming task is
to compute the distance from each particle of S
n
to
the triangles of S
n1
. A naive approach is to compute
the distance from each particle to all triangles. Since
the task has complexity O(K
2
) with K is the num-
ber of particles, the computation time is small at low
resolution. However, with a higher one (for example
about 30,000 particles), the computing time can take a
whole day. It is unacceptable even if the computation
will be performed only one time before the minimiza-
tion process starts.
We propose an efficient method to compute the
correspondences. This method uses bounding boxes
((Bergen, 1998)) for the set of triangles for each level.
Each node of the bounding box contains a linked list
of triangles. For each particle, we find the node cor-
responding to its bounding box. Distances from the
particle to all triangles contained by the node are com-
puted in order to find the minimum one.
Since the bounding box method has the complex-
ity O(n), we can compute the correspondences for
very high resolution with a reasonable time.
5 COLLISION DETECTION
The geometrically based minimization has to han-
dle self collisions and collisions between the hu-
man body and the cloth. Several methods have
been proposed in the last few years (Lafleur et al.,
1991),(Zhang and Yuen, 2000),(Robert Bridson and
Anderson, 2002). We have decided to solve the prob-
lem approximately by not testing particles against tri-
angles and edges against each other; we consider only
particles. Clearly, we now have to hold the particles
a little bit away from the human body or away from
each other to avoid artifacts of not detected intersect-
ing triangles. But this approach saves a lot of compu-
tation.
We have used a hierarchy of bounding boxes for
the garment. The hierarchy is built once at the begin-
ning and the bounding boxes are updated after each
step. For collision detection between the garment and
the human body we hold the particles away from the
body surface at a predefined distance δ. Now we are
able to determine the closest distance between the par-
ticles and the triangles. From the surface normal at
the closest distance we can determine if the particle
is inside the body or just close to it. In any case the
collision response moves the particle so that it is away
from the body by δ.
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
456
tance β. The self-collision process will allow us to
obtain much better results.
REFERENCES
Baraff, D. and Witkin, A. (1998). Large steps in cloth sim-
ulation. In SIGGRAPH ’98: Proceedings of the 25th
annual conference on Computer graphics and inter-
active techniques, pages 43–54, New York, NY, USA.
ACM Press.
Bergen, G. V. D. (1998). Efficient collision detection of
complex deformable models using aabb trees. In Jour-
nal of Graphics Tools.
C.Feynman (1986). Modeling the appearance of cloth. In
Master’s thesis, Dept. of EECS, Massachusetts Inst.
of Technology, Cambridge, Mass.
Choi, K.-J. and Ko, H.-S. (2002). Stable but responsive
cloth. In SIGGRAPH ’02, New York, NY, USA. ACM
Press.
Chouraqui, P. and Elber, G. (1996). Physically based adap-
tive triangulation of freeform surfaces. In CGI’96,
page 144, Los Alamitos, CA, USA.
Clemens Gross, Arnulph Fuhrmann, V. L. (2003). Au-
tomatic pre-positioning of virtual clothing. In Pre-
ceedings of the 19th spring conference on Computer
Graphics, pages 99–108, Budmerice, Slovakia.
Dave Hutchinson, Martin Preston, T. H. (1996). Adaptive
refinement for mass/spring simulations. In Computer
Animation and Simulation ’96, pages 31–45.
David E.Breen, Donald H.House, M. J. (1994). Predicting
the drape of woven cloth using interacting particles. In
SIGGRAPH ’94, New York, NY, USA. ACM Press.
Demetri Terzopoulos, John Platt, A. B. and Fleischer, K.
(1987). Elastically deformable models. In Computer
Graphics, pages 205–214.
Hing N.Ng, R. L. (1996). Computer techniques for mod-
eling cloth. In Computer Graphics and Applications,
Vol. 16 No.5, pages 28–641.
House, D. H. and Breen, D. E. (2000). Cloth Modeling and
Animation. A. K. Peters.
Jerry, W. (1986). The synthesis of cloth objects. In Pro-
ceeding SIGGRAPH’86. Vol 20, No 4, pages 49–54.
Computer Graphics.
Lafleur, B., Magnenat-Thalmann, N., and Thalmann, D.
(1991). Cloth animation with self-collision detection.
In Proceedings IFIP Conference on Modeling in Com-
puter Graphics, pages 179–187. Springer-Verlag.
Li, L. and Volkov, V. (2005). Cloth animation with adap-
tively refined meshes. In ACSC ’05: Proceedings of
the Twenty-eighth Australasian conference on Com-
puter Science.
Nitin Jain, Ilknur Kabul, N. K. G. D. M. M. L. (2005).
Multi-resolution collision handling for cloth-like sim-
ulations. In Computer Animation and Virtual Worlds.
Volume 16, Issue 3–4, pages 141–151. John Wiley &
Sons, Ltd.
Philippe Decaudin, Dan Julius, J. W. L. B. A. S. M.-P. C.
(2006). Virtual garments: A fully geometric approach
for clothing design. In EUROGRAPHICS ’06.
Provot, X. (1995). Deformation constraints in a mass-
spring model to describe rigid cloth behavior. In Proc.
Graphics Interface ’95, pages 147–154.
Robert Bridson, R. F. and Anderson, J. (2002). Robust treat-
ment of collisions, contact and friction 106 for cloth
animation. In SIGGRAPH ’02, New York, NY, USA.
ACM Press.
Steve Capell, Seth Green, B. C. T. D. Z. P. (2002a). Inter-
active skeleton-driven dynamic deformations. In SIG-
GRAPH ’02, New York, NY, USA. ACM Press.
Steve Capell, Seth Green, B. C. T. D. Z. P. (2002b). A
multiresolution framework for dynamic deformations.
In SIGGRAPH ’02, New York, NY, USA. ACM Press.
T. Le Thanh, A. G. (2005). Virtual cloth pre-positioning. In
Proceedings of Mirage 2005.
William H. Press, William T. Vetterling, S. A. T. B. P. F.
(1992). Numerical Recipes. In C : The art of scientific
Computing. Cambridge University Press.
Zhang, D. and Yuen, M. M. (2000). Collision detection for
clothed human animation. In Proceedings of the 8th
Pacific Graphics Conference on Computer Graphics
and Application, pages 328–337.
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
458