Garment deformation method based on the human body's Laplacian deformation

11704871 · 2023-07-18

Assignee

Inventors

Cpc classification

International classification

Abstract

A method of garment deformation based on Laplacian deformation of a human body, including the following steps: inputting polygonal mesh models of the human body and the garment; discretizing non-homogeneous mesh models of the human body and the garment inputted in the first step; clustering all the discretized mesh vertices, to reduce a number of vertices and to form a set of homogeneous discrete vertices; constructing Laplacian matrices of the human body and the garment; preprocessing and solving inverse matrices; editing by using the human body mesh as a control vertex, to drive a real-time smooth deformation of the garment mesh; and mapping a deformed and simplified mesh back to a mesh space of an original resolution to obtain deformed human body and garment mesh models.

Claims

1. A method of garment deformation based on Laplacian deformation of a human body, comprising the following steps: (1) inputting polygonal mesh models of the human body and the garment; (2) discretizing non-homogeneous mesh models of the human body and the garment inputted in Step (1); (3) clustering all the discretized mesh vertices, to reduce a number of vertices and to form a set of homogeneous discrete vertices; (4) constructing Laplacian matrices of the human body and the garment; (5) preprocessing and solving inverse matrices; (6) editing by using the human body mesh as a control vertex, to drive a real-time smooth deformation of the garment mesh; and (7) mapping a deformed and simplified mesh back to a mesh space of an original resolution to obtain deformed human body and garment mesh models.

2. The method of claim 1, wherein in the Step (1), the inputted mesh models of the human body and the garment are non-homogeneously distributed; portions of the mesh are dense and other portions of the mesh are sparse; and in the Step (2), the mesh models of the human body and the garment models are modified during a preprocessing step to make the mesh models of the human body and the garment homogeneous.

3. The method of claim 1, wherein in the Step (2), the non-homogeneous human body mesh M.sub.B and the garment mesh M.sub.C are discretized to retrieve only vertex information from inputted mesh information thus obtaining sets of original vertices V.sub.B and V.sub.C; and during the discretization, distances are recorded between all vertices and topological connections of the vertices among original mesh data for use in the mapping of Step (7).

4. The method of claim 3, wherein to reduce the number of vertices and to form the set of homogeneous discretized vertices, in the Step (3), a set of discretized human body vertices V.sub.B and a set of discretized garment vertices V.sub.C are voxelized, and the space is decomposed into n×n voxels, each with a cubic radius of d; with the set of discretized human body vertices V.sub.B, for the ith voxel V.sub.B.sup.i, there are m human body mesh vertices M.sub.B.sup.i, M.sub.B.sup.i+1, . . . , M.sub.B.sup.m−1 in a space covered by the set of discretized human body vertices V.sub.B and the m human body mesh vertices are combined in the voxel V.sub.B.sup.i into a single vertex; the Step (3) further comprises handling all human body and garment vertices in a same way to obtain a simplified, discretized, and homogeneous set of vertices V.sub.B′ for the human body mesh and a simplified, discretized, and homogeneous set of vertices V.sub.C′ for the garment mesh; and based on the topological connections from Step (2), adding edge connections to all vertices in the simplified sets of vertices V.sub.B′ and V.sub.C′ for new topological connections, which are used for constructing the Laplacian matrix in the Step (4).

5. The method of claim 4, wherein the human body model and the garment model are two independent models and all vertices in the human body model and the garment model have their own topological connections, the human body model and the garment model are separated from each other in terms of topology; as the deformation of the garment mesh is driven by human body mesh, the discretized set of vertices of the human body model and the garment model is treated as a whole while constructing the Laplacian matrix; the topological information and geometric information of the human body model and the garment model is considered simultaneously, and a geometric Laplacian matrix is constructed during the step 4; the set of vertices from the discretized and simplified human body and garment models is defined as V and contains n vertices; among the n vertices, Euclidean coordinates of any vertex i is expressed as v.sub.i=[v.sub.ix, v.sub.iy, v.sub.iz].sup.T∈R.sup.3 and the set of vertices is expressed as V=[v.sub.1.sup.T, v.sub.2.sup.T, . . . , v.sub.n.sup.T].sup.T; positions of all vertices in the set of vertices V are expressed, with a dimension of n, as a vector F; the Laplacian matrix is an n×n matrix L and the Laplacian matrix and the position vector of the vertexes for the discretized human body and garment models are multiplied to obtain L×F; the Laplacian matrix is a sparse matrix that assigns non-zero element values resembling an adjacency matrix between vertices; in considering the topology information of the set of vertices V, if there is an edge between any two vertices i, j, the weight between the two vertices is not zero, such that w.sub.ij≠0, corresponding to an element a.sub.ij=w.sub.ij (where i≠j) in the Laplacian matrix; for an element a.sub.ii in a diagonal line of the Laplacian matrix, a value of the element a.sub.ii refers to a number of vertices that connect to vertex i through an edge.

6. The method of claim 5, wherein a deformed simplified mesh is mapped back to the mesh space of original resolution and in the Step (3), the simplified set of vertices V.sub.B′ for the human body mesh and the simplified set of vertices V.sub.C′ for the garment mesh are obtained through voxelization and combination; for the vertices of the human body mesh, in the original non-simplified set of vertices V.sub.B for human body mesh, for any vertex i, m simplified vertices of the human body mesh are found within a given distance range: s.sub.1, s.sub.2, . . . , s.sub.m, and a distance between Vertex i and the m simplified human body mesh vertices is recorded as d.sub.s.sup.1, d.sub.s.sup.2, . . . , d.sub.s.sup.m; Euclidean coordinates of Vertex i are expressed as:
v.sub.i=v.sub.s.sup.1w(d.sub.s.sup.1)+v.sub.s.sup.2w(d.sub.s.sup.2)+v.sub.s.sup.3w(d.sub.s.sup.3)+ . . . +v.sub.s.sup.mw(d.sub.s.sup.m); wherein, v.sub.s.sup.j, j=1, 2, . . . , m refers to Euclidean coordinates of m simplified vertices; w(d.sub.s.sup.j) represents a weighting function with a distance d.sub.s.sup.j as an independent variable; based on the weighting function and relationships between adjacent vertices recorded in Step (3), new positions of human body mesh vertices of the original resolution are calculated in accordance with the new positions of the deformed and simplified human body mesh vertices, the original topological connections are recovered, and edge connections are added to the recovered vertices; and a same method is adopted for garment mesh vertices, and the deformed mapped human body and garment mesh of the original resolution are obtained.

7. The method of claim 1, wherein during preprocessing and solving the inverse matrix, Laplacian deformation is used to convert the coordinates of a vertex from a Euclidean space to a differential coordinates space; to keep local details of the garment model unchanged, the deformed local differential coordinates are unchanged; and the Laplacian deformation process comprises: calculating the differential coordinates of each vertex falling under the set of vertices V:
Δ=L(V) wherein Δ refers to the differential or Laplacian coordinates of the vertex, corresponding to three components of three coordinate axes in a local space of differential coordinates; moving vertices in the human body model, and using the vertices as a deformation handle to obtain the new Euclidean coordinates of the vertex on the deformation handle according to:
v.sub.i′=u.sub.i,i∈C wherein C refers to the set of all vertices on the deformation handle; u.sub.i refers to a new position of the ith vertex on the deformation handle; and v.sub.i′ represents the new position of the ith vertex; based on the differential coordinates and the new position of the vertex on the deformation handle, utilizing a least square method to calculate the positions of other vertices in the set of vertices V according to: V = argmin ( .Math. L ( V ) - Δ .Math. 2 + .Math. i C .Math. v i - u i .Math. 2 ) wherein, V′ refers to the new position vectors of all vertices; simplifying the optimal equation in the third step to transform the optimization problem according to:
AV′=b specifically, A = ( L F ) , F i j = { 1 , j = s i C 0 , Others b k = { 0 , k n x s k - n , n < k n + m ; the optimization problem is expressed as:
min∥Ax−b∥; systems are expressed as:
A.sup.TAx=A.sup.Tb
x=(A.sup.TA)A).sup.−1A.sup.Tb; A.sup.TA are positive definite systems; the systems are decomposed into two triangular matrices to multiply each other according to:
A.sup.TA=R.sup.TR; equation systems are transformed into:
R.sup.TRx=A.sup.Tb
R.sup.T{tilde over (x)}=A.sup.Tb
Rx={tilde over (x)}
x=R.sup.−1{tilde over (x)}; and a solution to the inverse matrix R.sup.−1 is obtained, and an intermediate variable is utilized to solve positions x of all vertices in the final set of vertices.

8. The method of claim 7, wherein the human body mesh is deformed as control vertices in accordance with the Laplacian matrix, driving real-time smooth deformation of the garment mesh, wherein pursuant to the processes described in Step (5), during a virtual dressing, motion information inputted by a customer is seen as new positions of control handle vertices of the human body model; by solving the least square problem, new positions of deformed human body and garment models are obtained.

Description

DESCRIPTION OF FIGURES

(1) FIG. 1 provides the renderings of two female models with different body shapes who wear T-shirts and trousers for this invention;

(2) FIG. 2 provides the renderings of two male models with different body shapes who wear T-shirts and shorts for this invention;

DETAILED DESCRIPTION OF THE INVENTION EMBODIMENTS

(3) Next, the technical solution in this invention will be further detailed in conjunction with figures and embodiments.

(4) (1) inputting polygonal mesh models of the human body and the garment;

(5) (2) discretizing non-homogeneous mesh models of the human body and the garment inputted in Step (1);

(6) (3) clustering all the discretized mesh vertices, to reduce the number of vertices and to form a set of homogeneous discrete vertices;

(7) (4) constructing Laplacian matrices of the human body and the garment;

(8) (5) preprocessing and solving inverse matrices;

(9) (6) editing by using the human body mesh as a control vertex, to drive a real-time smooth deformation of the garment mesh;

(10) (7) mapping a deformed and simplified mesh back to a mesh space of an original resolution to get deformed human body and garment mesh models.

(11) In the said Step (1), the mesh of 3D human body and garment models inputted are generally non-homogeneously distributed in real life; some parts of the mesh are dense and other parts are sparse. If non-homogeneous mesh is directly applied to the mesh deformation, the deformation effect will be greatly affected. Therefore, the human body and garment models shall be optimized during the preprocessing step to make them homogeneous.

(12) In the said Step (2), the non-homogeneous human body mesh M.sub.B and the garment mesh M.sub.C inputted in Step (1) are discretized to retrieve only vertex information from inputted mesh information, and get the sets of original vertices, namely, V.sub.B and V.sub.C. During the discretization, record distances between all vertices and their topological connections among the original mesh data for use in the mapping of Step (7).

(13) In the said Step (3), the set of discretized human body vertices V.sub.B and the set of discretized garment vertices V.sub.C are voxelized, and the space is decomposed into n×n voxels, each with a cubic radius of d. With the set of vertices V.sub.B for the human body mesh as an example, for the ith voxel V.sub.B.sup.i in it, supposing that there are m human body mesh vertices M.sub.B.sup.i, M.sub.B.sup.i+1, . . . , M.sub.B.sup.m−1 in the space covered by it, combine the m mesh vertices in the voxel V.sub.B.sup.i into a single vertex.

(14) (3-3) Handling all human body and garment vertices in the same way to get a simplified, discretized, and homogeneous set of vertices V.sub.B′ for the human body mesh and a simplified, discretized, and homogeneous set of vertices V.sub.C′ for the garment mesh.

(15) (3-4) Based on original topological connections from Step (2), adding edge connections to all vertices in the simplified set of vertices for new topological connections, which are used for constructing the Laplacian matrix in Step (4).

(16) In the said Step (4), the Laplacian operator matrices L for the human body and garment models are established. Since the human body model and the garment model are two independent models and all vertices in these two models have their own topological connections, these two models are separated from each other in terms of topology. In the meantime, as the deformation of the garment mesh shall be driven by human body mesh, the discretized set of vertices of these two models shall be treated as a whole while constructing the Laplacian matrix. The topological information and geometric information of the 3D model shall be considered simultaneously, so a geometric Laplacian matrix shall be constructed during this step

(17) (4-1) The set of vertices from the discretized and simplified human body and garment models is defined as V, which contains n vertices; among them, the Euclidean coordinates of any vertex i can be expressed as v.sub.i=[v.sub.ix, v.sub.iy, v.sub.iz].sup.T∈R.sup.3. For the set of vertices, V=[v.sub.1.sup.T, v.sub.2.sup.T, . . . , v.sub.n.sup.T].sup.T∘

(18) (4-2) Further, the positions of all vertices in the set of vertices V can be expressed, with a dimension of n, as the vector F. Correspondingly, the Laplacian matrix is n×n's matrix L. Therefore, multiply the Laplacian matrix and the position vector of the vertexes for the discretized human body and garment models, namely, L×F.

(19) (4-3) Further, the Laplacian matrix is a sparse matrix, whose way of assigning non-zero element values resembles the adjacency matrix between vertices. Considering the topology information of the set of vertices V, if there is an edge between any two vertices i, j, the weight between these two vertices is not zero, namely, w.sub.ij≠0, corresponding to the element a.sub.ij=w.sub.ij(i≠j) in the Laplacian matrix.

(20) (4-4) Further, for the element a.sub.ii in a diagonal line of the Laplacian matrix, its value refers to the number of vertices that connect to vertex i through an edge.

(21) In the said Step (5), the inverse matrix is preprocessed and solved. The core of Laplacian deformation is to convert the coordinates of the vertex from the Euclidean space to the differential coordinates space. To keep local details of the garment model unchanged, the deformed local differential coordinates shall also be maintained unchanged. The entire deformation process is shown below:

(22) (5-1) First, calculate the differential coordinates of each vertex falling under the set of vertices V:
Δ=L(V).

(23) Wherein, Δ refers to the differential coordinates of the vertex.

(24) (5-2) Second, move some vertices in the human body model, and see these vertices as the deformation handle to get the new Euclidean coordinates of the vertex on the deformation handle:
v.sub.i′=u.sub.i,i∈C

(25) Wherein, C refers to the set of all vertices on the handle. u.sub.i refers to the new position of the ith vertex on the handle; v.sub.i′ represents the new position of the ith vertex.

(26) (5-3) Third, based on the differential coordinates and the new location of the vertex on the handle, the least square method is utilized to calculate the locations of other vertices in the set of vertices V:

(27) V = argmin ( .Math. L ( V ) - Δ .Math. 2 + .Math. i C .Math. v i - u i .Math. 2 )

(28) Wherein, V′ refers to the new position vectors of all vertices.

(29) (5-4) Fourth, simplify the optimal equation in the third step to transform the optimization problem for solving the following linear equations:
AV′=b

(30) Specifically,

(31) A = ( L F ) , F i j = { 1 , j = s i C 0 , Others b k = { 0 , k n x s k - n , n < k n + m

(32) (5-5) The above optimization problem can be expressed as:
min∥Ax−b∥

(33) Since A is not a square matrix, the system cannot be directly solved, and the above system can be expressed as:
A.sup.TAx=A.sup.Tb
x=(A.sup.TA).sup.−1A.sup.Tb

(34) (5-6) A.sup.TA are positive definite systems, the systems can be decomposed into two triangular matrices to multiply each other:
A.sup.TA=R.sup.TR

(35) (5-7) The equation systems can be transformed into:
R.sup.TRx=A.sup.Tb
R.sup.T{tilde over (x)}=A.sup.Tb
Rx={tilde over (x)}
x=R.sup.−1{tilde over (x)}

(36) As a result, the solution to the inverse matrix R.sup.−1 shall be obtained first, and an intermediate variable is utilized to solve the positions x of all vertices in the final set of vertices.

(37) In the said Step (6), changes are made to the control vertices of human boxy mesh through the Laplacian matrix to drive real-time smooth deformation of garment mesh. Pursuant to the processes described in Step (5), during the virtual dressing, the motion information inputted by the users is seen as new positions of the control handle vertices of the human body model; by solving the above least square problem, the new positions of deformed human body and garment models can be obtained.

(38) In the said Step (7), the deformed and simplified human body and garment mesh are mapped back to the mesh space of original resolution based on the recorded distances ad topological connections to get the ultimately deformed human body and garment mesh.

(39) (7-1) In the said Step (3), the simplified set of vertices V.sub.B′ for human body mesh and the simplified set of vertices V.sub.C′ for the garment mesh are obtained through voxelization and conglomeration. With the vertices of human body mesh as an example, in the original non-simplified set of vertices V.sub.B for human body mesh, for any vertex i, m simplified vertices of human body mesh can be found within the given distance range: s.sub.1, s.sub.2, . . . , s.sub.m, and the distance between Vertex i and m simplified human body mesh vertices can be recorded as d.sub.s.sup.1, d.sub.s.sup.2, . . . , d.sub.s.sup.m.

(40) (7-2) Euclidean coordinates of Vertex i can be expressed as:
v.sub.i=v.sub.s.sup.1w(d.sub.s.sup.1)+v.sub.s.sup.2w(d.sub.s.sup.2)+v.sub.s.sup.3w(d.sub.s.sup.3)+ . . . +v.sub.s.sup.mw(d.sub.s.sup.m)

(41) Wherein, v.sub.s.sup.j, j=1, 2, . . . , m refers to the Euclidean coordinates of m simplified vertices; w(d.sub.s.sup.j) represents the weighting function with the distance d.sub.s.sup.j as an independent variable.

(42) (7-3) Based on the weighting function and relations between adjacent vertices recorded in Step (3), calculate the new positions of human body mesh vertices of the original resolution in accordance with the new positions of the deformed and simplified human body mesh vertices, recover the original topological connections, and add edge connections to the recovered vertices.

(43) (7-4) The same method is adopted for garment mesh vertices, and the deformed mapped human body and garment mesh of the original solution are finally obtained.

(44) Above are detailed descriptions about this invention, but the embodiments of this invention are not limited to the above ones, and other alterations, replacements, combinations, and simplifications made under the guidance of the core idea of this invention shall also be included in the protection range of this invention.