Jin Y, Qian GP, Zhao JY et al. Stretch-minimizing volumetric parameterization. JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY 30(3): 553–564 May 2015. DOI 10.1007/s11390-015-1545-y
Stretch-Minimizing Volumetric Parameterization
7
a8²
ë#
~ ï)
Yao Jin 1 ( ), Gui-Ping Qian 2 ( ), Jie-Yi Zhao 1 ( ), Jian Chang 3 ( 1,∗ ), Member, CCF, ACM, and Jianjun Zhang 3 ( ) Ruo-Feng Tong (
Öe¹
Üï
1
Department of Computer Science and Engineering, Zhejiang University, Hangzhou 310027, China
2
College of New Media, Zhejiang University of Media and Communications, Hangzhou 310018, China
3
National Centre for Computer Animation, Bournemouth University, Bournemouth, BH12 5BB, U.K.
E-mail: {fool1025, qianguiping}@163.com;
[email protected];
[email protected];
[email protected] E-mail:
[email protected] Received December 1, 2014; revised March 11, 2015. Abstract Not many methods for parameterization guarantee bijectivity or local injectivity, which is essential for foldoverfree mappings. Stretch-minimizing parameterization which is widely used for surface parameterization, provides foldover-free mappings and is capable of trading off between angle and area distortions. We extend its usage to volumetric parameterization in this paper by deriving a 3D version of stretch-distortion energy and incorporating fixed boundary conditions. Our energy definition includes a natural barrier term which effectively prevents elements from collapsing and folding over. It saves the effort in other methods of formulating additional energy or constrains to ensure the local injectivity. We propose to minimize the overall energy integrated over the whole mesh with a relaxation-enhanced solver and optimize the energy globally. This is different from the conventional approach of surface parameterization where mesh nodes are optimized individually. Compared with other volumetric parameterizations, our approach bears the advantages of stretch-minimizing method, being foldover-free and offering a good trade-off between angle and volume distortions. Keywords
1
stretch-minimizing, volumetric parameterization, foldover-free
Introduction
A number of geometry processing applications such as hexahedral meshing, detail transferring, and texture synthesis can be solved with the assistance of effective volumetric parameterization of a solid model. An ideal parameterization should satisfy the requirements of low distortions, alignment of constraints, and bijectivity (for texture mapping), which can be relaxed to local injectivity (for remeshing). Either the bijectivity or the local injectivity helps to ensure mapping free of foldover. Parameterization that is neither bijective nor local injective may cause difficult issues for simulation and post-processing.
Early work[1-6] has paid great efforts to resolve the first two criteria, low distortions and alignment of constraints. Few of them are able to produce bijective mappings or local injective (foldover-free) mappings. It is only recently that several papers have managed to incorporate foldover-free constraints. The foldoverfree criterion is often formulated as constraints of nonconvex inequalities in an optimization problem. Aigerman and Lipman[7] convexified the problem and projected simplicial maps onto a set of bounded distortion maps. Sch¨ uller et al.[8] proposed an interior point method which supports various kinds of distortion energy. Kovalsky et al.[9] presented a convex framework for controlling singular values of simplicial maps via
Regular Paper Special Section on Computational Visual Media This work was supported by the National Natural Science Foundation of China under Grant No. 61170141, the National High Technology Research and Development 863 Program of China under Grant No. 2013AA013903, the People Programme (Marie Curie Actions) of the European Union’s Seventh Framework Programme FP7/2007-2013/ under REA Grant Agreement n◦ [612627]-“AniNex”, and the Zhejiang Provincal Natural Science Foundation of China under Grant No. LY13F020036. ∗ Corresponding Author ©2015 Springer Science + Business Media, LLC & Science Press, China
554
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
semi-definite programming. Different methods need different optimization strategies and solvers, and all of them have to explicitly impose foldover-free constraints. Can we directly optimize certain distortion energy without imposing additional foldover-free constraints so that the energy can restrain the foldover while preserving other geometric measures like angles and volumes? Such type of energy exists and was used to solve 2D problems, e.g., MIPS (Most Isometric Parameterizations) energy[10] and stretch-distortion energy[11] . To the best of our knowledge, no such kind of energy has been adopted for 3D volumetric parameterization so far. Both MIPS and stretch-distortion energy have a term of reciprocal signed area which can be set as a barrier function to prevent mesh elements from foldover. Stretch-distortion energy is bounded with two norms on stretch or shear which can locally measure length distortions. It is then possible to offer a trade-off between angle and area distortions. In this paper, we derive the 3D version of stretch-distortion energy by following its definition on the 2D domain. We then apply it to volumetric parameterization. The energy is related to singular values of the Jacobian of simplicial maps. And it can be optimized globally with an improved Newtonlike solver (a relaxation-enhanced solver). The barrier item in our energy definition effectively prevents the appearance of folding elements and minimizes distortions. 2
Related Work
The mesh parameterization has been studied for many years. Although there is a large body of surface parameterization methods as highlighted in the survey paper of [1] and its listed references, not many methods have addressed the challenges in volumetric parameterization, and very few of them consider the foldover problem. The widely used harmonic maps in 2D have been adopted to help with constructing volumetric mappings. The harmonic mapping uses Dirichlet energy[12] which measures the smoothness of the mapping. Wang et al.[2] discretized the volumetric harmonic energy over tetrahedral mesh and used it for volumetric mapping. Li et al.[13-14] computed the harmonic volumetric mapping between solid models by using a meshless approach. The basic idea is to simulate an electrical charging system over sample points and use MFS (method of fundamental solutions) to compute the harmonic function. Li et al.[3] further considered feature
constraints in volumetric data and applied a multiple fundamental solutions system for fast computation. Xu et al.[15] recently used the similar framework to produce smoother parameterization but with a biharmonic model. Martin et al.[16] computed harmonic volumetric parameterization for cylindrical objects, which is used for trivariate spline construction. They extended their work in [16] and used midsurface in combination with harmonic functions to eliminate the degenerated elements[17] . However, the volumetric parameterization based on harmonic function has no guarantees on bijectivity. Xia et al.[18] used Green functions to parameterize star-shaped volumes and showed that the constructed map is bijective and smooth except at unique critical point. Xia et al.[19] also proposed an algorithm to decompose a volume into the direct product of a twodimensional (2D) surface and a one-dimensional (1D) curve and then trace the integral curve along the harmonic function. The mapping is claimed to be bijective. Paill´e and Poulin[6] generalized the Cauchy-Riemann equations to compute as-conformal-as-possible parameterization but the bijectivity and the convergence are also not guaranteed. Generalized barycentric coordinates with closedform expressions are a powerful and flexible interpolating tool to compute mappings[20-21] . Ju et al.[22] and Floater et al.[23] extended the mean-value coordinates from surface[20] to volume to compute the interpolation of volumetric data. Lipman et al.[24] proposed Green coordinates which led to mappings with shape-preserving property. However, these methods do not perform well for general solid models with complex shapes and cannot ensure the bijectivity. Following suit in 2D parameterization which derives distortion energy from the Jacobian of simplicial maps (also known as “deformation gradient”) and formulates the problem in a variational way, several work computed 3D mappings. Chao et al.[4] proposed a simple geometric model measuring distance from the Jacobian of the mapping to an isometry, which is known as ARAP (as-rigid-as-possible) deformation energy. They used SVD (singular value decomposition) of the Jacobian to extract the rotation, and detect and resist inversion[25] by rectifying the target transformation, but still some inversion might occur. Frame field driven methods[26-28] compute the volumetric parameterization in a multi-patch manner, which uses an energy measuring difference between the Jacobian and the guidance frame field. The parameterization usually has low distortions and does not have guarantees of anti-
555
Yao Jin et al.: Stretch-Minimizing Volumetric Parameterization
folding. Volumetric polycube mappings were used to compute mappings to volumes with orthogonal polyhedron boundary. Gregson et al.[5] proposed a rotation and position driven deformation algorithm to construct polycube maps. This deformation strategy was also used in [29-30]. However, they did not consider the foldover problem. Huang et al.[31] recently proposed a variational method for deforming an input mesh into a polycube shape through the minimization of the l1 norm of the mesh normals, regularized via an ARAP volumetric distortion energy. They added log-barrier terms as anti-folding constraints, but still produced degenerated elements. Recently, with the development of 2D locally injective mappings, generating 3D volumetric mappings without foldovers has received researchers’ attention. Some methods explicitly control the singular values of the Jacobian of simplicial maps. Aigerman and Lipman[7] projected simplicial maps onto a set of bounded distortion maps by quadratic programs. This projection seeks a mapping close to an input, rather than directly optimizes the distortion energy. Kovalsky et al.[9] introduced a family of convex sets of matrices whose singular values are bounded. These sets are formulated using LMI (linear matrix inequalities), allowing optimization with standard convex SDP (semidefinite programming) solvers. Some other methods design an explicit “barrier term” for the feasible region. Sch¨ uller et al.[8] proposed a general framework which supports various types of distortion energy using interior point method. It shows successful applications on 2D/3D deformations and surface parameterization. In surface parameterization, foldover problem is well studied. For a detail review, please refer to the recent work[8]. One simple but effective idea is to design some special energy with a term of reciprocal signed area of a parameter domain, which prevents foldovers. The wellknown MIPS energy measures Dirichlet energy per parameter area[10]. It is a kind of conformal energy with the anti-folding property. Stretch-distortion energy is another of such type. It was first proposed by Sander et al.[11] and was used to measure the stretch distortion of the mapping between two objects. The energy was widely used and improved by the later work[32-35] for several 2D problems. However, no such kind of energy in 3D has been adopted so far. In this paper, we aim to explore the definition of stretch-distortion energy in a 3D domain and apply it to generate foldover-free volumetric mappings.
3 3.1
Stretch-Distortion Energy Stretch-Distortion Energy in 2D
In this subsection, we recall the 2D stretchdistortion energy from the work of [11]. Given a triangle t with 2D parametric coordinates {u1 , u2 , u3 }, ui = (si , ti ) and the corresponding 3D coordinates {x1 , x2 , x3 }, xi ∈ R3 , we can establish an affine mapping A : u → x with its Jacobian J = A ∈ R3×2 . The two singular values of J, γ and Γ (γ 6 Γ) can be used to measure the local stretch of a mapping which maps unit-length vectors from a triangle in the parameter domain to a triangle in 3D, i.e., the largest (Γ) and the smallest (γ) local stretch. Based on this observation, Sander et al.[11] defined the following stretch measures under L2 and L∞ norms, p L2 (t) = (γ 2 + Γ2 )/2, L∞ (t) = Γ.
Note that as the parameterization of a triangle t starts to degenerate, Γ increases to infinity, and both the norms L2 and L∞ approach infinity. Therefore degeneration triangles can be severely punished and avoided by minimizing these two measures. The feature makes it possible to produce foldover-free parameterization and has the ability to trade off between angle and area distortions as well. Such nice property arouses us to seek stretch-distortion energy in 3D for volumetric mappings which will be introduced in the next subsection. 3.2
Stretch-Distortion Energy in 3D
Similar to the 2D case, the stretch-distortion energy in 3D can be defined analogously, i.e., using the norms of the singular values of the Jacobian. Since it is difficult to obtain the expressions of the singular values of the Jacobian in 3D, it is non-trivial to derive the energy (eps., the L∞ -norm energy) in the same way. However, we can derive the L2 -norm energy through a lemma to be proved. Different from the 2D case, where it constructs the Jacobian of a mapping from the parameter domain to the source domain, we take the Jacobian of an inverse map instead, i.e., from the source domain to the parameter domain. This is to simplify the problem since each element of the Jacobian matrix of such an inverse mapping becomes a linear function. Let a volumetric model be represented as a tetrahedral mesh M = {V, T }, where V = {xi }, xi ∈ R3 and T = {ti } denote the sets of vertices and tetrahedrons
556
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
of the mesh, and the parameter domain denoted as D with vertices V ′ = {ui }, ui ∈ R3 . Let a tetrahedron ′ in D denoted as tj = (u j0 , u j1 , u j2 , u j3 ) and the corresponding tetrahedron in M as tj = (x j0 , x j1 , x j2 , x j3 ). Then the Jacobian as the first derivative of the affine mapping At can be calculated as: Jt =
To prove (2), we transform the F -norm to the form of matrix trace and use the commutative law of the trace, tr(AB) = tr(BA). Thus we can obtain, ||Jt ||2F = tr(JtT Jt ) T T = tr(Vt Σ T t Ut Ut Σ t Vt ) T = tr(Vt Σ T t Σ t Vt )
Ut Xt−1 ,
= tr(Vt VtT Σ T t Σ t) = tr(Σ T t Σ t)
where Ut = (u j1 − u j0 , u j2 − u j0 , u j3 − u j0 ) and Xt = (x j1 − x j0 , x j2 − x j0 , x j3 − x j0 ) are incidence matrices. The related notations can be seen in Fig.1.
Note that the above equation is the well-known and widely used volumetric Dirichlet energy[2] expressed in the form of singular values. Similarly, we can easily get the proof of (3),
uj
xj
Jt
||JtT Jt ||2F = tr(JtT Jt JtT Jt )
xj
T T T T T = tr(Vt Σ T t Ut Ut Σ t Vt Vt Σ t Ut Ut Σ t Vt )
uj
uj
xj
2 2 2 = σt,1 + σt,2 + σt,3 .
T t = tr(Vt Σ T t Σ tΣ t Σ tV )
xj
uj
T = tr(Vt VtT Σ T t Σ tΣ t Σ t) T = tr(Σ T t Σ tΣ t Σ t)
Fig.1. Affine mapping between two tetrahedrons.
4 4 4 = σt,1 + σt,2 + σt,3 .
To derive the formula of the 3D version of the stretch-distortion energy, we first give out a lemma with its proof. Lemma 1. Let Jt ∈ R3×3 be the Jacobian matrix of the affine mapping from the tetrahedron t of the mesh to the corresponding tetrahedron t′ of the parameter domain, Vt and Vt′ are volumes of the tetrahedrons t and t′ , and assume σt,1 , σt,2 , σt,3 are singular values of Jt , then the following equations hold, Vt′ , Vt 2 2 2 σt,1 + σt,2 + σt,3 = ||Jt ||2F ,
(2)
4 σt,1
(3)
σt,1 σt,2 σt,3 =
+
4 σt,2
+
4 σt,3
=
||JtT Jt ||2F ,
= = =
det(Jt ) = det(Ut Xt−1 ) det(Ut ) det(Xt−1 ) det(Ut ) Vt′ det(Xt )
=
Vt
.
Estretch (t) = =
(1)
where || ∗ ||F is the Frobenius norm (F -norm). Proof. Take SVD (singular value decomposition) of the Jacobian matrix Jt = Ut Σ t VtT , where Ut and Vt are orthogonal matrices, and Σ t is a diagonal matrix whose diagonal entries are σt,1 , σt,2 , σt,3 . Then the proof of (1) is as follows, σt,1 σt,2 σt,3 = det(Σ t ) = det(Ut Σ t VtT )
Now with the lemma above, we can easily derive the L2 stretch-distortion energy and obtain the following theorem. Theorem 1. The L2 stretch-distortion energy has the following closed-form expression, 1 1 1 2 + σ2 + σ2 σt,1 t,2 t,3 1 Vt2 2 ((||J t ||2F )2 − ||J T t J t ||F ), 2 Vt2′
(4)
where symbols J t , σt,1 , σt,2 , σt,3 , Vt , Vt′ are defined in Lemma 1. To prove the above theorem, we use the results in Lemma 1 and obtain: Proof. 1 1 1 + 2 + 2 2 σt,1 σt,2 σt,3 1 = ((σt,1 σt,2 )2 + (σt,2 σt,3 )2 + (σt,3 σt,1 )2 ) (σt,1 σt,2 σt,3 )2 =
det(Xt )2 1 2 2 2 2 ((σ + σt,2 + σt,3 ) − det(Ut )2 2 t,1 4 4 4 (σt,1 + σt,2 + σt,3 ))
=
1 Vt2 ((||Jt ||2F )2 − ||JtT Jt ||2F ). 2 Vt2′
557
Yao Jin et al.: Stretch-Minimizing Volumetric Parameterization
Note in (4) that the term V12 has a natural “barrier” t′ item, namely, 1 , for V ′ > ε, t φ(Vt′ ) = Vt2′ ∞, for V ′ 6 ε, t
where ε is a small value that accounts for numerical inaccuracies. This function defines a feasible region with positively signed volumes of the tetrahedron. With this property, the stretch-distortion energy would punish collapsing tetrahedrons and thus it is able to prevent tetrahedrons from degeneration or foldovers and preserve the volume better than other kinds of energy like Dirichlet. With the results of Lemma 1, we can further derive the 3D versions of LSCM (least square conformal maps)[36-37] and LPM (length preservation maps)[37] . Different from the 2D versions of LSCM and LPM 2 which use σt,i to measure the distortions, we use σt,i instead in order to obtain closed-form expressions as follows. ELSCM = = ELPM = = 4
2 2 2 2 2 2 ) + − σt,2 ) + (σt,2 − σt,3 (σt,1 T 2 2 2 3||Jt Jt ||F − (||Jt ||F ) , 2 2 2 (σt,1 − 1)2 + (σt,2 − 1)2 + (σt,3 ||JtT Jt ||2F − 2||Jt ||2F + 3.
2 (σt,3
−
2 2 σt,1 )
(5) − 1)2
4.1
Energy Function for Volumetric Parameterization
Formally, given a source tetrahedron mesh M with boundary ∂M and a target domain D with boundary ∂D, we want to seek a low distortion and foldover-free mapping f : M → D under the boundary constraints h : ∂M → ∂D. The boundary constraints can be formulated as a set of linear equations: P (u) = C u − p = 0,
(7)
where C is a coefficient matrix, and p is a vector of target positional values. We use the stretch-distortion energy for measuring distortions and take the positional constraints in (7) into consideration. Thus we can find a mapping by minimizing the following energy, which can gradually deform the rest shape to the target. arg min E = Estretch + Epos u
=
n 3 X 1 Vt,i 2 2 T 2 2 ((||Ji ||F ) − ||Ji Ji ||F ) + 2 V ′ ,i t i=1
ω||P (u)||22 ,
(8)
where Epos is the energy of positional constraints for the boundary vertices and ω is a large weight to fulfill the constraints of (7).
(6)
Stretch-Minimizing Parameterization
Stretch-distortion energy can be used to compute volumetric parameterizations. However, directly minimizing the energy without constraints is not acceptable because it would “stretch” all parametric elements to infinite size. To prevent such an infinite stretching, the boundary of the domain is required to be fixed as it was done in [11]. Therefore, “stretch-minimizing” is only meaningful for boundary constrained mappings. To find a stretch-minimizing parameterization under such constraints, Sander et al.[32] used a local optimization scheme. They began with an initial foldover-free planar embedding (e.g., Tutte embedding[38] ) and optimized each interior node individually by performing a line search minimization along a randomly chosen direction in the parameter domain. However, there is no parallel theory for Tutte embedding in 3D, and it is non-trivial to obtain a foldover-free initial status with a fixed boundary. Thus the same scheme cannot be used directly in general. Instead, we compute the parameterization using a global optimization.
4.2
Optimization
The energy function in (8) is non-linear and nonconvex. The term of reciprocal of the signed volume of parameter domain (1/Vt2′ ) can be served as a natural barrier to prevent degeneration and foldovers. However it may potentially make the optimization difficult since the gradient and the Hessian may become illconditioned when the elements are close to degeneration. In order to accelerate the convergence, we need to keep a good condition number of the gradient and the Hessian in the iteration. Thus we adopt the similar interior point method discarding the topology operations in [39] (a variant of the method in [8]) with a modification. In each iteration of the solver[39], it updates vertices’ coordinates via Newton’s method with backtracking line search (subroutine UpdateVertices) followed by a relaxation step to improve the conditioning of the gradient and the Hessian (subroutine RelaxVertices). When the Hessian becomes ill-conditioned (e.g., by checking whether the LLT decomposition of Hessian is failed[8] ), the later step is taken and alters the energy term Epos temporally by replacing the final target with the current vertices’ positions and re-optimizing
558
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
the new energy to improve the distribution of tetrahedrons. This strategy can provide a well-conditioned Hessian for further optimization. However, the solver[39] is not robust and may still slow down the convergence for some examples which require acute constraints. This situation may appear when the total energy is reduced largely at the expense of sharply increasing the norm of the gradient. When the iteration falls into such a case, the gradient and the Hessian may tend to be ill-conditioned and the further convergence would become very slow. Thus we modify the line search scheme in each update of vertices’ coordinates by adding an additional criterion of reducing the norm of the gradient as well as the energy value. Such a modification may increase the rate of failure in finding a suitable step. When such failure happens, we switch to the relaxation subroutine for further improvement (to avoid excessive relaxation which consumes too much time, we set the maximal number to 5 in each relaxation subroutine). Besides this modification, we also consider the following issues. Convergence Criteria. After the subroutine UpdateVertices, we will check the convergence criteria as described in [39] as well as the function-value convergence criterion: |En − En−1 | < εf DM , where n is the current number of iterations, εf is a small constant (εf = 10−8 by default) and DM is the diameter of the bounding box of the mesh M . Soft Weight. The weight ω in (8) has an impact on the convergence of the optimization. Too small value may result in failing to fulfill the constraints and too large value may lead to numerical issues. By default, we set ω = 108 and for examples with acute boundary constraints, we begin with a small value for ω and increase it by multiplying γ when the iteration meets one of the three convergence criteria while the constraints are not satisfied (||P (u)||2 > η (η = 10−6 by default), ωn = γωn−1 , 1 6 n 6 5). And we find that ω0 = 100 and γ = 25 work well. Initial Guess. The solver requires that the initial value should be an interior point, i.e., all the tetrahedrons have positive signed volumes. Though rest-pose mesh is a choice, we find experimentally that the solver behaves better when the initial mesh well approximates the target parameter domain. Thus we calculate a shape as an initial guess which rigidly aligns the target parameter domain as well as possible. The problem is to find a “scaled” rotation matrix Q ∈ R3×3 (a rotation matrix multiplies a scalar value), a translation 1 ○ http://eigen.tuxfamily.org, Mar. 2015.
t ∈ R3 , and an auxiliary variable for global scaling s ∈ R, which minimize the following energy function: N X 1 ||(Qxi + t) − ui ||2 + ||QT Q − s2 I||2F , s,Q,t N i
arg min
where the summation is taken all over the boundary vertices. It can be efficiently solved using the same method above by discarding the relaxation subroutine due to its low dimensionality (with 13 variables). Since the obtained Q is not a strictly scaled rotation matrix, we have to rectify it with the closest rotation matrix to Q: R = U V T , where U , V are rotation matrices taken from SVD of Q: Q = U Σ V T . Finally, we update coordinates of all the vertices as the initial guess: x′i = |s|Rxi + t. In the optimization, relaxation plays a very important role in the convergence since it can keep the condition of the gradient and the Hessian as well as possible. To show its effect, we plot the change of the two energy terms Estretch and Epos during the iterations by using the algorithms with and without relaxation. Fig.2 illustrates the change of the function values and the gradient norm of the two energy terms for a cow model (with 5876-V , 4675-B and 19232-T , where V, B, T stand for the number of vertices, boundary vertices and tetrahedrons respectively) with the two algorithms. It takes 272 s for the former algorithm to achieve a point with gradient convergence and 1 597 s for the later one which exceeds the maximal iteration number. It shows that with the relaxation, the value of Estretch increases monotonously during the iteration and finally converges in 46 iterations (Fig.2(a)); while for the algorithm without relaxation, its value reaches a peak before reducing (Fig.2(c)) and the norm of the corresponding gradient changes abruptly (Fig.2(d)) meanwhile, which greatly slows down the convergence. We also display the shapes of the cow model sampled from the iterations in Fig.3. Note that the shape generated with the relaxation-enhanced algorithm deforms much smoother (the first row) than that of algorithm without relaxation (the second row). 5
Results
We implemented the algorithm of stretchminimizing volumetric parameterization on a computer with 3.40 GHz CPU and 12 GB memory. In the imple1 mentation, we used the Eigen library○ to carry out the
559
Yao Jin et al.: Stretch-Minimizing Volumetric Parameterization 12
6
Position Energy
Squared Norm of Gradient Value (log)
Energy Value (log)
7
5 4 3 2 Stretch Energy 1 0
0
10
20 30 Iteration (a)
6 4 Stretch Energy
2 0
10
20 30 Iteration (b)
40
12
6
Position Energy
Squared Norm of Gradient Value (log)
Energy Value (log)
Position Energy
8
0
40
7
5 4 3 2 Stretch Energy
1 0
10
0
100
200 300 Iteration (c)
400
10
6 4 2 0
500
Position Energy
8
Stretch Energy 0
100
200 300 Iteration (d)
400
500
Fig.2. Convergence plots of the energy value and the gradient norm of the two energy terms Estretch and Epos for the cow model with the fixed soft weight ω = 104 . (a) (b) Results with relaxation. (c) (d) Results without relaxation.
matrix computations and the simplicial LLT decompo2 sition method wrapped by CHOLMOD library○ to solve the linear system in the optimization.
(a)
(f)
(b)
(g)
(c)
(h)
(d)
(i)
distortions, V σt,1 σt,3 Pt + , σt,3 σt,1 t Vt t σt,1 σt,3 Dma = max + , t σt,3 σt,1 X Vt 1 P σt,1 σt,2 σt,3 + Dav = , σt,1 σt,2 σt,3 t Vt t 1 Dmv = max σt,1 σt,2 σt,3 + , t σt,1 σt,2 σt,3 Daa =
(e)
(j)
Fig.3. Shapes of the cow model during the iteration. The shapes of (a)∼(e) are sampled from the iteration 1, 11, 22, 33, 46 of the relaxation-enhanced solver respectively. The shapes of (f)∼(j) are sampled from the iteration 1, 120, 240, 360, 500 of the solver without relaxation respectively.
To quantify the parameterization distortion, we computed angle and volume distortions. With the help of the singular values σt,1 , σt,2 , σt,3 (σt,1 6 σt,2 6 σt,3 ) of the Jacobians Jt for tetrahedron t, we had the following distortion measures for angle distortions and volume
X
where Daa , Dma , Dav , Dmv denote the average angle distortions, maximal angle distortions, average volume distortions, and maximal volume distortions respectively. In the following, we would use the vector D = (Daa , Dma , Dav , Dmv ) to represent the four types of distortions of the mapping. We applied our approach to parameterize a variety of volumetric tetrahedron meshes to target domains (e.g., polycube) with prescribed boundaries. The polycube domain can be manually or automatically constructed, and the position of inner vertices in each polycube patch can be calculated using the convex combination method[1,20] with bijective guarantees or bounded
2 ○ http://faculty.cse.tamu.edu/davis/suitesparse.html, Mar. 2015.
560
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
distortion mappings with controllable distortions[7,40] . In our experiment, we used the data coming from the 3 4 homepages of Xin Li○ and Noam Aigerman○ . All the boundary vertices of the parameter domains are fixed to different polycube shapes. We first compared results of our stretch-distortion energy with those of popular energies, such as “Dirichlet”[2] and “ARAP”[4] . The results can be seen in Fig.4. Since “Dirichlet” energy and “ARAP” energy do not impose foldover-free conditions, the results have foldover tetrahedrons (colored in red in Figs.4(c) and 4(d)), where the results of Dirichlet energy in Fig.4(c) and ARAP energy in Fig.4(d) have 921 and 1 114 folding elements respectively. Thanks to the barrier term possessed in our stretch-distortion energy, it produces results without foldovers as shown in Fig.4(e).
(a)
(b)
(c)
(d)
We found by experiments that in general, the method in [8] performs well in applications such as 2D/3D deformation and surface parameterization, but not in volumetric parameterization with acute constraints. An example can be seen in the first row of Fig.5, where we parameterize the Isis model (3403V , 2535-B, 12074-T ) to a cuboid using our method and that of [8] using the ARAP energy. Note that in Fig.5(c), the boundary constraints are far away from the target parameter domain with the method in [8], while in Fig.5(b), ours can align the constraints well. We further replaced the optimization solver of the method in [8] with ours, parameterized the horse model (10999-V , 8457-B, 36775-T ) to a polycube with Dirichlet energy and obtained the result in Fig.5(f). We can see in Fig.5(e) that the fulfillment of the constraints has been improved but is still not well compared with ours.
(e)
Fig.4. Parameterization results for (a) “MaxPlanck” model with 23 653 tetrahedrons by using three different energies: “Dirichlet” energy, “ARAP” energy and our stretch-distortion energy. A cross section is opened for the model (b) and its tetrahedron elements and corresponding mapped elements can be seen in (c), (d) and (e). The red color encodes the foldover tetrahedrons.
We then compared our method with the most related work[8] which aims to compute foldover-free mappings in the framework of interior point method. In [8], the authors explicitly imposed the foldover-free constraints as an inverse-spline barrier function and converted a constrained optimization to an unconstrained one. Their method needs to set two additional parameters, the weight for the barrier energy β and the weight for the initial rest-pose tetrahedron volumes λ, which can affect the convergence (ours directly optimizes the distortion energy and is parameter-free). In the comparison experiment, we set β = 0.01 and λ = VD /VM , where VD and VM are the total volume for the parameter domain D and the mesh M respectively. And we adopted the Newton-like solver as proposed in the paper to optimize the energy. The solver updates vertices’ coordinates using the similar strategy to ours combined with a different substepping strategy for improving the condition number of the Hessian.
(a)
(d)
(b)
(e)
(c)
(f)
Fig.5. Comparison results for (a) the Isis and (d) the horse models. (b) (e) Results of our method. (c) (f) Results of the method in [8].
To see the convergence behavior of different energies under foldover-free constraints, we parameterized the duck model (2464-V , 901-B, 12601-T ) to a cube with Dirichlet energy, ARAP energy, and stretch-distortion energy. Since Dirichlet energy and ARAP energy do not contain any term to prevent foldovers, we explicitly added a barrier energy as done in [8] for both of them and optimized the energy functions with our solver. The results can be seen in Fig.6 and Table 1. We can see
3 ○ http://www.ece.lsu.edu/xinli/Meshing/VolumeMeshing.html, Mar. 2015. 4 ○ http://www.wisdom.weizmann.ac.il/∼noamaig/html/projects/bd3d/bd3d.html, Mar. 2015.
561
Yao Jin et al.: Stretch-Minimizing Volumetric Parameterization
that all the three kinds of energy achieve similar convergence behavior with gradient convergence. Though our result costs more time, it provides much lower angle distortions than the others. 10 8 7
10
6
9
5
8
Energy Value (log)
Energy Value (log)
9
Besides, to show the behavior of the other two kinds of energy, LSCM (5) and LPM (6), we parameterized the same duck model using these two kinds of energy with the same method above (with barrier energy). The results are shown in Fig.7 and Table 1, where LPM energy converges faster and has lower distortions than LSCM energy, and both of them cost much time.
4 3 2 1
0
2
4
6
8 10 12 Iteration (a)
14
16
18
10
5 4 3
1
8
0
10
20
7 5
10
4
9
3 2 1 0
30 40 Iteration
50
60
70
(a)
6
Energy Value (log)
Energy Value (log)
6
2
9
0
2
4
6 8 Iteration (b)
10
12
10 9 Energy Value (log)
7
8
8 7 6 5 4 3 2
7
1
6
0
5
10 15 Iteration
4
(b)
3
5
20
25
Fig.7. Results of LSCM and LPM parameterizations (ω = 108 ). (a) LSCM energy. (b) LPM energy.
2 1 0
0
2
4
6 8 Iteration (c)
10
12
14
Fig.6. Comparison results of the foldover-free algorithms with different kinds of energy (ω = 108 ). (a) Dirichlet energy. (b) ARAP energy. (c) Stretch-distortion energy.
Table 1. Distortions and Time Statistics for the Duck Model with Different Kinds of Energy Types of Energy
(Daa , Dma , Dav , Dmv )
Dirichlet
(3.2, 273.7, 5.2, 34.7)
Time (s) 1 047
ARAP
(2.9, 254.9, 5.1, 33.7)
1 041
Stretch
(2.8, 12.3, 5.1, 34.7)
1 098
LSCM
(6.7, 652.1, 5.3, 31.6)
1 018
LPM
(3.9, 236.0, 5.3, 30.1)
1 569
Finally, we compared our results with those of the method in [7]. Fig.8 displays comparison results for the hand model (8366-V , 3497-B, 40627-T ) and the sphinx model (10528-V , 6118-B, 43371-T ) and Table 2 lists their statistics information. The method in [7] can flexibly control the bound of angle distortions (K) in a convex framework. Thus we set different bounds for the algorithm in the results. Generally speaking, the method in [7] can achieve much lower maximal angle distortions and higher average angle distortions compared with our method. For the volume distortions, our method shows its advantages in most cases. We can see the volume distortions of the both models in the table, where the average and the maximal volume distortions are much lower than those in [7].
562
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
each iteration, which is costly. As for our method, it is due to the high non-linearity of the energy function, in which the evaluation of the Hessian of the non-linear energy accounts for the most of the running time. 6 (a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
(p)
Fig.8. Comparison results for the hand (the first row) and the sphinx (the second and the third row) models. (c) (f) (j) (n) Results of our method. (d) (e) (g) (h) (k) (l) (o) (p) Results of [7]. The color map encodes distortions (the colors from light red to dark red denote the values from small to large). (c)∼(e) display angle distortions with the method of ours, [7] with K = 64, and [7] with K = 20 respectively, and (f)∼(h) are their volume distortions. (j)∼(l) show angle distortions with the method of ours, [7] with K = 38, and [7] with K = 10 respectively, and (n)∼(p) are their volume distortions respectively. Both angle and volume distortions are concentrated on the boundary.
Table 2. Distortions and Time Statistics for the Results of Our Method and the Method in [7] Method
(Daa , Dma , Dav , Dmv )
Ours
(3.8, 63.9, 4.6, 41.3)
Time (s) 684
[7] (K = 64)
(4.0, 63.8, 4.8, 559.8)
943
[7] (K = 20)
(3.9, 20.0, 4.7, 91.4)
425
Ours
(2.6, 38.4, 2.1, 68.2)
110
[7] (K = 38)
(2.8, 37.9, 2.4, 258.0)
499
[7] (K = 10)
(2.6, 10.0, 2.3, 102.2)
588
Note: K is the bound of angle distortion. The algorithm of [7] is ran with MATLAB. The former three and the later three rows are the results for the hand and the sphinx model respectively.
Besides, our method distributes distortions more evenly. Note the inside region of the green frames in Figs.8(j)∼8(l) and Figs.8(n)∼8(p). This is due to the fact that the stretch-distortion energy has a severe punishment on the degeneration volumes and thus can preserve the volume to a large extent but their method has no control over the volume distortions. The time performance of our method is listed in the last columns of Table 1 and Table 2. Note that both the method in [7] and ours are time-consuming. The method in [7] needs to solve a quadratic program in
Conclusions
We derived the definition of the stretch-distortion energy of a 3D domain and applied it to volumetric parameterization to satisfy fixed boundary constrains. We provided a global optimization strategy which moves all vertices of a model simultaneously with a relaxationenhanced solver to optimize the non-linear energy. One important feature of our parameterization is that a barrier item defined in the energy implicitly enforces the foldover-free constraints while minimizing the distortions of both angles and volumes. We also extended the 2D definition to the 3D one for both forms of distortion energy, i.e., LSCM and LPM, and conducted several numerical experiments. And in general, we found that the LPM method offers faster convergence and less distortions than LSCM. Our method provides a solution to satisfy the criteria in parameterization of low distortions, alignment of constraints, and foldover-free. Like most methods, our approach has to conduct a non-linear optimization which is time-consuming. In our experience, our parameterization can align to the boundary constraints in most examples when the relaxation scheme is adopted in optimization. However, it cannot guarantee to fulfill arbitrary desired boundary constraints and may fail to align some very extreme constraints. Currently, only the fixed boundary conditions can be included in our model, which limits its potential in some applications. It may not work well for general deformation simulation where people want to implement a force constraint. We will investigate into the matter in the future to enhance the overall efficiency of solving the problem and make it adapt to other applications, including deformation. This can be achieved by improving the solver to include only the gradient information and parallelizing the computation. Acknowledgement We would thank all anonymous reviewers for their helpful suggestions and Xin Li and Noam Aigerman for providing data and codes on their homepages. References [1] Hormann K, L´ evy B, Sheffer A. Mesh parameterization: Theory and practice. ACM SIGGRAPH Courses, 2007, Ar-
Yao Jin et al.: Stretch-Minimizing Volumetric Parameterization ticle No. 1. [2] Wang Y, Gu X, Yau S T. Volumetric harmonic map. Communications in Information and Systems, 2004, 3(3): 191202. [3] Li X, Xu H, Wan S, Yin Z, Yu W. Feature-aligned harmonic volumetric mapping using MFS. Computers and Graphics, 2010, 34(3): 242-251. [4] Chao I, Pinkall U, Sanan P, Schr¨ oder P. A simple geometric model for elastic deformations. ACM Transactions on Graphics, 2010, 29(4): 38:1-38:6. [5] Gregson J, Sheffer A, Zhang E. All-Hex mesh generation via volumetric PolyCube deformation. Computer Graphics Forum, 2011, 30(5): 1407-1416. [6] Paill´ e G P, Poulin P. As-conformal-as-possible discrete volumetric mapping. Computers & Graphics, 2012, 36(5): 427433. [7] Aigerman N, Lipman Y. Injective and bounded distortion mappings in 3D. ACM Transactions on Graphics, 2013, 32(4): 106:1-106:13. [8] Sch¨ uller C, Kavan L, Panozzo D, SorkineHornung O. Locally injective mappings. Computer Graphics Forum, 2013, 32(5): 125-135. [9] Kovalsky S, Aigerman N, Basri R, Lipman Y. Controlling singular values with semidefinite programming. ACM Transactions on Graphics, 2014, 33(4): 68:1-68:13. [10] Hormann K, Greiner G. MIPS: An effcient global parametrization method. In Curve and Surface Design: SaintMalo 1999, Laurent P J, Sablonni` ere P, Schumaker L L (eds.), Nashville, TN: Vanderbilt University Press, 2000, pp.153-162. [11] Sander P V, Snyder J, Gortler S J, Hoppe H. Texture mapping progressive meshes. In Proc. the 28th Annual Conference on Computer Graphics, Aug. 2001, pp.409-416. [12] Pinkall U, Polthier K. Computing discrete minimal surfaces and their conjugates. Experimental Mathematics, 1993, 2(1): 15-36. [13] Li X, Guo X, Wang H, He Y, Gu X, Qin H. Harmonic volumetric mapping for solid modeling applications. In Proc. the ACM Symposium on Solid and Physical Modeling, June 2007, pp.109-120. [14] Li X, Guo X, Wang H, He Y, Gu X, Qin H. Meshless harmonic volumetric mapping using fundamental solution methods. IEEE Transactions on Automation Science and Engineering, 2009, 6(3): 409-422. [15] Xu H, Yu W, Gu S, Li X. Biharmonic volumetric mapping using fundamental solutions. IEEE Transactions on Visualization and Computer Graphics, 2013, 19(5): 787-798. [16] Martin T, Cohen E, Kirby R M. Volumetric parameterization and trivariate B-spline fitting using harmonic functions. Computer Aided Geometric Design, 2009, 26(6): 648664. [17] Martin T, Cohen E. Volumetric parameterization of complex objects by respecting multiple materials. Computers & Graphics, 2010, 34(3): 187-197. [18] Xia J, He Y, Han S, Fu C W, Luo F, Gu X. Parameterization of star-shaped volumes using Green’s functions. In Proc. the 6th Int. Conf. Advances in Geometric Modeling and Processing, June 2010, pp.219-235. [19] Xia J, He Y, Yin X, Han S, Gu X. Direct-product volumetric parameterization of handlebodies via harmonic fields. In Proc. Shape Modeling International Conference, June 2010, pp.3-12. [20] Floater M S. Mean value coordinates. Computer Aided Geometric Design, 2003, 20(1): 19-27.
563 [21] Li X Y, Ju T, Hu S M. Cubic mean value coordinates. ACM Transactions on Graphics, 2013, 32(4): 126:1-126:10. [22] Ju T, Schaefer S, Warren J. Mean value coordinates for closed triangular meshes. ACM Transactions on Graphics, 2005, 24(3): 561-566. [23] Floater M S, K´ os G, Reimers M. Mean value coordinates in 3D. Computer Aided Geometric Design, 2005, 22(7): 623631. [24] Lipman Y, Levin D, Cohen-Or D. Green coordinates. ACM Transactions on Graphics, 2008, 27(3): 78:1-78:10. [25] Irving G, Teran J, Fedkiw R. Invertible finite elements for robust simulation of large deformation. In Proc. the 2004 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, August 2004, pp.131-140. [26] Nieser M, Reitebuch U, Polthier K. CubeCoverparameterization of 3D volumes. Computer Graphics Forum, 2011, 30(5): 1397-1406. [27] Huang J, Tong Y, Wei H, Bao H. Boundary aligned smooth 3D cross-frame field. ACM Transactions on Graphics, 2011, 30(6): 143:1-143:8. [28] Li Y, Liu Y, Xu W, Wang W, Guo B. All-Hex meshing using singularity-restricted field. ACM Transactions on Graphics, 2012, 31(6): 177:1-177:11. [29] Livesu M, Vining N, Sheffer A, Gregson J, Scateni R. PolyCut: Monotone graph-cuts for PolyCube base-complex construction. ACM Transactions on Graphics, 2013, 32(6): 171:1-171:12. [30] Yu W, Zhang K, Wan S, Li X. Optimizing polycube domain construction for hexahedral remeshing. ComputerAided Design, 2014, 46: 58-68. [31] Huang J, Jiang T, Shi Z, Tong Y, Bao H, Desbrun M. l1 based construction of polycube maps from complex shapes. ACM Transactions on Graphics, 2014, 33(3): 25:1-25:11. [32] Sander P V, Gortler S, Snyder J, Hoppe H. Signalspecialized parameterization. In Proc. the 13th Eurographics Workshop on Rendering, June 2002, pp.87-98. [33] Yoshizawa S, Belyaev A, Seidel H P. A fast and simple stretch-minimizing mesh parameterization. In Proc. Shape Modeling Applications, June 2004, pp.200-208. [34] Lee T Y, Yen S W, Yeh I C. Texture mapping with hard constraints using warping scheme. IEEE Transactions on Visualization and Computer Graphics, 2008, 14(2): 382395. [35] Kwok T H, Zhang Y, Wang C C. Effcient optimization of common base domains for cross parameterization. IEEE Transactions on Visualization and Computer Graphics, 2012, 18(10): 1678-1692. [36] L´ evy B, Petitjean S, Ray N, Maillot J. Least squares conformal maps for automatic texture atlas generation. ACM Transactions on Graphics, 2002, 21(3): 362-371. [37] Liu L, Zhang L, Xu Y, Gotsman C, Gortler S J. A local/global approach to mesh parameterization. Computer Graphics Forum, 2008, 27(5): 1495-1504. [38] Tutte W T. How to draw a graph. Proc. London Math. Soc., 1963, 13(3): 743-768. [39] Jin Y, Huang J, Tong R. Remeshing-assisted optimization for locally injective mappings. Computer Graphics Forum, 2014, 33(5): 269-279. [40] Lipman Y. Bounded distortion mapping spaces for triangular meshes. ACM Transactions on Graphics, 2012, 31(4): 108:1-108:13.
564
J. Comput. Sci. & Technol., May 2015, Vol.30, No.3
Yao Jin received his B.S. degree in apparel engineering and M.S. degree in computer science in 2007 and 2010 respectively from Zhejiang Sci-Tech University. He is a Ph.D. candidate in the Department of Computer Science and Engineering, Zhejiang University, Hangzhou. His research interests include computer graphics and digital geometry process. Gui-Ping Qian received his B.S. degree in electrical engineering in 1997 and Ph.D. degree in computer science in 2008 from Zhejiang University. He is currently an associate professor of Zhejiang University of Media and Communications, Hangzhou. His research interests include digital geometry process, mesh deformation and editing. Jie-Yi Zhao received his Ph.D. degree in computer science in 2013 from Zhejiang University, Hangzhou. Currently, he is a postdoctoral researcher in the University of Texas at Houston. His research interests include computer graphics and GPU computing. Jian Chang received his Ph.D. degree in computer graphics at the National Centre for Computer Animation (NCCA), Bournemouth University, UK, in 2007. He is now an associate professor at the NCCA and a member of the Computer Animation Research Center. His research has focused on a number of topics related to deformation and physically-based animation, geometric, algorithmic art, character rigging and skinning. He has conducted research in applications related to medical simulation and virtual surgery, involving complex modeling work of human anatomic structures and dynamics.
Ruo-Feng Tong received his B.S. degree in mathematics from Fudan University, and Ph.D. degree in applied mathematics in 1996 from Zhejiang University. He continued his research as a postdoctoral researcher at Intelligent Systems and Modeling Laboratory, Hiroshima University, Japan. Currently, he is a professor of the Department of Computer Science and Engineering, Zhejiang University, Hangzhou. His research interests include computer graphics and CAD, medical image reconstruction, virtual reality. Jianjun Zhang received his Ph.D. degree from Chongqing University in 1987. He is a professor of computer graphics at the National Centre for Computer Animation, Bournemouth University, UK, and leads the Computer Animation Research Centre. He is also a cofounder of the UK’s Centre for Digital Entertainment, funded by the Engineering and Physical Sciences Research Council. His research focuses on a number of topics related to 3D virtual human modelling, animation and simulation, including geometric modelling, rigging and skinning, motion synthesis, deformation and physics-based simulation.