Reconstruction Method, Device, Electronic Device and Storage Medium for Three-Dimensional Hair Model

By using preset control points to adjust the basic shape model in three-dimensional hair modeling, the problem of long hair cluster adjustment time is solved, and more efficient hair model generation is achieved.

CN114078179BActive Publication Date: 2025-07-11BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010800420.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-11
Publication Date
2025-07-11
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

In the existing three-dimensional hair modeling methods, adjusting hair clusters takes a lot of time, resulting in inefficiency.

Method used

By obtaining the hair cluster and basic shape model to be adjusted, and using preset control points to make adjustments, a three-dimensional hair model is generated, reducing dependence on vertices and improving adjustment efficiency.

Benefits of technology

It shortens the hair cluster adjustment time, reduces the designer's workload, and improves the generation efficiency of three-dimensional hair models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114078179B_ABST
    Figure CN114078179B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, apparatus, electronic device, and storage medium for reconstructing a three-dimensional hair model. The method includes: obtaining a hair cluster to be adjusted and a corresponding basic shape model, where the basic shape model is a three-dimensional model representing the shape of a basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model; adjusting the basic shape model according to adjustment operations on the preset control points, and determining the three-dimensional coordinates of the adjusted basic shape model through the three-dimensional coordinates of the preset control points after adjustment; adjusting the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model; and generating a three-dimensional hair model according to the adjusted hair cluster. Through the solution of the present disclosure, the adjustment work of the designer on the hair cluster is reduced, the time spent on adjusting the hair cluster is reduced, and the work efficiency of the designer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of three-dimensional model reconstruction technology, and in particular, to a method, apparatus, electronic device, and storage medium for reconstructing a three-dimensional hair model. Background Art

[0002] With the development of computer vision technology, three-dimensional reconstruction technology has emerged. Through processes such as depth data acquisition, preprocessing, point cloud registration and fusion, and surface generation, three-dimensional reconstruction technology depicts a real scene as a mathematical model that conforms to computer logic expression. Since the creation of hair can significantly enhance the realism of a virtual image or virtual character, and three-dimensional reconstruction technology is a key technology for establishing virtual reality that expresses the objective world in a computer, how to use three-dimensional reconstruction technology to construct a realistic hair model is an urgent problem to be solved.

[0003] In related technologies, hair is modeled based on multi-directional constraints, mainly using the hair surface geometry reconstructed from an image, the hair surface direction, and the head model geometry to reconstruct a complete hair model.

[0004] However, in current three-dimensional hair modeling methods, it takes a lot of time to adjust the hair clusters in the hair model. Summary of the Invention

[0005] The present disclosure provides a method, apparatus, electronic device, and storage medium for reconstructing a three-dimensional hair model to at least solve the technical problem that it takes a lot of time to adjust the hair clusters in the hair model in related technologies. The technical solution of the present disclosure is as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, a method for reconstructing a three-dimensional hair model is provided, including:

[0007] Obtain a hair cluster to be adjusted and a corresponding basic shape model, where the basic shape model is a three-dimensional model representing the shape of a basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model;

[0008] Adjust the basic shape model according to the adjustment operations on the preset control points, and determine the adjusted three-dimensional coordinates of the basic shape model through the adjusted three-dimensional coordinates of the preset control points;

[0009] Adjust the hair cluster to be adjusted on the basic shape model according to the adjusted three-dimensional coordinates of the basic shape model;

[0010] Generate a three-dimensional hair model according to the adjusted hair cluster.

[0011] In one of the embodiments, the obtaining the hair cluster to be adjusted and the corresponding basic shape model includes:

[0012] Obtain a hair cluster of interest and the corresponding original basic shape model, where the hair cluster of interest is the hair cluster to be adjusted, and original control points are distributed on the original basic shape model;

[0013] Copy the hair cluster of interest and the corresponding original basic shape model to obtain a copy of the hair cluster of interest and a copy of the corresponding original basic shape model. Original control point copies are distributed on the copy of the original basic shape model. Use the copy of the hair cluster of interest as the hair cluster to be adjusted, use the copy of the corresponding original basic shape model as the basic shape model, and use the original control point copies as the preset control points.

[0014] In one embodiment, adjusting the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates adjusted by the basic shape model includes:

[0015] Obtain the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted through the texture coordinates of the basic shape model;

[0016] Determine the adjusted three-dimensional coordinates of the hair cluster to be adjusted according to the adjusted three-dimensional coordinates of the basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted;

[0017] Adjust the hair cluster to be adjusted on the basic shape model according to the adjusted three-dimensional coordinates of the hair cluster to be adjusted.

[0018] In one embodiment, generating a three-dimensional hair model according to the adjusted hair cluster includes:

[0019] Generate a number of bone points of the adjusted hair cluster according to the position information of the adjusted hair cluster on the corresponding basic shape model;

[0020] Perform skinning operations on the adjusted hair cluster according to the position information of each bone point.

[0021] In one embodiment, each of the bone points is evenly distributed in the length direction of the adjusted hair cluster.

[0022] In one embodiment, performing skinning operations on the adjusted hair cluster according to the position information of each bone point includes:

[0023] Add bones for the adjusted hair cluster between each of the bone points according to the position information of each bone point;

[0024] Obtain the position information of each vertex in the adjusted hair cluster;

[0025] According to the position information of each vertex and the position information of each bone point, obtain the distance between each vertex and each bone point;

[0026] Generate the skinning weights of each vertex in the adjusted hair cluster according to the distance;

[0027] According to the skinning weights, associate the bones between each vertex and each bone point.

[0028] In one embodiment, the generation method of the hair cluster to be adjusted includes:

[0029] Obtain a hair plane template, where the hair plane template includes a plurality of projection maps, and the projection maps are obtained by projecting a basic shape model in a plurality of preset view directions;

[0030] Select a target projection map from the hair plane template, and obtain the drawn hair cluster through the target projection map;

[0031] According to the position information of the drawn hair cluster in the target projection map and the geometric information of the basic shape model corresponding to the target projection map, determine the geometric information of the drawn hair cluster;

[0032] Generate the hair cluster to be adjusted according to the geometric information of the drawn hair cluster.

[0033] In one embodiment, the generation method of the hair plane template includes:

[0034] Obtain the basic shape model;

[0035] Project the basic shape model in each of the preset view directions to obtain the projection map of the basic shape model in the preset view direction;

[0036] Generate the hair plane template according to the projection map of the basic shape model in the preset view direction.

[0037] According to the second aspect of the embodiments of the present disclosure, there is provided a three-dimensional hair model reconstruction device, including:

[0038] An acquisition module, configured to execute the acquisition of the hair cluster to be adjusted and the corresponding basic shape model, where the basic shape model is a three-dimensional model representing the shape of the basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model;

[0039] The model adjustment module is configured to perform an adjustment operation on the basic shape model according to the adjustment operation at the preset control points, and determine the three-dimensional coordinates of the adjusted basic shape model through the three-dimensional coordinates after the adjustment of the preset control points;

[0040] The hair cluster adjustment module is configured to perform an adjustment on the hair clusters to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model;

[0041] The model generation module is configured to generate a three-dimensional hair model according to the adjusted hair clusters.

[0042] In one embodiment, the acquisition module is further configured to acquire the hair clusters of interest and the corresponding original basic shape model, where the hair clusters of interest are the hair clusters to be adjusted, and the original control points are distributed on the original basic shape model; copy the hair clusters of interest and the corresponding original basic shape model to obtain a copy of the hair clusters of interest and a copy of the corresponding original basic shape model, where the original control point copies are distributed on the original basic shape model copy, use the copy of the hair clusters of interest as the hair clusters to be adjusted, use the corresponding original basic shape model copy as the basic shape model, and use the original control point copies as the preset control points.

[0043] In one embodiment, the hair cluster adjustment module is further configured to obtain the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted through the texture coordinates of the basic shape model; determine the three-dimensional coordinates of the adjusted hair clusters to be adjusted according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted; adjust the hair clusters to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted hair clusters to be adjusted.

[0044] In one embodiment, the model generation module includes a bone point generation unit and a skinning operation unit;

[0045] The bone point generation unit is configured to generate a plurality of bone points of the adjusted hair clusters according to the position information of the adjusted hair clusters on the corresponding basic shape model;

[0046] The skinning operation unit is configured to perform a skinning operation on the adjusted hair clusters according to the position information of each bone point.

[0047] In one embodiment, each of the bone points is evenly distributed in the length direction of the adjusted hair clusters.

[0048] In one embodiment, the skinning operation unit is further configured to add bones between the adjusted hair clusters according to the position information of each of the bone points; obtain the position information of each vertex in the adjusted hair clusters; obtain the distance between each vertex and each bone point according to the position information of each vertex and the position information of each bone point; generate the skinning weights of each vertex in the adjusted hair clusters according to the distances; and associate the bones between each vertex and each bone point according to the skinning weights.

[0049] In one embodiment, the reconstruction device further includes an unadjusted hair cluster generation module configured to obtain a hair plane template, where the hair plane template includes a plurality of projection maps obtained by projecting a basic shape model in a plurality of preset view directions; select a target projection map from the hair plane template, and obtain the drawn hair clusters through the target projection map; determine the geometric information of the drawn hair clusters according to the position information of the drawn hair clusters in the target projection map and the geometric information of the basic shape model corresponding to the target projection map; and generate the unadjusted hair clusters according to the geometric information of the drawn hair clusters.

[0050] In one embodiment, the reconstruction device further includes a hair plane template generation module configured to obtain the basic shape model; project the basic shape model in each of the preset view directions to obtain the projection maps of the basic shape model in the preset view directions; and generate the hair plane template according to the projection maps of the basic shape model in the preset view directions.

[0051] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0052] a processor;

[0053] a memory for storing instructions executable by the processor;

[0054] wherein the processor is configured to execute the instructions to implement the three-dimensional hair model reconstruction method in any one of the embodiments of the first aspect.

[0055] According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the three-dimensional hair model reconstruction method in any one of the embodiments of the first aspect.

[0056] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, which includes a computer program stored in a readable storage medium. At least one processor of a device reads and executes the computer program, so that the device executes the method for reconstructing a three-dimensional hair model described in any one of the embodiments of the first aspect.

[0057] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0058] The present disclosure obtains a hair cluster to be adjusted and a corresponding basic shape model, where the basic shape model is a three-dimensional model representing the shape of a basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model; adjusts the basic shape model according to the adjustment operations on the preset control points, and determines the adjusted three-dimensional coordinates of the basic shape model through the adjusted three-dimensional coordinates of the preset control points; adjusts the hair cluster to be adjusted on the basic shape model according to the adjusted three-dimensional coordinates of the basic shape model; and generates a three-dimensional hair model according to the adjusted hair cluster. The present disclosure adjusts the preset control points on the basic shape model to realize the adjustment of the hair cluster to be adjusted. Since the number of preset control points is much smaller than the number of vertices of the basic shape model, compared with the traditional technology of adjusting the hair cluster by vertices to change the shape of the hair model, it not only shortens the time spent on adjusting the hair cluster, but also reduces the workload of designers and the time required for designing a single material, thereby improving the generation efficiency of the three-dimensional hair model.

[0059] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure and do not constitute an improper limitation of the present disclosure.

[0061] Figure 1 is an application environment diagram of a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0062] Figure 2 is a flowchart of a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0063] Figure 3 is a flowchart of step S210 in the method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0064] Figure 4It is a flowchart of step S230 in a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0065] Figure 5 It is a flowchart of step S240 in a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0066] Figure 6a It is a flowchart of step S510 in a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0067] Figure 6b It is a schematic diagram of bone point distribution shown according to an exemplary embodiment.

[0068] Figure 7 It is a flowchart of step S520 in a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0069] Figure 8 It is a flowchart of a generation method of a hair cluster to be adjusted shown according to an exemplary embodiment.

[0070] Figure 9 It is a flowchart of a generation method of a hair plane template shown according to an exemplary embodiment.

[0071] Figure 10 It is a flowchart of a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0072] Figure 11 It is a block diagram of a device for reconstructing a three-dimensional hair model shown according to an exemplary embodiment.

[0073] Figure 12 It is an internal structure diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0074] To enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0075] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such used data may be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order different from those illustrated or described herein. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0076] The method for reconstructing a three-dimensional hair model provided by the present disclosure can be applied to an application environment as Figure 1 shown. Among them, the terminal 110 interacts with the server 120 through the network. Among them, the terminal 110 obtains the hair clusters to be adjusted and the corresponding basic shape model. The basic shape model is a three-dimensional model representing the shape of the basic hairstyle, and the hair clusters to be adjusted and preset control points are distributed on the basic shape model; according to the adjustment operations on the preset control points, the basic shape model is adjusted, and the adjusted three-dimensional coordinates of the basic shape model are determined through the adjusted three-dimensional coordinates of the preset control points; according to the adjusted three-dimensional coordinates of the basic shape model, the hair clusters to be adjusted on the basic shape model are adjusted; according to the adjusted hair clusters, a three-dimensional hair model is generated. By adjusting the preset control points on the basic shape model, the adjustment of the hair clusters to be adjusted is realized. Since the number of preset control points is much smaller than the number of vertices of the basic shape model, in this embodiment, the hair clusters to be adjusted are adjusted through the preset control points, and a three-dimensional hair model is generated according to the adjusted hair clusters. Compared with the traditional technology of adjusting the hair clusters by vertices to change the shape of the hair model, it not only shortens the time spent on adjusting the hair clusters, but also reduces the workload of the designer, and also reduces the time required to design a single material, improving the generation efficiency of the three-dimensional hair model.

[0077] Among them, the terminal 110 can be but is not limited to various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 120 can be implemented by an independent server or a server cluster composed of multiple servers.

[0078] Figure 2 is a flowchart of a method for reconstructing a three-dimensional hair model shown according to an exemplary embodiment. As Figure 2 shown, this method for reconstructing a three-dimensional hair model is used for Figure 1 the terminal 110 in, and includes the following steps:

[0079] In step S210, the hair clusters to be adjusted and the corresponding basic shape model are obtained.

[0080] Among them, the three-dimensional hair model is a three-dimensional model corresponding to the hair with a specific hairstyle. For example, the three-dimensional hair model can be a three-dimensional model corresponding to two-dimensional hair. The basic shape model is a three-dimensional model representing the shape of the basic hairstyle. The basic shape model can be a three-dimensional model obtained by summarizing and abstracting the characteristics and shapes of common hairstyles. Common hairstyles can be long hair, short hair, bangs, slicked-back hair, ponytail, bun, etc. The surface of the basic shape model is the curved surface to which the hair of various basic hairstyles adheres. There are hair clusters to be adjusted and preset control points distributed on the basic shape model. It can be understood that if the hairstyle corresponding to the three-dimensional hair model is complex, the reconstruction of the three-dimensional hair model requires multiple basic shape models. The three-dimensional hair model is composed of several groups of hair clusters. The hair cluster can be a cluster of hair that makes up the three-dimensional hair model. The hair cluster adheres to the surface of the basic shape model, so there can be at least one group of hair clusters corresponding to the surface of the basic shape model. The hair cluster to be adjusted is the hair cluster whose position and / or shape needs to be adjusted. The preset control point is a feature point used to represent the basic hairstyle. The number and distribution of the preset control points can be preset according to the actual situation, and the number of the preset control points is much smaller than the number of vertices of the basic shape model. For example, the number of the preset control points can be 41, one of which is distributed at the position of the crown, and the remaining 40 are divided into 10 rows, with 4 in each row, and are evenly distributed at the same height of the basic shape model. After the position of the preset control point is determined, the vertices of the basic shape model can be generated according to the position of the preset control point by cubic spline interpolation, so there is a mapping relationship between the preset control point and the basic shape model. Specifically, obtain several hair clusters and their corresponding basic shape models from the local computer, or load several hair clusters and their corresponding basic shape models from another computer device connected to the computer network. In order to realistically display the three-dimensional hair model, it is necessary to adjust some or all of the hair clusters therein. Select the hair cluster to be adjusted. Since the hair cluster adheres to the corresponding basic shape model, select the basic shape model corresponding to the hair cluster to be adjusted.

[0081] In step S220, according to the adjustment operation on the preset control point, the basic shape model is adjusted, and the three-dimensional coordinates of the adjusted basic shape model are determined by the three-dimensional coordinates of the preset control point after adjustment.

[0082] Among them, the three-dimensional coordinates of the preset control point are used to represent the position information of the preset control point in the world coordinate system. The three-dimensional coordinates of the basic shape model are used to represent the position information of the basic shape model in the world coordinate system. Since the hair cluster adheres to the basic shape model, and there is a mapping relationship between the preset control point on the basic shape model and the basic shape model, therefore, the adjustment of the basic shape model is realized by adjusting the preset control point, and then the adjustment of the hair cluster is realized by adjusting the basic shape model.

[0083] Specifically, according to the actual requirements of hair styling, the designer adjusts the set control points on the basic shape model, that is, an adjustment operation is performed on the set control points on the basic shape model. In response to the adjustment instruction of the preset control points, the positions of the preset control points change. Since there is a mapping relationship between the preset control points on the basic shape model and the basic shape model, after the positions of the preset control points change, the position of the basic shape model also changes accordingly. Also, since the hair clusters are attached to the basic shape model, when the position of the basic shape model changes, the positions of the hair clusters to be adjusted distributed on the basic shape model also change accordingly, and the position information in the world coordinate system is recorded as three-dimensional coordinates. Therefore, the three-dimensional coordinates of the adjusted basic shape model are determined by the three-dimensional coordinates after the preset control points are adjusted. It should be noted that the adjustment instruction is an operation instruction for adjusting the hair styling on the preset control points. The adjustment instruction can be a dragging operation on the preset control points or an input of the adjustment distance of the preset control points in the display interface of the basic shape model, etc.

[0084] In step S230, according to the three-dimensional coordinates of the adjusted basic shape model, the hair clusters to be adjusted on the basic shape model are adjusted.

[0085] Specifically, there is a mapping relationship between the preset control points on the basic shape model and the basic shape model. The three-dimensional coordinates of the adjusted basic shape model are determined by the three-dimensional coordinates after the preset control points are adjusted. Since the hair clusters are attached to the basic shape model, when the position of the basic shape model changes, the positions of the hair clusters to be adjusted distributed on the basic shape model also change accordingly. Therefore, the adjusted positions of the hair clusters to be adjusted can be determined according to the three-dimensional coordinates of the adjusted basic shape model, and then the hair clusters to be adjusted are adjusted according to their adjusted positions.

[0086] In step S240, a three-dimensional hair model is generated according to the adjusted hair clusters.

[0087] Specifically, according to the actual requirements of hair styling, the designer adjusts the basic shape model, and the hair clusters to be adjusted corresponding to the basic shape model are adjusted along with the adjustment of the basic shape model. When the adjustment work of the hair clusters to be adjusted is completed, the adjusted hair clusters can be used to generate the final three-dimensional hair model. It can be understood that the initial three-dimensional hair model includes several hair clusters. If some hair clusters need to be adjusted, then these hair clusters are the hair clusters to be adjusted. After the adjustment of these hair clusters is completed, the adjusted hair clusters are obtained, and then the final three-dimensional hair model is generated by using the other hair clusters except these hair clusters and the adjusted hair clusters together; if all the hair clusters need to be adjusted, then all the hair clusters are the hair clusters to be adjusted. After the adjustment of all the hair clusters is completed, the adjusted hair clusters are obtained, and then the final three-dimensional hair model is generated by using the adjusted hair clusters.

[0088] In the above method for reconstructing a three-dimensional hair model, a hair cluster to be adjusted and a corresponding basic shape model are obtained; according to the adjustment operations on the preset control points, the basic shape model is adjusted, and the three-dimensional coordinates of the adjusted basic shape model are determined through the three-dimensional coordinates of the preset control points after adjustment; according to the three-dimensional coordinates of the adjusted basic shape model, the hair cluster to be adjusted on the basic shape model is adjusted; and a three-dimensional hair model is generated based on the adjusted hair cluster. In this embodiment, the adjustment of the hair cluster to be adjusted is achieved by adjusting the preset control points on the basic shape model. Since the number of preset control points is much smaller than the number of vertices of the basic shape model, compared with the traditional technology of adjusting the hair cluster by vertices to change the shape of the hair model, it not only shortens the time spent on adjusting the hair cluster, but also reduces the workload of the designer, and further reduces the time required for designing a single material, thus improving the generation efficiency of the three-dimensional hair model.

[0089] In an exemplary embodiment, as Figure 3 shown, in step S210, obtaining the hair cluster to be adjusted and the corresponding basic shape model can be specifically implemented through the following steps:

[0090] In step S310, obtain the hair cluster of interest and the corresponding original basic shape model.

[0091] Among them, the hair cluster of interest is the hair cluster that needs to be adjusted. For example, the hair cluster of interest can be a hair cluster whose position and shape need to be adjusted within a certain range. For example, a straight hair cluster is adjusted to a curly hair cluster. The hair clusters of interest are distributed on the original basic shape model, and the original control points are distributed on the original basic shape model. The original basic shape model can be a basic shape model on which no operations have been performed. Specifically, on the one hand, a number of hair clusters of interest and their respective corresponding original basic shape models can be obtained from the local computer, or a number of hair clusters of interest and their respective corresponding original basic shape models can be loaded from another computer device connected to the computer network. On the other hand, a number of hair clusters and their respective corresponding basic shape models are obtained from the local computer, or a number of hair clusters and their respective corresponding basic shape models are loaded from another computer device connected to the computer network. In order to realistically display the three-dimensional hair model, the hair clusters of interest are selected. Since the hair clusters are attached to the corresponding basic shape models, the original basic shape models corresponding to the hair clusters of interest are selected.

[0092] In step S320, the hair cluster of interest and the corresponding original basic shape model are copied to obtain a copy of the hair cluster of interest and a copy of the corresponding original basic shape model. The copy of the original basic shape model is distributed with copies of the original control points. The copy of the hair cluster of interest is used as the hair cluster to be adjusted, the copy of the corresponding original basic shape model is used as the basic shape model, and the copy of the original control points is used as the preset control points.

[0093] Among them, multiple groups of hair clusters are attached to the basic shape model, and the positions of the multiple groups of hair clusters affect each other. When one group of hair clusters is adjusted, the other hair clusters will also be adjusted accordingly. This problem will increase the adjustment work of the designer for the hair clusters. For example, the subsequent adjustment of other hair clusters will affect the hair clusters that have been adjusted, which will not only affect the realistic effect of the hair styling, but also require the designer to readjust the hair clusters that have been adjusted, so the adjustment work of the hair clusters will take a lot of time. To avoid the mutual influence between hair clusters and increase the freedom of the designer's operation and control, the hair clusters to be adjusted and the corresponding basic shape model can be isolated by copying, so that when the hair clusters to be adjusted and the corresponding basic shape model are adjusted, the positions of other hair clusters will not be affected. The copy of the hair cluster of interest is obtained by copying the source file of the hair cluster of interest, and the copy of the basic shape model corresponding to the copy of the hair cluster of interest is obtained by copying the basic shape model corresponding to the source file of the hair cluster of interest. Specifically, the hair cluster of interest and the corresponding original basic shape model are selected from several groups of hair clusters as the content to be copied, and in response to the paste instruction of the hair cluster of interest and the corresponding original basic shape model, a copy of the hair cluster of interest and a copy of the corresponding original basic shape model are generated. Since the copy of the hair cluster of interest and the copy of the corresponding original basic shape model are obtained through the copy operation, the copy of the original basic shape model is distributed with copies of the original control points. To adjust the copy of the hair cluster of interest, the copy of the hair cluster of interest is used as the hair cluster to be adjusted, the copy of the corresponding original basic shape model is used as the basic shape model, and the copy of the original control points is used as the preset control points. It should be noted that in the present disclosure, the hair cluster to be adjusted can be directly obtained from the calculation local or another computer device connected to the computer network, or it can be a copy of the hair cluster of interest obtained by copying the hair cluster of interest.

[0094] In the above method for reconstructing a three-dimensional hair model, the hair clusters of interest and the corresponding original basic shape model are obtained; by copying the hair clusters of interest and the corresponding original basic shape model, a copy of the hair clusters of interest and a copy of the corresponding original basic shape model are obtained. It can be seen that in this embodiment, by providing a copy function for the hair clusters and the corresponding basic shape model, the influence between the hair clusters is effectively avoided; and then in response to the adjustment instruction of the copy of the original control points, the hair clusters of interest are adjusted, which not only reduces the adjustment work of the hair clusters in the designer's hair model, but also reduces the time spent on adjusting the hair clusters, and improves the work efficiency of the designer.

[0095] In one exemplary embodiment, as Figure 4 shown, in step S230, according to the adjusted three-dimensional coordinates of the basic shape model, the hair clusters to be adjusted on the basic shape model are adjusted, which can be specifically implemented through the following steps:

[0096] In step S410, through the texture coordinates of the basic shape model, the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted is obtained.

[0097] In step S420, according to the adjusted three-dimensional coordinates of the basic shape model and the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted, the adjusted three-dimensional coordinates of the hair clusters to be adjusted are determined.

[0098] In step S430, according to the adjusted three-dimensional coordinates of the hair clusters to be adjusted, the hair clusters to be adjusted on the basic shape model are adjusted.

[0099] Among them, the texture coordinates have two coordinate axes, U and V, so they are called UV coordinates, which can be used to define the position information of each point on the picture. U represents the distribution on the horizontal coordinate, and V represents the distribution on the vertical coordinate. The geometric information of the basic shape model is known, and the geometric information includes texture coordinates and three-dimensional coordinates. The texture coordinates and the three-dimensional coordinates correspond one by one, and the texture coordinates have invariance. Specifically, the hair clusters to be adjusted are distributed on the basic shape model, and the texture coordinates of the hair clusters to be adjusted can be obtained through the texture coordinates of the basic shape model. Further, due to the invariance of the texture coordinates and the one-to-one correspondence between the texture coordinates and the three-dimensional coordinates, the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted can be obtained through the texture coordinates of the basic shape model. Thus, the adjusted three-dimensional coordinates of the basic shape model are substituted into the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted for calculation to determine the adjusted three-dimensional coordinates of the hair clusters to be adjusted. Finally, according to the adjusted three-dimensional coordinates of the hair clusters to be adjusted, the hair clusters to be adjusted on the basic shape model are adjusted.

[0100] In the above method for reconstructing a three-dimensional hair model, the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted is obtained through the texture coordinates of the basic shape model. Then, based on the adjusted three-dimensional coordinates of the basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted, the adjusted three-dimensional coordinates of the hair cluster to be adjusted are determined. Finally, based on the adjusted three-dimensional coordinates of the hair cluster to be adjusted, the hair cluster to be adjusted on the basic shape model is adjusted. It can be seen that this embodiment realizes high-precision adjustment of the hair model and reduces the complexity of the adjustment operation of the hair model.

[0101] In an exemplary embodiment, as Figure 5 shown, in step S240, a three-dimensional hair model is generated according to the adjusted hair cluster, which can be specifically implemented through the following steps:

[0102] In step S510, a number of bone points of the adjusted hair cluster are generated according to the position information of the adjusted hair cluster on the corresponding basic shape model.

[0103] In step S520, skinning operation is performed on the adjusted hair cluster according to the position information of each bone point.

[0104] Among them, in order to increase the realism of the three-dimensional hair model, a reasonable internal entity structure (bone structure) can be added to each group of hair clusters. For example, a preset number of bones are connected end to end to form the internal entity structure of the current hair cluster. The bone points are the joint points that make up the internal entity structure of the three-dimensional hair model, and a bone is added between adjacent bone points. In order to drive the three-dimensional hair model to generate reasonable movements, bones can be added to the three-dimensional hair model.

[0105] Specifically, the hair cluster is attached to the basic shape model, and the hair cluster is adjusted through the preset control points on the basic shape model to obtain the adjusted hair cluster. If it is necessary to add a bone structure in combination with the position information of the adjusted hair cluster, the position information of the adjusted hair cluster on the corresponding basic shape model is obtained, and the distribution of bone points is determined according to the obtained position information, so as to generate the corresponding bone points. The position information of each bone point is obtained, and skinning operation is performed on the adjusted hair cluster in combination with the position information of each bone point.

[0106] In the above method for reconstructing a three-dimensional hair model, each bone point of the hair cluster is generated according to the position information of the adjusted hair cluster on the corresponding basic shape model; and skinning operation is performed on the adjusted hair cluster according to the position information of each bone point. In this way, the workload of bone binding for designers is reduced, and the work efficiency of designing a three-dimensional hair model is improved.

[0107] In an exemplary embodiment, each of the bone points is evenly distributed in the length direction of the adjusted hair cluster. Further exemplary illustration is as follows Figure 6a As shown, in step S510, according to the position information of the adjusted hair cluster on the corresponding basic shape model, a number of bone points of the adjusted hair cluster are generated, which can be specifically implemented through the following steps:

[0108] In step S610, the root point and the tip point on the hair cluster are obtained.

[0109] In step S620, a preset number of points are extracted from the edge contour of the hair cluster as edge points, and the edge points are evenly distributed between the root point and the tip point.

[0110] In step S630, the bone points on the hair cluster are generated according to the root point, the tip point and the edge points.

[0111] Among them, the hair cluster includes a root point and a tip point. The edge contour refers to the boundary line that constitutes the outer edge of the hair cluster. Specifically, in order to bind the three-dimensional hair model to the bone structure, the corresponding bone structure needs to be generated first. The bone structure includes bone points and bones between adjacent bone points. In order to increase the realism of the three-dimensional hair model, the corresponding bone points are generated in combination with the actual situation of the hair cluster. Therefore, first, the root point and the tip point on the hair cluster need to be obtained; then, a preset number of points are extracted from the edge contour of the hair cluster as edge points, and the edge points are evenly distributed between the root point and the tip point; finally, the bone points of the hair cluster are generated according to the root point of the hair cluster, the tip point of the hair cluster and the edge points on the edge contour of the hair cluster.

[0112] Further, the midpoint of two edge points at the same height is obtained, and the midpoint between the root point, the tip point and the edge points at the same height is used as the bone point of the hair cluster. Exemplarily, as Figure 6b shown, the hair cluster includes a root point 610 and a tip point 620. Three edge points 630 are evenly distributed on the edge contour of the hair cluster copy. The midpoint 640 of two edge points 630 at the same height is obtained, and the midpoint 640 between the root point 610, the tip point 620 and the edge points 630 at the same height is used as the bone point of the hair cluster.

[0113] In the above method for reconstructing a three-dimensional hair model, in combination with the actual situation of the hair cluster, each of the bone points is evenly distributed in the length direction of the adjusted hair cluster. For example, the midpoint between the root point, the tip point and the edge points at the same height is used as the bone point of the hair cluster, which increases the realism of the three-dimensional hair model.

[0114] In an exemplary embodiment, as Figure 7As shown, in step S520, according to the position information of each bone point, a skinning operation is performed on the adjusted hair cluster, which can be specifically implemented through the following steps:

[0115] In step S710, according to the position information of each bone point, bones are added between each bone point for the adjusted hair cluster.

[0116] Among them, the bone points are the joint points that make up the internal entity structure of the adjusted hair cluster, and a bone is added between adjacent bone points. Specifically, in order to drive the adjusted hair cluster to generate reasonable movements, bones can be added between each bone point for the adjusted hair cluster.

[0117] In step S720, the position information of each vertex in the adjusted hair cluster is obtained.

[0118] Specifically, the hair cluster includes a number of vertices. After the hair cluster is adjusted through preset control points, the position information of each vertex in the hair cluster changes, and the position information of each vertex in the adjusted hair cluster is obtained.

[0119] In step S730, according to the position information of each vertex and the position information of each bone point, the distance between each vertex and each bone point is obtained.

[0120] Specifically, the root point and the tip point of the hair cluster are obtained; a preset number of points are extracted from the edge contour of the hair cluster copy as edge points, and the edge points are evenly distributed between the root point and the tip point; the bone points on the hair cluster copy are generated according to the root point, the tip point and the edge points, and it can be known the position information of the bone points. On the basis of knowing the position information of each vertex and the position information of each bone point, the distance between each vertex and each bone point is calculated. Further, in order to avoid the interference of bone points at relatively far positions, the bone points adjacent to each vertex are selected from each bone point of the hair cluster to calculate the distance between the vertex and the bone point, that is, each vertex will only be affected by the two bone points adjacent to it.

[0121] In step S740, the skinning weights of each vertex in the adjusted hair cluster are generated according to the distance.

[0122] Among them, the skinning weight is for each vertex in the hair cluster copy and is used to characterize the strength of the influence of each bone point on any vertex. The skinning weight is mainly determined according to the distance from the vertex to the bone point. The closer the distance, the greater the weight. As mentioned above, in order to avoid the interference of bone points at relatively far positions, only the influence of the two bone points adjacent to each vertex is considered. Therefore, first find the two bone points closest to the current vertex according to the distance, and calculate the distances d1 and d2 from the current vertex to the two closest bone points. Then the skinning weight can be expressed as:

[0123] W1 = d2 / (d1 + d2);

[0124] W2 = d1 / (d1 + d2).

[0125] In step S750, according to the skinning weights, the bones between each vertex and each bone point are associated.

[0126] Among them, since the bone structure and the hair clusters are independent of each other, therefore, through skinning operations, a bone structure is added to the hair clusters, and the changes in the bone structure can drive the hair clusters to also produce corresponding movements. Specifically, the skinning weights of the vertices in the adjusted hair clusters have been calculated based on the distances between the vertices and the bone points. Thus, the bones between each vertex and each bone point are associated according to the skinning weights, so that the bones drive the hair clusters to move.

[0127] In the above method for reconstructing a three-dimensional hair model, by performing skinning operations on the adjusted hair clusters according to the position information of each bone point, the changes in the bone structure can drive the hair clusters to also produce corresponding movements, solving the technical problem that the static three-dimensional hair model in the traditional technology cannot meet the actual needs, and improving the established three-dimensional hair model. It can not only improve the production efficiency of designers, but also enhance the realism of the three-dimensional hair model through skinning operations.

[0128] Figure 8 is a flowchart of a generation method of a hair cluster to be adjusted shown according to an exemplary embodiment, as Figure 8 shown, including the following steps:

[0129] In step S810, a hair plane template is obtained. The hair plane template includes a plurality of projection maps, and the projection maps are obtained by projecting a basic shape model in a plurality of preset view directions.

[0130] Among them, the hair plane template can be a plane template used to guide graphic designers in designing a three-dimensional hair model. Graphic designers can design the planar materials of the three-dimensional hair model through the hair plane template. The hair plane template includes multiple projection views, which are obtained by projecting a basic shape model in multiple preset view directions. The basic shape model is a three-dimensional model representing the shape of the basic hairstyle. For example, the basic shape model can be a three-dimensional model obtained by summarizing and abstracting the characteristics and shapes of common hairstyles. Common hairstyles can be long hair, short hair, bangs, slicked-back hair, ponytail, bun, etc. The surface of the basic shape model is the curved surface to which the hair of various basic hairstyles adheres. The view direction is the direction in which light projects from one side of the basic shape model to the opposite side, and can also be understood as the direction in which the line of sight projects from one side of the basic shape model to the opposite side. For example, it projects from the front of the basic shape model to the back, from the left side of the basic shape model to the right side, and from the top of the basic shape model to the bottom. The preset view directions include the front view direction, the rear view direction, the left view direction, and the right view direction, etc. A projection view refers to the view obtained by projecting light from one side of an object to the opposite side. Specifically, the hair plane template is obtained from the local computer or loaded from another computer device connected to the computer network.

[0131] In step S820, a target projection view is selected from the hair plane template, and the drawn hair clusters are obtained through the target projection view.

[0132] Among them, hair is composed of several groups of hair clusters, and the three-dimensional hair model is also composed of several hair clusters. The drawn hair clusters are the planar images of the hair clusters that make up the three-dimensional hair model in the target projection view. On the target projection view, the designer designs the three-dimensional hair model by drawing the shapes and textures of each hair cluster from the view direction corresponding to the target projection view. Specifically, after obtaining the hair plane template, the multiple projection views included in the hair plane template can be displayed, and the designer selects the target projection view from the hair plane template according to the actual design requirements. After the designer finishes drawing the hair clusters on the target projection view, the drawn hair clusters can be immediately sent to the server or the current computer background, so that the server or the computer background obtains the hair clusters drawn on the target projection view. In addition, the drawn hair clusters can also be stored in the local computer in advance, and then the hair clusters drawn on the target projection view are obtained from the local computer. The hair clusters drawn on the target projection view can also be stored in advance in another computer device connected to the local computer network, and then the hair clusters drawn on the target projection view are obtained from another computer device connected to the local computer network.

[0133] In step S830, according to the position information of the drawn hair clusters in the target projection view and the geometric information of the basic shape model corresponding to the target projection view, the geometric information of the drawn hair clusters is determined.

[0134] Among them, the position information of the hair clusters in the target projection diagram refers to the position information of the hair clusters drawn by the designer on the projection diagram relative to the target projection diagram. Geometric information is information or data used to characterize the texture features, spatial structure, and spatial position of the three-dimensional model. Each basic shape model has corresponding geometric information, which is used to characterize the spatial structure of the basic shape model, the spatial positions of each vertex, etc. Specifically, at least one hair cluster is drawn on the target projection diagram, and the position information of the drawn hair cluster in the target projection diagram is known, so that the position information of the drawn hair cluster in the target projection diagram can be obtained. In order to accurately and quickly generate a three-dimensional hair model, the geometric information of the basic shape model corresponding to the generated target projection diagram is obtained. Further, the drawn hair clusters are attached to the projection contour of the basic shape model, and there is a projection relationship between the projection of the basic shape model and the basic shape model corresponding to the target projection diagram, then the geometric information of the hair clusters can be determined by using the position information of the drawn hair clusters in the target projection diagram and the geometric information of the basic shape model corresponding to the target projection diagram.

[0135] In step S840, a hair cluster to be adjusted is generated according to the geometric information of the drawn hair cluster.

[0136] As described above, hair is composed of several groups of hair clusters, and the three-dimensional hair model is also composed of several hair clusters. Specifically, the geometric information of the hair clusters includes the texture information and three-dimensional information of the hair clusters. The spatial structure of the hair clusters is generated according to the three-dimensional information of the hair clusters, and the surface of the spatial structure of the hair clusters is rendered according to the texture information of the hair clusters to generate a hair cluster to be adjusted.

[0137] In the above method for generating the hair cluster to be adjusted, by obtaining a hair plane template, selecting a target projection diagram from the hair plane template, and obtaining the drawn hair clusters through the target projection diagram; determining the geometric information of the hair clusters according to the position information of the hair clusters in the target projection diagram and the geometric information of the basic shape model corresponding to the target projection diagram; thus generating a three-dimensional hair model according to the geometric information of the hair clusters. Therefore, this embodiment realizes the modeling work of three-dimensional hair by using a plane template. According to this embodiment, not only can the generation efficiency of three-dimensional hair modeling be improved, but also the difficulty of three-dimensional hair modeling can be reduced.

[0138] Figure 9 is a flowchart of a generation method of a hair plane template shown according to an exemplary embodiment. As Figure 9 shown, it includes the following steps:

[0139] In step S910, a basic shape model is obtained.

[0140] In step S920, project the basic shape model in each preset view direction to obtain the projection diagram of the basic shape model in the preset view direction.

[0141] In step S930, generate a hair plane template according to the projection diagram of the basic shape model in the preset view direction.

[0142] Specifically, summarize and abstract the features and shapes of common hairstyles to obtain a basic shape model, and save the obtained basic shape model. When it is necessary to draw hair clusters, the basic shape model can be obtained from the local computer, or can be obtained from another computer device through the network and loaded onto the local computer. To facilitate the design of 3D models by graphic designers, project the basic shape model in each preset view direction to obtain the projection diagram of the basic shape model in the preset view direction; generate a hair plane template according to the projection diagrams of the basic shape model in each preset view direction.

[0143] In the above method for generating the hair plane template, a new path is provided for graphic designers to design 3D hair models, enabling graphic designers to complete the design of 3D hair models by drawing 2D hair cluster images on the projection diagram of the basic shape model. Through this embodiment, not only the learning cost of designers is reduced, but also the work of graphic designers to complete 3D design is assisted. Further, when actually designing 3D hair models, designers can select appropriate basic shape models and appropriate perspectives according to the requirements of specific hairstyles to generate hair plane templates. In the hair plane template, select appropriate positions, appropriate shapes, and appropriate textures to draw corresponding hair clusters. When drawing hair clusters through the hair plane template, the entire process is directly controllable for designers, which not only improves the work efficiency of designers, but also enhances the design effect of 3D hair models.

[0144] Figure 10 is a flowchart of a method for reconstructing a 3D hair model shown according to an exemplary embodiment. As Figure 10 shown, this method for reconstructing a 3D hair model is used for Figure 1 the terminal 110 in, and includes the following steps:

[0145] In step S1002, obtain a basic shape model.

[0146] In step S1004, project the basic shape model in each preset view direction to obtain the projection diagram of the basic shape model in the preset view direction.

[0147] In step S1006, generate a hair plane template according to the projection diagram of the basic shape model in the preset view direction.

[0148] In step S1008, a hair plane template is obtained. The hair plane template includes a plurality of projection maps, and the projection maps are obtained by projecting a basic shape model in a plurality of preset view directions.

[0149] In step S1010, a target projection map is selected from the hair plane template, and the drawn hair clusters are obtained through the target projection map.

[0150] In step S1012, according to the position information of the drawn hair clusters in the target projection map and the geometric information of the basic shape model corresponding to the target projection map, the geometric information of the drawn hair clusters is determined.

[0151] In step S1014, a hair cluster to be adjusted is generated according to the geometric information of the drawn hair clusters.

[0152] In step S1016, a hair cluster to be adjusted and the corresponding basic shape model are obtained. The basic shape model is a three-dimensional model representing the shape of a basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model.

[0153] Specifically, an interested hair cluster and the corresponding original basic shape model are obtained. The interested hair cluster is the hair cluster to be adjusted, and original control points are distributed on the original basic shape model; the interested hair cluster and the corresponding original basic shape model are copied to obtain a copy of the interested hair cluster and a copy of the corresponding original basic shape model. Original control point copies are distributed on the copy of the original basic shape model. The copy of the interested hair cluster is used as the hair cluster to be adjusted, the copy of the corresponding original basic shape model is used as the basic shape model, and the original control point copies are used as the preset control points.

[0154] In step S1018, the basic shape model is adjusted according to the adjustment operations on the preset control points, and the adjusted three-dimensional coordinates of the basic shape model are determined through the three-dimensional coordinates of the preset control points after adjustment.

[0155] In step S1020, through the texture coordinates of the basic shape model, the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted is obtained.

[0156] In step S1022, according to the adjusted three-dimensional coordinates of the basic shape model and the corresponding relationship between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted, the adjusted three-dimensional coordinates of the hair cluster to be adjusted are determined.

[0157] In step S1024, the hair cluster to be adjusted on the basic shape model is adjusted according to the adjusted three-dimensional coordinates of the hair cluster to be adjusted.

[0158] Specifically, in response to an adjustment instruction for a preset control point on the copy of the base shape model, the copy of the base shape model is adjusted, and the three-dimensional coordinates of the adjusted copy of the base shape model are obtained; the texture coordinates of the hair cluster copy corresponding to the copy of the base shape model are obtained; according to the three-dimensional coordinates of the adjusted copy of the base shape model, the texture coordinates of the hair cluster copy are transformed to obtain the three-dimensional coordinates of the hair cluster copy; and according to the three-dimensional coordinates of the hair cluster copy, the hair cluster copy corresponding to the copy of the base shape model is adjusted.

[0159] In step S1026, a number of bone points of the adjusted hair cluster are generated according to the position information of the adjusted hair cluster on the corresponding base shape model.

[0160] Among them, the bone points are evenly distributed in the length direction of the adjusted hair cluster. Specifically, the root point and the tip point of the hair cluster are obtained; a preset number of points are extracted from the edge contour of the hair cluster as edge points, and the edge points are evenly distributed between the root point and the tip point; and the midpoints between the root point, the tip point and the edge points at the same height are used as the bone points on the hair cluster.

[0161] In step S1028, skinning operation is performed on the adjusted hair cluster according to the position information of each bone point.

[0162] Specifically, according to the position information of each bone point, bones are added for the adjusted hair cluster between each bone point; the position information of each vertex in the adjusted hair cluster is obtained; according to the position information of each vertex and the position information of each bone point, the distances between each vertex and each bone point are obtained;

[0163] Skinning weights of each vertex in the adjusted hair cluster are generated according to the distances; and according to the skinning weights, the bones between each vertex and each bone point are associated.

[0164] It should be understood that although the steps in the above flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0165] Figure 11 is a block diagram of a device for reconstructing a three-dimensional hair model shown according to an exemplary embodiment. Refer toFigure 11 , the reconstruction device 1100 includes an acquisition module 1102, a model adjustment module 1104, a hair cluster adjustment module 1106, and a model generation module 1108.

[0166] The acquisition module 1102 is configured to acquire the hair clusters to be adjusted and the corresponding basic shape model, where the basic shape model is a three-dimensional model representing the shape of the basic hairstyle, and the hair clusters to be adjusted and preset control points are distributed on the basic shape model;

[0167] The model adjustment module 1104 is configured to adjust the basic shape model according to the adjustment operations on the preset control points, and determine the three-dimensional coordinates of the adjusted basic shape model through the three-dimensional coordinates of the preset control points after adjustment;

[0168] The hair cluster adjustment module 1106 is configured to adjust the hair clusters to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model;

[0169] The model generation module 1108 is configured to generate a three-dimensional hair model according to the adjusted hair clusters.

[0170] In an exemplary embodiment, the acquisition module 1102 is further configured to acquire the hair clusters of interest and the corresponding original basic shape model, where the hair clusters of interest are the hair clusters that need to be adjusted, and original control points are distributed on the original basic shape model; copy the hair clusters of interest and the corresponding original basic shape model to obtain a copy of the hair clusters of interest and a copy of the corresponding original basic shape model, and original control point copies are distributed on the copy of the original basic shape model. Use the copy of the hair clusters of interest as the hair clusters to be adjusted, use the copy of the corresponding original basic shape model as the basic shape model, and use the original control point copies as the preset control points.

[0171] In an exemplary embodiment, the hair cluster adjustment module 1106 is further configured to obtain the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted through the texture coordinates of the basic shape model; determine the three-dimensional coordinates of the adjusted hair clusters to be adjusted according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair clusters to be adjusted; adjust the hair clusters to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted hair clusters to be adjusted.

[0172] In an exemplary embodiment, the model generation module 1108 includes a bone point generation unit and a skinning operation unit;

[0173] The bone point generation unit is configured to generate a plurality of bone points of the adjusted hair cluster according to the position information of the adjusted hair cluster on the corresponding basic shape model;

[0174] The skinning operation unit is configured to perform a skinning operation on the adjusted hair cluster according to the position information of each bone point.

[0175] In an exemplary embodiment, each of the bone points is evenly distributed in the length direction of the adjusted hair cluster.

[0176] In an exemplary embodiment, the skinning operation unit is further configured to perform adding bones for the adjusted hair cluster between each of the bone points according to the position information of each bone point; obtaining the position information of each vertex in the adjusted hair cluster; obtaining the distance between each vertex and each bone point according to the position information of each vertex and the position information of each bone point; generating a skinning weight of each vertex in the adjusted hair cluster according to the distance; and associating the bones between each vertex and each bone point according to the skinning weight.

[0177] In an exemplary embodiment, the reconstruction device further includes an adjustable hair cluster generation module, configured to obtain a hair plane template, where the hair plane template includes a plurality of projection maps, and the projection maps are obtained by projecting the basic shape model in a plurality of preset view directions; select a target projection map from the hair plane template, and obtain the drawn hair cluster through the target projection map; determine the geometric information of the drawn hair cluster according to the position information of the drawn hair cluster in the target projection map and the geometric information of the basic shape model corresponding to the target projection map; and generate the adjustable hair cluster according to the geometric information of the drawn hair cluster.

[0178] In an exemplary embodiment, the reconstruction device further includes a hair plane template generation module, configured to obtain the basic shape model; project the basic shape model in each of the preset view directions to obtain a projection map of the basic shape model in the preset view direction; and generate the hair plane template according to the projection map of the basic shape model in the preset view direction.

[0179] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0180] Figure 12 It is a block diagram of a device 1200 for reconstructing a three-dimensional hair model shown according to an exemplary embodiment. For example, the device 1200 may be a server. Refer toFigure 12 Device 1200 includes a processing component 1220, which further includes one or more processors, and memory resources represented by a memory 1222 for storing instructions executable by the processing component 1220, such as application programs. The application programs stored in the memory 1222 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1220 is configured to execute instructions to perform the above-described method for reconstructing a three-dimensional hair model.

[0181] Device 1200 may further include a power component 1224 configured to perform power management of the device 1200, a wired or wireless network interface 1226 configured to connect the device 1200 to a network, and an input / output (I / O) interface 1228. Device 1200 may operate based on an operating system stored in the memory 1222, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.

[0182] In an exemplary embodiment, a storage medium including instructions is also provided, such as the memory 1222 including instructions, and the above instructions can be executed by the processor of the device 1200 to complete the above-described method for reconstructing a three-dimensional hair model. The storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0183] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0184] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A method for reconstructing a three-dimensional hair model, characterized in that Including: Obtain a hair cluster of interest and a corresponding original basic shape model, where the hair cluster of interest is the hair cluster to be adjusted, and original control points are distributed on the original basic shape model; Duplicate the hair cluster of interest and the corresponding original basic shape model to obtain a copy of the hair cluster of interest and a copy of the corresponding original basic shape model. Original control point copies are distributed on the copy of the original basic shape model. Use the copy of the hair cluster of interest as the hair cluster to be adjusted, use the copy of the corresponding original basic shape model as the basic shape model, and use the original control point copies as preset control points. The basic shape model is a three-dimensional model representing the shape of a basic hairstyle, and the hair cluster to be adjusted and preset control points are distributed on the basic shape model; Adjust the basic shape model according to the adjustment operations on the preset control points, and determine the three-dimensional coordinates of the adjusted basic shape model through the three-dimensional coordinates of the preset control points after adjustment; Adjust the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted; Generate a three-dimensional hair model based on the adjusted hair cluster.

2. The method for reconstructing a three-dimensional hair model according to claim 1, wherein The adjusting the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted includes: Obtain the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted through the texture coordinates of the basic shape model; Determine the three-dimensional coordinates of the adjusted hair cluster to be adjusted according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted; Adjust the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted hair cluster to be adjusted.

3. The method for reconstructing a three-dimensional hair model according to claim 1, characterized in that, The generating a three-dimensional hair model based on the adjusted hair cluster includes: Generate a number of bone points of the adjusted hair cluster according to the position information of the adjusted hair cluster on the corresponding basic shape model; Perform skinning operations on the adjusted hair cluster according to the position information of each bone point.

4. The method for reconstructing a three-dimensional hair model according to claim 3, wherein Each of the bone points is evenly distributed in the length direction of the adjusted hair cluster.

5. The method for reconstructing a three-dimensional hair model according to claim 3, wherein, The performing skinning operations on the adjusted hair cluster according to the position information of each bone point includes: Add bones for the adjusted hair cluster between each of the bone points according to the position information of each bone point; Obtain the position information of each vertex in the adjusted hair cluster; Obtain the distance between each vertex and each bone point according to the position information of each vertex and the position information of each bone point; Generate skinning weights for each vertex in the adjusted hair cluster according to the distance; Associate the bones between each vertex and each bone point according to the skinning weights.

6. The method for reconstructing a three-dimensional hair model according to any one of claims 1 to 5, characterized in that, The generation method of the hair cluster to be adjusted includes: Obtain a hair plane template, where the hair plane template includes multiple projection maps, and the projection maps are obtained by projecting a basic shape model in multiple preset view directions; Select a target projection map from the hair plane template, and obtain the drawn hair cluster through the target projection map; Determine the geometric information of the drawn hair cluster according to the position information of the drawn hair cluster in the target projection map and the geometric information of the basic shape model corresponding to the target projection map; Generate the hair cluster to be adjusted according to the geometric information of the drawn hair cluster.

7. The method for reconstructing a three-dimensional hair model according to claim 6, wherein The generation method of the hair plane template includes: Obtain the basic shape model; Project the basic shape model in each of the preset view directions to obtain the projection maps of the basic shape model in the preset view directions; Generate the hair plane template according to the projection maps of the basic shape model in the preset view directions.

8. A three-dimensional hair model reconstruction device, characterized in that, It includes: An acquisition module configured to execute the acquisition of the hair cluster of interest and the corresponding original basic shape model, where the hair cluster of interest is the hair cluster to be adjusted, and the original control points are distributed on the original basic shape model; Copy the hair cluster of interest and the corresponding original basic shape model to obtain a copy of the hair cluster of interest and a copy of the corresponding original basic shape model. The original control points are distributed on the copy of the original basic shape model. Use the copy of the hair cluster of interest as the hair cluster to be adjusted, use the copy of the corresponding original basic shape model as the basic shape model, and use the copy of the original control points as the preset control points. The basic shape model is a three-dimensional model representing the shape of the basic hairstyle, and the hair cluster to be adjusted and the preset control points are distributed on the basic shape model; A model adjustment module configured to execute the adjustment of the basic shape model according to the adjustment operations on the preset control points, and determine the three-dimensional coordinates of the adjusted basic shape model through the three-dimensional coordinates of the preset control points after adjustment; A hair cluster adjustment module configured to execute the adjustment of the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted; A model generation module configured to execute the generation of a three-dimensional hair model according to the adjusted hair cluster.

9. The reconstruction device for the three-dimensional hair model according to claim 8, characterized in that, The hair cluster adjustment module is further configured to execute obtaining the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted through the texture coordinates of the basic shape model; Determine the three-dimensional coordinates of the adjusted hair cluster to be adjusted according to the three-dimensional coordinates of the adjusted basic shape model and the correspondence between the three-dimensional coordinates of the basic shape model and the three-dimensional coordinates of the hair cluster to be adjusted; adjust the hair cluster to be adjusted on the basic shape model according to the three-dimensional coordinates of the adjusted hair cluster to be adjusted.

10. The reconstruction device of the three-dimensional hair model according to claim 8, characterized in that, The model generation module includes a bone point generation unit and a skinning operation unit; The bone point generation unit is configured to generate a plurality of bone points of the adjusted hair cluster according to the position information of the adjusted hair cluster on the corresponding basic shape model; The skinning operation unit is configured to perform a skinning operation on the adjusted hair cluster according to the position information of each bone point.

11. The reconstruction device of the three-dimensional hair model according to claim 10, characterized in that, Each of the bone points is evenly distributed in the length direction of the adjusted hair cluster.

12. The reconstruction device of the three-dimensional hair model according to claim 10, characterized in that, The skinning operation unit is further configured to add bones for the adjusted hair cluster between each of the bone points according to the position information of each bone point; obtain the position information of each vertex in the adjusted hair cluster; according to the position information of each vertex and the position information of each bone point, obtain the distance between each vertex and each bone point; generate the skinning weight of each vertex in the adjusted hair cluster according to the distance; According to the skinning weight, associate the bones between each vertex and each bone point.

13. The reconstruction device of the three-dimensional hair model according to any one of claims 8 to 12, characterized in that, The reconstruction device further includes an unadjusted hair cluster generation module, configured to obtain a hair plane template, where the hair plane template includes a plurality of projection maps, and the projection maps are obtained by projecting a basic shape model in a plurality of preset view directions; select a target projection map from the hair plane template, and obtain the drawn hair cluster through the target projection map; determine the geometric information of the drawn hair cluster according to the position information of the drawn hair cluster in the target projection map and the geometric information of the basic shape model corresponding to the target projection map; generate the unadjusted hair cluster according to the geometric information of the drawn hair cluster.

14. The reconstruction device of the three-dimensional hair model according to claim 13, wherein, The reconstruction device further includes a hair plane template generation module, configured to obtain the basic shape model; project the basic shape model in each of the preset view directions to obtain a projection map of the basic shape model in the preset view direction; Generate the hair plane template according to the projection map of the basic shape model in the preset view direction.

15. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the three-dimensional hair model reconstruction method according to any one of claims 1 to 7.

16. A storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the three-dimensional hair model reconstruction method according to any one of claims 1 to 7.

17. A computer program product, wherein the computer program product includes instructions, characterized in that, When the instructions are executed by a processor of an electronic device, enabling the electronic device to execute the three-dimensional hair model reconstruction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Hair modeling and portrait editing method based on single image

    CN102800129A

  • Non-uniformly sampled 3D information representation method

    US20120147008A1