The present invention relates to a data processing method for transforming a first 3D (3 dimensions) surface which is adapted to cover a first object and is formed of a mesh of first 2D (2 dimensions) elementary surfaces into a second 3D surface which is adapted to cover a second object and is formed of a mesh of second 2D elementary surfaces.
Such data processing methods are used, for example, to determine, starting from a person, called the “source person”, dressed in a garment, called the “source garment”, and another person, called the “target person”, of a different size to the source person, a garment, called the “target garment”, which corresponds to the source garment but is adapted to the size of the target person, the target/source persons and garments all being defined by numerical data.
In one process, especially a manual process, which requires considerable know-how, tailors adapt a 2D pattern of the garment according to the changes between the source and target persons in the region of key distances: for example in the region of the hips, the waist, the length of the arms, etc.
There are automatic systems for assisting with the adaptation (see, for example, MOORE C. L., MULLET K. K., and YOUNG M. B. P. 2001, Concepts of Pattern Grading: Techniques for Manual and Computer Grading, Fairchild Books And Visuals), but they only provide certain correspondences in tables and do not allow a tailor's know-how to be dispensed with. Furthermore, they are scarcely suitable for virtual persons which, typically, do not comply with the size tables of standard bodies.
Techniques called “skinning” are also used to adapt real or virtual garments in 3D: see, for example, WANG C. C. L., WANG Y., and YUEN M. M. F. 2005. Design automation for customized apparel products, Comput. Aided Des. 37, 675-691, or WANG C. C. L., C. HUI K., and M. TONG K. 2007, Volume parameterization for design automation of customized free-form products, submitted for IEEE Transactions on Automation Science and Engineering 4, 11-21). However, as indicated in MENG Y., WANG C. C., and JIN X. 2012, flexible shape control for automatic resizing of apparel products, Computer-Aided Design 44, 1, 68-76, these techniques alter the shapes of loose garments significantly and impair both the conformity to the initial model and the credibility of the adapted garment.
In addition, in order to simplify the creation of virtual 3D content, there are transfer and resizing techniques for different types of data, for example for textures and geometric details, deformations or even animations . . . . In particular, geometry and deformation transfer techniques use a shape-preserving approach (see, for example, BEN-CHEN M., WEBER O., and GOTSMAN C. 2009, Spatial deformation transfer, Eurographics/ACM SIGGRAPH Symposium on Computer Animation). In order to resize models of manufactured objects in a realistic manner, one technique (KRAEVOY V., SHEFFER A., COHEN-OR D., and SHAMIR A. 2008, Non-homogeneous resizing of complex models, ACMTrans. Graph, 111) minimizes the changes of the surface normals. However, this method does not give satisfactory results in the transfer of virtual or real garments, as a result especially of the compromise which must be taken into account between the constraints of proportionality, credibility and shape.
Consequently, there is a need for a technique, called a transfer or calibration technique, which defines a covering which fits the proportions of a support object, for example a virtual person or a real person, starting from an initial covering serving as a model, which initial covering is adapted to the proportions of another support object, that is to say another virtual person or real person, and which especially is satisfactory when the covering comprises a garment.
To that end, according to a first aspect, the invention proposes a method of the type mentioned above, characterized in that it comprises a step of iterative processing in which the transformations of the first elementary surfaces into respective second elementary surfaces are determined by carrying out in an iterative manner steps in which:
a/ in a current (k+1)th iteration step, k being an integer greater than or equal to 0, for each of a plurality of couples comprising a first elementary surface and a second elementary surface derived from a transformation of the first elementary surface and having been obtained in the preceding iteration k, the projection of said second elementary surface on the plane of said first elementary surface is determined, and a current 2D transformation matrix Tk+1t is defined for said couple,
where Tk+1t=Pkt
wherein pi, for i=1 to n, are the vertices of the first elementary surface t of the couple and pn+1 is obtained by offsetting the vertex p1 by a normal vector of given norm to said first surface;
wherein (Pt)−1 is the inverse of the matrix Pt when the first elementary surfaces are triangles and is a pseudo-inverse matrix of the matrix Pt otherwise;
wherein p′i,k, for i=1 to n, are the vertices of said projection of the second elementary surface and p′n+1,k is obtained by offsetting the vertex p′1,k of said normal vector;
b/ the second elementary surfaces obtained for the (k+1)th iteration are determined as those minimizing a function including at least the term
wherein S is a set of second elementary surfaces {tilde over (t)}k+1 determined in step k+1;
Tk+1t are the transformation matrices defined in step a/ of the (k+1)th iteration;
{tilde over (P)}
k+1
t
=[{tilde over (p)}
n+1,k+1
−{tilde over (p)}
i,k+1]i=1, . . . ,n;
wherein {tilde over (p)}i,k+1, for i=1 to n, are the vertices of the second elementary surface {tilde over (t)}k+1 as determined in the (k+1)th iteration and {tilde over (p)}n+1,k+1 is obtained by offsetting the vertex {tilde over (p)}1,k+1 by a vector of said given norm normal to said second elementary surface {tilde over (t)}k+1.
A method according to the invention gives very satisfactory results relative to data defining garments to be calibrated according to the sizes of the persons who are to wear them, but also relative to any type of surface element which is to cover structures of various sizes, for example a shoe, a hat or a bag on a model of a person, or an envelope (of paper, plastics or other material) around any object which is to be resized.
In embodiments, the method according to the invention further comprises one or more of the following features:
wherein σ is a constant value, pm is the second point of a pair, pi is said vertex of the first surface, vb is the unit vector collinear to the bone, and v is the vector joining said vertex and the first point of the pair;
{tilde over (p)}
i1
={tilde over (p)}
m1
+∥p
m1
,p
i
∥·V
bm1 and {tilde over (p)}i2={tilde over (p)}m2+∥pm2,pi∥·Vbm2;
pi being said vertex of the first elementary surface;
{tilde over (p)}mn being the point resulting from the application of the isomorphism function to the second point of reference of the nth reference pair, n=1 or 2;
vbmn being a unit vector parallel to the segment [{tilde over (p)}bn, {tilde over (p)}mn], {tilde over (p)}bn is the point resulting from the application of the isomorphism function to the first point of reference of the nth reference pair;
wherein z is the coordinate of the projection of the vertex pi on the segment connecting the two points of reference pb1 and pb2, pb1 being considered as the zero coordinate point;
wherein T is a set of second elementary surfaces {tilde over (t)}k+1 determined in iteration k+1;
each {tilde over (p)}i,0 is a second elementary surface vertex defined in iii/ for a vertex pi of a first elementary surface;
αi is a value which is constant for the vertices {tilde over (p)}i,k+1 of a same second elementary surface {tilde over (t)}k+1;
db is the unit vector collinear to the bone for which the selected pair of first and second points of reference has been determined, and, dq being the unit vector collinear to (pb, {tilde over (p)}i,0), the unit vector dt is equal to the vector product of the vectors db and dq;
wherein β is a constant,
F is a set of second elementary surfaces {tilde over (t)}k+1 determined in iteration k+1 and situated in adjusted zones of the surface on the object, said second elementary surfaces determined as being found in F then being removed from the set S;
each {tilde over (p)}i,0 is a second elementary surface vertex defined in iii/ for the vertex pi of a first elementary surface;
db is the unit vector collinear to the bone for which the selected pair of first and second points of reference has been determined, and, dq being the unit vector collinear to (pb, {tilde over (p)}i,0), the unit vector dt is equal to the vector product of the vectors db and dq;
According to a second aspect, the present invention proposes a computer program which is to be installed in a data processing device for transforming a first 3D surface which is adapted to cover a first object and is formed of a mesh of first 2D elementary surfaces into a second 3D surface which is adapted to cover a second object and is formed of a mesh of second 2D elementary surfaces, said program comprising instructions for carrying out the steps of a method according to the first aspect of the invention during execution of the program by computing means of said device.
According to a third aspect, the present invention proposes a data processing device for transforming a first 3D surface which is adapted to cover a first object and is formed of a mesh of first 2D elementary surfaces into a second 3D surface which is adapted to cover a second object and is formed of a mesh of second 2D elementary surfaces, said processing device being adapted to determine transformations of the first elementary surfaces into respective second elementary surfaces and comprising:
where Tk+1t=Pkt
wherein pi, for i=1 to n, are the vertices of the first elementary surface t of a couple and pn+1 is obtained by offsetting the vertex p1 by a vector normal to said first surface, of given norm;
wherein (Pt)−1 is the inverse of the matrix Pt when the first elementary surfaces are triangles and is a pseudo-inverse matrix of the matrix Pt otherwise;
wherein p′i,k, for i=1 to n, are the vertices of said projection of the second elementary surface and p′n+1,k is obtained by offsetting the vertex p′1,k of said normal vector;
wherein Tk+1t are the transformation matrices defined by the first module in the (k+1)th iteration operation by the supervisor;
where {tilde over (P)}k+1t=[{tilde over (p)}n+1,k+1−{tilde over (p)}i,k+1]i=1, . . . ,n,
wherein {tilde over (p)}i,k+1, for i=1 to n, are the vertices of the second elementary surface of the couple as determined in the (k+1)th iteration and {tilde over (p)}n+1,k+1 is obtained by offsetting the vertex {tilde over (p)}1,k+1 by a vector normal to said second surface, of given norm.
These features and advantages of the invention will become apparent upon reading the following description, which is given solely by way of example and with reference to the accompanying drawings, in which:
a shows source and target persons and a source garment in an embodiment of a method according to the invention;
b shows the target garment after step 202 shown in
c shows the final target garment obtained in an embodiment of the invention;
The device 1 is adapted to store in its memory 3 data defining a 3D source surface, referenced Ss, and a 3D source object, referenced Os, such that the source surface Sc is adapted to “clothe” the outside surface of the source object Os.
The device 1 is adapted further to store in its memory 3 data defining a 3D target object, referenced Oc, and an isomorphism function Fcross allowing a point of the source object Os to be matched to a point of the target object Oc, which is assumed to be known (see, for example, SHEFFER A., PRAUN E. and ROSE K. 2006, Mesh parameterization methods and their applications, Found. Trends. Comput. Graph. Vis. 2, 105-171, or CHANG Y.-T., CHEN B.-Y., LUO W.-C. and HUANG J.-B., volume parameterization, in Proceedings of Computer Graphics International 2006, 78-89) or methods consisting in using a deformation of the same mesh to represent the geometry of the source and target objects.
The memory 3 of the device 1 further comprises a computer program P comprising software instructions which, when they are executed on the microprocessor 2 under the supervision of the controller 4, carry out steps described below.
The device 1, by carrying out those steps, is adapted to determine data defining a 3D target surface, referenced Sc, adapted to clothe the target object Oc.
In the embodiment considered below, the data defining the source object Os are data that define points of the animated skeleton and points of the skin of a first person. The data defining the target object Oc are also data that define points of the skeleton and of the skin of a second person, whose morphology may be very different from that of the first person.
In the embodiment considered below, the source surface Ss corresponds to a garment clothing the source object Ss and is a surface composed of intermeshed triangles called the “source triangles”. Each triangle is defined by its three vertices.
Likewise, the desired target surface Sc corresponds to a garment clothing the target object Sc and is a surface composed of intermeshed triangles called the “target triangles”.
A balance between different criteria is to be taken into account for a satisfactory transfer operation, those criteria being especially the preservation of the shape of the initial garment, of the relative position and the fit between the garment and the person, of the manufacturable nature of the garment, and of non-collision.
The criterion of preservation of the shape of the initial garment allows the overall rendering of the initial garment to be maintained. For example, a straight skirt must still be a straight skirt after transfer, and the same is true for flared jeans. With reference to
Proportionality, or the increase or reduction in size, requires that a transferred garment respects the relative position of the garment in relation to the limbs and the body of the person. For example, a knee-length skirt must remain at knee length independently of a change in the height of the person, a waistline of a dress must remain at waist level, and a side zip must remain at the side.
The criterion of preservation of the fit reflects the maintenance of the local distance between the garment and the person wearing it. There may be competition between this criterion and the criterion of preservation of shape, because this distance must sometimes be altered, especially in non-tight zones (i.e. distances between the garment and the person which are greater than a threshold representing the thickness of the fabric), in order to preserve the shape.
The garments are produced from flat panels of fabric. The criterion of manufacturable nature takes account of the fact that the fabric has limited stretchability.
Finally, when applied to transfers of garments between virtual persons, it must be ensured that the surface of the garment is modified in order to avoid collisions with the body of the person or interpenetrations between separate layers of clothing on the person.
In one embodiment, with reference to
In a transformation operation 200 called “transformation as far as possible in 2D”, steps 201 to 204 are carried out to calibrate the source surface Ss intended for the target object, defining iteratively a target surface Sc.
In a step 201, for each triangle t of the source surface Sc, if the vertices of the triangle t are named p1, p2, p3, there is defined a matrix Pt, of size 3*3, representing a reference point local to the triangle t: Pt=(p4−p1, p4−p2, p4−p3), wherein p4=p1+{right arrow over (n)} and {right arrow over (n)} is the unit vector normal to the triangle t. This reference point represents the triangle t in that it defines its plane, the length of its three sides and the angles which those sides form between them, but without taking into account the position of the triangle in space.
In a T0 initialization step 202 (k=0), the starting coordinates of the vertices of the triangles of the target surface Sb are initialized as a function of the source surface Ss at least one target object. There is one, and only one, target triangle {tilde over (t)}0 for a source triangle t.
This initialization is optionally also a function of the source object.
A form of this initialization is described hereinbelow.
For each source triangle t, the coordinates of the target triangle {tilde over (t)}0 corresponding thereto on initialization are {tilde over (p)}1,0, {tilde over (p)}2,0 and {tilde over (p)}3,0.
In an iterative step 203, an attempt will be made to modify as little as possible the normal of a target triangle {tilde over (t)} (the triangle {tilde over (t)} is the result of the transformation of the triangle t) relative to the normal of the source triangle t corresponding thereto, by minimization of the following formula:
wherein ∥.∥F is a matrix norm, for example the Frobenius norm;
the
relates to each triangle t of the source surface Ss.
{tilde over (P)}t is the 3*3 matrix equal to [{tilde over (p)}4−{tilde over (p)}1, {tilde over (p)}4−{tilde over (p)}2, {tilde over (p)}4−{tilde over (p)}3], wherein {tilde over (p)}1, {tilde over (p)}2, {tilde over (p)}3 are the vertices of the target triangle {tilde over (t)} derived from the transformation of the source triangle t corresponding thereto, and {tilde over (p)}4={tilde over (p)}1+{tilde over ({right arrow over (n)}, and {tilde over ({right arrow over (n)} is the unit vector normal to the target triangle {tilde over (t)}; {tilde over (P)}t represents the local reference point obtained after transformation of the triangle t to {tilde over (t)};
(Pt)−1 is the inverse matrix of {tilde over (P)}t;
{tilde over (P)}t(Pt)−1 represents the transformation between the source triangle t and the corresponding target triangle {tilde over (t)}; and
Tt is a corresponding transformation which is necessarily a 2D transformation, in the plane of the triangle t.
In order to solve the problem of minimization, an iterative technique of least squares is used, which alternates between updating each transformation Tt, while keeping {tilde over (P)}t fixed, and updating {tilde over (P)}t while this time considering the transformations Tt to be fixed. The value obtained for the formula Form decreases between two successive iterations, which ensures the convergence of step 203.
Step 203 comprises sub-steps 203—a and 203—b carried out in a (k+1)th iteration, where k is an integer greater than or equal to 0.
There are named {tilde over (p)}1,k, {tilde over (p)}2,k, {tilde over (p)}3,k the vertices of the target triangle {tilde over (t)}k which are derived from the transformation of the triangle t as determined in the kth iteration of step 203.
There is a target triangle {tilde over (t)}k for each source triangle t.
This transformation is defined by the matrix {tilde over (P)}kt(Pt)−1, wherein {tilde over (P)}kt=[{tilde over (p)}4,k−{tilde over (p)}1,k, {tilde over (p)}4,k−{tilde over (p)}2,k, {tilde over (p)}4,k−{tilde over (p)}3,k], wherein {tilde over (p)}4,k={tilde over (p)}1,k+{tilde over ({right arrow over (n)}k, and {tilde over ({right arrow over (n)}k is the unit vector normal to the target triangle {tilde over (t)}k determined in the kth iteration.
A corresponding 2D transformation matrix Tkt has also been determined for each triangle t at the end of the kth iteration of step 203.
In a current iteration step k+1, during the sub-step 203—a carried out by the first module of the device 1, the corresponding 2D transformation matrix Tk+1t determined for each source triangle t.
To that end, the projection of each target triangle {tilde over (t)}k determined in iteration k on the plane of the corresponding source triangle t is carried out:
p′i,k+1={tilde over (p)}i,k−<{tilde over (p)}i,k, {right arrow over (n)}t>{right arrow over (n)}t wherein {right arrow over (n)}t is the unit vector normal to the triangle t, wherein the function <.,.> represents the scalar product and i=from 1 to 3.
The local reference point derived from this projection is P′kt=[p′4,k−p′1,k, p′4,k−p′2,k, p′4,k−p′3,k], where p′4,k=p′1,k+{right arrow over (n)}, and {right arrow over (n)} is the unit vector normal to the source triangle t.
There is then determined the corresponding 2D transformation matrix Tk+1t for the triangle t:
T
k+1
t
=P′
k
t(Pt)−1.
In the current iteration k+1 of the sub-step 203—b carried out by the second module, on the basis of the matrices Tk+1t so determined for the source triangles t, the target triangle for each source triangle t is updated.
To that end there are determined the target triangles {tilde over (t)}k+1 permitting minimization of the following term, derived from the formula (Form 1):
wherein {tilde over (P)}k+1t=[{tilde over (p)}4,k+1−{tilde over (p)}1,k+1, {tilde over (p)}4,k+1−{tilde over (p)}2,k+1, {tilde over (p)}4,k+1−{tilde over (p)}3,k+1], wherein {tilde over (p)}4,k+1={tilde over (p)}1,k+1+{tilde over ({right arrow over (n)}k+1, {tilde over ({right arrow over (n)}k+1 being the unit vector normal to the target triangle {tilde over (t)}k+1. This sum
relates to all the triangles t of the source surface (or all the target triangles, each target triangle corresponding to a source triangle), or only to those verifying a given condition, as indicated below.
The matrices Tk+1t being known, the determination of the vertices {tilde over (p)}1,k+1, {tilde over (p)}2,k+1, {tilde over (p)}3,k+1 of the target triangles {tilde over (t)}k+1 t minimizing the quadratic equation (Form 1k+1) is reduced to the resolution of a simple linear system.
In one embodiment, since the positions of the vertices of the target triangle determined for each source triangle do not vary significantly from one iteration to the other, a resolution of the conjugate gradient type is used, with the positions determined in iteration k as the initial conditions.
In a step 204 carried out by the supervisor 7, an iteration stop condition is verified: if the value obtained for the term Ek+1 is below a fixed threshold dmax, the iterations are stopped, the final target surface Sc considered then being that constituted by the mesh of the target triangles {tilde over (t)}k+1. Otherwise, a new iteration of step 203 is carried out.
Such an operation 200 allows the shape of the garment to be preserved in the best possible manner during its transfer between the persons, as well as its manufacturable nature.
In one embodiment, the initialization step 202 is performed in the manner described below with reference to
Accordingly, each vertex pi of a triangle t of the source surface Ss will be associated with a pair of points of reference (pb, pm) situated on a bone of the skeleton and on the skin of the source person, respectively.
It has been determined by the applicant that selecting the point on the skin that is closest to the vertex pi, as suggested by CORDIER F., SEO H. and MAGNENAT-THALMANN N. 2003, Made-to-measure technologies for an online clothing store, IEEE Computer Graphics and Applications 23, 38-48; or MENG Y., WANG C. C. and JIN X. 2012, Flexible shape control for automatic resizing of apparel products, Computer-Aided Design 44, 1, 68-76, is not necessarily the best choice because it will give rise to phenomena of slipping of the garment along the body of the target person.
According to the invention, in the initialization step 202, the chosen pairs of points of reference correspond to local minima of a function expressing the distance to the source person which gives preference to directions perpendicular to the local bone.
Accordingly, in a sub-step 202—a, for each vertex pi there is(are) determined the point(s) pbj closest to pi on each bone j (j=1 to J) of the skeleton of the source object (it will be noted that pb may be an end of a bone).
For each bone j, pmj is defined as being the point of the skin of the source person that is closest to the vertex and situated on the segment [pbj, pi]. Such a point pmj necessarily exists, since pbj is on the inside, and pi is on the outside, of the skin of the source person.
In order to select a pair of points of reference for a vertex pg, both the distance between pi and each of the intersections pmj (j=1 to J) and also the angle between the axis of the bone vbj and the vector v=pi−pbj are considered, because it is preferred that those two vectors are perpendicular.
Accordingly, one pair (pb, pm) among the pairs (pbj, pmj) is thus selected as the reference for the vertex pi if it minimizes the following formula:
wherein σ is a constant value, for example equal to 0.1.
In most cases, only one minimum exists. When there are two solutions giving an equal or very similar minimum, the two corresponding pairs are associated with the vertex pi: this is typically the case in the zones between the legs of the person or under the arms.
Furthermore, for each pair (pb, pm) selected as reference for the vertex pi, the offset oi=∥pm, pi∥ is further associated with the vertex pi.
It will be noted that, in other embodiments, the formula to be minimized takes other forms, for example also function of ∥pmj, pi∥ and of the scalar product (vbj, v).
In a sub-step 202—b, for each pair of points of reference (pb, pm) so selected for a vertex pi, the corresponding pair of points of reference ({tilde over (p)}b, {tilde over (p)}m) on the target object Oc is determined by applying the isomorphism function Fcross:
{tilde over (p)}
b
=F
cross(pb) and {tilde over (p)}m=Fcross(pm) (Eq 1)
Then, in a sub-step 202—c, a vertex {tilde over (p)}i,0 of the target surface Sc is defined for each vertex pi of the source surface Ss, which will then be considered in the initialization step 202 as a vertex of the target triangle {tilde over (t)}0 corresponding to the source triangle t:
for each vertex pi of a triangle t of the source surface with which there is associated a single pair of points of reference (pb, pm), {tilde over (p)}i,0 is defined:
{tilde over (p)}
i,0
={tilde over (p)}
m
+o
i
·v
bm (Eq 2)
wherein vbm is a unit vector parallel to the segment [{tilde over (p)}b, {tilde over (p)}m]
For each vertex pi of a triangle t of the source surface with which there are associated two pairs of points of reference (pb1, pm1) and (pb2, pm2), there are obtained, with the aid of the equations (Eq 1) and (Eq 2) applied in succession to each of the two pairs, {tilde over (p)}i,0,1 and {tilde over (p)}i,0,2 ({tilde over (p)}i,0,n=Fcross(pm,n)+∥pm,n, pi∥vbm wherein vbm is a unit vector parallel to the segment [Fcross(pbn), Fcross(pmn)], and n=1 to 2);
{tilde over (p)}g,0 is defined with the aid of a weighted sum of {tilde over (p)}i,s,1 and {tilde over (p)}i,0,2:
{tilde over (p)}
i,0
=w
1
·{tilde over (p)}
i,0,1
+w
2
·{tilde over (p)}
i,0,2,
where
wherein z is the coordinate of the projection of the vertex pi on the segment connecting the two points of reference pb1 and pb2, pb1 being considered as the zero coordinate point;
and w2=1−w1.
Such a step 202 allows a version to be generated which is based on a proportional scaling starting from the source surface, and which satisfies the criteria of preservation of fit and of relative position (the criterion of preservation of shape being taken into account in step 203).
By way of illustration,
In
In
In one embodiment, there is taken into account in step 203 for the (k+1)th iteration, in addition to the criterion of preservation of shape, the criterion of preservation of the relative position and/or of fit.
To that end there is considered a local reference point defined by the relation between each initialization vertex {tilde over (p)}i,0 determined for a vertex pi of a triangle t of the source surface Ss and the point of reference pb, on the skeleton, determined for the vertex pi (see steps 202—a_to 202—c). This reference point includes the unit vector db parallel to the bone corresponding to the pair of points of reference selected in sub-step 202—a, the unit vector dq collinear to (pb, {tilde over (p)}i,0), and the unit vector dt equal to the vector product of the vectors db and dq (by construction dq is orthogonal to db).
In order better to take into account the preservation of the relative position, in step 203—b of the (k+1)th iteration, the term Erl
The purpose of the two terms of this sum is to prevent the garment from slipping or turning on the skeleton during transfer. For internal vertices (as opposed to those located on the edge of part of the garment) situated in loose regions, a low value is used for αi (for example, chosen in the range [0, 10] and equal in one embodiment to 0.5), which assists with the preservation of the shape at the expense of minor imprecisions in the preservation of the relative positions. Along borders and seams of the garment (where any twisting or displacement of the garment would be truly visible) in tight regions, a high value is used for αi (for example, chosen in the range [10, +∞] and equal in one embodiment to 1000).
Given that the preservation of the relative position does not impose any constraint on the distance between the body of the person and the fabric, in one embodiment no constraint is fixed relative to the component of {tilde over (p)}i,k+1−{tilde over (p)}i,0 aligned with dq.
In one embodiment, in order better to take into account the fit in tight regions, the term of relative location is increased with a term of fit Efit
wherein the set F comprises the target triangles situated in the tight regions (or the target triangles each corresponding to a source triangle situated in a tight region); and wherein the constant value of β is chosen in the range [10, +∞] and is, for example, in one embodiment equal to 1000.
Accordingly, in one embodiment, in step 203—b, in order to determine the target triangles {tilde over (t)}k+1, instead of minimizing Eshape
In the case where Efit
Given the degree of freedom provided by varying the distance to the body of the target object person, it is thus possible to preserve simultaneously the shape and the relative location in the adjusted regions.
In one embodiment, the source triangles identified as forming part of a tight region of the source garment are selected as those separated by a distance to the body which is below a given threshold. This criterion can be problematical when the curve of the body increases significantly between the source and target persons. In this case, preserving the tight appearance can increase the Gaussian curve of the garment, rendering production of the garment unlikely. In another embodiment, a technique of selective relaxation is used, relaxing the fit in regions where the normal to the points of the source garment points downwards or sideways. The set F then includes as elements any target triangle such that all the vertices of the corresponding source triangle are situated beyond a given threshold distance of the body of the source person, the normal of the source triangle pointing towards the top of the person.
In one embodiment, in order to prevent collisions between the target garment determined iteratively in step 203 and the body of the target person, the scalar product of the vectors {tilde over (p)}i,k+1−pm and dq is greater than a fixed minimum value ε (typically, the smallest distance between the source garment and the skin of the source person is taken as ε, which is generally equal to the assumed thickness of the fabric), namely <{tilde over (p)}i,k+1−pm, dq>≧ε, which amounts to requiring that the target garment is further from the bone than is the skin of the target person.
To that end, the vertices that minimize Ek+1 are first sought in step 203—b for iteration k+1 without taking account of that constraint. Then the collisions are identified.
In order to identify the collisions, the intersection of the segments {tilde over (p)}i,k+1−pb with the target person is determined, and a test is carried out by comparing the target skeleton/current target garment distances with the target skeleton/target person distances. To that end, the point of the garment is re-projected onto the associated bone, which gives a new value at point pb, and the point of the skin pm is recalculated as being the intersection between the straight line which carries {tilde over (p)}i,k+1−pb and the skin. The comparison between the distance (pb, pm) and the distance ({tilde over (p)}i,k+1−pb) makes it possible to know if {tilde over (p)}i,k+1 has penetrated beneath the skin. In the case of penetration of the vertex {tilde over (p)}i,k+1, the vertex {tilde over (p)}i,0 is recalculated by projecting the vertex at the distance ε defined above of the point pm of the target person along the segment {tilde over (p)}i,kk+1−pb, and the highest triangle adjacent to that recalculated vertex {tilde over (p)}i,0 is added to the set F, that triangle being treated as a triangle of tight zones in the calculations which follow. The optimization (step 202) is then repeated. The treatment of the collisions (step 203) is iterated as long as collisions remain.
In one embodiment, the source person comprises several superposed layers of source garments, which are to be adapted to cover a target person. In such a case, each source garment is adapted to the target person in succession, starting with the source garment which is closest to the body of the source person. At each stage, the layers of garments which have already been adapted are considered as forming part of the body of the source/target persons.
In order to obtain a 2D pattern corresponding to a garment adapted to a target person according to the invention, the latter is cut out from the target garment along seams indicated on the source garment (in such a manner as to have the same edges for the patterns). A parameterization method is then used to flatten each part of the garment (for example, ABF++ can be used, see SHEFFER A., LEVY B., MOGILNITSKY M. and BOGOMYAKOV A. 2005, Abf++: fast and robust angle based flattening, ACM Trans. Graph. 24 (April), 311-330).
The source and target surfaces Ss and Sc considered above are defined by meshed triangles. It goes without saying that the invention can be carried out on the basis of surfaces defined by a mesh of planar elementary surfaces comprising all types of planar polygons.
When the elementary surfaces are not triangles, (Pt)−1 is pseudo-inverse of the matrix Pt.
The steps and criteria described above according to the invention relate to the operations of defining a garment adapted to dimensions of a target person starting from a garment which serves as a model adapted to a source person. They are, of course, wholly transposable to operations of transferring a surface covering a source object to a target object of dimensions other than those of the source object, the surfaces and objects being of any type, for example other than clothing on persons. The points of the skin are then replaced by the points of the mesh of the object and the points of the animated skeleton are replaced by the points of a skeleton internal to the mesh of the object, for example of the medial axis type.
A method according to the invention permits very credible resizing while avoiding the need for intervention by the user (automatic process).
Number | Date | Country | Kind |
---|---|---|---|
1254869 | May 2012 | FR | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2013/060422 | 5/21/2013 | WO | 00 |