Virtual hair processing method and device, electronic equipment and readable storage medium

By creating a hair patch model and hair skeleton chain and determining the driving weight, the problem of unreal-time hair dynamic preview in animation production is solved, and high-precision hair morphology control and efficiency improvement is achieved.

CN120070679APending Publication Date: 2025-05-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411924920.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

During the animation production process, it is difficult to achieve real-time and accurate hair dynamic preview, resulting in a disconnect between hair design and animation production, increasing the difficulty and cost of post-adjustment.

Method used

By creating a hair patch model and hair skeleton chain based on the hair guidance curve, the driving weight between the hair bones and hair patches can be determined, real-time and accurate motion control of virtual hair can be achieved.

Benefits of technology

It improves the accuracy and efficiency of hair morphology control, reduces the workload of post-adjustment, and realizes real-time and accurate hair dynamic preview during the animation production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070679A_ABST
    Figure CN120070679A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual hair processing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: building a hair patch model according to a hair guide curve, and enabling the hair patch model to comprise a plurality of hair patches; a hair skeleton chain corresponding to the hair guide curve is created, and the hair skeleton chain comprises a plurality of hair skeletons; determining a driving weight between each hair skeleton and each hair patch; and according to the driving weight, transmitting the movement of each hair skeleton to the hair guide curve through the hair patch so as to drive virtual hair to move. According to the virtual hair processing method provided by the invention, real-time and accurate dynamic hair preview can be realized in an animation production process, so that the hair form control precision and efficiency are improved, and the workload of later adjustment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method, apparatus, electronic device, and computer-readable storage medium for processing virtual hair. Background Art

[0002] In the animation production and game industries, the production of characters is a complex and delicate task, and the design and implementation of hair are particularly crucial. High-quality hair can not only significantly enhance the realism of characters but also strengthen the emotional resonance of the audience. However, the production of hair faces many challenges. Especially in the animation production process, due to real-time performance limitations, it is difficult to accurately preview the dynamic effects of hair during the animation stage. This leads to a disconnection between hair design and animation production, increasing the difficulty and cost of post-production adjustment.

[0003] To provide a certain reference for the hair shape during the animation production process, simple proxy models are usually used to indicate the shape of the hair. These proxy models can help developers understand the general volume and shape of the hair during the animation stage, so as to make corresponding adjustments during animation design. However, proxy models are mainly used to indicate the overall shape and volume of the hair, but there are significant gaps in the specific shape and details of the hair. The information of these proxy models cannot be directly used in the subsequent solving stage and can only be used as a reference.

[0004] Therefore, how to achieve real-time and accurate dynamic preview of hair during the animation production process has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and computer-readable storage medium for processing virtual hair, which can achieve real-time and accurate dynamic preview of hair during the animation production process, thereby improving the accuracy and efficiency of hair shape control and reducing the difficulty of post-production adjustment. The specific solutions are as follows:

[0006] In a first aspect, an embodiment of this application provides a method for processing virtual hair, and the method includes:

[0007] Create a hair patch model according to a hair guiding curve, where the hair patch model includes a plurality of hair patches;

[0008] Create a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones;

[0009] Determine the driving weights between each of the hair bones and each of the hair patches;

[0010] According to the driving weights, transfer the motions of the respective hair bones to the hair guiding curve through the hair patches, so as to drive the virtual hair to move.

[0011] In a second aspect, an embodiment of the present application provides a processing device for virtual hair, and the device includes:

[0012] A first creation unit, configured to create a hair patch model according to a hair guiding curve, where the hair patch model includes a plurality of hair patches;

[0013] A second creation unit, configured to create a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones;

[0014] A determination unit, configured to determine the driving weights between the respective hair bones and the respective hair patches;

[0015] A driving unit, configured to transfer the motions of the respective hair bones to the hair guiding curve through the hair patches according to the driving weights, so as to drive the virtual hair to move.

[0016] In a third aspect, the present application further provides an electronic device, including:

[0017] A processor; and

[0018] A memory, configured to store a data processing program, and after the electronic device is powered on and runs the program through the processor, execute the method described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, storing a data processing program, and when the program is run by a processor, execute the method described in the first aspect.

[0020] Compared with the prior art, the present application has the following advantages:

[0021] The method for processing virtual hair provided by the embodiments of the present application includes the following steps: creating a hair patch model according to a hair guiding curve, where the hair patch model includes a plurality of hair patches; creating a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones; determining the driving weights between each of the hair bones and each of the hair patches; and according to the driving weights, transmitting the movement of each of the hair bones to the hair guiding curve through the hair patches to drive the virtual hair to move. It can be seen that in the method for processing virtual hair provided by the embodiments of the present application, a hair patch model including a plurality of hair patches is created through a hair guiding curve, so that the control of the hair guiding curve can be converted into the control of the hair patches. And by creating a hair bone chain corresponding to the hair guiding curve and including a plurality of hair bones, the control of the hair patches can be converted into the control of the hair bones. Then, the driving weights between the hair bones and the hair patches can be determined. Since the bone is a quick means for calculating physical effects, the movement of the hair bones can be conveniently controlled, and according to the driving weights, the movement of the hair bones can be transmitted to the hair patches. Since there is a corresponding relationship between the points on the hair patches and the key points on the hair guiding curve, the movement of the hair bones can be transmitted to the hair guiding curve through the hair patches, so as to control the virtual hair to move through the hair guiding curve. In addition, the hair patch model created through the hair guiding curve can normally preview the hair shape, so that the virtual hair can be visually previewed and efficiently controlled while maintaining the performance. Therefore, the method for processing virtual hair provided by the embodiments of the present application can realize real-time and accurate dynamic preview of hair during the animation production process, thereby improving the accuracy and efficiency of hair shape control and reducing the workload of post-adjustment. Description of the Drawings

[0022] Figure 1 is a flowchart of the method for processing virtual hair provided by the present application;

[0023] Figure 2 is a schematic diagram of the effect of an example of a hair guiding curve and a hair patch in the method for processing virtual hair provided by the embodiments of the present application;

[0024] Figure 3 is a schematic diagram of an example of creating a hair bone for a hair guiding curve in the method for processing virtual hair provided by the embodiments of the present application;

[0025] Figure 4 is an example diagram of completing a triangular patch in the method for processing virtual hair provided by the embodiments of the present application;

[0026] Figure 5 is a structural block diagram of an example of the virtual hair processing device provided by the embodiments of the present application;

[0027] Figure 6 It is a structural block diagram of an example of an electronic device for data processing provided by an embodiment of the present application. Detailed implementation manners

[0028] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.

[0029] It should be noted that the terms "first", "second", "third", etc. in the claims, the description and the drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. Data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising", "having" and their variants are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.

[0030] It should be understood that in the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. "Including A, B and / or C" means including any one or any two or all three of A, B, and C.

[0031] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A relatively", "A corresponding to B relatively" or "B corresponding to A relatively" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, but also B can be determined according to A and / or other information.

[0032] Before elaborating on the implementation manners of the present application in detail, the prior art will be further described first.

[0033] In modern animation production, in order to pursue more realistic visual effects, the dynamic simulation of hair has become an important component. However, due to limitations in computing resources, in the actual animation production process, especially in the design and editing stages, it is usually not feasible to preview the dynamic effects of high-fidelity hair in real time.

[0034] Currently, the industry generally adopts the following several solutions to address this challenge: 1. Represent the overall shape of the hair through a simplified proxy model, which helps to quickly preview the approximate position and volume of the hair during the animation design stage. 2. Reduce the display quantity / only display guide lines: During the editing process, reduce the quantity of hair details or only display the guide curves used to define the hair direction, so as to improve the editing efficiency. 3. Guide curve control: Indirectly change the manifestation form of the hair during the final rendering by adjusting the guide curves.

[0035] Although the above methods can alleviate the problem of real-time preview to a certain extent, they also bring several deficiencies: The limitations of the proxy model, although able to provide basic volume references, cannot be directly applied to the later complex physical solving process. Therefore, their role is mainly limited to illustration and cannot help with precise dynamic simulation. Reducing the display quantity reduces the computational burden, but at the same time it also reduces the intuitive understanding of the final effect by developers, especially when fine-tuning is required, which is particularly inconvenient. In the solution of guide curve control, when a large number of guide curves are involved, the overall hair control becomes very cumbersome and difficult to manage.

[0036] In summary, although the existing solutions have solved the performance problem to a certain extent, they have not fundamentally resolved the contradiction between the needs of developers in the design and preview stages and the final high-quality rendering. Therefore, finding a method that can both maintain performance and provide intuitive preview and efficient control remains an urgent problem to be solved.

[0037] For the above reasons, in order to achieve real-time and accurate dynamic preview of hair during the animation production process, thereby improving the accuracy and efficiency of hair shape control and reducing the workload of later adjustments, the first embodiment of this application provides a method for processing virtual hair. This method is applied to an electronic device, which can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, a smartwatch, etc., or other electronic devices capable of processing virtual hair. The embodiments of this application do not specifically limit.

[0038] The technical solutions of this application will be described in detail below through specific embodiments. It should be noted that these several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0039] Hereinafter, in combination with Figures 1 to 4Introduce the method for processing virtual hair provided by the embodiments of the present application.

[0040] As Figure 1 shown, it is a flowchart of the method for processing virtual hair provided by the present application, including the following steps S101 to S104.

[0041] Step S101: Create a hair patch model according to the hair guiding curve, where the hair patch model includes a plurality of hair patches.

[0042] The embodiments of the present application can be applied in the animation production stage. It should be noted that the animation production process usually includes the animation production stage and the animation generation stage.

[0043] Among them, the animation production stage refers to the stage where developers carry out creative design and preliminary animation production. In this stage, developers can use various tools and technologies to create and adjust animations, and preview the produced animations to ensure that the basic effects of the produced animations meet expectations.

[0044] The animation generation stage refers to the stage where, after the animation production is completed, the final animation effect is generated through a physics engine or other advanced technologies. In this stage, the computer can automatically perform complex calculations to ensure that the animation effect conforms to physical laws.

[0045] The above-mentioned hair guiding curve is used to define the general trend and shape of virtual hair. Compared with virtual hair, the hair guiding curve is usually a curve with a smaller number, which is used to control the overall movement of a group of hairs.

[0046] The above-mentioned virtual hair refers to the hair of characters, animals or other objects in virtual games or film and television animations. The virtual hair can be at least one of virtual hair, virtual beard, virtual eyebrows and virtual eyelashes, etc.

[0047] In the embodiments of the present application, a hair patch model can be created according to the hair guiding curve. The hair patch model is used to simulate the appearance and behavior of hair. The hair patch model is also called a hair wrapping model and usually includes a plurality of slender hair patches. The hair patch can be a triangular patch, a quadrilateral patch or a polygonal patch, etc.

[0048] In an optional implementation manner, the "create a hair patch model according to the hair guiding curve" in the above step S101 can be implemented through the following steps:

[0049] For each hair guiding curve, starting from the starting point, determine every preset number of key points as the vertices of each hair patch to be generated, and generate each hair patch;

[0050] Determine the model formed by each of the hair patches as the hair patch model.

[0051] It should be noted that the hair guiding curve is composed of multiple key points, and the key points are used to define the basic shape of the corresponding hair guiding curve. These key points include a starting point (also called the root point), an end point, and intermediate points. Among them, the starting point can be understood as the hair root of the bundle of virtual hair corresponding to the hair guiding curve, and the end point can be understood as the hair tip of the bundle of virtual hair corresponding to the hair guiding curve.

[0052] The above preset quantity can be, for example, 3, 4, 5, etc., and can be specifically set based on the actual situation. For the convenience of description, in the embodiments of the present application, the preset quantity is taken as 3 as an example for introduction, and the present application does not specifically limit this.

[0053] In the embodiments of the present application, for each hair guiding curve, starting from the starting point, a triangular patch can be generated for every 3 points, and the model formed by each triangular patch is the above-mentioned hair patch model, thereby converting the hair guiding curve into a hair patch model.

[0054] As Figure 2 shown, it is a schematic diagram of the effect of an example of the hair guiding curve and the hair patch in the method for processing virtual hair provided by the embodiments of the present application. This figure includes multiple hair guiding curves including the hair guiding curve 10. On the hair guiding curve 10, an adjacent three key points generate a triangular patch 11.

[0055] By converting the preset quantity of points on the hair guiding curve into a hair patch, in the subsequent physical calculation process, the calculation amount of the originally preset quantity of points is converted into the calculation amount of one point in the hair patch, which can effectively reduce the calculation amount in the physical calculation.

[0056] Step S102: Create a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes multiple hair bones.

[0057] In the embodiments of the present application, a hair bone chain including multiple hair bones can be created according to the hair guiding curve. Among them, the hair bones are used to simulate the structure of the hair guiding curve. The hair bones can be regarded as a rigid body and have displacement attributes and rotation attributes. By controlling the movement of the hair bones, the movement of the hair guiding curve is realized efficiently and accurately. The hair bone chain refers to a continuous chain structure formed by connecting multiple hair bones.

[0058] As Figure 3 shown, it is a schematic diagram of an example of creating hair bones for a hair guiding curve in the method for processing virtual hair provided by the embodiments of the present application. For the hair guiding curve, multiple hair bones including the hair bone 12 shown in Figure 3 the figure can be created, thereby forming a hair bone chain.

[0059] It should be noted that in the embodiments of the present application, the displacement attribute of the hair bones can be locked, so that visual errors such as stretching caused by the movement of the hair bones can be avoided.

[0060] In an alternative embodiment, when creating a hair bone chain corresponding to a hair guiding curve, the method for processing virtual hair provided by the embodiments of the present application may further include the following steps:

[0061] Add a controller to each joint in the hair bone chain;

[0062] Configure the displacement attribute of the controller to a locked state, and the controller is used to control the corresponding hair bone to rotate.

[0063] In this embodiment, during the animation production stage, a controller can be added to each joint in the hair bone chain respectively.

[0064] It can be understood that during the animation production process, the controller is used to simplify and enhance the control of the model, bones, and animation curves. By moving or rotating the controller, the corresponding joints can also be made to move or rotate. Developers can adjust the position and rotation of the bones by dragging the controller handle, without directly operating the complex bone system, reducing the difficulty of bone movement control.

[0065] In the embodiments of the present application, after adding the controller, the displacement attribute of the controller can be configured to a locked state to limit the movement of the hair bones by restricting the movement of the controller. The rotation attribute of the controller is configured to an unlocked state, so that the rotation of the hair bones can be controlled by rotating the controller.

[0066] In a specific implementation manner, for any controller, the property panel of the controller can be opened, and the locked state of the displacement attribute can be set to "True" or "Locked", so as to configure the displacement attribute to a locked state.

[0067] Step S103: Determine the driving weights between each of the hair bones and each of the hair patches.

[0068] After creating the hair patch model and the hair bone chain, the driving weights between each hair bone and each hair patch can be determined, and the driving weights can be used to characterize the contribution degree of the movement of the hair bones to the movement of the hair patches.

[0069] For example, the driving weight between the hair bone a1 and the hair patch b1 is 1, indicating that the contribution of the movement of the hair bone a1 to the movement of the hair patch b1 is 100%, that is, the movement of the hair patch a1 is completely transferred to the hair patch b1 by 100%; the driving weight between the hair bone a2 and the hair patch b2 is 0.5, indicating that the contribution of the movement of the hair bone a2 to the movement of the hair patch b2 is 50%, that is, 50% of the movement of the hair patch a2 is transferred to the hair patch b2.

[0070] In an alternative embodiment, the above step S103 can be implemented by the following steps:

[0071] For each of the hair patches, determine the first hair bone to which the hair patch belongs among the hair bones;

[0072] Determine the driving weight between the first hair bone and the hair patch.

[0073] It should be noted that a hair bone can include at least one hair patch, and a hair patch can correspond to at least one hair bone. The movement of the hair bone can be transferred to the corresponding hair patch, thereby driving the movement of the hair guiding curve corresponding to the hair patch.

[0074] In this embodiment, for a hair patch, the first hair bone to which the hair patch belongs can be determined. For example, the first hair bone to which the hair patch b1 belongs can be the hair bone a1, and the first hair bones to which the hair patch b2 belongs can be the hair bones a2 and a3.

[0075] After that, the driving weight between the first hair bone and the hair patch can be determined.

[0076] It should be noted that the driving weight between the first hair bone and the hair patch can be a certain fixed floating-point value between 0 and 1. That is to say, the contribution of the movement of the first hair bone to the movement of each point on a hair patch is the same. In this way, the movement data of each point on a hair patch can be kept consistent, thereby avoiding the distortion of the hair patch.

[0077] In an alternative specific implementation manner, the above "determine the driving weight between the first hair bone and the hair patch" can be implemented by the following steps:

[0078] When the first hair bone is one, determine the driving weight between the hair patch model and the first hair bone with the first weight value; the first weight value represents that the movement of the first hair bone is completely transferred to the hair patch model;

[0079] When there are multiple first hair skeletons, determine the second weight values between the hair patch model and each of the first hair skeletons according to the number of the first hair skeletons; the second weight value represents the movement part of the corresponding first hair skeleton transmitted to the hair patch model.

[0080] In this embodiment, if one hair patch corresponds to one hair skeleton, that is, the first hair skeleton to which the hair patch belongs is one, then the first weight value is determined as the driving weight between the first hair skeleton and the hair patch. Usually, the first weight value is 1, and the first weight value represents that 100% of the movement of the first hair skeleton is completely transmitted to the hair patch.

[0081] As shown in Table 1, it is an example table of the driving weights between the hair skeletons and the hair patches in the virtual hair processing method provided by the embodiments of the present application.

[0082] Table 1.

[0083] Hair bones Hair patches Driving weights Hair bone a1 Hair patch b1 1

[0084] In Table 1 above, the first hair skeleton to which the hair patch b1 belongs is the hair skeleton a1, and the driving weight between the hair skeleton a1 and the hair patch b1 is 1.

[0085] If one hair patch corresponds to multiple hair skeletons, that is, the first hair skeleton to which the hair patch belongs is multiple. For example, a part of the hair patch b2 belongs to the hair skeleton a2 and a part belongs to the hair skeleton a3. Then, the second weight values between each first hair skeleton and the hair patch can be determined according to the number of the first hair skeletons. Usually, the sum of the second weight values can be 1, and the second weight value represents that the movements of the first hair skeletons are not completely transmitted to the hair patch by 100%, but only part of the movements are transmitted to the hair patch.

[0086] Optionally, when there are multiple first hair skeletons, the second weight values between each first hair skeleton and the hair patch can be the same. That is, the ratio of 1 to the total number of the first hair skeletons can be determined as the second weight value between each first hair skeleton and the hair patch.

[0087] As shown in Table 2, it is an example table of the driving weights between the hair skeletons and the hair patches in the virtual hair processing method provided by the embodiments of the present application.

[0088] Table 2.

[0089]

[0090] In Table 2 above, the first hair bone to which the hair patch b2 belongs is the hair bones a2 and a3. Then, the driving weight between the hair bone a2 and the hair patch b2 is 0.5, and the driving weight between the hair bone a3 and the hair patch b2 is also 0.5. The first hair bone to which the hair patch b3 belongs is the hair bones a1, a2, and a3. Then, the driving weight between the hair bone a1 and the hair patch b3 is 1 / 3, the driving weight between the hair bone a2 and the hair patch b3 is 1 / 3, and the driving weight between the hair bone a3 and the hair patch b3 is also 1 / 3.

[0091] In this setting method, for a hair patch, the driving weight between the belonging hair bone and the hair patch is set. In this way, when the hair bone moves, it will drive the corresponding hair patch to move accordingly. Moreover, the driving weight is a fixed value. In this way, when the hair bone moves, it will make any position of the hair patch move in the same way, avoiding the distortion and deformation of the hair patch.

[0092] Step S104: According to the driving weight, transfer the movement of each hair bone to the hair guiding curve through the hair patch to drive the virtual hair to move.

[0093] It should be noted that since the hair patch is a patch structure formed by a preset number of points on the hair guiding curve, each vertex of the hair patch corresponds one-to-one with the key points on the hair guiding curve.

[0094] Based on the driving weight, the movement of the hair bone can be transferred to the hair patch. In this way, based on the corresponding relationship between the hair patch and the key points on the hair guiding curve, the movement of the hair patch can be transferred to the movement of the key points on the hair guiding curve, thus conveniently and efficiently realizing the transfer of the movement of each hair bone to the hair guiding curve through the hair patch.

[0095] It should be noted that in the embodiment of the present application, by creating the hair patch corresponding to the hair guiding curve, and creating the hair bone corresponding to the hair guiding curve, and adding a controller to the hair bone. In this way, through a series of conversions of virtual hair → hair guiding curve → hair patch → hair bone → controller, in the preview stage, the high-efficiency control of virtual hair can be conveniently realized by controlling the controller, and the control of virtual hair can be completed with relatively low performance consumption.

[0096] The virtual hair processing method provided by the embodiment of the present application includes the following steps: creating a hair patch model according to a hair guiding curve, where the hair patch model includes a plurality of hair patches; creating a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones; determining the driving weights between each of the hair bones and each of the hair patches; and according to the driving weights, transmitting the movement of each of the hair bones to the hair guiding curve through the hair patches to drive the virtual hair to move. It can be seen that in the virtual hair processing method provided by the embodiment of the present application, a hair patch model including a plurality of hair patches is created through a hair guiding curve. In this way, the control of the hair guiding curve can be converted into the control of the hair patches. And by creating a hair bone chain corresponding to the hair guiding curve and including a plurality of hair bones, in this way, the control of the hair patches can be converted into the control of the hair bones. Then, the driving weights between the hair bones and the hair patches can be determined. Since the bone is a quick means of calculating physical effects, in this way, the movement of the hair bones can be conveniently controlled, and according to the driving weights, the movement of the hair bones can be transmitted to the hair patches. Since there is a corresponding relationship between the points on the hair patches and the key points on the hair guiding curve, in this way, the movement of the hair bones can be transmitted to the hair guiding curve through the hair patches, so as to control the virtual hair to move through the hair guiding curve. In addition, the hair patch model created through the hair guiding curve can normally preview the hair shape. In this way, while maintaining the performance, the virtual hair can be intuitively previewed and efficiently controlled. Therefore, the virtual hair processing method provided by the embodiment of the present application can achieve real-time and accurate hair dynamic preview during the animation production process, thereby improving the accuracy and efficiency of hair shape control and reducing the workload of post-adjustment.

[0097] In an alternative embodiment, the above step S104 can be implemented through the following steps:

[0098] Determine the first physical solution data corresponding to each of the hair bones;

[0099] According to the driving weights, weight the first physical data to obtain the second physical solution data of each of the hair patches;

[0100] According to the second physical solution data, determine the third physical solution data of each key point on the hair guiding curve, so as to transmit the movement of each of the hair bones to the hair guiding curve through the hair patches.

[0101] In this embodiment, when calculating the physical effects of virtual hair, the physical effects of hair bones can be calculated first. Specifically, a physics engine can be used for detailed physical simulation to calculate the effects of physical forces such as gravity, wind force, and collision on the hair bones, so as to obtain the first physical solution data corresponding to each hair bone.

[0102] As shown in Table 3, it is an example table of the first physical solution data of each hair bone in the virtual hair processing method provided by the embodiments of the present application.

[0103] Table 3.

[0104] Each hair bone Initial rotation angle data First physical solution data Hair bone a1 (0°,0°,0°) (0°,30°,0°) Hair bone a2 (0°,0°,0°) (-45°,0°,0°) Hair bone a3 (0°,0°,0°) (0°,0°,60°)

[0105] In Table 3 above, the initial rotation angle data of the hair bone a1 in each hair bone is (0°, 0°, 0°), that is, the hair bone a1 has no rotation around the x-axis, y-axis, and z-axis in the initial state. When subjected to physical simulation forces, the first physical solution data of the hair bone a1 is (0°, 30°, 0°), that is, the hair bone a1 rotates 30° around the y-axis and has no rotation around the x-axis and z-axis; the initial rotation angle data of the hair bone a2 in each hair bone is (0°, 0°, 0°), that is, the hair bone a2 has no rotation around the x-axis, y-axis, and z-axis in the initial state. When subjected to physical simulation forces, the first physical solution data of the hair bone a2 is (-45°, 0°, 0°), that is, the hair bone a2 rotates -45° around the x-axis and has no rotation around the y-axis and z-axis; the initial rotation angle data of the hair bone a3 in each hair bone is (0°, 0°, 0°), that is, the hair bone a3 has no rotation around the x-axis, y-axis, and z-axis in the initial state. When subjected to physical simulation forces, the first physical solution data of the hair bone a3 is (0°, 0°, 60°), that is, the hair bone a3 rotates 60° around the z-axis and has no rotation around the x-axis and y-axis.

[0106] After obtaining the first physical solution data of each hair bone, the first physical data can be weighted according to the driving weights to obtain the second physical solution data of each hair patch. This second physical solution data can be understood as the motion data of the center point of the hair patch.

[0107] Combining Table 1, Table 2, and Table 3 above, the second physical solution data corresponding to each hair patch calculated is shown in Table 4:

[0108] Table 4.

[0109] Each hair patch Second physical solution data Hair patch b1 (0°,30°,0°) Hair patch b2 (-22.5°,0°,30°) Hair patch b3 (-15°,10°,20°)

[0110] In the examples of Table 1 and Table 2 above, the driving weight between the hair bone a1 and the hair patch b1 is 1; the driving weight between the hair bone a2 and the hair patch b2 is 0.5, and the driving weight between the hair bone a3 and the hair patch b2 is also 0.5; the driving weight between the hair bone a1 and the hair patch b3 is 1 / 3, the driving weight between the hair bone a2 and the hair patch b3 is 1 / 3, and the driving weight between the hair bone a3 and the hair patch b3 is also 1 / 3. In Table 3 above, the first physical solution data of the hair bone a1 is (0°, 30°, 0°), the first physical solution data of the hair bone a2 is (-45°, 0°, 0°), and the first physical solution data of the hair bone a3 is (0°, 0°, 60°). After weighted calculation according to the driving weight, the data in Table 4 above are obtained. The first physical solution data of the hair bone a1 is completely transferred to the hair patch b1 by 100%, that is, the second physical solution data of the hair patch b1 is (0°, 30°, 0°); the first physical solution data of the hair bone a2 and the hair bone a3 are transferred to the hair patch b2 by 50% respectively, that is, the second physical solution data of the hair patch b2 is (-22.5°, 0°, 30°); the first physical solution data of the hair bone a1, the hair bone a2 and the hair bone a3 are transferred to the hair patch b3 by 1 / 3 respectively, that is, the second physical solution data of the hair patch b3 is (-15°, 10°, 20°).

[0111] After obtaining the second physical solution data of each hair patch, since each vertex of the hair patch corresponds one-to-one with the key point on the hair guiding curve, the third physical solution data of each key point on the hair guiding curve can be determined according to the corresponding relationship between the hair patch and the key point on the hair guiding curve.

[0112] Exemplarily, the vertices of the hair patch b1 respectively correspond to the key points p1, p2, and p3 on the hair guiding curve c1, the vertices of the hair patch b2 respectively correspond to the key points p4, p5, and p6 on the hair guiding curve c1, and the vertices of the hair patch b3 respectively correspond to the key points p7, p8, and p9 on the hair guiding curve c2. Combining the second physical solution data of each hair patch shown in Table 4 above, it can be determined that the third physical solution data of the key point p1 on the hair guiding curve c1 is (0°, 30°, 0°), the third physical solution data of the key point p2 on the hair guiding curve c1 is (0°, 30°, 0°), the third physical solution data of the key point p3 on the hair guiding curve c1 is (0°, 30°, 0°), the third physical solution data of the key point p4 on the hair guiding curve c1 is (-22.5°, 0°, 30°), the third physical solution data of the key point p5 on the hair guiding curve c1 is (-22.5°, 0°, 30°), the third physical solution data of the key point p6 on the hair guiding curve c1 is (-22.5°, 0°, 30°); the third physical solution data of the key point p7 on the hair guiding curve c2 is (-15°, 10°, 20°), the third physical solution data of the key point p8 on the hair guiding curve c2 is (-15°, 10°, 20°), and the third physical solution data of the key point p9 on the hair guiding curve c2 is (-15°, 10°, 20°).

[0113] In this way, through the first physical solution data of each hair bone, the third physical solution data of each key point on the hair guiding curve can be determined efficiently and accurately, so as to transfer the motion of each hair bone to the hair guiding curve efficiently and accurately and map the motion of each hair bone to the motion of the hair guiding curve.

[0114] In an alternative embodiment, the method for processing virtual hair provided by the embodiments of the present application may further include the following steps:

[0115] Determine the motion data of each hair point on the virtual hair according to the third physical solution data;

[0116] Determine the fourth physical solution data of the virtual hair according to the motion data of each hair point on the virtual hair;

[0117] Drive the virtual hair to move according to the fourth physical solution data.

[0118] In this embodiment, the motion data of each hair point on each virtual hair can be generated according to the third physical solution data of each key point on the hair guiding curve.

[0119] In an alternative specific implementation, interpolation calculations can be performed on the third physical solution data of each key point on the hair guiding curve to generate the interpolated data of each hair point on each virtual hair, and the interpolated data is determined as the motion data corresponding to each hair point. For example, if the hair guiding curve has 5 key points, namely p1 to p5, and there are 10 points h1 to h10 on the corresponding virtual hair, interpolation calculations can be performed between the third physical solution data of the 5 key points p1 to p5 to obtain the interpolated data of the 10 points h1 to h10 on the virtual hair.

[0120] In an alternative specific implementation, the above step of "determining the fourth physical solution data of the virtual hair according to the motion data of each hair point on the virtual hair" can be implemented through the following steps:

[0121] Obtain the length of the virtual hair;

[0122] Determine the physical effect weights of each hair point on the virtual hair according to the length;

[0123] Determine the fourth physical solution data of the virtual hair according to the third physical solution data and the physical effect weights.

[0124] For a virtual hair, the length of the virtual hair can be obtained. After that, weight values can be assigned to each hair point on the virtual hair according to the length of the virtual hair, and the assigned weight values are determined as the physical effect weights of each hair point on the virtual hair. It should be noted that for a virtual hair, the physical effect weight corresponding to the hair point closer to the hair tip is larger, and the physical effect weight corresponding to the hair point closer to the hair root is smaller. That is to say, the part closer to the hair tip moves more obviously, and the part closer to the hair root moves less obviously.

[0125] In a specific implementation, for a hair point on a virtual hair, the ratio of the distance between the hair point and the hair root of the virtual hair to the length of the virtual hair can be determined as the physical effect weight of the hair point.

[0126] Exemplarily, the length of a certain virtual hair is 40 cm. There are hair point 1, hair point 2, hair point 3, hair point 4, and hair point 5 on the virtual hair. The distance between hair point 1 and the hair root of the virtual hair is 8 cm, the distance between hair point 2 and the hair root of the virtual hair is 16 cm, the distance between hair point 3 and the hair root of the virtual hair is 24 cm, the distance between hair point 4 and the hair root of the virtual hair is 32 cm, and the distance between hair point 5 and the hair root of the virtual hair is 40 cm (i.e., hair point 5 is the hair tip of the virtual hair). Then the physical effect weights corresponding to hair point 1, hair point 2, hair point 3, hair point 4, and hair point 5 are 0.2, 0.4, 0.6, 0.8, and 1 respectively.

[0127] After determining the physical effect weights of each hair point on the virtual hair, the motion data of each hair point on the determined virtual hair can be weighted according to the physical effect weights, so as to obtain the fourth physical solution data of the virtual hair.

[0128] After obtaining the fourth physical solution data of the virtual hair, the virtual hair can be driven to perform corresponding motions based on the fourth physical solution data.

[0129] In this setting method, by setting different physical effect weights for each hair point on the virtual hair, the physical motion effect of the virtual hair is further refined, making the motion of the virtual hair smoother and more natural, and improving the authenticity of the virtual hair during motion.

[0130] In an optional implementation manner, the method for processing virtual hair provided by the embodiments of the present application may further include the following steps

[0131] Determine the hair growth model corresponding to the hair patch model;

[0132] Obtain the first normal direction of the hair growth model;

[0133] For the hair patch model, determine the first face whose difference between the normal direction and the first normal direction is within a preset range;

[0134] Bake the pre-configured hair color information onto the first face.

[0135] The above-mentioned hair growth model refers to a model used to define the starting point and direction of hair or a hair cluster. This hair growth model determines where the hair starts to grow and the initial direction of the hair. The hair growth model can be, for example, the scalp model of a virtual character, the skin model of a virtual animal, etc.

[0136] In this embodiment, the first normal direction corresponding to the hair growth model can be obtained. In three-dimensional geometry, the normal is a vector perpendicular to the surface. Specifically, for a plane, the normal is a vector perpendicular to the plane; for a curved surface, the normal is a perpendicular vector at a certain point on the curved surface. The first normal vector corresponding to the hair growth model can be used to assist in judging the front and back sides of the hair patch model.

[0137] In an alternative embodiment, a first face in the hair patch model whose difference between the normal direction and the first normal direction is within a preset range can be determined, and pre-configured hair color information (such as yellow, black, etc.) can be baked onto this first face. It should be noted that in the hair patch model, when the difference between the normal direction of a certain face and the first normal direction is within the preset range, it means that the normal direction of this face is the same as or similar to the first normal direction, and this face is the front face of the hair patch model, that is, the outer surface of the hair patch model.

[0138] In this setting method, on the one hand, by pre-baking the hair color information, the complex calculation results can be saved as simple data for use in real-time applications, effectively reducing the calculation burden in real-time rendering. On the other hand, through the first normal direction of the hair growth model, the front and back of the hair patch model can be effectively distinguished, so as to achieve the correct baking of the hair color information and avoid wrongly baking the hair color to the back.

[0139] In an example alternative embodiment, each of the hair patches is a triangular patch, and the above step "for the hair patch model, determine the first face whose difference between the normal direction and the first normal direction is within the preset range" can specifically include the following steps:

[0140] Complete each triangular patch in the hair patch model into a quadrilateral patch to obtain a completed hair patch model;

[0141] Determine the face in the completed hair patch model whose difference between the normal direction and the first normal direction is within the preset range as the first face.

[0142] In this embodiment, each triangular patch can be completed into a quadrilateral patch. As Figure 4 shown, it is an example diagram of completing a triangular patch in the virtual hair processing method provided by the embodiment of the present application. One of the triangular patches is completed into a quadrilateral patch 13. Thus, a completed hair patch model is obtained. The completed hair patch model includes multiple quadrilateral patches, and smooth transitions can be made between every two adjacent quadrilateral patches.

[0143] After obtaining the completed hair patch model, the face in the hair patch model whose difference between the normal direction and the first normal direction is within the above preset range can be determined as the first face, and then the pre-configured hair color information can be baked on this first face to obtain a pre-baked hair patch model.

[0144] In this setting method, completing the hair patches can widen the originally sparse hair patches, so as to better simulate the coverage effect of the hair.

[0145] During the game running stage, the pre-baked hair patch model can be directly used to restore the hair effect, effectively reducing the performance consumption during the real-time rendering of virtual hair.

[0146] The method for processing virtual hair provided in the first embodiment of this application has at least the following advantages: By creating a hair patch model for the hair guiding curve, the hair shape can be normally previewed during the hair production stage and adjusted in a timely manner during the animation production process. By completing the hair patch model and baking the hair color, a pre-baked hair patch model can be quickly generated, so as to quickly restore the hair effect during the game running stage and reduce the performance overhead caused by hair rendering. When calculating the physical motion effect of the hair, the physical motion effect of the hair patch model can be calculated first, and a physical effect weight can be added to increase the detailed physical effect that the hair tip movement is stronger than the hair root movement.

[0147] Corresponding to the method for processing virtual hair provided in the first embodiment of this application, the second embodiment of this application also provides a device for processing virtual hair, as Figure 5 shown. The device 500 for processing virtual hair includes:

[0148] A first creation unit 501, configured to create a hair patch model according to a hair guiding curve, wherein the hair patch model includes a plurality of hair patches;

[0149] A second creation unit 502, configured to create a hair bone chain corresponding to the hair guiding curve, wherein the hair bone chain includes a plurality of hair bones;

[0150] A determination unit 503, configured to determine the driving weights between each of the hair bones and each of the hair patches;

[0151] A driving unit 504, configured to transmit the motion of each of the hair bones to the hair guiding curve through the hair patches according to the driving weights, so as to drive the virtual hair to move.

[0152] Optionally, the device 500 for processing virtual hair further includes an adding unit, and the adding unit is configured to:

[0153] Add a controller to each joint in the hair bone chain;

[0154] Configure the displacement attribute of the controller to a locked state, and the controller is used to control the corresponding hair bone to rotate.

[0155] Optionally, the determination unit 503 is specifically configured to:

[0156] For each hair patch, determine the first hair bone to which the hair patch belongs among each of the hair bones;

[0157] Determine the driving weight between the first hair bone and the hair patch.

[0158] Optionally, the determining unit 503 is specifically configured to:

[0159] When there is one first hair bone, determine the driving weight between the first hair bone and the hair patch as the first weight value; the first weight value represents that the movement of the first hair bone is completely transmitted to the hair patch;

[0160] When there are multiple first hair bones, determine the second weight value between the first hair bones and the hair patch according to the number of the first hair bones; the second weight value represents that the movement of the corresponding first hair bone is partially transmitted to the hair patch.

[0161] Optionally, the first creating unit 501 is specifically configured to:

[0162] For each hair guiding curve, starting from the starting point, determine every preset number of key points as the vertices of each hair patch to be generated, and generate each hair patch;

[0163] Determine the model formed by the hair patches as the hair patch model.

[0164] Optionally, the driving unit 504 is specifically configured to:

[0165] Determine the first physical solution data corresponding to each hair bone;

[0166] Weight the first physical data according to the driving weight to obtain the second physical solution data of each hair patch;

[0167] According to the second physical solution data, determine the third physical solution data of each key point on the hair guiding curve, so as to transmit the movement of each hair bone to the hair guiding curve through the hair patch to drive the virtual hair to move.

[0168] Optionally, the driving unit 504 is further configured to:

[0169] Determine the movement data of each hair point on the virtual hair according to the third physical solution data;

[0170] Determine the fourth physical solution data of the virtual hair according to the movement data of each hair point on the virtual hair;

[0171] Drive the virtual hair to move according to the fourth physical solution data.

[0172] Optionally, the driving unit 504 is further specifically configured to:

[0173] Obtain the length of the virtual hair;

[0174] Determine the physical effect weights of each hair point on the virtual hair according to the length;

[0175] Determine the fourth physical solution data of the virtual hair according to the motion data of each hair point on the virtual hair and the physical effect weights.

[0176] Optionally, the processing device 500 of the virtual hair further includes a baking unit, and the baking unit is used for:

[0177] Determine the hair growth model corresponding to the hair patch model;

[0178] Obtain the first normal direction of the hair growth model;

[0179] For the hair patch model, determine the first face whose difference between the normal direction and the first normal direction is within a preset range;

[0180] Bake the pre-configured hair color information onto the first face.

[0181] Optionally, the baking unit is specifically configured to:

[0182] Complete each triangular patch in the hair patch model into a quadrilateral patch to obtain a completed hair patch model;

[0183] Determine the face whose difference between the normal direction and the first normal direction is within a preset range in the completed hair patch model as the first face.

[0184] Corresponding to the method for processing virtual hair provided in the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for processing virtual hair.

[0185] As Figure 6 shown, it is a structural block diagram of an example of an electronic device for data processing provided in the embodiments of the present application.

[0186] In this embodiment, an optional hardware structure of the electronic device 600 can be as Figure 6 shown, including: at least one processor 601, at least one memory 602, and at least one communication bus 605; the memory 602 contains a program 603 and data 604.

[0187] The bus 605 can be a communication device for transferring data between components inside the electronic device 600, such as an internal bus (e.g., the CPU-memory bus, where the processor is the central processing unit, abbreviated as CPU), an external bus (e.g., a universal serial bus port, a peripheral component interconnect express port), etc.

[0188] In addition, the electronic device further includes: at least one network interface 606 and at least one peripheral interface 607. The network interface 606 provides wired or wireless communication related to an external network 608 (e.g., the Internet, an intranet, a local area network, a mobile communication network, etc.); in some embodiments, the network interface 606 may include any combination of any number of network interface controllers (abbreviated as NIC in English), radio frequency (abbreviated as RF in English) modules, repeaters, transceivers, modems, routers, gateways, wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (abbreviated as NFC in English) adapters, cellular network chips, etc.

[0189] The peripheral interface 607 is used to connect to peripherals, and the peripherals can be, for example, peripheral 1 ( Figure 6 in the figure as 609), peripheral 2 ( Figure 6 in the figure as 610), and peripheral 3 ( Figure 6 in the figure as 611). Peripherals are peripheral devices, and peripheral devices can include, but are not limited to, cursor control devices (e.g., mice, touch pads, or touch screens), keyboards, displays (e.g., cathode ray tube displays, liquid crystal displays, light emitting diode displays), video input devices (e.g., cameras or input interfaces communicatively coupled to video archives), etc.

[0190] The processor 601 may be a CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0191] The memory 602 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk memory.

[0192] Among them, the processor 601 calls the programs and data stored in the memory 602 and executes the following steps:

[0193] Create a hair patch model according to the hair guiding curve, where the hair patch model includes a plurality of hair patches;

[0194] Create a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones;

[0195] Determine the driving weights between each of the hair bones and each of the hair patches;

[0196] According to the driving weights, transfer the motion of each of the hair bones to the hair guiding curve through the hair patches to drive the virtual hair to move.

[0197] Corresponding to the method for processing virtual hair provided in the first embodiment of the present application, the fourth embodiment of the present application provides a computer-readable storage medium storing a program for the method for processing virtual hair, and the program is run by a processor to execute the following steps:

[0198] Create a hair patch model according to the hair guiding curve, where the hair patch model includes a plurality of hair patches;

[0199] Create a hair bone chain corresponding to the hair guiding curve, where the hair bone chain includes a plurality of hair bones;

[0200] Determine the driving weights between each of the hair bones and each of the hair patches;

[0201] According to the driving weights, transfer the motion of each of the hair bones to the hair guiding curve through the hair patches to drive the virtual hair to move.

[0202] It should be noted that for the detailed descriptions of the devices, electronic devices and computer-readable storage media provided in the second, third and fourth embodiments of the present application, reference may be made to the relevant descriptions of the first embodiment of the present application, which will not be repeated here.

[0203] Although the present application is disclosed above with preferred embodiments, it is not used to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be defined by the scope of the claims of the present application.

[0204] In a typical configuration, the node devices in the blockchain include one or more processors (CPUs), input / output interfaces, network interfaces and memories.

[0205] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash RAM. The memory is an example of computer-readable media.

[0206] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), random access memory (RAM) of other properties, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media, or any other non-transitory media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0207] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0208] Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be determined by the scope defined by the claims of the present application.

Claims

1. A method for processing virtual hair, characterized in that: The method comprises: Creating a hair patch model according to the hair guide curve, wherein the hair patch model includes a plurality of hair patches; Creating a hair skeleton chain corresponding to the hair guide curve, wherein the hair skeleton chain includes a plurality of hair skeletons; Determining the driving weights between each of the hair skeletons and each of the hair patches; According to the driving weight, the movement of each of the hair skeletons is transmitted to the hair guide curve via the hair patch to drive the virtual hair to move.

2. The method according to claim 1, characterized in that Before transmitting the movement of each of the hair skeletons to the hair guide curve via the hair patch according to the driving weight, the method further includes: Add controllers to each joint in the hair skeleton chain respectively; The displacement attribute of the controller is configured to be in a locked state, and the controller is used to control the corresponding hair skeleton to rotate.

3. The method according to claim 1, characterized in that: The determining of the driving weights between each of the hair skeletons and each of the hair patches comprises: For each of the hair patches, determine the first hair skeleton to which the hair patch belongs in each of the hair skeletons; A drive weight between the first hair skeleton and the hair patch is determined.

4. The method according to claim 3, characterized in that The determining of the driving weight between the first hair skeleton and the hair patch comprises: In the case where there is only one first hair skeleton, a first weight value is used to determine a driving weight between the first hair skeleton and the hair patch; the first weight value indicates that all movements of the first hair skeleton are transmitted to the hair patch; In the case where there are multiple first hair skeletons, a second weight value between the first hair skeleton and the hair patch is determined according to the number of the first hair skeletons; the second weight value represents that the corresponding motion part of the first hair skeleton is transmitted to the hair patch.

5. The method according to claim 1, characterized in that The step of creating a hair patch model according to the hair guide curve comprises: For each hair guide curve, starting from the starting point, a preset number of key points are determined as vertices of each hair patch to be generated, and each hair patch is generated; The model formed by each of the hair patches is determined as a hair patch model.

6. The method according to claim 1, characterized in that The step of transmitting the movement of each of the hair skeletons to the hair guide curve via the hair patch according to the driving weight comprises: Determine the first physical solution data corresponding to each of the hair skeletons; weighting the first physical data according to the driving weight to obtain second physical solution data of each hair patch; According to the second physical solution data, third physical solution data of each key point on the hair guide curve is determined to transfer the movement of each hair skeleton to the hair guide curve via the hair patch.

7. The method according to claim 6, characterized in that The method further comprises: Determining motion data of each hair point on the virtual hair according to the third physical calculation data; Determining fourth physics solution data of the virtual hair according to the motion data of each hair point on the virtual hair; The virtual hair is driven to move according to the fourth physics calculation data.

8. The method according to claim 7, characterized in that The determining, according to the motion data of each hair point on the virtual hair, fourth physical calculation data of the virtual hair comprises: Get the length of virtual hair; Determining the physical effect weight of each hair point on the virtual hair according to the length; The fourth physics calculation data of the virtual hair is determined according to the motion data of each hair point on the virtual hair and the physical effect weight.

9. The method according to claim 1, characterized in that: The method further comprises: Determining a hair growth model corresponding to the hair patch model; Acquire a first normal direction of the hair growth model; For the hair patch model, determining a first surface whose normal direction has a difference with the first normal direction within a preset range; The pre-configured hair color information is baked into the first side.

10. The method according to claim 9, characterized in that Each of the hair patches is a triangular patch, and determining, for the hair patch model, a first face whose normal direction has a difference with the first normal direction within a preset range includes: Completing each of the triangular facets in the hair facet model into a quadrangular facet to obtain a completed hair facet model; In the completed hair patch model, a surface whose normal direction has a difference value between the first normal direction and the first normal direction within a preset range is determined as a first surface.

11. A virtual hair processing device, characterized in that: The device comprises: A first creation unit, configured to create a hair patch model according to the hair guide curve, wherein the hair patch model includes a plurality of hair patches; A second creation unit, used for creating a hair skeleton chain corresponding to the hair guide curve, wherein the hair skeleton chain includes a plurality of hair skeletons; A determination unit, used for determining a driving weight between each of the hair skeletons and each of the hair patches; A driving unit is used to transmit the movement of each of the hair skeletons to the hair guide curve via the hair patch according to the driving weight, so as to drive the virtual hair to move.

12. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 10 is executed.

13. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 10.