Hair modeling method and device based on parameter control

By determining basic hair parameters and key node positions in three-dimensional hair modeling, combined with particle dynamics simulation, the hair parameters are generated and randomized, which solves the problems of hair model simulation efficiency and difficult morphological control in the existing technology, and achieves efficient, Detailed hair modeling and clothing fabric performance.

CN118674890APending Publication Date: 2024-09-20SHANGHAI BAIQIMAI TECH (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410730449.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing three-dimensional hair modeling technology is difficult to achieve efficient and precise hair-based hair model simulation, and lacks precise control of hair shape.

Method used

By determining the surface mesh and obtaining basic hair parameters, such as density, length, root diameter, taper, number of segments, bending direction, curvature and curl radius, the number and position of key hair nodes are determined, and generated based on the particle dynamics simulation method Basic hair, randomize hair parameters to achieve hair diversification.

Benefits of technology

It achieves efficient and convenient generation of three-dimensional hair, and can accurately control the shape of hair with only a few parameters. It is especially suitable for expressing hair clothing fabrics and enhances the authenticity of digital content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674890A
    Figure CN118674890A
Patent Text Reader

Abstract

The invention provides a hair modeling method and device based on parameter control. The method comprises the following steps: acquiring basic hair parameters including density, length, root diameter, taper, segment number, bending direction, curvature, curl radius and curl number; determining the hair quantity, the hair growth position and the hair growth direction; determining the number of hair key nodes according to the number of segments, determining the diameter of each hair key node according to the root diameter and the taper, and determining the position of each hair key node according to the bending direction, the curvature, the curl radius and the curl number; generating basic hair at each hair growth position of the surface grid according to the diameter of each hair key node and the position of each hair key node; and randomizing the length, root diameter, bending direction, curvature, curl radius and / or curl number of each basic hair according to the random hair parameters. According to the device, the method is realized when a processor executes a computer program stored in a memory. According to the invention, the simulation of the hairline type hair model can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of three-dimensional hair modeling, and more specifically, relates to a hair modeling method and device based on parameter control. Background Art

[0002] Currently, the metaverse and digital human technology are in a stage of vigorous development, and people's demand for high-quality digital content is growing. Hair, whether human hair or animal fur, is one of the key features to show the authenticity of digital content. In addition, hair-rich clothing is also an indispensable and important part of digital clothing. Therefore, realistic and detailed hair forms play a vital role in the presentation of digital content.

[0003] In existing 3D hair modeling, hair models are usually simulated by patches with hair texture images attached to them. This mode can achieve the purpose of simplifying the expression by using relatively less mesh data. However, with the rapid improvement of hardware computing performance in recent years, the simulation of hair models based on hair strands has become possible, and the related demand is also growing.

[0004] Therefore, it is necessary to propose a hair modeling method that can simulate the hair-based hair model. Summary of the invention

[0005] In view of this, the present invention provides a hair modeling method and device based on parameter control.

[0006] According to a first aspect of the present invention, there is provided a hair modeling method based on parameter control, the hair modeling method comprising the following steps:

[0007] determining a surface mesh on which hair is to be generated;

[0008] Acquiring basic hair parameters, wherein the basic hair parameters include density, length, root diameter, taper, number of segments, bending direction, curvature, curl radius, and curl quantity;

[0009] Determine the number of hairs, where they grow, and the direction of their growth;

[0010] Determine the number of key hair nodes according to the number of segments, determine the diameter of each key hair node according to the root diameter and the taper, and determine the position of each key hair node according to the bending direction, the bending degree, the curling radius and the curling number;

[0011] generating basic hair at each hair growth position of the surface mesh according to the diameter of each hair key node and the position of each hair key node;

[0012] The length, root diameter, curvature direction, curvature, curl radius and / or curl quantity of each basic hair are randomized according to the obtained random hair parameters.

[0013] Optionally, the number of hairs is determined based on the area of ​​the surface mesh and the density.

[0014] Optionally, the hair growth position is determined in the following manner:

[0015] According to the hair quantity, an interpolation operation based on Poisson distribution is performed on the surface mesh.

[0016] Optionally, the hair growth direction is the normal direction of the surface mesh.

[0017] Optionally, the number of key hair nodes is the number of segments plus one.

[0018] Optionally, the step of determining the diameter of each hair key node according to the root diameter and the taper includes:

[0019] constructing a truncated cone according to the root diameter, the length and the taper;

[0020] Uniformly marking the truncated cone in sections along its axial direction according to the number of sections;

[0021] The large end, each segmented marking point and the small end of the truncated cone are taken as each hair key node;

[0022] The diameter of each hair key node is determined according to the position of each hair key node on the truncated cone.

[0023] Optionally, the determining the position of each hair key node according to the bending direction, the curvature, the curling radius and the curling quantity includes:

[0024] Using the position of each hair key node on the truncated cone as the initial position of each hair key node;

[0025] Determining the bending position of each key hair node according to the bending direction and the bending degree and based on a particle dynamics simulation method;

[0026] Taking the center point of each key hair node at the bending position as the center of the circle and the curling radius as the radius, a circle is constructed in the radial direction of the truncated cone, and a corresponding quasi-cylinder is obtained based on each constructed circle;

[0027] Constructing a cylindrical helix on the quasi-cylindrical body, wherein the number of turns of the cylindrical helix is ​​equal to the number of curls;

[0028] The intersection of the cylindrical spiral line and each circle is taken as the center point of each key node of the hair in the curling position.

[0029] Optionally, the determining the bending position of each hair key node according to the bending direction and the curvature and based on a particle dynamics simulation method includes:

[0030] Treat each key hair node at the initial position as a particle;

[0031] According to the bending direction and the bending degree, a distance constraint is imposed on every two adjacent particles, and an angle constraint is imposed on every three adjacent particles. The problem is solved using a method based on position dynamics, and the positions of the constrained particles obtained through the solution are used as the bending positions of the key hair nodes.

[0032] Optionally, generating basic hair at each hair growth position of the surface mesh according to the diameter of each hair key node and the position of each hair key node is specifically as follows:

[0033] A truncated cone side surface mesh between every two adjacent hair key nodes is generated according to the diameter of each hair key node and the position of each hair key node in the curled position.

[0034] According to a second aspect of the present invention, there is provided a hair modeling device based on parameter control, the hair modeling device comprising a processor and a memory, wherein the processor implements any of the above-mentioned hair modeling methods based on parameter control when executing a computer program stored in the memory.

[0035] The beneficial effects of the present invention are:

[0036] The parameter-controlled hair modeling method of the present invention first determines the surface mesh of the hair to be generated; secondly, obtains basic hair parameters, which include density, length, root diameter, taper, number of segments, bending direction, curvature, curl radius and curl quantity; thirdly, determines the number of hairs, hair growth position and hair growth direction; from this, determines the number of key hair nodes according to the number of segments, determines the diameter of each key hair node according to the root diameter and the taper, and determines the position of each key hair node according to the bending direction, the curvature, the curl radius and the curl quantity; next, generates basic hair at each hair growth position of the surface mesh according to the diameter of each key hair node and the position of each key hair node; finally, performs random processing on the length, root diameter, bending direction, curvature, curl radius and / or curl quantity of each basic hair according to the acquired random hair parameters.

[0037] The parameter-controlled hair modeling method of the present invention is based on computer graphics, computational geometry and physical simulation technology. It can not only efficiently and conveniently realize the generation of three-dimensional hair on surface meshes, but also accurately control the shape of the hair with only a small number of parameters. It is particularly worth mentioning that the parameter-controlled hair modeling method of the present invention is particularly good at expressing clothing fabrics with hair, which brings more possibilities for digital content production.

[0038] The parameter-controlled hair modeling device of the present invention and the parameter-controlled hair modeling method described above belong to a general inventive concept, and have at least the same beneficial effects as the parameter-controlled hair modeling method described above, and the beneficial effects will not be repeated here.

[0039] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which the same or similar reference numerals are used throughout the drawings to represent the same or similar components.

[0041] Figure 1 A flowchart of an implementation of a hair modeling method based on parameter control according to an embodiment of the present invention is shown;

[0042] Figure 2a A schematic diagram showing a set of randomly distributed hair growth position points according to an embodiment of the present invention is shown;

[0043] Figure 2b A schematic diagram showing a set of hair growth position points in Poisson distribution according to an embodiment of the present invention is shown;

[0044] Figure 3a A schematic diagram of hair with various key hair nodes at initial positions according to an embodiment of the present invention is shown;

[0045] Figure 3b A schematic diagram of hair with each key hair node in a bent position according to an embodiment of the present invention is shown;

[0046] Figure 3c A schematic diagram of hair with each key hair node in a curled position according to an embodiment of the present invention is shown;

[0047] Figure 4 A schematic diagram showing the effect of a clothing fabric obtained based on hair modeling according to an embodiment of the present invention is shown;

[0048] Figure 5A schematic diagram of another clothing fabric effect obtained based on hair modeling according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to more fully understand the technical solution of the present invention, the exemplary embodiments of the present invention will be described in more comprehensive and detailed in conjunction with the accompanying drawings below. Obviously, the one or more embodiments of the present invention described below are only one or more of the specific ways in which the technical solution of the present invention can be implemented, and are not exhaustive. It should be understood that other ways belonging to a general inventive concept can be used to implement the technical solution of the present invention, and should not be limited by the exemplary embodiments described. Based on one or more embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0050] Example: Figure 1 FIG. 1 is a flowchart of a method for modeling hair based on parameter control according to an embodiment of the present invention. Figure 1 The parameter-controlled hair modeling method of the embodiment of the present invention comprises the following steps:

[0051] Step S100, determining the surface mesh of the hair to be generated;

[0052] Step S200, obtaining basic hair parameters, wherein the basic hair parameters include density, length, root diameter, taper, number of segments, bending direction, curvature, curl radius and curl number;

[0053] Step S300, determining the number of hairs, the hair growth position and the hair growth direction;

[0054] Step S400, determining the number of key hair nodes according to the number of segments, determining the diameter of each key hair node according to the root diameter and the taper, and determining the position of each key hair node according to the bending direction, the curvature, the curling radius and the curling number;

[0055] Step S500, generating basic hair at each hair growth position of the surface grid according to the diameter of each hair key node and the position of each hair key node;

[0056] Step S600: randomizing the length, root diameter, bending direction, curvature, curl radius and / or curl quantity of each basic hair according to the acquired random hair parameters.

[0057] Specifically, in the embodiment of the present invention, the random hair parameters include a length random adjustment coefficient, a root diameter random adjustment parameter, a bending direction random adjustment parameter, a curvature random adjustment parameter, a curl radius random adjustment parameter, and a curl quantity random adjustment parameter;

[0058] The length random adjustment coefficient is used to randomly adjust the length of the basic hair. The length random adjustment coefficient is an interval adjustment coefficient, for example, [0.90, 1.10], that is, the length random adjustment coefficient adjusts the length of the basic hair to 0.90 times the basic length at the minimum and 1.10 times the basic length at the maximum;

[0059] The root diameter random adjustment parameter is used to randomly adjust the root diameter of the basic hair. The root diameter random adjustment parameter is an interval adjustment coefficient, for example, [0.80, 1.20], that is, the root diameter random adjustment parameter adjusts the root diameter of the basic hair to a minimum of 0.80 times the basic root diameter and a maximum of 1.20 times the basic root diameter;

[0060] The bending direction random adjustment parameter is used to randomly adjust the bending direction of the basic hair. The bending direction random adjustment parameter is an interval adjustment coefficient, for example, [-15 degrees, 15 degrees], that is, the bending direction random adjustment parameter can make the basic hair rotate clockwise or counterclockwise in its cross-sectional plane, and the maximum amplitude of clockwise or counterclockwise rotation is 15 degrees;

[0061] The curvature random adjustment parameter is used to randomly adjust the curvature of the basic hair. The curvature random adjustment parameter is an interval adjustment coefficient, for example, [0.70, 1.30], that is, the curvature random adjustment parameter adjusts the curvature of the basic hair to a minimum of 0.70 times the basic curvature and a maximum of 1.30 times the basic curvature;

[0062] The curl radius random adjustment parameter is used to randomly adjust the curl radius of the basic hair. The curl radius random adjustment parameter is an interval adjustment coefficient, for example, [0.75, 1.25], that is, the curl radius random adjustment parameter adjusts the curl radius of the basic hair to a minimum of 0.75 times the basic curl radius and a maximum of 1.25 times the basic curl radius;

[0063] The random adjustment parameter of curl quantity is used to randomly adjust the curl quantity of the basic hair. The random adjustment parameter of curl quantity is an interval adjustment coefficient, for example, [0.85, 1.35], that is, the random adjustment parameter of curl quantity adjusts the curl quantity of the basic hair to a minimum of 0.85 times the basic curl quantity and a maximum of 1.35 times the basic curl quantity;

[0064] It should be noted that, among the basic hair parameters, if rounding is required after randomization, rounding up is adopted.

[0065] Furthermore, in step S300 of the embodiment of the present invention, the number of hairs is determined based on the area of ​​the surface grid and the density.

[0066] Specifically, in the embodiment of the present invention, the number of hairs is the product of the area of ​​the surface grid and the hair density.

[0067] Furthermore, in step S300 of the embodiment of the present invention, the method for determining the hair growth position is specifically:

[0068] According to the hair quantity, an interpolation operation based on Poisson distribution is performed on the surface mesh.

[0069] Specifically, in the embodiment of the present invention, an interpolation operation based on Poisson distribution is performed on the surface mesh to obtain a plurality of hair growth position points whose total number is equal to the number of hairs and which are Poisson distributed as a whole. Figure 2a is a schematic diagram of a set of randomly distributed hair growth position points according to an embodiment of the present invention, Figure 2b is a schematic diagram of a set of hair growth position points in a Poisson distribution according to an embodiment of the present invention. Figure 2a and Figure 2b By comparison, it can be seen that the set of hair growth position points with Poisson distribution is more consistent with the characteristics of hair growth.

[0070] Furthermore, in step S300 of the embodiment of the present invention, the hair growth direction is the normal direction of the surface mesh.

[0071] Furthermore, in step S400 of the embodiment of the present invention, the number of key hair nodes is the number of segments plus one.

[0072] Furthermore, in step S400 of the embodiment of the present invention, determining the diameter of each hair key node according to the root diameter and the taper includes:

[0073] constructing a truncated cone according to the root diameter, the length and the taper;

[0074] Uniformly marking the truncated cone in sections along its axial direction according to the number of sections;

[0075] The large end, each segmented marking point and the small end of the truncated cone are taken as each hair key node;

[0076] The diameter of each hair key node is determined according to the position of each hair key node on the truncated cone.

[0077] Furthermore, in step S400 of the embodiment of the present invention, determining the position of each hair key node according to the bending direction, the curvature, the curling radius and the curling quantity includes:

[0078] Using the position of each hair key node on the truncated cone as the initial position of each hair key node;

[0079] Determining the bending position of each key hair node according to the bending direction and the bending degree and based on a particle dynamics simulation method;

[0080] Taking the center point of each key hair node at the bending position as the center of the circle and the curling radius as the radius, a circle is constructed in the radial direction of the truncated cone, and a corresponding quasi-cylinder is obtained based on each constructed circle;

[0081] Constructing a cylindrical helix on the quasi-cylindrical body, wherein the number of turns of the cylindrical helix is ​​equal to the number of curls;

[0082] The intersection of the cylindrical spiral line and each circle is taken as the center point of each key node of the hair in the curling position.

[0083] Furthermore, in an embodiment of the present invention, the determining the bending position of each key hair node according to the bending direction and the curvature and based on a particle dynamics simulation method comprises:

[0084] Treat each key hair node at the initial position as a particle;

[0085] According to the bending direction and the bending degree, a distance constraint is imposed on every two adjacent particles, and an angle constraint is imposed on every three adjacent particles. The problem is solved using a method based on position dynamics, and the positions of the constrained particles obtained through the solution are used as the bending positions of the key hair nodes.

[0086] Furthermore, in the embodiment of the present invention, the step S500 of generating basic hair at each hair growth position of the surface grid according to the diameter of each hair key node and the position of each hair key node is specifically as follows:

[0087] A truncated cone side surface mesh between every two adjacent hair key nodes is generated according to the diameter of each hair key node and the position of each hair key node in the curled position.

[0088] Specifically, in the embodiment of the present invention, the side surface mesh of the truncated cone is generated between two adjacent hair key nodes, and is used to simulate the hair segment between the two adjacent hair key nodes; the side surface mesh of the truncated cone presents an irregular truncated cone shape as a whole, and the difference between it and a regular truncated cone is that its large end and small end are not opposite to each other, but staggered.

[0089] Specifically, in the embodiment of the present invention, Figure 3a FIG. 1 shows a schematic diagram of hair with each key hair node in an initial position according to an embodiment of the present invention. Figure 3b A schematic diagram of hair in which each key node of the hair is in a bent position according to an embodiment of the present invention is shown. Figure 3c A schematic diagram of hair with various key hair nodes in a curled position according to an embodiment of the present invention is shown. Figure 4 A schematic diagram of the effect of a clothing fabric obtained by the hair modeling method based on parameter control according to an embodiment of the present invention is shown. Figure 5 A schematic diagram of the effect of another clothing fabric obtained by the parameter-controlled hair modeling method according to an embodiment of the present invention is shown.

[0090] The parameter-controlled hair modeling method according to the embodiment of the present invention has the following beneficial effects:

[0091] 1. Compared with the existing hair patch modeling method, it is more expressive, especially in controlling the bending and curling of hair;

[0092] 2. Use fewer parameters to control the shape of hair, which is convenient and quick;

[0093] 3. In addition to being able to express the hair morphology effect, it is also applicable to other materials with short hair and plush effects;

[0094] 4. It is particularly suitable for clothing sweaters, furs and home textile modeling to express clothing fabrics with different hair characteristics.

[0095] Correspondingly, based on the parameter-controlled hair modeling method of the embodiment of the present invention, the embodiment of the present invention also proposes a parameter-controlled hair modeling device, which includes a processor and a memory. When the processor executes the computer program stored in the memory, the parameter-controlled hair modeling method of the embodiment of the present invention is implemented.

[0096] Although one or more embodiments of the present invention are described above, it should be known to those skilled in the art that the present invention can be implemented in any other form without departing from its subject matter and scope. Therefore, the embodiments described above are illustrative rather than restrictive, and many modifications and substitutions are obvious to those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A hair modeling method based on parameter control, characterized in that: include: determining a surface mesh on which hair is to be generated; Acquiring basic hair parameters, wherein the basic hair parameters include density, length, root diameter, taper, number of segments, bending direction, curvature, curl radius, and curl quantity; Determine the number of hairs, where they grow, and the direction of their growth; Determine the number of key hair nodes according to the number of segments, determine the diameter of each key hair node according to the root diameter and the taper, and determine the position of each key hair node according to the bending direction, the bending degree, the curling radius and the curling number; generating basic hair at each hair growth position of the surface mesh according to the diameter of each hair key node and the position of each hair key node; The length, root diameter, curvature direction, curvature, curl radius and / or curl quantity of each basic hair are randomized according to the obtained random hair parameters.

2. The method for hair modeling based on parameter control according to claim 1, characterized in that: The number of hairs is determined based on the area of ​​the surface mesh and the density.

3. The method for hair modeling based on parameter control according to claim 2, characterized in that: The method for determining the hair growth position is specifically as follows: According to the hair quantity, an interpolation operation based on Poisson distribution is performed on the surface mesh.

4. The method for hair modeling based on parameter control according to claim 3, characterized in that: The hair growth direction is the normal direction of the surface mesh.

5. The method for hair modeling based on parameter control according to claim 4, characterized in that: The number of key hair nodes is the number of segments plus one.

6. The method for hair modeling based on parameter control according to claim 5, characterized in that: The step of determining the diameter of each hair key node according to the root diameter and the taper comprises: constructing a truncated cone according to the root diameter, the length and the taper; Uniformly marking the truncated cone in sections along its axial direction according to the number of sections; The large end, each segmented marking point and the small end of the truncated cone are taken as each hair key node; The diameter of each hair key node is determined according to the position of each hair key node on the truncated cone.

7. The method for hair modeling based on parameter control according to claim 6, characterized in that: Determining the position of each hair key node according to the bending direction, the bending degree, the curling radius and the curling quantity comprises: Using the position of each hair key node on the truncated cone as the initial position of each hair key node; Determining the bending position of each key hair node according to the bending direction and the bending degree and based on a particle dynamics simulation method; Taking the center point of each key hair node at the bending position as the center of the circle and the curling radius as the radius, a circle is constructed in the radial direction of the truncated cone, and a corresponding quasi-cylinder is obtained based on each constructed circle; Constructing a cylindrical helix on the quasi-cylindrical body, wherein the number of turns of the cylindrical helix is ​​equal to the number of curls; The intersection of the cylindrical spiral line and each circle is taken as the center point of each key node of the hair in the curling position.

8. The method for hair modeling based on parameter control according to claim 7, characterized in that: The method of determining the bending position of each key hair node according to the bending direction and the bending degree and based on a particle dynamics simulation method comprises: Treat each key hair node at the initial position as a particle; According to the bending direction and the bending degree, a distance constraint is imposed on every two adjacent particles, and an angle constraint is imposed on every three adjacent particles. The problem is solved using a method based on position dynamics, and the positions of the constrained particles obtained through the solution are used as the bending positions of the key hair nodes.

9. The method for hair modeling based on parameter control according to claim 8, characterized in that: The method of generating basic hair at each hair growth position of the surface mesh according to the diameter of each hair key node and the position of each hair key node is specifically as follows: A truncated cone side surface mesh between every two adjacent hair key nodes is generated according to the diameter of each hair key node and the position of each hair key node in the curled position.

10. A hair modeling device based on parameter control, characterized in that: It comprises a processor and a memory, and when the processor executes the computer program stored in the memory, it implements the parameter-controlled hair modeling method described in any one of claims 1-9.