Three-dimensional model wearing method, apparatus and device, and storage medium
By calculating the deformation parameters of the wearable component to adapt it to the target reference three-dimensional model, the problem of inefficient manual adjustment in the prior art is solved, and the interoperability and efficient fit of the wearable component under different reference three-dimensional models is achieved.
Patent Information
- Application Number
- PCT/CN2024/132199
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-15
- Filing Date
- 2024-11-15
- Publication Date
- 2025-06-19
AI Technical Summary
The prior art requires manual adjustment of the shape of the wearable component to fit the target base mold, resulting in inefficiency and possible errors.
By obtaining the type of wearable components, calculate the deformation parameters of the corresponding source reference three-dimensional model to the target reference three-dimensional model, including irregular and regular deformation parameters, and then adaptively deform the wearable components to adapt to the target reference three-dimensional model.
The interoperable use of wearable components under different reference three-dimensional models is realized, which avoids misalignment, mold wear or non-fitting, improves wearable efficiency, and saves storage and management costs.
Smart Images

Figure CN2024132199_19062025_PF_FP_ABST
Abstract
Description
A three-dimensional model wearing method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application No. 202311733495.4 filed in China on December 15, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the technical field of three-dimensional models, and in particular to a method, apparatus, device and storage medium for wearing a three-dimensional model. Background Art
[0004] A digital human is a digitized humanoid created using digital technology that closely resembles a human. To provide digital humans with varying sizes, dimensions, and appearances for different products or scenarios, it's necessary to design baseline 3D models of digital humans of varying sizes and build wearable components for each base model.
[0005] However, when adding wearable components from the source master model to the target master model, components constructed under different master models cannot communicate with each other, resulting in misalignment, interlacing, or poor fit. To avoid this, existing techniques typically involve manually adjusting the shape of the wearable components added to the target master model to ensure they fit the target master model. Summary of the Invention
[0006] The present disclosure provides a three-dimensional model wearing method, device, equipment and storage medium to solve the problem in the prior art that the shape of the wearable parts added to the target base model must be manually adjusted to make them fit the target base model.
[0007] To achieve the above objectives, the present disclosure provides a method for wearing a three-dimensional model, comprising:
[0008] Obtaining the type of the wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component;
[0009] According to the type, deformation parameters of a source reference three-dimensional model corresponding to the wearable component converted into a target reference three-dimensional model are obtained; wherein the deformation parameters include irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponds to the irregular deformation parameters, and the rigid wearable component corresponds to the regular deformation parameters;
[0010] Deforming the wearable component using the deformation parameters;
[0011] The deformed wearable component is worn on the target reference three-dimensional model.
[0012] As an improvement to the above solution, the irregular deformation parameters are obtained by the following steps:
[0013] Acquire first source key point data of the source reference three-dimensional model and first target key point data of the target reference three-dimensional model;
[0014] Based on a Gaussian radial basis function, establishing a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model;
[0015] The first source key point data and the first target key point data are substituted into the conversion relationship to obtain the irregular deformation parameters.
[0016] As an improvement to the above solution, the conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model is established based on the Gaussian radial basis function, including:
[0017] Constructing the Gaussian radial basis function according to the Euclidean distance between any of the first source key point data and any other of the first source key point data in the source reference three-dimensional model;
[0018] The value of the weighted sum of the irregular deformation parameter and the Gaussian radial basis function is used as the first target key point data in the target reference three-dimensional model to obtain a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model.
[0019] As an improvement to the above solution, the step of deforming the wearable component using the deformation parameter includes:
[0020] Acquiring mesh vertex data of the wearable component;
[0021] Deforming the mesh vertex data using the irregular deformation parameters to obtain deformed mesh vertex data;
[0022] The mesh vertex data in the wearable component is replaced with the deformed mesh vertex data.
[0023] As an improvement to the above solution, after obtaining the irregular deformation parameters, the three-dimensional model wearing method further includes:
[0024] Acquiring second source key point data of the source reference three-dimensional model;
[0025] Deforming the second source key point data using the irregular deformation parameters to obtain deformed second source key point data;
[0026] Replacing the second target key point data in the target reference three-dimensional model with the deformed second source key point data to obtain a deformed target reference three-dimensional model;
[0027] Wearing the deformed wearable component on the target reference three-dimensional model includes:
[0028] The deformed wearable component is worn on the deformed target reference three-dimensional model.
[0029] As an improvement to the above solution, the rule deformation parameters are obtained by the following steps:
[0030] Acquire third source key point data of the source reference three-dimensional model and third target key point data of the target reference three-dimensional model;
[0031] Calculating a scaling factor for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0032] Calculating a rotation matrix for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0033] Calculating an offset from the source reference three-dimensional model to the target reference three-dimensional model according to the scaling factor and the rotation matrix;
[0034] The regular deformation parameters include: the scaling factor, the rotation matrix and the offset.
[0035] As an improvement to the above solution, the calculating, based on the scaling factor and the rotation matrix, an offset from the source reference three-dimensional model to the target reference three-dimensional model includes:
[0036] Acquire fourth source key point data of the source reference three-dimensional model and fourth target key point data of the target reference three-dimensional model;
[0037] deforming the fourth source key point data according to the scaling factor and the rotation matrix to obtain deformed fourth source key point data;
[0038] An offset amount for converting the source reference three-dimensional model into the target reference three-dimensional model is determined based on the deformed fourth source key point data and the fourth target key point data.
[0039] As an improvement to the above solution, the step of deforming the wearable component using the deformation parameter includes:
[0040] scaling the wearable component according to the scaling factor;
[0041] Rotating the wearable component according to the rotation matrix;
[0042] The wearable component is offset according to the offset amount.
[0043] To achieve the above objectives, the present disclosure further provides a three-dimensional model wearable device, comprising:
[0044] A type acquisition module, configured to acquire the type of a wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component;
[0045] a deformation parameter acquisition module, configured to acquire, based on the type, deformation parameters of a source reference three-dimensional model corresponding to the wearable component, converted into a target reference three-dimensional model; wherein the deformation parameters include irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponding to the irregular deformation parameters, and the rigid wearable component corresponding to the regular deformation parameters;
[0046] A first deformation module, configured to deform the wearable component using the deformation parameters;
[0047] A wearing module is used to wear the deformed wearable component on the target reference three-dimensional model.
[0048] To achieve the above-mentioned purpose, an embodiment of the present disclosure also provides a three-dimensional model wearable device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the three-dimensional model wearing method as described above when executing the computer program.
[0049] To achieve the above-mentioned purpose, an embodiment of the present disclosure also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the three-dimensional model wearing method as described above.
[0050] Compared with the prior art, the disclosed embodiments provide a 3D model wearing method, apparatus, device, and storage medium. Based on the type of wearable component, the deformation parameters of the source reference 3D model corresponding to the wearable component are determined to convert the wearable component into a target reference 3D model. The wearable component is then deformed according to the deformation parameters, and the deformed wearable component is finally worn on the target reference 3D model. This enables the interoperability of the same wearable component under different reference 3D models. Through adaptive deformation processing of the wearable component, the wearable component is adapted to reference 3D models of various specifications and sizes, avoiding the phenomenon of wearable component misalignment, mold penetration, or poor fit. The disclosed embodiments do not require manual adjustment, thereby improving wearing efficiency. Furthermore, the appropriate deformation parameters are selected based on the type of wearable component, allowing the wearable component to fit the target reference 3D model more closely. Furthermore, the disclosed embodiments do not require pre-storage of a large number of wearable component copies adapted to various reference 3D models, saving storage and management costs for the wearable components. The saved storage space can be used to store more types of wearable components, providing users with a wider range of choices and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] FIG1 is a flow chart of a method for wearing a three-dimensional model provided by an embodiment of the present disclosure;
[0052] FIG2 is a flow chart of a method for obtaining irregular deformation parameters provided by an embodiment of the present disclosure;
[0053] FIG3 is a flow chart of a method for obtaining regular deformation parameters provided by an embodiment of the present disclosure;
[0054] FIG4 is a structural block diagram of a three-dimensional model wearable device provided by an embodiment of the present disclosure;
[0055] FIG5 is a structural block diagram of a three-dimensional model wearable device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0056] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0057] Referring to FIG1 , FIG1 is a flow chart of a three-dimensional model wearing method provided by an embodiment of the present disclosure, wherein the three-dimensional model wearing method includes:
[0058] S1. Obtain the type of the wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component;
[0059] S2. Obtaining, based on the type, deformation parameters for converting a source reference three-dimensional model corresponding to the wearable component into a target reference three-dimensional model; wherein the deformation parameters include irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponding to the irregular deformation parameters, and the rigid wearable component corresponding to the regular deformation parameters;
[0060] S3, deforming the wearable component using the deformation parameter;
[0061] S4. Wearing the deformed wearable component on the target reference three-dimensional model.
[0062] It can be understood that wearable parts are divided into non-rigid wearable parts and rigid wearable parts based on whether the wearable parts can be deformed freely. Non-rigid wearable parts are wearable parts that can undergo irregular local stretching and geometric deformation, such as hair. Rigid wearable parts are wearable parts that cannot undergo irregular local stretching and geometric deformation, such as glasses. The types of wearable parts can also be simply distinguished from their appearance.
[0063] Furthermore, when the type is a non-rigid wearable component, irregular deformation parameters of the source reference three-dimensional model corresponding to the wearable component are obtained to convert it into a target reference three-dimensional model; when the type is a rigid wearable component, regular deformation parameters of the source reference three-dimensional model corresponding to the wearable component are obtained to convert it into a target reference three-dimensional model; after obtaining the corresponding deformation parameters, the wearable component is deformed, and the deformed wearable component is loaded into the target position of the target reference three-dimensional model, thereby completing the work of wearing the deformed wearable component into the target reference three-dimensional model.
[0064] The disclosed embodiments enable the interoperability of the same wearable component under different reference three-dimensional models. By adaptively deforming the wearable component, the wearable component is adapted to reference three-dimensional models of various specifications and sizes, thereby avoiding the phenomenon of misalignment, penetration, or poor fit of the wearable component.
[0065] The embodiment of the present disclosure does not require manual adjustment, thereby improving wearing efficiency, and selects appropriate deformation parameters according to the type of the wearable component to deform the wearable component, so that the wearable component fits the target reference three-dimensional model more closely.
[0066] In addition, the existing technology manually adjusts and deforms the wearable parts to make them fit the target baseline three-dimensional model, and then saves the wearable parts that fit the target baseline three-dimensional model for the user to select later. This undoubtedly increases the storage and management costs of the wearable parts. The embodiment of the present disclosure uses adaptive deformation processing of the wearable parts, which does not require pre-storage of a large number of copies of wearable parts that fit various baseline three-dimensional models, saving the storage and management costs of the wearable parts. At the same time, since there is no need to save the wearable parts that fit each baseline three-dimensional model, the saved storage space can store more types of wearable parts, providing users with a wider range of choices, which is conducive to improving the user experience.
[0067] In an optional embodiment, as shown in FIG2 , the irregular deformation parameters are obtained by the following steps:
[0068] Acquire first source key point data of the source reference three-dimensional model and first target key point data of the target reference three-dimensional model;
[0069] Based on a Gaussian radial basis function, establishing a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model;
[0070] The first source key point data and the first target key point data are substituted into the conversion relationship to obtain the irregular deformation parameters.
[0071] It is understandable that the irregular deformation parameters of the source base model to the target base model can be calculated offline in advance and stored. When the wearable component is subsequently added to the target base model online, the stored irregular deformation parameters can be directly obtained.
[0072] It can be understood that the wearable component is generally worn on the head, so the head key point data of the benchmark three-dimensional model can be used to construct the conversion relationship from the source benchmark three-dimensional model to the target benchmark three-dimensional model, and then the irregular deformation parameters are confirmed according to the conversion relationship. The wearable component obtained by deforming the wearable component using the irregular deformation parameters calculated based on the head key point data can better fit the head of the target benchmark three-dimensional model.
[0073] Optionally, the first source key point data is head key point data of the source reference 3D model, and the first target key point data is head key point data of the target reference 3D model. Of course, the first source key point data and the first target key point data disclosed in the present invention are not limited to head key point data, and no specific limitation is made herein.
[0074] For example, for the base models in the base model asset library, each base model (including the source base model and the target base model) is annotated with head key points to obtain the head key point data L{(x1, y1, z1), ... (xn ,y n, z n )}, where (x1, y1, z1) represents the key point data of the first base model, (x n ,y n, z n ) represents the key point data of the head of the nth basic model. At the same time, the vertices of the scalp attachment area are indexed and marked to obtain the scalp vertex data M{v1,..,v m}, where v1 represents the scalp vertex data with a scalp vertex index value of 1, and v m The scalp vertex data with the scalp vertex index value m is prepared for the subsequent replacement of the second target key point data.
[0075] In an optional embodiment, establishing a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model based on a Gaussian radial basis function includes:
[0076] Constructing the Gaussian radial basis function according to the Euclidean distance between any of the first source key point data and any other of the first source key point data in the source reference three-dimensional model;
[0077] The value of the weighted sum of the irregular deformation parameter and the Gaussian radial basis function is used as the first target key point data in the target reference three-dimensional model to obtain a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model.
[0078] Exemplarily, the Gaussian radial basis function is constructed by the Euclidean distance between any first source key point data and any other first source key point data in the source reference three-dimensional model. The expression for constructing the Gaussian radial basis function is as follows:
[0079] Where k represents the Gaussian radial basis function, e represents the natural constant, ‖xx i ‖ represents the input of any first source key data point x to any other first source key point data x i The Euclidean distance between them, σ represents the standard deviation of the normal distribution;
[0080] The value of the weighted sum of the irregular deformation parameter and the Gaussian radial basis function is used as the first target key point data in the target reference three-dimensional model, and a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model is obtained. The specific expression of the conversion relationship is as follows:
[0081] ω iRepresents the deformation parameter, N represents the number of the first source key points, k represents the Gaussian radial basis function, and y represents the first target key point data.
[0082] Substituting the first source key point data and the first target key point data into the conversion relationship, the irregular deformation parameter is obtained by solving the equation as follows:
[0083] Among them, W ij represents the deformation parameter of the source reference 3D model i to the target reference 3D model j, N represents the number of the first source key points, y N Indicates the Nth first target key point data, k NN The Gaussian radial basis function representing the Nth component of the Nth first source keypoint data.
[0084] In an optional embodiment, the deforming the wearable component using the deformation parameter includes:
[0085] Obtaining mesh vertex data of the wearable component;
[0086] Deforming the mesh vertex data using the irregular deformation parameters to obtain deformed mesh vertex data;
[0087] The mesh vertex data in the wearable component is replaced with the deformed mesh vertex data.
[0088] Exemplarily, the mesh vertex data of the wearable component is obtained, each mesh vertex in the mesh vertex data is traversed, and each mesh vertex data v is deformed using the conversion relationship and the irregular deformation parameter to obtain deformed mesh vertex data v′, where: The mesh vertex data in the wearable component is replaced with the deformed mesh vertex data v', and the replaced wearable component is mounted on the target reference three-dimensional model to complete the wearing of the wearable component.
[0089] The embodiment of the present disclosure uses irregular deformation parameters to deform the wearable components constructed on the source reference model, so as to convert it into a wearable model that is compatible with the target reference three-dimensional model, thereby making the wearable components fit more closely with the target reference three-dimensional model.
[0090] In an optional embodiment, after obtaining the irregular deformation parameters, the three-dimensional model wearing method further includes:
[0091] Acquiring second source key point data of the source reference three-dimensional model;
[0092] Deforming the second source key point data using the irregular deformation parameters to obtain deformed second source key point data;
[0093] Replacing the second target key point data in the target reference three-dimensional model with the deformed second source key point data to obtain a deformed target reference three-dimensional model;
[0094] Wearing the deformed wearable component on the target reference three-dimensional model includes:
[0095] The deformed wearable component is worn on the deformed target reference three-dimensional model.
[0096] It can be understood that in order to make the wearable component more adaptable to the target reference model, the embodiment of the present disclosure not only deforms the wearable component, but also deforms the second source key point data of the source reference three-dimensional model, and then replaces the deformed second source key point data with the target reference three-dimensional model. Since the wearable component originally fits the key area where the second source key point data of the source reference three-dimensional model is located, the key areas of the wearable component and the source reference three-dimensional model are deformed according to the same rules. After processing, the two are also in a fitting state, which further realizes the correction of the problem of mold penetration in the key area after the wearable component is worn.
[0097] It is understandable that the wearable component is generally worn on the head, especially the scalp area is more closely fitted, so the scalp vertex data of the reference three-dimensional model can be selected for deformation and replacement to make the wearable component fit the scalp area of the target reference three-dimensional model more closely.
[0098] Optionally, the second source key point data is the scalp vertex data of the source reference three-dimensional model, and the second target key point data is the scalp vertex data of the target reference three-dimensional model. Of course, the first source key point data and the first target key point data disclosed in the present invention are not limited to scalp vertex data, and no specific restrictions are made here.
[0099] Exemplarily, the scalp vertex data of the source reference three-dimensional model is obtained, each scalp vertex h in the scalp vertex data M is traversed, and each scalp vertex data h is deformed using the conversion relationship and the irregular deformation parameter to obtain deformed scalp vertex data h′, where:
[0100] The scalp vertex data of the target reference three-dimensional model is replaced with the deformed scalp vertex data h′ to obtain the deformed target reference three-dimensional model.
[0101] In an optional embodiment, as shown in FIG3 , the rule deformation parameters are obtained by the following steps:
[0102] Acquire third source key point data of the source reference three-dimensional model and third target key point data of the target reference three-dimensional model;
[0103] Calculating a scaling factor for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0104] Calculating a rotation matrix for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0105] Calculating an offset from the source reference three-dimensional model to the target reference three-dimensional model according to the scaling factor and the rotation matrix;
[0106] The regular deformation parameters include: the scaling factor, the rotation matrix and the offset.
[0107] It can be understood that for rigid wearable parts, since they cannot undergo irregular local stretching deformation, it is only necessary to obtain a few key point data, and then determine the scaling coefficient, rotation matrix and offset based on these key point data, and finally deform the wearable parts according to the scaling coefficient, rotation matrix and offset.
[0108] Optionally, the third source keypoint data includes the vertex data for the left and right ear roots, and the vertex data between the two eyes (hereinafter referred to as "eyes"; the vertex data between the two eyes is also the vertex data for the root of the nose) of the source reference 3D model; and the third target keypoint data includes the vertex data for the left and right ear roots, and the vertex data between the two eyes of the target reference 3D model. It will be appreciated that the third source keypoint data ensures that the rigid wearable component can be deformed.
[0109] In an optional implementation, calculating the offset of the source reference three-dimensional model to the target reference three-dimensional model according to the scaling factor and the rotation matrix includes:
[0110] Acquire fourth source key point data of the source reference three-dimensional model and fourth target key point data of the target reference three-dimensional model;
[0111] deforming the fourth source key point data according to the scaling factor and the rotation matrix to obtain deformed fourth source key point data;
[0112] An offset amount for converting the source reference three-dimensional model into the target reference three-dimensional model is determined based on the deformed fourth source key point data and the fourth target key point data.
[0113] Exemplarily, extracting third source key point data of the source reference three-dimensional model and third target key point data of the target reference three-dimensional model through the head key point data L;
[0114] The scaling factor s for converting the source reference 3D model to the target reference 3D model is calculated according to the following formula:
[0115] Where l represents the vertex index of the left ear root, r represents the vertex index of the right ear root, x, y, and z belong to the key point data of the source reference 3D model, and x', y', and z' belong to the key point data of the target reference 3D model. Then, (x l ,y l , z l ) represents the source left ear root vertex data, (x l ',y l ‘ , z l ') represents the target left ear root vertex data, (x r ,y r , z r ) represents the source right ear root vertex data, (x' r ,y r ',z' r ) represents the target right ear root vertex data;
[0116] Exemplarily, the rotation matrix R of the source reference three-dimensional model to the target reference three-dimensional model is calculated according to the following formula:
[0117] Estimate() represents the estimated rotation matrix, l represents the vertex index of the left ear root, r represents the vertex index of the right ear root, m represents the vertex index of the eye, x, y, and z belong to the key point data of the source reference 3D model, and x', y', and z' belong to the key point data of the target reference 3D model. Then, (x, y, z) l Represents the source left ear root vertex data, (x, y, z) r Represents the source right ear root vertex data, (x, y, z) m Represents the vertex data in the source eye, (x′, y′, z′) l Indicates the target left ear root vertex data, (x′, y′, z′) r Represents the target right ear root vertex data, (x′, y′, z′) m Represents vertex data in the target eye;
[0118] Exemplarily, the offset T from the source reference 3D model to the target reference 3D model is calculated according to the following formula:
[0119] T=s*(xm ,y m ,z m )*R-(x m ′,y m ′,z m ′)
[0120] Where s represents the scaling factor, R represents the rotation matrix, (x m ,y m ,z m ) represents the vertex data of the source eye, (x m ′,y m ′,z m ′) represents the vertex data in the target eye.
[0121] In an optional embodiment, the deforming the wearable component using the deformation parameter includes:
[0122] scaling the wearable component according to the scaling factor;
[0123] Rotating the wearable component according to the rotation matrix;
[0124] The wearable component is offset according to the offset amount.
[0125] It can be understood that the embodiment of the present disclosure scales, rotates and offsets the wearable component using the scaling coefficient, the rotation moment and the offset to obtain the deformed wearable component.
[0126] The disclosed embodiment provides a method for wearing a three-dimensional model. The method determines the deformation parameters of a source reference three-dimensional model corresponding to the wearable component into a target reference three-dimensional model based on the type of the wearable component. The wearable component is then deformed according to the deformation parameters. Finally, the deformed wearable component is worn on the target reference three-dimensional model. This enables the interoperability of the same wearable component under different reference three-dimensional models. Through the adaptive deformation processing of the wearable component, the wearable component is adapted to the reference three-dimensional models of various specifications and sizes, avoiding the phenomenon of dislocation, mold penetration, or poor fit of the wearable component. The disclosed embodiment does not require manual adjustment, thereby improving wearing efficiency. The method selects appropriate deformation parameters according to the type of the wearable component, making the wearable component more closely fit the target reference three-dimensional model. In addition, the disclosed embodiment does not require pre-storage of a large number of copies of wearable components adapted to various reference three-dimensional models, saving storage and management costs for the wearable components. The saved storage space can be used to store more types of wearable components, providing users with a wider range of choices and improving the user experience.
[0127] 4 is a block diagram of a three-dimensional model wearable device 10 provided in an embodiment of the present disclosure. The three-dimensional model wearable device 10 includes:
[0128] A type acquisition module 11 is used to acquire the type of the wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component;
[0129] A deformation parameter acquisition module 12 is configured to acquire, based on the type, deformation parameters of a source reference three-dimensional model corresponding to the wearable component, converted into a target reference three-dimensional model; wherein the deformation parameters include irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponding to the irregular deformation parameters, and the rigid wearable component corresponding to the regular deformation parameters;
[0130] A first deformation module 13, configured to deform the wearable component using the deformation parameters;
[0131] The wearing module 14 is configured to wear the deformed wearable component onto the target reference three-dimensional model.
[0132] Optionally, the deformation parameter acquisition module is further configured to:
[0133] Acquire first source key point data of the source reference three-dimensional model and first target key point data of the target reference three-dimensional model;
[0134] Based on a Gaussian radial basis function, establishing a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model;
[0135] The first source key point data and the first target key point data are substituted into the conversion relationship to obtain the irregular deformation parameters.
[0136] Optionally, the deformation parameter acquisition module is further configured to:
[0137] Constructing the Gaussian radial basis function according to the Euclidean distance between any of the first source key point data and any other of the first source key point data in the source reference three-dimensional model;
[0138] The value of the weighted sum of the irregular deformation parameter and the Gaussian radial basis function is used as the first target key point data in the target reference three-dimensional model to obtain a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model.
[0139] Optionally, the first deformation module is further configured to:
[0140] Obtaining mesh vertex data of the wearable component;
[0141] Deforming the mesh vertex data using the irregular deformation parameters to obtain deformed mesh vertex data;
[0142] The mesh vertex data in the wearable component is replaced with the deformed mesh vertex data.
[0143] Optionally, the three-dimensional model wearable device further includes a second deformation module, and the second deformation module is used to:
[0144] Acquiring second source key point data of the source reference three-dimensional model;
[0145] Deforming the second source key point data using the irregular deformation parameters to obtain deformed second source key point data;
[0146] Replacing the second target key point data in the target reference three-dimensional model with the deformed second source key point data to obtain a deformed target reference three-dimensional model;
[0147] Wearing the deformed wearable component on the target reference three-dimensional model includes:
[0148] The deformed wearable component is worn on the deformed target reference three-dimensional model.
[0149] Optionally, the deformation parameter acquisition module is further used to:
[0150] Acquire third source key point data of the source reference three-dimensional model and third target key point data of the target reference three-dimensional model;
[0151] Calculating a scaling factor for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0152] Calculating a rotation matrix for converting the source reference three-dimensional model into the target reference three-dimensional model using the third source key point data and the third target key point data;
[0153] Calculating an offset from the source reference three-dimensional model to the target reference three-dimensional model according to the scaling factor and the rotation matrix;
[0154] The regular deformation parameters include: the scaling factor, the rotation matrix and the offset.
[0155] Optionally, the deformation parameter acquisition module is further configured to:
[0156] Acquire fourth source key point data of the source reference three-dimensional model and fourth target key point data of the target reference three-dimensional model;
[0157] deforming the fourth source key point data according to the scaling factor and the rotation matrix to obtain deformed fourth source key point data;
[0158] An offset amount for converting the source reference three-dimensional model into the target reference three-dimensional model is determined based on the deformed fourth source key point data and the fourth target key point data.
[0159] Optionally, the first deformation module is further configured to:
[0160] scaling the wearable component according to the scaling factor;
[0161] Rotating the wearable component according to the rotation matrix;
[0162] The wearable component is offset according to the offset amount.
[0163] It is worth noting that the working process of each module in the three-dimensional model wearing device 10 described in the embodiment of the present disclosure can refer to the working process of the three-dimensional model wearing method described in the above embodiment, and will not be repeated here.
[0164] The disclosed embodiment provides a three-dimensional model wearable device 10. The device determines the deformation parameters of the source reference three-dimensional model corresponding to the wearable component into the target reference three-dimensional model according to the type of the wearable component, and then deforms the wearable component according to the deformation parameters. Finally, the deformed wearable component is worn on the target reference three-dimensional model, thereby realizing the interoperability of the same wearable component under different reference three-dimensional models. Through the adaptive deformation processing of the wearable component, the wearable component is adapted to the reference three-dimensional models of various specifications and sizes, thereby avoiding the phenomenon of misalignment, penetration or non-fitting of the wearable component. The disclosed embodiment does not require manual adjustment, thereby improving the wearing efficiency. The device selects appropriate deformation parameters according to the type of the wearable component, thereby making the wearable component more fit to the target reference three-dimensional model. In addition, the disclosed embodiment does not require pre-storage of a large number of copies of wearable components adapted to various reference three-dimensional models, thereby saving storage and management costs of the wearable components. The saved storage space can be used to store more types of wearable components, providing users with a wider range of choices and helping to improve the user experience.
[0165] An embodiment of the present disclosure also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the three-dimensional model wearing method as described in any of the above embodiments.
[0166] Referring to Figure 5, Figure 5 is a block diagram of a three-dimensional model wearable device 20 provided in an embodiment of the present disclosure. The three-dimensional model wearable device 20 includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps of the above-mentioned three-dimensional model wearing method embodiment are implemented. Alternatively, when the processor 21 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0167] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present disclosure. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the three-dimensional model wearable device 20.
[0168] The three-dimensional model wearable device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of the three-dimensional model wearable device 20 and does not constitute a limitation on the three-dimensional model wearable device 20. The three-dimensional model wearable device 20 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the three-dimensional model wearable device 20 may also include input and output devices, network access devices, buses, etc.
[0169] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 21 is the control center of the three-dimensional model wearable device 20, and uses various interfaces and lines to connect various parts of the entire three-dimensional model wearable device 20.
[0170] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements the various functions of the three-dimensional model wearable device 20 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 22 can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0171] Wherein, if the module / unit integrated in the three-dimensional model wearable device 20 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0172] It is understood that the embodiments described in the embodiments of the present disclosure may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, modules, units, submodules, subunits, etc. may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present disclosure, or a combination thereof.
[0173] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present disclosure, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive work.
[0174] The above is a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications are also considered to be within the scope of protection of the present disclosure.
Claims
1. A three-dimensional model wearing method, comprising: Obtaining the type of the wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component; According to the type, the deformation parameters of the source reference three-dimensional model corresponding to the wearable component converted into the target reference three-dimensional model are obtained; wherein the deformation parameters include: irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponds to the irregular deformation parameters, and the rigid wearable component corresponds to the regular deformation parameters; Deforming the wearable component using the deformation parameter; The deformed wearable component is worn on the target reference three-dimensional model.
2. The three-dimensional model wearing method according to claim 1, wherein: The irregular deformation parameters are obtained by the following steps: Acquire first source key point data of the source reference three-dimensional model and first target key point data of the target reference three-dimensional model; Based on a Gaussian radial basis function, a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model is established; Substitute the first source key point data and the first target key point data into the conversion relationship to obtain the irregular deformation parameters.
3. The three-dimensional model wearing method according to claim 2, wherein: The step of establishing a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model based on a Gaussian radial basis function includes: Constructing the Gaussian radial basis function through the Euclidean distance between any of the first source key point data and any other of the first source key point data in the source reference three-dimensional model; The value of the weighted sum of the Gaussian radial basis function by the irregular deformation parameter is used as the first target key point data in the target reference three-dimensional model to obtain a conversion relationship from the source reference three-dimensional model to the target reference three-dimensional model.
4. The three-dimensional model wearing method according to claim 1, wherein: The deforming the wearable component by using the deformation parameter comprises: Acquire mesh vertex data of the wearable component; Deforming the mesh vertex data using the irregular deformation parameters to obtain deformed mesh vertex data; The mesh vertex data in the wearable component is replaced with the deformed mesh vertex data.
5. The three-dimensional model wearing method according to claim 1, wherein: After obtaining the irregular deformation parameters, the three-dimensional model wearing method further includes: Acquire second source key point data of the source reference three-dimensional model; Deforming the second source key point data using the irregular deformation parameters to obtain deformed second source key point data; Replacing the second target key point data in the target reference three-dimensional model with the deformed second source key point data to obtain a deformed target reference three-dimensional model; The step of wearing the deformed wearable component on the target reference three-dimensional model includes: The deformed wearable component is worn on the deformed target reference three-dimensional model.
6. The three-dimensional model wearing method according to claim 1, wherein: Obtain the rule deformation parameters by the following steps: Acquire third source key point data of the source reference three-dimensional model and third target key point data of the target reference three-dimensional model; Using the third source key point data and the third target key point data, a scaling factor of the source reference three-dimensional model to the target reference three-dimensional model is calculated; Using the third source key point data and the third target key point data, a rotation matrix of the source reference three-dimensional model to the target reference three-dimensional model is calculated; Calculating an offset of the source reference three-dimensional model to the target reference three-dimensional model according to the scaling factor and the rotation matrix; The regular deformation parameters include: the scaling factor, the rotation matrix and the offset.
7. The three-dimensional model wearing method according to claim 6, wherein: The calculating, according to the scaling factor and the rotation matrix, an offset of the source reference three-dimensional model to the target reference three-dimensional model comprises: Acquire fourth source key point data of the source reference three-dimensional model and fourth target key point data of the target reference three-dimensional model; Deforming the fourth source key point data according to the scaling factor and the rotation matrix to obtain deformed fourth source key point data; An offset of converting the source reference three-dimensional model into the target reference three-dimensional model is determined according to the deformed fourth source key point data and the fourth target key point data.
8. A three-dimensional model wearable device, comprising: A type acquisition module, used to acquire the type of the wearable component; wherein the type includes: a non-rigid wearable component and a rigid wearable component; A deformation parameter acquisition module, used for acquiring deformation parameters of the source reference three-dimensional model corresponding to the wearable component into a target reference three-dimensional model according to the type; wherein the deformation parameters include: irregular deformation parameters and regular deformation parameters, the non-rigid wearable component corresponds to the irregular deformation parameters, and the rigid wearable component corresponds to the regular deformation parameters; A first deformation module, used for deforming the wearable component using the deformation parameter; A wearing module is used to wear the deformed wearable component on the target reference three-dimensional model.
9. A three-dimensional model wearable device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the three-dimensional model wearable method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, the computer-readable storage medium comprising a stored computer program; wherein: When the computer program is run, it controls the device where the computer-readable storage medium is located to execute the three-dimensional model wearing method as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the three-dimensional model wearing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Flexible body simulation method and device, electronic equipment and computer readable storage medium
CN110705094A
Virtual equipment model adaptation method and device and terminal equipment
CN114733201A
Three-dimensional model wearing method and device, equipment and storage medium
CN117710621A
Method, apparatus and device for processing deformation of virtual object, and storage medium
US20210043000A1