variational mannequin approximation using spheres and …

9
Received March 25, 2018, accepted May 3, 2018, date of publication May 15, 2018, date of current version June 5, 2018. Digital Object Identifier 10.1109/ACCESS.2018.2837013 Variational Mannequin Approximation Using Spheres and Capsules NANNAN WU 1 , DONGLIANG ZHANG 2 , ZHIGANG DENG 3,4 , (Senior Member, IEEE), AND XIAOGANG JIN 1 , (Member, IEEE) 1 State Key Laboratory of CAD&CG, Zhejiang University, Hangzhou 310058, China 2 International Design Institute, Zhejiang University, Hangzhou 310058, China 3 Virtual Reality and Interactive Technique Institute, East China Jiaotong University, Nanchang 330013, China 4 Computer Science Department, University of Houston, Houston, TX 77004, USA Corresponding author: Xiaogang Jin ([email protected]) The work of D. Zhang was supported by the National Natural Science Foundation of China under Grant 61472355. The work of X. Jin was supported in part by the National Natural Science Foundation of China under Grant 61732015, in part by the National Key Research and Development Program of China under Grant 2017YFB1002600, and in part by the Key Research and Development Program of Zhejiang Province under Grant 2018C01090. ABSTRACT We present a method to approximate a mannequin represented as a triangle/quadrangle mesh using spheres and capsules. We formulate this 3-D approximation problem as a 2-D one, which increases its efficiency by one or even two orders of magnitude. Our algorithm first extracts cross sections from a given mannequin, approximates each cross section with circles using a variant of iterative Lloyd clustering, and finally generates capsules based on the circle sets. Compared with previous methods, our method is much faster and is able to get a tighter result with a given number of primitives. Our method can be directly applied to cloth-body collision handling in real-time cloth animation, and the simulation results by our approach are visually plausible. INDEX TERMS Approximation, real-time cloth animation, spheres and capsules, variational. I. INTRODUCTION Approximating a 3D object using a set of simple geometric primitives is of great importance in shape analysis, colli- sion detection, and shadowing. Geometric primitives include spheres, ellipsoids, axis-aligned bounding boxes (AABBs), oriented bounding boxes (OBBs), discrete oriented polytopes (k-DOPs), and so on. Among all the primitives, sphere is the simplest one; thus, it has been widely employed in computer graphics community. A capsule consisting of two spheres is also simple and efficient in collision detection. Because of this, both of two well-known, open-source physics-based engines, Bullet and PhysX, require a character to be repre- sented by spheres and/or capsules in cloth simulation in order to provide real-time performance. However, such a represen- tation is created manually in these engines. Therefore, there is a clear need to develop an automatic method to approximate a given mannequin using spheres and capsules as primitives. Recently, Thiery et al. [1] proposed the Sphere-Meshes representation which is the linear interpolation of spheres along edges and triangles. While this method can handle a wide variety of models, the approximation error is large when the number of primitives is small, e.g., fewer than 300. Moreover, it cannot guarantee a symmetric approximation for a symmetric input mannequin. In this paper, based on the key insight that a human body can be divided into six parts: left/right arm, left/right leg, head and torso, and that the shape of each part is similar to a capsule, we propose a novel variational approxima- tion algorithm to represent a mannequin by spheres and capsules. By employing the semantic information of the input mannequin, our method can generate a tighter and more symmetric result while keeping the number of primitives small. Based on the anthropometric characteristics of the human body, we turn such a 3D approximation problem into a 2D one, which significantly increases the efficiency of the approximation (i.e., two orders of magnitude faster than existing methods in our experiments). Figure 1 shows the framework of our approach. It consists of four steps: (i) Extract cross sections for each body part based on anthropometric characteristics of the human body. Each cross section is represented as a polygon which serves as a feature polygon of the input mannequin (see Figure 2). (ii) Approximate a feature polygon with circles using a variant of iterative Lloyd clustering. (iii) Generate capsules VOLUME 6, 2018 2169-3536 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. 25921

Upload: others

Post on 20-Oct-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Variational Mannequin Approximation Using Spheres and …

Received March 25, 2018, accepted May 3, 2018, date of publication May 15, 2018, date of current version June 5, 2018.

Digital Object Identifier 10.1109/ACCESS.2018.2837013

Variational Mannequin ApproximationUsing Spheres and CapsulesNANNAN WU1, DONGLIANG ZHANG2, ZHIGANG DENG3,4, (Senior Member, IEEE),AND XIAOGANG JIN 1, (Member, IEEE)1State Key Laboratory of CAD&CG, Zhejiang University, Hangzhou 310058, China2International Design Institute, Zhejiang University, Hangzhou 310058, China3Virtual Reality and Interactive Technique Institute, East China Jiaotong University, Nanchang 330013, China4Computer Science Department, University of Houston, Houston, TX 77004, USA

Corresponding author: Xiaogang Jin ([email protected])

The work of D. Zhang was supported by the National Natural Science Foundation of China under Grant 61472355. The work of X. Jin wassupported in part by the National Natural Science Foundation of China under Grant 61732015, in part by the National Key Research andDevelopment Program of China under Grant 2017YFB1002600, and in part by the Key Research and Development Program of ZhejiangProvince under Grant 2018C01090.

ABSTRACT We present a method to approximate a mannequin represented as a triangle/quadrangle meshusing spheres and capsules. We formulate this 3-D approximation problem as a 2-D one, which increases itsefficiency by one or even two orders of magnitude. Our algorithm first extracts cross sections from a givenmannequin, approximates each cross section with circles using a variant of iterative Lloyd clustering, andfinally generates capsules based on the circle sets. Compared with previous methods, our method is muchfaster and is able to get a tighter result with a given number of primitives. Our method can be directly appliedto cloth-body collision handling in real-time cloth animation, and the simulation results by our approach arevisually plausible.

INDEX TERMS Approximation, real-time cloth animation, spheres and capsules, variational.

I. INTRODUCTIONApproximating a 3D object using a set of simple geometricprimitives is of great importance in shape analysis, colli-sion detection, and shadowing. Geometric primitives includespheres, ellipsoids, axis-aligned bounding boxes (AABBs),oriented bounding boxes (OBBs), discrete oriented polytopes(k-DOPs), and so on. Among all the primitives, sphere is thesimplest one; thus, it has been widely employed in computergraphics community. A capsule consisting of two spheresis also simple and efficient in collision detection. Becauseof this, both of two well-known, open-source physics-basedengines, Bullet and PhysX, require a character to be repre-sented by spheres and/or capsules in cloth simulation in orderto provide real-time performance. However, such a represen-tation is created manually in these engines. Therefore, there isa clear need to develop an automatic method to approximatea given mannequin using spheres and capsules as primitives.

Recently, Thiery et al. [1] proposed the Sphere-Meshesrepresentation which is the linear interpolation of spheresalong edges and triangles. While this method can handlea wide variety of models, the approximation error is largewhen the number of primitives is small, e.g., fewer than 300.

Moreover, it cannot guarantee a symmetric approximation fora symmetric input mannequin.

In this paper, based on the key insight that a human bodycan be divided into six parts: left/right arm, left/right leg,head and torso, and that the shape of each part is similarto a capsule, we propose a novel variational approxima-tion algorithm to represent a mannequin by spheres andcapsules. By employing the semantic information of the inputmannequin, our method can generate a tighter and moresymmetric result while keeping the number of primitivessmall. Based on the anthropometric characteristics of thehuman body, we turn such a 3D approximation problem intoa 2D one, which significantly increases the efficiency ofthe approximation (i.e., two orders of magnitude faster thanexisting methods in our experiments).

Figure 1 shows the framework of our approach. It consistsof four steps: (i) Extract cross sections for each body partbased on anthropometric characteristics of the human body.Each cross section is represented as a polygon which servesas a feature polygon of the input mannequin (see Figure 2).(ii) Approximate a feature polygon with circles using avariant of iterative Lloyd clustering. (iii) Generate capsules

VOLUME 6, 20182169-3536 2018 IEEE. Translations and content mining are permitted for academic research only.

Personal use is also permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

25921

Page 2: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

FIGURE 1. The pipeline of our method: Given a mannequin, we first extract cross sections (feature polygons) from each body part. Then, we use avariational scheme to approximate these polygonal sections with circles. After that, we generate spheres, spheres/capsules in turn for the mannequin,and obtain the final result by adjusting their centers and radii.

FIGURE 2. Feature polygons extraction and approximation: (a) some landmark points of a mannequin used in our algorithm, (b) twenty featurepolygons of a mannequin, (c) and the approximation result of the waist polygon using six circles. The colored dotted lines outside the waist polygon(black) are the boundaries of the circles, and the colored dots inside the waist polygon are the centers of the circles.

based on the approximation results from (ii); (iv) Adjust thecenters and/or radii of some spheres to completely cover themannequin. Step (i) and step (ii) are the key steps to transformthe 3D approximation problem to a 2D one. In a nutshell,our algorithm of approximating a feature polygon is a kind ofvariational approximation methods, where the primitives arecircles, and the error metric is the outside area (i.e., the areainside the circle set but outside the polygon).

For a given number of primitives, our method is both fasterand tighter than previous methods, and the result by ourapproach can be directly used in physics-based engines suchas Bullet and PhysX for cloth-body collision handling. Ourapproach has two major technical contributions:

• a novel method to turn the 3D approximation probleminto a 2D one by extracting feature polygons from amannequin; and

• a variational method to approximate a feature polygonwith circles with a user-specified error threshold, usingan error metric that measures the area inside the circleset but outside the polygon.

II. RELATED WORKA. SHAPE APPROXIMATIONA large amount of research works have been conducted onshape approximation. These works can be categorized by theapproximation primitives: spheres [2]–[4], ellipsoids [5]–[7],

25922 VOLUME 6, 2018

Page 3: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

axis-aligned bounding boxes (AABBs) [8], oriented boundingboxes (OBBs) [9], [10], discrete oriented polytopes(k-DOPs) [11], planar elements [12], swept spherevolumes [13], surfels [14], and a mixed set of the aboveprimitives [1], [15].

Variational approximationmethods [3], [6], [12], [15], [16]play an important role in shape approximation. A typicalvariational approximation framework consists of three stages:(i) a partitioning stage usually segments an object into someregions using a variant of Lloyd clustering; (ii) a fitting stagefits geometric primitives to each region, and (iii) a teleporta-tion stage is triggered when the algorithm gets stuck in a localminimum, for example, it deletes a certain primitive and theninserts a new one accordingly.

The difference among variational methods mainly liesin the geometric primitives used to approximate each regionand the error metric to guide the partitioning and fittingstages. The original variational shape approximation [12]uses planar elements as geometric primitives, and furtherwork [15] extends to spheres, circular cylinders, and rollingball blending surfaces. Both of them use an integrated surfacedistance as the error metric. The variational sphere setapproximation [3] uses spheres as primitives and the outsidevolume as the error metric, and it is able to obtain a tighterapproximation.

Thiery et al. [1] proposed an approximationmethod guidedby spherical quadric error metrics. The resulting Sphere-Meshes representation is a linear interpolation of spheresalong edges and triangles, which can be viewed as an approx-imation using spheres, truncated cones, and prisms as prim-itives. Technically, our approximation result can be viewedas a Sphere-Mesh without prisms, which is designed for real-time virtual try-on. Recently, Calderon and Boubekeur [17]proposed a shape approximation method based on an asym-metric morphological closing. Their output is a boundingpolygon mesh. It is noteworthy that our method can alsobound the input mannequin.

Other works also use the ellipsoid [6] or generalquadric [16] as geometric primitives. Khoury et al. [18] usecapsules to approximate humanoid robots. However, theyonly use one capsule to approximate each body part, andthe capsule is required to be composed of two spheres ofthe same size. Their goal is to minimize the volume of thecapsule while the capsule covers the body part. As a result,the accuracy of their method is limited. Since the body partsare segmented in advance, their method is essentially thefitting stage of variational approximation.

B. ACCELERATION STRUCTURES FORCOLLISION DETECTIONCollision detection is one of the most time-consuming partsin many computer graphic applications. To accelerate colli-sion detection, researchers have developed various accelera-tion data structures including bounding-volume hierarchies,distance fields, and other spatial partitioning methods [19].For a deforming character, its spatial data structures have

to be updated when a character deforms. Although distancefield-based approaches can get a high performance for a staticobject, it is time consuming to compute the dynamic distancefield for a dynamic object. Different from them, our methodcan be updated through skinning in a fast way, and thereforeit could deal with a dynamic mannequin for real time virtualtry-on applications.

III. SPHERE AND CAPSULE SET APPROXIMATIONIn this section, we describe our algorithm in detail.After presenting the feature polygon extraction algorithmin Section III-A, we approximate the obtained feature poly-gons with circles in Section III-B. Based on the 2D approxi-mation, we can generate a 3D approximation in Sections III-Cand III-D. After that, we describe the refinement partin Section III-E.

A. EXTRACTING FEATURE POLYGONSA feature polygon is the boundary of a cross section of a bodypart. To extract feature polygons, we first calculate landmarkpoints of the input mannequin including the points nearbycrotch, wrists, and elbows. This can be done automaticallyusing the method in [20]. Then, we extract cross sectionsthat go through the landmark points and are perpendicularto the corresponding bone’s direction. This part takes abouttwo-thirds of the total computation time. Figure 2(a) showstypical feature points of a mannequin, Figure 2(b) shows thecorresponding feature polygons, and Figure 2(c) shows theapproximation result of the waist polygon.

B. APPROXIMATING FEATURE POLYGONSA feature polygon can be approximated by a set of circlesusing a variational approximation method (Figure 2(c)).We first define an error metric called Circle OutsideArea (COA), which represents the area inside the circle set butoutside the polygon (Figure 3), similar to SOV in [3]. Then,we minimize this error using a variant of iterative Lloyd clus-tering. All feature polygons are approximated independently.Note that with COA as the error metric, the approximationbecomes a smallest circle problemwhen the number of circlesequals 1, which can be solved efficiently [21].

1) CALCULATING COAThe COA error of a circle Ci is defined as:

Err(P,Ci) = A(E,Ci), (1)

where E is the edge set of the polygon P, and A is the areainside the circle Ci but outside the polygon P. The totaloutside area of the entire circle set thus is defined as:

Err(P,C) =nc∑i=1

Err(P,Ci) =nc∑i=1

A(E,Ci), (2)

where nc is the number of circles, and Ci is the i-th circle.We calculate the COA of Ci edge by edge. If an edge ek

is entirely or partially inside Ci, then there exists an area

VOLUME 6, 2018 25923

Page 4: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

FIGURE 3. The computation of COA. (a) The circle center is inside thepolygon, the COEAs of e0 and e2 are positive, the COEA of e1 is negative.(b) The circle center is outside the polygon. Calculating Eq. 4 will resultin the green part.

between the circumference of Ci and ek , we call it CircleOutside Edge Area (COEA) and denote it by A(ek ,Ci). Thenthe total COA is calculated by adding or subtracting theseCOEAs over all the edges of P.

a: COMPUTING COEALet p0 and p1 be the two vertices of the edge ek . If both ppp0and ppp1 are inside Ci, then the COEA is defined as:

A(ek ,Ci) = Asec(ek ,Ci)− Atri(ek ,oooi), (3)

where Asec(ek ,Ci) is the area of the sector formed by the edgeek and Ci’s center oooi; Atri(ek ,oooi) is the area of the triangleformed by the Ci’s center oooi, ppp0, and ppp1.If any of ppp0 and ppp1 is outside Ci, then the part of ek inside

Ci (denoted as ek ) is used to calculate COEA using Eq. 3.If ek does not exist, which means ek is completely outside Ci,then the COEA of the edge ek is 0.

b: ACCUMULATING COEA INTO COAThe sign of each COEA is determined by two factors: whetherthe circle center is inside or outside the polygon, and whetherthe circle center is behind or in front of the edge (accordingto the edge’s outward normal direction).

i) THE CIRCLE CENTER INSIDE THE POLYGONCOEA is positive if the circle center is behind the edge,and negative otherwise. Then, the COA of circle Ci can becomputed as:

Ain(E,Ci) =ne∑k=1

SGN (nnnk · (pppk0 − oooi)) · A(ek ,Ci), (4)

where ne is the number of the edges of the polygon, ek is thek-th edge, nnnk is the outward normal of ek , pppk0 is one of theendpoints of ek , and oooi is the center of the circle Ci. SGN isa sign function that returns 1 if the argument is positive, −1otherwise.

ii) THE CIRCLE CENTER OUTSIDE THE POLYGONWe first calculate the complementary area of COA(Figure 3(b)) using Eq. 4, which is negative in this case.Adding the total circle area to the complementary area resultsin the following COA:

Aout (E,Ci) = πr2 + Ain(E,Ci). (5)

As shown in Figure 3, the blue part is the COA, the greenpart is the complementary area of COA, which is calculatedby Eq. 4.We have also experimented the Hausdorff Distance as the

error metric. For a circle C , the Hausdorff Distance error isdefined between the circle part outside the polygon P and thepolygon part inside the circle C . However, we found that itcosted more time and the result was not as good as the circleoutside area.

2) MINIMIZING COAWe use a variant of iterative Lloyd clustering algorithm [22]to minimize Eq. 2. It consists of four steps: initialization,partitioning, fitting, and teleportation. With our strategy,we calculate several local minimums and then choose the bestone as the final result.Initialization. A polygon is discretized into two types of

points: boundary points and interior points. We use thevertices of the polygon as boundary points and generateinterior points using a scan conversion algorithm [23].

We choose nc points that are evenly distributed on thelongest diagonal of the polygon as the circle centers basedon the observation that the resulting circle centers are alwaysnearby the longest diagonal of the polygonP after the approx-imation process. We set all the circle radii as 0.Partitioning. When a point p is assigned to a circle C ,

C’s radius will be enlarged to include p, and thus the COAof C will increase accordingly. We assign p to Ci that has theminimal increased COA.

To decide the order of points to be assigned, we calculatethe distances from point p to each circle center, and theminimal distance is called the distance value of p. The pointswith smaller distance values will be assigned first. We havealso experimented the flood fill (stack-based) algorithm [3]to order the points, but the result is not as good as the methodwe employ.Fitting. After the partitioning, each circle is assigned to a

set of points. Then, the center and radius of each circle areupdated to best fit the points assigned to it.Weminimize Eq. 1using the multidimensional direction set method [24]:

argmino,r

Err(P,Ci), (6)

where o is the center of circle C , and the radius r must belarge enough to include all the assigned points.Teleportation. Like other variational approximation algo-

rithms, our method cannot guarantee the global optimalresult. When the algorithm gets stuck in a local minimum,a teleportation step is triggered to find another local

25924 VOLUME 6, 2018

Page 5: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

minimum. If several consecutive local minimums do notimprove the result sufficiently, the approximating processterminates and the best local minimum is accepted as the finalresult.

If several consecutive partitioning and fitting iterationsdid not improve the result significantly, then the algorithmwould get stuck in a local minimum (possibly a globalminimum) and teleportation is triggered. The circle Co withthe maximum overlap ratio is marked and will be deleted, andthe circle Ce with the maximum COA is split into two circlesC0e and C1

e . The overlap ratio of a circle C is defined as theratio of COA shared with at least one of other circles to thetotal area of C . The initial centers of C0

e and C1e are randomly

chosen from interior points ofCi, and another partitioning andfitting iteration is then conducted.

C. GENERATING SPHERES AND CAPSULESThe capsule here means a volume formed by two spheres,and the radii of the spheres are not necessarily the same.Generating spheres: For each circle, we generate a spherewith the same radius and center. Generating capsules: Wedivide the mannequin into five parts: left arm, right arm,left leg, right leg, and torso, and each part will be processedindependently. For each body part, we iteratively choose twoadjacent feature polygons denoted as L1 and L2, then for eachsphere Ci from L1 and Cj from L2, a capsule formed by Ciand Cj is generated. After all the capsules are generated,we eliminate those capsules that are completely covered byother capsules.

For most applications, the head can be approximated withone sphere, which is a minimally-enclosing sphere problem.The same method can be used for hands and feet.

D. ADJUSTING CENTERS/RADII OF SPHERESThe sphere/capsule set calculated from Section 3.3 usuallycannot completely cover the mannequin. Therefore, we needto adjust the centers and/or radii of some spheres. We firstcalculate a point that is outside the sphere/capsule set, andassign it to the nearest sphere or capsule.

If an outside point p is assigned to a sphere S, then weincrease the radius of S by D/2, and move the center towardsp by D/2, where D is the distance from p to S (see Figure 4).

FIGURE 4. Adjust a sphere to include a new point (2D).

If an outside point p is assigned to capsule J , then weenlarge the radii of the two spheres of J by D/2, and movethe centers of the two spheres toward the direction that points

to p and is perpendicular to the axis of J by D/2, where D isthe distance from p to J (see Figure 5).

FIGURE 5. Adjust a capsule to include a new point (2D). The trapezoid isthe cross section of the circular truncated cone part of the capsule.

As shown in Figures 4 and 5, the ordinal sphere/capsule iscompletely inside the new sphere/capsule. This means thatthe points inside the original sphere/capsule will also beinside the new sphere/capsule.

E. REFINEMENTSWe can further refine the approximation as follows.

1) SPLITTING THE HIP POLYGON INTO THREE PARTSWe split a hip polygon into three parts: left buttock polyline,right buttock polyline, and center butt polyline (see Figure 6).Each part will be approximated independently. Althoughsample points for the partitioning step are generated from thenew polygon, we still calculate the COA of a circle using theoriginal feature polygon.

FIGURE 6. Top view of the splitting result of the hip polygon. A, B and Care local valley points.

2) SPLITTING THE BUST POLYGON INTO THREE PARTSAs for a female mannequin, two breasts can be representedby two spheres. To do so, we split the bust polygon intothree parts: left breast polyline, right breast polyline, and therest (see Figure 7), and use one circle to approximate eachpart.

To decide the gender of the mannequin, we calculate theratio of the height of the breast and the width of the chest.If the ratio is larger than a threshold (we use 0.04 in ourexperiments), we consider the mannequin as female, and splitthe bust polygon as described above.

VOLUME 6, 2018 25925

Page 6: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

FIGURE 7. Top view of the splitting result of the bust polygon. A, B and Care local valley points.

IV. APPLICATIONS AND RESULTSA. APPLICATIONSLike the sphere set from [3], our sphere/capsule set can alsobe used for proximity query, generating soft shadows, etc.It is obvious that out sphere/capsule set is smoother than thesphere set [3], and thus can be directly used for cloth-bodycollision detection in cloth simulation.

While animating other approximations [12], [16] might becomplex, it is quite straightforward for our sphere + capsuleset. We first calculate the mean value coordinates [3], [25]of each sphere center in the rest pose. During the animation,the centers of spheres are updated using a linear combinationof the positions of the deformed vertices of the mannequin’sskin.

In [26], animated mesh sequences are approximated byanimated sphere-meshes, which are meshes indexing theanimated sphere set. However, this method may not workwhen the animated mesh sequence does not exist,, e.g. real-time virtual try-on applications.

B. RESULTSWe implemented our approach in C++ and reported itsperformances on an off-the-shelf computer with Intel Corei7-7700 CPU 4.20GHz and 16GB memory.

To the best of our knowledge, there is no existingmethod toapproximate a solid object using both spheres and capsules asprimitives. Themost relevant one is Sphere-Meshes [1] whichis a linear interpolation of spheres along edges and triangles.Therefore, we compared our method with it, based on visualand geometric errors, performance, and applications in clothsimulation. Note that we do not approximate hands, feet andthe head of the mannequin, since these parts typically are notused in virtual try-on applications.

1) VISUAL AND GEOMETRIC ERRORSGeometric errors are measured by the relative outside volumeEr , i.e., the ratio of the volume outside (inside) the originalmodel but inside (outside) the sphere/capsule set, and EM ,i.e., mean distance from the original model to the approx-imation. Similar to [1], EM is expressed as the percentage

of the bounding box of the input mannequin. The orig-inal mannequin Mo consists of 45k vertices and 64k faces.We deleted the hands, feet and head of the original mannequinto generate a new mannequin Mn. Both our method andSphere-Meshes useMo as input.

We take a capsule as 3 primitives, 2 spheres and 1 trun-cated cone. For Sphere-Meshes [1], each interpolated edgecorresponds to a capsule and thus 3 primitives, and eachinterpolated triangle corresponds to three capsules and onetriangle for the outer crusts of the interpolation and thus8 primitives. Figure 8 compares our approximation with theSphere-Meshes representation using three different numbersof primitives: np = 32, np = 64, and np = 128. From thefigure we can see that, the computation time of our methodis much less than that of the Sphere-Meshes method, and ourresult is more symmetric and tighter. The main reason is thatby utilizing the semantic information of the input mannequin,our method can put spheres at the most appropriate positions.

Figure 9 illustrates Er as a function of np. We can seethat our results are more accurate with a given number ofprimitives. Although the curves of our method are close tothose of Sphere-Meshes after np is larger than 150, bothcurves are flatten out. This means that, to obtain a certainerror, the number of primitives required for Sphere-Meshesis much larger than our method.

There are two ways to improve our result: (1) Increase thenumber of circles for each feature polygon, and (2) add morefeature polygons (although this will result in more circles).Generally, when a feature polygon Lnew is newly added, morecircles are needed for the feature polygons adjacent to Lnewand for Lnew itself.

2) PERFORMANCETable 1 shows the computation time t with respect to thenumber of primitives np. We can find that our method is morethan two orders of magnitude faster than Sphere-Meshes.Sphere-Meshes is a bottom-up decimation algorithm, whichmeans the smaller the desired number of primitives, the moretime it costs. As shown in column one, to obtain an approx-imation of 22 primitives, our method is more than 200 timesfaster than Sphere-Meshes. As a result, our method is moresuitable for real-time applications than the Sphere-Meshesmethod.

Figure 10 shows the time ratio t as a function of thenumber of faces nf of the mannequin. Each mannequin isapproximated with 64 primitives. We can see that the relativeperformance of our method increases even further when thenumber of the faces of the mannequin increases. Therefore,our method is more appropriate to approximate high resolu-tion mannequins.

3) CLOTH SIMULATIONa: DRAPING SIMULATIONFigure 11 shows a draping simulation result using our sphere/capsule set approximation method. The female mannequinis approximated by 64 primitives. The dress consists of 8k

25926 VOLUME 6, 2018

Page 7: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

FIGURE 8. Sphere/capsule set comparison with Sphere-Meshes.

FIGURE 9. Plottings of Er vs. np (a), and EM vs. np (b).

TABLE 1. Computation time vs. number of primitives (our method / Sphere-Meshes).

vertices and 14k faces. In this example, we only take thesphere/capsule set (not rendered) as a collision handling datastructure.

b: REAL-TIME CLOTH ANIMATIONCollision handling is the most time-consuming processin cloth simulation. Many prior works [19], [27] have been

VOLUME 6, 2018 25927

Page 8: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

FIGURE 10. The time ratio between Sphere-Meshes and our method withrespect to the number of faces of the mannequin. tSphere−Meshesand tours are the computational times for Sphere-Meshes and ourmethod, respectively.

FIGURE 11. Draping simulation using our approximation algorithm.(a) front view. (b) left view. (c) back view.

done in this area. However, all of them have to re-computea spatial data structure (e.g., bounding-volume hierarchies,distance fields, etc.) for acceleration when the character isdeformed. The re-computing process will consume a lot oftime, which is usually unacceptable for real-time cloth anima-tion. Fortunately, the time cost of updating our sphere/capsuleset is negligible in our approach: we first calculate the meanvalue coordinate [28] of each sphere center in the character’srest pose, and then update them using a linear combination ofthe deformed positions of the mannequin skin vertices.

We used position based dynamics [29], which is a popularmethod to simulate fluid [30], cloth, etc., to perform physicalsimulation. The mannequin was rigged by a dual quaternionlinear blending skinning [31]–[33]. The motion data wasextracted from CMU motion capture data [34] or capturedby Kinect v2.0. We used the method in [35] to define theskinning weights of a given character’s mesh with respectto its skeleton. Unlike previous data-driven methods [32],[36]–[39], our algorithm can perform in real time withoutany pre-computation except for generating sphere/capsule setapproximation. In our experiments, the dress consists of 8kvertices and 14k faces, the mannequin consists of 7k verticesand 13k faces, and the frame per second (fps) can be up to 55.In the future, we plan to add hair to the mannequin [40], [41]

to obtain more realistic results. Please see the supplementaldemo video for animation details.

V. CONCLUSION AND FUTURE WORKIn this paper, we present a novel algorithm to approximate amannequin using a mixed set of spheres and capsules. Ourmethod turns a 3D approximation problem into a 2D one,which increases the performance by two orders of magnitude.With the same number of primitives, our method is faster andmore accurate than previous methods. When the user usesphysics-based engines such as Bullet and PhysX engines,our result can be directly used for real-time cloth anima-tion because we employ a simplified cloth-body collisionhandling algorithm. Our experimental results demonstrate theeffectiveness and efficiency of our approach. Although ourmethod is tailored to generate a sphere/ capsule set approxi-mation for a mannequin, we believe that it can also be usedto approximate other articulated characters when their featurepolygons can be calculated.

Our current approach has the following limitations: First,as the sphere/ capsule set is larger than the mannequin,our algorithm may bring errors. Second, for a mannequin,the regions around shoulders are difficult to be approximatedaccurately because of their special shapes. In the future,we plan to solve this issue by adding certain special featurepolygons perpendicular to each shoulder’s direction.

ACKNOWLEDGMENTNannan Wu would like to thank Liang Guo from ZhejiangUniversity for his great help in debuging the code. NannanWu also wants to thank Chunji Yin and Han Liu, both fromZhejiang University, for their valuable discussion about theimplementation of the Sphere-Meshes method [1].

REFERENCES[1] J.-M. Thiery, É. Guy, and T. Boubekeur, ‘‘Sphere-meshes: Shape approxi-

mation using spherical quadric error metrics,’’ACMTrans. Graph., vol. 32,no. 6, 2013, Art. no. 178.

[2] G. Bradshaw and C. O’Sullivan, ‘‘Adaptive medial-axis approximation forsphere-tree construction,’’ ACM Trans. Graph., vol. 23, no. 1, pp. 1–26,Jan. 2004.

[3] R. Wang et al., ‘‘Variational sphere set approximation for solid objects,’’Vis. Comput., vol. 22, nos. 9–11, pp. 612–621, 2006.

[4] S. Stolpner, P. Kry, and K. Siddiqi, ‘‘Medial spheres for shape approx-imation,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 34, no. 6,pp. 1234–1240, Jun. 2012.

[5] S. Bischoff and L. Kobbelt, ‘‘Ellipsoid decomposition of 3D-models,’’in Proc. 1st Int. Symp. 3D Data Process. Vis. Transmiss., 2002,pp. 480–488.

[6] L. Lu, Y.-K. Choi, W. Wang, and M.-S. Kim, ‘‘Variational 3D shapesegmentation for bounding volume computation, ’’ Comput. Graph.Forum, vol. 26, no. 3, pp. 329–338, 2007.

[7] Y. Meng, P. Y. Mok, and X. Jin, ‘‘Interactive virtual try-on clothing designsystems,’’ Comput.-Aided Des., vol. 42, no. 4, pp. 310–321, 2010.

[8] G. van den Bergen, ‘‘Efficient collision detection of complex deformablemodels using AABB trees,’’ J. Graph. Tools, vol. 2, no. 4, pp. 1–13, 1997.

[9] S. Gottschalk, M. C. Lin, and D. Manocha, ‘‘OBBTree: A hierarchicalstructure for rapid interference detection,’’ in Proc. 23rd Annu. Conf.Comput. Graph. Interact. Techn., 1996, pp. 171–180.

[10] S. Krishnan, A. Pattekar, and M. C. Lin, ‘‘Spherical shell: A higher orderbounding volume for fast proximity queries,’’ in Proc. 3rd Workshop Algo-rithmic Found. Robot. Robot., Algorithmic Perspective, 1997, pp. 177–190.

25928 VOLUME 6, 2018

Page 9: Variational Mannequin Approximation Using Spheres and …

N. Wu et al.: Variational Mannequin Approximation Using Spheres and Capsules

[11] J. T. Klosowski, M. Held, J. S. B. Mitchell, H. Sowizral, and K. Zikan,‘‘Efficient collision detection using bounding volume hierarchies ofk-DOPs,’’ IEEE Trans. Vis. Comput. Graphics, vol. 4, no. 1, pp. 21–36,Jan. 1998.

[12] D. Cohen-Steiner, P. Alliez, and M. Desbrun, ‘‘Variational shape approxi-mation,’’ ACM Trans. Graph., vol. 23, no. 3, pp. 905–914, 2004.

[13] M. Bae, J. Kim, and Y. J. Kim, ‘‘User-guided volumetric approximationusing swept sphere volumes for physically based animation,’’ Comput.Animation Virtual Worlds, vol. 23, nos. 3–4, pp. 385–394, 2012.

[14] Y. Fan, Y. Huang, K. Cai, F. Yan, and J. Peng, ‘‘Surfel set simpli-fication with optimized feature preservation,’’ IEEE Access, vol. 4,pp. 10258–10269, 2016.

[15] J. W. L. Kobbelt, ‘‘Structure recovery via hybrid variational surfaceapproximation,’’ Comput. Graph. Forum, vol. 24, no. 3, pp. 277–284,2005.

[16] D.-M. Yan, Y. Liu, and W. Wang, ‘‘Quadric surface extraction by varia-tional shape approximation,’’ in Proc. 4th Int. Conf. Geometric ModelingProcess. (GMP). Berlin, Germany: Springer, 2006, pp. 73–86.

[17] S. Calderon and T. Boubekeur, ‘‘Bounding proxies for shape approxima-tion,’’ ACM Trans. Graph., vol. 36, no. 4, Jul. 2017, Art. no. 57.

[18] A. E. Khoury, F. Lamiraux, and M. Taïx, ‘‘Optimal motion planning forhumanoid robots,’’ in Proc. IEEE Int. Conf. Robot. Automat., May 2013,pp. 3136–3141.

[19] M. Teschner et al., ‘‘Collision detection for deformable objects,’’ Comput.Graph. Forum, vol. 24, no. 1, pp. 61–81, 2005.

[20] C. C. L. Wang, ‘‘Parameterization and parametric design of mannequins,’’Comput.-Aided Des., vol. 37, no. 1, pp. 83–98, 2005.

[21] E. Welzl, ‘‘Smallest enclosing disks (balls and ellipsoids),’’ New Resultsand New Trends in Computer Science. Berlin, Germany: Springer, 1991.

[22] S. Lloyd, ‘‘Least squares quantization in PCM,’’ IEEE Trans. Inf. Theory,vol. 28, no. 2, pp. 129–137, Mar. 2006.

[23] A. Kaufman, ‘‘An algorithm for 3d scan-conversion of polygons,’’ in Proc.Eurograph. Conf., 1987, pp. 197–208.

[24] W. H. Press, Numerical Recipes: The Art of Scientific Computing, 3rd ed.Cambridge, U.K.: Cambridge Univ. Press, 2007.

[25] J.-M. Thiery, J. Tierny, and T. Boubekeur, ‘‘Jacobians and hessians of meanvalue coordinates for closed triangular meshes,’’ Vis. Comput., vol. 30,no. 9, pp. 981–995, 2014.

[26] J.-M. Thiery, É. Guy, T. Boubekeur, and E. Eisemann, ‘‘Animated meshapproximation with sphere-meshes,’’ ACM Trans. Graph., vol. 35, no. 3,2016, Art. no. 30.

[27] J. Mezger, S. Kimmerle, and O. Etzmuß, ‘‘Hierarchical techniquesin collision detection for cloth animation,’’ J. WSCG, vol. 11, nos. 1–3,pp. 1–8, 2003.

[28] T. Ju, S. Schaefer, and J. Warren, ‘‘Mean value coordinates for closedtriangular meshes,’’ ACM Trans. Graph., vol. 24, no. 3, pp. 561–566,Jul. 2005.

[29] M. Müller, B. Heidelberger, M. Hennix, and J. Ratcliff, ‘‘Position baseddynamics,’’ J. Vis. Commun. Image Represent., vol. 18, no. 2, pp. 109–118,2007.

[30] X. Shao, E. Liao, and F. Zhang, ‘‘Improving SPH fluid simulation usingposition based dynamics,’’ IEEE Access, vol. 5, pp. 13901–13908, 2017.

[31] L. Kavan, S. Collins, and J. žára, and C. O’Sullivan, ‘‘Geometric skinningwith approximate dual quaternion blending,’’ ACM Trans. Graph., vol. 27,no. 4, 2008, Art. no. 105.

[32] W. Xu, N. Umentani, Q. Chao, J. Mao, X. Jin, and X. Tong, ‘‘Sensitivity-optimized rigging for example-based real-time clothing synthesis,’’ ACMTrans. Graph., vol. 33, no. 4, Jul. 2014, Art. no. 107.

[33] J. Baek, H. Jeon, G. Kim, and S. Han, ‘‘Visualizing quaternion multiplica-tion,’’ IEEE Access, vol. 5, pp. 8948–8955, 2017.

[34] CMU. (2003). CMU Graphics Lab Motion Capture Database. Accessed:Jan. 1, 2017. [Online]. Available: http://mocap.cs.cmu.edu

[35] I. Baran and J. Popović, ‘‘Automatic rigging and animation of 3D charac-ters,’’ ACM Trans. Graph., vol. 26, no. 3, Jul. 2007, Art. no. 72.

[36] F. Hahn et al., ‘‘Subspace clothing simulation using adaptive bases,’’ ACMTrans. Graph., vol. 33, no. 4, 2014, Art. no. 105.

[37] D. Kim, W. Koh, R. Narain, K. Fatahalian, A. Treuille, and J. F. O’Brien,‘‘Near-exhaustive precomputation of secondary cloth effects,’’ACMTrans.Graph., vol. 32, no. 4, 2013, Art. no. 87.

[38] Y. A. Sekhavat, ‘‘Privacy preserving cloth try-on using mobile augmentedreality,’’ IEEE Trans. Multimedia, vol. 19, no. 5, pp. 1041–1049,May 2017.

[39] H. Wang, F. Hecht, R. Ramamoorthi, and J. F. O’Brien, ‘‘Example-basedwrinkle synthesis for clothing animation,’’ ACM Trans. Graph., vol. 29,no. 4, Jul. 2010, Art. no. 107.

[40] Y. Bao and Y. Qi, ‘‘A survey of image-based techniques for hair modeling,’’IEEE Access, vol. 6, pp. 18670–18684, 2018.

[41] Y. Bao and Y. Qi, ‘‘An image-based hair modeling and dynamic simulationmethod,’’ IEEE Access, vol. 5, pp. 12533–12544, 2017.

NANNAN WU received the B.Sc. degreein computer science from the Nanjing Universityof Science and Technology, China, in 2013. He iscurrently pursuing the Ph.D. degree with the StateKey Laboratory of CAD&CG, Zhejiang Univer-sity. His main research interests include clothsimulation, virtual try on, and computer animation.

DONGLIANG ZHANG received the B.Sc. andM.Sc. degrees from Zhejiang University and thePh.D. degree from The Hong Kong Universityof Science and Technology. He is currently aProfessor with the International Design Insti-tute, Zhejiang University, China. His researchinterests include computer-aided design, computergraphics, interaction design, and robotics.

ZHIGANG DENG (SM’11) received the B.S.degree in mathematics from Xiamen University,China, the M.S. degree in computer science fromPeking University, China, and the Ph.D. degreein computer science from the Department ofComputer Science, University of Southern Cali-fornia, in 2006. He is currently a Full Professorof computer science with the University ofHouston (UH) and the Founding Director of theUH Computer Graphics and the Interactive Media

Laboratory. His research interests include computer graphics, computeranimation, virtual human modeling and animation, and human–computerinteraction. He is a Senior Member of the ACM. He was a recipient of anumber of awards, including the ACM ICMI Ten Year Technical ImpactAward, the UH Teaching Excellence Award, the Google Faculty ResearchAward, the UHCS Faculty Academic Excellence Award, and the NSFCOverseas and Hong Kong/Macau Young Scholars Collaborative ResearchAward. He was the CASA 2014 Conference General Co-Chair and theSCA 2015 Conference General Co-Chair. He currently serves as an Asso-ciate Editor for several journals, including Computer Graphics Forum andComputer Animation and Virtual Worlds journal.

XIAOGANG JIN (M’14) received the B.Sc.degree in computer science and the M.Sc. andPh.D. degrees in applied mathematics fromZhejiang University, China, in 1989, 1992, and1995, respectively. He is currently a Professor withthe State Key Laboratory of CAD&CG, ZhejiangUniversity. His current research interests includetraffic simulation, insect swarm simulation, phys-ically based animation, cloth animation, specialeffects simulation, implicit surface computing,

non-photorealistic rendering, computer generated marbling, and digitalgeometry processing. He is a member of the ACM. He received the ACMRecognition of Service Award in 2015 and the Best Paper Award fromCASA 2017.

VOLUME 6, 2018 25929