Virtual hair editing method and device, equipment, storage medium and program product

By adjusting the hair area and using virtual brushes, vertex color information is updated in real time, solving the problem that art designers cannot precisely control the direction and length of virtual hair, and enabling flexible editing and efficient rendering of virtual hair.

CN121661220APending Publication Date: 2026-03-13TENCENT DIGITAL (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, art designers cannot precisely control the direction and length of virtual hair, resulting in insufficient expressiveness and diversity of hair materials and poor rendering flexibility.

Method used

It provides a hair adjustment area and a virtual brush, allowing users to edit virtual hair in real time in a 3D editing space through various hair adjustment functions. The vertex color information is automatically updated based on the editing operation to display the editing result, enabling flexible control and real-time preview.

Benefits of technology

It improves the expressiveness and diversity of virtual hair, enhances the flexibility of hair rendering, and increases editing efficiency, allowing for detailed adjustments without rebuilding the 3D model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661220A_ABST
    Figure CN121661220A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual hair editing method and device, equipment, a storage medium and a program product, and relates to the technical field of graphic rendering. The method comprises the following steps: displaying a three-dimensional object model rendered in a three-dimensional editing space, wherein the three-dimensional object model comprises virtual hair embodied in a three-dimensional model structure; a hair adjusting area is displayed, the hair adjusting area comprises multiple hair adjusting functions, and the multiple hair adjusting functions are used for editing and adjusting virtual hair from different adjusting dimensions; under the condition that a first hair adjusting function in the multiple hair adjusting functions is selected, responding to the received editing operation on virtual hair on the three-dimensional object model through the virtual pen brush, updating vertex color information in real time based on the editing operation, and displaying the editing result of the virtual hair in real time based on the vertex color information, the editing result comprises a rendering effect obtained after the virtual hair is adjusted according to the adjustment dimension of the first hair adjustment function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of graphics rendering technology, and in particular to a virtual hair editing method, apparatus, device, storage medium, and program product. Background Technology

[0002] In modern game and film production, hair rendering technology is a key element in achieving realistic visual effects. With advancements in graphics rendering technology, real-time hair generation has become possible, allowing developers to dynamically create hair effects during gameplay without the need for complex modeling work in pre-production.

[0003] In related technologies, preset algorithms and mathematical models are used to simulate the physical properties of hair in the real world. Art designers can use a pre-built basic 3D model, and the system can automatically generate hair along the normal direction of the model through multiple renderings.

[0004] However, the above methods reduce the artists' control over hair details. Since the hair is automatically generated, the artists cannot precisely control the direction and length of each hair, which limits the expressiveness and diversity of hair materials and makes hair rendering less flexible. Summary of the Invention

[0005] This application provides a virtual hair editing method, apparatus, device, storage medium, and program product, which can improve the flexibility of virtual hair rendering. The technical solution is as follows.

[0006] On the one hand, a virtual hair editing method is provided, the method comprising:

[0007] A three-dimensional object model rendered in a three-dimensional editing space is displayed, the three-dimensional object model including virtual hair represented by a three-dimensional model structure;

[0008] The display area shows a hair adjustment region, which includes multiple hair adjustment functions. These multiple hair adjustment functions are used to edit and adjust the virtual hair from different adjustment dimensions.

[0009] When a first hair adjustment function is selected among the plurality of hair adjustment functions, in response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush, the vertex color information is updated in real time based on the editing operation, and the editing result of the virtual hair is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on the editing operation, and the editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0010] On the other hand, a virtual hair editing device is provided, the device comprising:

[0011] The display module is used to display the three-dimensional object model rendered in the three-dimensional editing space, wherein the three-dimensional object model includes virtual hair represented by the three-dimensional model structure;

[0012] The display module is also used to display a hair adjustment area, which includes multiple hair adjustment functions, each of which is used to edit and adjust the virtual hair from different adjustment dimensions.

[0013] The display module is further configured to, in response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush when a first hair adjustment function is selected among the plurality of hair adjustment functions, update the vertex color information in real time based on the editing operation, and display the editing result of the virtual hair in real time based on the vertex color information, wherein the vertex color information is used to indicate the changes of the virtual hair based on the editing operation, and the editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0014] In some embodiments, the apparatus further includes a processing module, the processing module being configured to select the first hair adjustment function in response to receiving a selection operation for the first hair adjustment function among the plurality of hair adjustment functions;

[0015] The display module is further configured to respond to receiving the editing operation of the virtual hair based on the first hair adjustment function through the virtual brush, and to display the editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair, wherein the vertex color information is automatically updated based on the editing operation.

[0016] In some embodiments, the first hair adjustment function includes a hair length increase / decrease function, which is used to increase or decrease the hair length of the virtual hair;

[0017] The processing module is also used to receive the hair length increase / decrease operation of the virtual hair through the virtual brush, based on the hair length increase / decrease function;

[0018] The display module is further configured to display a first editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The first editing result includes the virtual hair that has been lengthened or shortened according to a first adjustment range. The first adjustment range is positively correlated with the moving distance of the virtual brush based on the hair length increase / decrease operation. The vertex color information is automatically updated based on the hair length increase / decrease operation.

[0019] In some embodiments, the first hair adjustment function includes a hair length averaging function, which is used to average the hair length of the virtual hair within a selected area.

[0020] The processing module is also used to receive the hair length averaging operation of the virtual hair through the virtual brush, based on the hair length averaging function.

[0021] The display module is also used to display the second editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The second editing result includes the virtual hair with the average hair length in the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the average hair length operation. The vertex color information is automatically updated based on the average hair length operation.

[0022] In some embodiments, the first hair adjustment function includes a hair combing function, which is used to adjust the direction of the virtual hair;

[0023] The processing module is also used to receive hair combing operations on the virtual hair through the virtual brush, based on the hair combing function;

[0024] The display module is also used to display the third editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The third editing result includes the virtual hair after adjusting the hair direction. The hair direction of the adjusted virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation. The vertex color information is automatically updated based on the hair combing operation.

[0025] In some embodiments, the first hair adjustment function includes a hair gathering function, which is used to gather the virtual hair toward a designated gathering point.

[0026] The processing module is also used to receive hair gathering operations on the virtual hair through the virtual brush based on the hair gathering function.

[0027] The display module is also used to display the fourth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The fourth editing result includes the virtual hair that gathers towards the specified gathering point. The specified gathering point is selected by the virtual brush based on the hair gathering operation. The vertex color information is automatically updated based on the hair gathering operation.

[0028] In some embodiments, the first hair adjustment function includes a hair reset function, which is used to reset the display state of the virtual hair;

[0029] The processing module is further configured to receive a hair reset operation on the virtual hair via the virtual brush based on the hair reset function, wherein the hair reset operation is used to select a reset area based on the movement area of ​​the virtual brush.

[0030] The display module is also used to display the fifth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The fifth editing result includes the rendering effect of the virtual hair before adjustment in the reset area. The vertex color information is automatically updated based on the hair reset operation.

[0031] In some embodiments, the first hair adjustment function includes a hair randomization function, which is used to randomly adjust at least one of the length and direction of the virtual hair;

[0032] The processing module is further configured to receive random adjustment operations on the virtual hair through the virtual brush based on the random hair function, wherein the random adjustment operation is used to select a random adjustment area based on the movement area of ​​the virtual brush.

[0033] The display module is also used to display the sixth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The sixth editing result includes the rendering effect of the virtual hair in the random adjustment area after being adjusted according to at least one of random length or random direction.

[0034] In some embodiments, the hair length increase / decrease function and the hair gathering function are as follows: the hair length increase / decrease function is used to increase or decrease the hair length of the virtual hair; the hair gathering function is used to gather the virtual hair toward a specified gathering point; and the vertex color information is automatically updated based on the random adjustment operation.

[0035] The processing module is further configured to receive editing operations on the virtual hair via the virtual brush based on the hair length increase / decrease function and the hair gathering function. The editing operations are used to simultaneously adjust the hair length of the virtual hair and gather the virtual hair.

[0036] The display module is further configured to display the comprehensive editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The comprehensive editing result includes virtual hair that is lengthened or shortened according to a first adjustment range and converges towards the specified convergence point. The first adjustment range is positively correlated with the duration of the virtual brush operation based on the editing operation. The specified convergence point corresponds to the operation point of the virtual brush based on the editing operation. The vertex color information is automatically updated based on the editing operation.

[0037] In some embodiments, the processing module is further configured to, in response to receiving the editing operation on the virtual hair via the virtual brush, automatically update the vertex color information corresponding to the virtual hair based on the operation data of the editing operation, wherein the vertex color information is used to indicate at least one of the editing information of the virtual hair's direction offset information and length change information;

[0038] The display module is also used to display the editing results of the virtual hair in real time based on the vertex color information.

[0039] In some embodiments, the processing module is further configured to:

[0040] Based on at least one of the virtual brush's movement distance during the editing operation or the virtual brush's dwell time during the editing operation, the length change information in the vertex color information corresponding to the virtual hair is automatically updated, wherein the length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or the dwell time; or...

[0041] Based on the movement trajectory of the virtual brush according to the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, and the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

[0042] In some embodiments, the processing module is further configured to store the vertex color information corresponding to the virtual hair;

[0043] The display module is further configured to display the rendering effect of the virtual hair on the virtual object based on the vertex color information when the virtual scene includes a virtual object corresponding to the three-dimensional object model, wherein the rendering effect includes the editing result corresponding to the vertex color information.

[0044] In some embodiments, the processing module is further configured to:

[0045] The first vertex color information of the virtual hair in the wind state is stored for the three-dimensional object model. The wind state refers to the state in which the virtual hair on the virtual object is blown by the wind when it is displayed in the virtual scene. The first vertex color information includes the directional offset information of the virtual hair when it is blown by the first wind force.

[0046] The second vertex color information of the virtual hair in motion state is stored in the three-dimensional object model. The motion state refers to the state in which the virtual hair on the virtual object moves with the virtual object when it is displayed in the virtual scene. The second vertex color information includes the directional offset information of the virtual hair in the motion state.

[0047] The third vertex color information of the virtual hair in the touch state is stored in the three-dimensional object model. The touch state refers to the state of the virtual hair on the virtual object when it is displayed in the virtual scene and subjected to the touch force. The third vertex color information includes the directional offset information of the virtual hair in the touch state.

[0048] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the virtual hair editing method as described in any of the embodiments of this application above.

[0049] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the virtual hair editing method as described in any of the embodiments of this application above.

[0050] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the virtual hair editing methods described in the above embodiments.

[0051] The beneficial effects of the technical solutions provided in this application include at least the following:

[0052] By providing a hair adjustment area, artists can adjust virtual hair on 3D object models in the 3D editing space using different hair adjustment functions. This expands the various expressive effects of virtual hair, improves the flexibility of rendering virtual hair, and allows for editing and adjusting virtual hair based on virtual brushes. The system can automatically update vertex color information based on the operation data such as the operation position and trajectory of the virtual brush, thereby displaying the editing results in real time based on the vertex color information. This enables explicit adjustment of virtual hair based on virtual brush editing operations. Users can directly preview the editing results in real time based on visual operations, improving the efficiency of hair editing. Overall, there is no need to rebuild the 3D model structure for the virtual hair that needs adjustment and then re-render the virtual hair based on the model. This allows for flexible control over editing virtual hair, expanding its expressiveness and diversity. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a schematic diagram of an editing system provided in an exemplary embodiment of this application;

[0055] Figure 2 This is a flowchart of a virtual hair editing method provided in an exemplary embodiment of this application;

[0056] Figure 3 This is a flowchart of an editing method based on hair adjustment function provided in an exemplary embodiment of this application;

[0057] Figure 4 This is a schematic diagram of a hair adjustment area provided in an exemplary embodiment of this application;

[0058] Figure 5 This is a schematic diagram illustrating the increase or decrease of hair length provided in an exemplary embodiment of this application;

[0059] Figure 6 This is a schematic diagram of average hair length provided in an exemplary embodiment of this application;

[0060] Figure 7 This is a schematic diagram of hair combing provided in an exemplary embodiment of this application;

[0061] Figure 8 This is a schematic diagram of hair gathering provided in an exemplary embodiment of this application;

[0062] Figure 9This is a flowchart of an exemplary embodiment of the editing method based on a virtual brush provided in this application;

[0063] Figure 10 This is a schematic diagram of directional offset information provided in an exemplary embodiment of this application;

[0064] Figure 11 This is a schematic diagram illustrating length variation information provided in an exemplary embodiment of this application;

[0065] Figure 12 This is a schematic diagram of resource management provided in an exemplary embodiment of this application;

[0066] Figure 13 This is a structural block diagram of a virtual hair editing device provided in an exemplary embodiment of this application;

[0067] Figure 14 This is a structural block diagram of a terminal provided in an exemplary embodiment of this application. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0069] It should be understood that although the terms first, second, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, a first parameter may also be referred to as a second parameter without departing from the scope of this disclosure, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0070] In modern game and film production, hair rendering technology is a crucial step in achieving realistic visual effects. With advancements in graphics rendering technology, real-time hair generation has become possible, allowing developers to dynamically create hair effects during gameplay without the need for complex modeling work in pre-production. One related technology uses preset algorithms and mathematical models to simulate the physical properties of hair in the real world. Art designers can use a pre-built basic 3D model, allowing the system to automatically generate hair along the model's normal direction through multiple renderings. However, this method reduces the artist's control over hair details. Because the hair is automatically generated, artists cannot precisely control the direction and length of each individual hair, limiting the expressiveness and diversity of hair materials and resulting in poor flexibility in hair rendering.

[0071] The virtual hair editing method provided in this application provides a hair adjustment area, allowing artists to adjust virtual hair on a 3D object model in a 3D editing space using different hair adjustment functions. This expands the various expressive effects of virtual hair, improves the flexibility of rendering virtual hair, and enables editing and adjusting virtual hair based on virtual brush operations. The method can automatically update vertex color information based on the operation position and trajectory of the virtual brush, thereby displaying the editing results in real time based on the vertex color information. This achieves explicit adjustment of virtual hair based on virtual brush editing operations, allowing users to directly preview the editing results in real time based on visual operations, improving hair editing efficiency. Overall, it eliminates the need to rebuild the 3D model structure for the virtual hair that needs adjustment and then re-render the virtual hair based on the model, enabling flexible control over editing virtual hair and expanding expressiveness and diversity.

[0072] First, the editing system for this application will be introduced. Please refer to... Figure 1 The illustration shows a schematic diagram of an editing system provided in an exemplary embodiment of this application, which includes a terminal 110.

[0073] Terminal 110 is used to provide a three-dimensional editing space, which is used to edit the virtual scene and virtual objects in the virtual scene that need to be rendered when the target application runs. After the virtual scene and virtual objects are edited in the three-dimensional editing space, the corresponding virtual scene and virtual objects can be directly rendered and displayed according to the editing results when the target application runs.

[0074] Schematic, terminal 110 displays a 3D object model rendered in a 3D editing space. The 3D object model includes virtual hair represented by a 3D model structure. It displays a hair adjustment area, which includes multiple hair adjustment functions. These multiple hair adjustment functions are used to edit and adjust the virtual hair from different adjustment dimensions. When a first hair adjustment function is selected among the multiple hair adjustment functions, in response to receiving an editing operation on the virtual hair on the 3D object model using a virtual brush, the terminal updates vertex color information in real time based on the editing operation and displays the editing result of the virtual hair in real time based on the vertex color information. The vertex color information is used to indicate the changes in the virtual hair based on the editing operation. The editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0075] In some embodiments, the editing system further includes a server 120 and a communication network 130, through which data is transmitted between the terminal 110 and the server 120.

[0076] Optionally, server 120 is used to store the three-dimensional object model and the editing results provided by terminal 110. The editing results are rendered based on the vertex color information corresponding to the virtual hair, and the vertex color information is automatically updated based on the operation data of the editing operation.

[0077] Indicatively, terminal 110 reads model data of a 3D object model from server 120, displays the 3D object model rendered in the 3D editing space based on the model data, and displays a hair adjustment area. The hair adjustment area includes multiple hair adjustment functions, which are used to edit and adjust virtual hair from different adjustment dimensions. When the first hair adjustment function is selected among the multiple hair adjustment functions, in response to receiving the editing operation of virtual hair on the 3D object model through a virtual brush, the editing result of virtual hair is displayed based on the vertex color information corresponding to the virtual hair. Terminal 110 uploads the editing result to server 120 for storage.

[0078] Optionally, server 120 is used to provide background rendering services to a client, which is a terminal with the target application installed.

[0079] To illustrate, when the client runs the target application, a virtual scene is displayed. When the virtual scene includes virtual hair, the client renders and displays the virtual hair based on the editing results issued by the server 120 for that virtual hair.

[0080] It is worth noting that the above-described interaction process is merely an example and is not limited to any particular aspect in this application.

[0081] The aforementioned terminal is optional and can be a desktop computer, laptop computer, mobile phone, tablet computer, e-book reader, Moving Picture Experts Group Audio Layer III (MP3) player, Moving Picture Experts Group Audio Layer IV (MP4) player, smart TV, smart vehicle, and other types of terminal devices. This application embodiment does not limit the specific terminal device to these types.

[0082] It is worth noting that the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0083] In some embodiments, the server described above can also be implemented as a node in a blockchain system.

[0084] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the operational data and account information involved in this application were obtained with full authorization.

[0085] To further clarify, this application may display a prompt interface, pop-up window, or output voice prompts before and during the collection of user-related data (e.g., account information, historical operation data, and real-time operation data involved in this application). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins the steps for collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up window; otherwise (i.e., without receiving confirmation from the user), the steps for collecting user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant regions.

[0086] This is illustrative; please refer to it. Figure 2 This document illustrates a flowchart of a virtual hair editing method provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment uses the execution of the method by a terminal as an example for illustration. Figure 2 As shown, the method includes the following steps:

[0087] Step 210: Display the rendered 3D object model in the 3D editing space.

[0088] The 3D object model includes virtual hair represented by a 3D model structure.

[0089] The 3D editing space is used to edit at least one of the virtual scenes or virtual objects displayed in the target application.

[0090] The 3D editing space is a virtual environment that allows users to manipulate and edit objects in a three-dimensional way. It provides a three-dimensional work area where users can create, modify, and render 3D models.

[0091] Optionally, the three-dimensional editing space can be the editing space used by the artist of the target application when editing the program interface, or it can be the editing space displayed by the user of the target application when customizing the three-dimensional object model. This application embodiment does not limit this.

[0092] The target application is an application used to provide a virtual scene; the virtual scene is displayed by running the target application.

[0093] Alternatively, the target application can be any application that can provide a virtual scene, such as a virtual game application, architectural design software, traffic simulation software, or virtual reality (VR) program.

[0094] A virtual scene is a scene displayed (or provided) by the client of a target application (such as a game application) when it runs on a terminal device. This virtual scene refers to an environment created for virtual objects to engage in activities (such as game competitions), such as virtual houses, virtual islands, and virtual maps. The virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional three-dimensional world, or a purely fictional three-dimensional world. A virtual scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional.

[0095] A 3D object model is a rendering model for virtual objects in a virtual scene.

[0096] A virtual object refers to an active or inactive object in a virtual scene. An active object can be at least one of a virtual character, virtual animal, or cartoon character. An inactive object can be at least one of a virtual building, virtual plant, or virtual terrain. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object can be a three-dimensional virtual model, where each virtual object has its own shape and volume and occupies a portion of the space in the three-dimensional virtual scene.

[0097] When the target application is running, virtual objects are displayed in a virtual scene by rendering 3D object models.

[0098] Optionally, the virtual object has virtual hair, which can be any form of hair, such as the fur of a virtual animal, the hair of a virtual character, the fur of clothing worn by the virtual object, or items with fur effects (e.g., fur on a virtual carpet, fur on a virtual decoration, fur on a virtual pendant).

[0099] When a virtual object corresponds to virtual hair, the virtual hair is represented by a three-dimensional model on the virtual object's three-dimensional object model.

[0100] Virtual hair on a 3D object model in the 3D editing space is rendered and displayed based on a pre-built 3D hair model.

[0101] By editing and adjusting the virtual hair in the 3D editing space, the design and adjustment of the virtual hair of virtual objects in the target application can be completed. When the target application displays the virtual hair of the virtual object, it can render and display the virtual hair according to the editing and adjustment results in the 3D editing space.

[0102] Step 220: Display the hair adjustment area.

[0103] The hair adjustment area includes multiple hair adjustment functions, each used to edit and adjust virtual hair from different adjustment dimensions.

[0104] The hair adjustment area is a preset adjustment area in the 3D editing space, used to select the first hair adjustment function from multiple hair adjustment functions, and edit and adjust the virtual hair according to the adjustment dimension corresponding to the first hair adjustment function.

[0105] Optionally, the hair adjustment area can be displayed by default or based on an adjustment-triggered operation; this embodiment of the application does not limit this.

[0106] Indicatively, in response to receiving an adjustment trigger operation for virtual hair, the hair adjustment area is displayed, which triggers the display of the hair adjustment area.

[0107] Optionally, multiple hair adjustment functions include, but are not limited to, hair length increase / decrease function, hair length averaging function, hair combing function, hair gathering function, hair reset function, and hair randomization function.

[0108] Adjustment dimensions include, but are not limited to, at least one of hair length and hair direction.

[0109] To illustrate, the adjustment dimensions for the hair length increase / decrease function and the hair length averaging function include hair length; the adjustment dimensions for the hair combing function and the hair gathering function include hair direction; and the adjustment dimensions for the hair reset function and the hair random function include both hair length and hair direction.

[0110] The hair length adjustment function is used to increase or decrease the length of virtual hair.

[0111] The hair length averaging function is used to average the hair length of virtual hair within a selected area.

[0112] The hair combing function is used to adjust the direction of the virtual hair according to the combing direction of the virtual brush.

[0113] The hair gathering function is used to adjust the virtual hair in the selected area to gather towards the selected gathering point.

[0114] The hair reset function is used to restore the rendering effect of the virtual hair before it was adjusted.

[0115] The hair randomization function is used to randomly adjust at least one of the length and direction of virtual hair.

[0116] It is worth noting that the above-mentioned hair adjustment functions and adjustment dimensions are merely illustrative examples, and the embodiments of this application do not limit them.

[0117] Step 230: If the first hair adjustment function is selected among multiple hair adjustment functions, in response to receiving the editing operation of virtual hair on the 3D object model through a virtual brush, the vertex color information is updated in real time based on the editing operation, and the editing result of the virtual hair is displayed in real time based on the vertex color information.

[0118] Vertex color information is color data associated with each vertex in a 3D model, typically including red (R), green (G), blue (B), and optional transparency (Alpha, A) values, i.e., RGBA.

[0119] In this embodiment, vertex color information is used to indicate the changes in virtual hair based on the editing operation. The vertex color information is automatically updated based on the operation data of the editing operation.

[0120] The operation data for editing includes, but is not limited to, the brush movement direction, movement distance, dwell time, and pen placement when editing virtual hair with a virtual brush.

[0121] Optionally, vertex color information is used to indicate at least one of the editing information, namely, the orientation offset information and the length change information of the virtual hair.

[0122] In some embodiments, vertex color information is preset four-dimensional channel information, consisting of four floating-point numbers with values ​​between 0 and 1. For example, the default vertex color information is (0.5, 0.5, 0.5, 0.5).

[0123] Optionally, the first two data points in the vertex color information represent the direction offset information, and the third data point in the vertex color information represents the length change information.

[0124] Upon receiving an editing operation based on a virtual brush, the vertex color information can be automatically updated based on the operation data, thereby rendering and displaying the editing result based on the vertex color information.

[0125] For example, the direction offset information in the vertex color information is automatically updated based on the movement direction or position of the virtual brush, and the length change information in the vertex color information is automatically updated based on the movement distance or dwell time of the virtual brush. After updating the vertex color information corresponding to the virtual hair, the editing result is rendered and displayed based on the changes in the virtual hair indicated by the vertex color information.

[0126] By updating vertex color information based on operation data and displaying the editing results based on vertex color information, users can explicitly edit virtual hair based on virtual brush editing operations and preview the editing effect in real time, thus improving the efficiency of virtual hair editing.

[0127] The editing results include the rendering effect obtained after adjusting the virtual hair using the adjustment dimensions of the first hair adjustment function. The editing results are rendered based on the vertex color information corresponding to the virtual hair.

[0128] In some embodiments, virtual hair can be edited and adjusted using a virtual brush.

[0129] To illustrate, when the hair length increase / decrease function is selected, the length of the virtual hair is increased or decreased based on the dragging operation of the virtual brush. For example, dragging virtual hair A based on the dragging operation of the virtual brush will extend the length of virtual hair A by the dragging distance.

[0130] Optionally, the first hair adjustment function can be pre-selected or selected based on user operation.

[0131] Indicatively, in response to receiving a selection operation for a first hair adjustment function among multiple hair adjustment functions, the first hair adjustment function is selected.

[0132] The first hair adjustment function is at least one of several hair adjustment functions.

[0133] Indicatively, the first hair adjustment function includes hair length increase / decrease and hair gathering functions. Based on the virtual brush editing operation, the virtual hair can be adjusted in two adjustment dimensions at the same time. While increasing, decreasing or shortening the virtual hair according to the specified length, the virtual hair is made to gather towards the gathering point.

[0134] In some embodiments, in response to receiving an editing operation on virtual hair based on a first hair adjustment function using a virtual brush, the editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair.

[0135] Taking the first hair adjustment function, which includes the hair length increase / decrease function, as an example, based on the hair length increase / decrease function, the system receives the hair length increase / decrease operation of the virtual hair through the virtual brush; based on the vertex color information corresponding to the virtual hair, the system displays the first editing result of the virtual hair in real time. The first editing result includes the virtual hair that has been increased or decreased according to the first adjustment range. The adjustment range is positively correlated with the moving distance of the virtual brush based on the hair length increase / decrease operation. The vertex color information is automatically updated based on the hair length increase / decrease operation.

[0136] Taking the first hair adjustment function, which includes the hair length averaging function, as an example, based on the hair length averaging function, the system receives the hair length averaging operation of the virtual hair through a virtual brush; based on the vertex color information corresponding to the virtual hair, the system displays the second editing result of the virtual hair in real time. The second editing result includes the virtual hair with the hair length averaged within the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the hair length averaging operation, and the vertex color information is automatically updated based on the hair length averaging operation.

[0137] Taking the first hair adjustment function, which includes a hair combing function, as an example, based on the hair combing function, the system receives hair combing operations on virtual hair using a virtual brush; based on the vertex color information corresponding to the virtual hair, the system displays the third editing result of the virtual hair in real time. The third editing result includes the virtual hair after adjusting the hair direction. The hair direction of the virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation, and the vertex color information is automatically updated based on the hair combing operation.

[0138] Taking the first hair adjustment function, which includes the hair gathering function, as an example, based on the hair gathering function, the system receives the hair gathering operation of the virtual hair through the virtual brush; based on the vertex color information corresponding to the virtual hair, the system displays the fourth editing result of the virtual hair in real time. The fourth editing result includes the virtual hair gathered towards the specified gathering point. The specified gathering point is selected by the virtual brush based on the hair gathering operation, and the vertex color information is automatically updated based on the hair gathering operation.

[0139] Taking the first hair adjustment function, which includes a hair reset function, as an example, based on the hair reset function, the system receives a hair reset operation on the virtual hair using a virtual brush. The hair reset operation is used to select the reset area based on the movement area of ​​the virtual brush. The system displays the fifth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The fifth editing result includes the rendering effect of the virtual hair before adjustment in the reset area. The vertex color information is automatically updated based on the hair reset operation.

[0140] Taking the first hair adjustment function, which includes a random hair function, as an example, based on the random hair function, the system receives random adjustment operations on the virtual hair using a virtual brush. The random adjustment operation is used to select a random adjustment area based on the movement area of ​​the virtual brush. The system displays the sixth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The sixth editing result includes the rendering effect of the virtual hair in the random adjustment area after being adjusted according to at least one of random length or random direction. The vertex color information is automatically updated based on the random adjustment operation.

[0141] In some embodiments, virtual hair is edited and adjusted according to the operation data of the virtual brush.

[0142] Indicatively, in response to receiving an editing operation on virtual hair via a virtual brush, the vertex color information corresponding to the virtual hair is automatically updated based on the operation data of the editing operation. This vertex color information is used to indicate at least one of the editing information, namely, the direction offset information and the length change information of the virtual hair. The editing result of the virtual hair is displayed in real time based on the vertex color information.

[0143] Taking the first hair adjustment function as an example, the adjustment dimension corresponding to hair length includes the vertex color information, which includes length change information.

[0144] Indicatively, the length change information in the vertex color information corresponding to the virtual hair is automatically updated based on at least one of the virtual brush movement distance based on the editing operation or the virtual brush dwell time based on the editing operation. The length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or dwell time.

[0145] Taking the first hair adjustment function as an example, the adjustment dimensions include hair direction, and the vertex color information includes direction offset information.

[0146] Indicatively, based on the movement trajectory of the virtual brush according to the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, and the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

[0147] In summary, the method provided in this application, by offering a hair adjustment area, allows artists to adjust virtual hair on a 3D object model in a 3D editing space using different hair adjustment functions. This expands the various expressive effects of virtual hair, improves the flexibility of rendering virtual hair, and enables editing and adjusting virtual hair based on virtual brush operations. The method updates vertex color information based on the operation position and trajectory of the virtual brush, thereby displaying the editing results based on the vertex color information. This achieves explicit adjustment of virtual hair based on virtual brush editing operations, allowing users to directly preview the editing results in real time based on visual operations, improving hair editing efficiency. Overall, it eliminates the need to reconstruct the 3D model structure for the virtual hair that needs adjustment and then re-render the virtual hair based on the model, enabling flexible control over editing virtual hair and expanding expressiveness and diversity.

[0148] In some embodiments, depending on the selected hair adjustment function, the editing results are displayed based on the editing operations performed via a virtual brush. Please refer to [reference needed]. Figure 3 , Figure 3 This is a flowchart of an editing method based on hair adjustment function provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment of the application illustrates the method executed by a terminal as an example. Figure 3 As shown, step 230 above includes the following steps:

[0149] Step 231: In response to receiving a selection operation for a first hair adjustment function among multiple hair adjustment functions, select the first hair adjustment function.

[0150] Optionally, multiple hair adjustment functions include, but are not limited to, hair length increase / decrease function, hair length averaging function, hair combing function, hair gathering function, hair reset function, and hair randomization function.

[0151] Adjustment dimensions include, but are not limited to, at least one of hair length and hair direction.

[0152] To illustrate, the adjustment dimensions for the hair length increase / decrease function and the hair length averaging function include hair length; the adjustment dimensions for the hair combing function and the hair gathering function include hair direction; and the adjustment dimensions for the hair reset function and the hair random function include both hair length and hair direction.

[0153] Specifically, the actual functions of the multiple hair adjustment functions will be taken as an example in step 220 above, and will not be repeated here.

[0154] This is illustrative; please refer to it. Figure 4 , Figure 4This is a schematic diagram of a hair adjustment area provided in an exemplary embodiment of this application, as shown below. Figure 4 As shown, the hair adjustment area 400 includes multiple hair adjustment functions, including a hair length increase / decrease function 401, a hair length averaging function 402, a hair combing function 403, a hair gathering function 404, a hair reset function 405, and a hair randomization function 406. In response to receiving a selection operation for at least one of the multiple hair adjustment functions, a first hair adjustment function is selected. For example, in response to receiving a selection operation for the hair length increase / decrease function 401, the hair length increase / decrease function 401 is selected as the first hair adjustment function.

[0155] Step 232: In response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, the editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair.

[0156] The first hair adjustment function is at least one of several hair adjustment functions.

[0157] Vertex color information is used to indicate the length variation of virtual hair.

[0158] The vertex color information is automatically updated based on the editing operation. For example, in response to receiving an editing operation on the virtual hair based on the first hair adjustment function using a virtual brush, the vertex color information corresponding to the virtual hair is automatically updated based on the operation data of the editing operation, and the editing result of the virtual hair is displayed in real time based on the vertex color information.

[0159] Optionally, the first hair adjustment function may include one selected hair adjustment function or multiple selected hair adjustment functions, and this application embodiment does not limit this.

[0160] First, let's explain the selected hair adjustment function within the first hair adjustment function.

[0161] Taking the first hair adjustment function, which includes the hair length increase / decrease function, as an example, the hair length increase / decrease function is used to increase or decrease the hair length of virtual hair. Based on the hair length increase / decrease function, the system receives the hair length increase / decrease operation of the virtual hair through the virtual brush; and displays the first editing result of the virtual hair. The first editing result includes the virtual hair that has been increased or decreased according to the first adjustment range. The first adjustment range is positively correlated with the movement distance of the virtual brush based on the hair length increase / decrease operation.

[0162] Specifically, the vertex color information of the virtual hair is automatically updated based on the increase or decrease of hair length, and the first editing result is displayed in real time based on the vertex color information. This vertex color information is used to indicate the changes in the virtual hair based on the increase or decrease of hair length.

[0163] The first adjustment range is used to indicate the adjustment length of the virtual hair (including the length of growth or shortening). The first adjustment range is positively correlated with the adjustment length, that is, the movement distance of the virtual brush based on the hair length increase or decrease operation is indirectly positively correlated with the adjustment length.

[0164] Optionally, the first adjustment range corresponds to an adjustment range, including an upper limit and a lower limit, which are used to indicate the maximum and minimum values ​​of the virtual hair adjustment length.

[0165] The adjustment range can be set by the user during the hair editing process or preset by the user when constructing the three-dimensional model structure of the virtual hair. This application embodiment does not limit this.

[0166] The first adjustment range and the aforementioned moving distance can be linearly correlated.

[0167] For example, if the brush is moved 1 cm in the direction of growth, the virtual hair will grow by 1 cm, or if the brush is moved 2 cm in the direction of growth, the virtual hair will grow by 2 mm, and so on.

[0168] Optionally, a first adjustment range is determined based on the moving distance and a preset linear parameter, wherein the preset linear parameter is used to indicate the multiple relationship between the moving distance and the adjustment length indicated by the first adjustment range.

[0169] For example, the adjustment length of the first adjustment range indication is determined based on the product of the movement distance and a preset linear parameter.

[0170] The first adjustment range and the aforementioned moving distance can also conform to a range mapping relationship.

[0171] Indicatively, when the brush movement distance is within the first preset range, the virtual hair is increased or decreased according to the first adjustment length which has a mapping relationship with the first preset range.

[0172] For example, taking the growth of virtual hair as an example, when the virtual brush moves less than 1 cm in the growth direction, the virtual hair grows by 0.5 cm; when the virtual brush moves between 1 and 3 cm in the growth direction, the virtual hair grows by 1.5 cm; and when the virtual brush moves more than 3 cm in the growth direction, the virtual hair grows by 3 cm, and so on.

[0173] The first adjustment range can also be positively correlated with the dwell time of the virtual brush based on the increase or decrease of hair length.

[0174] Indicatively, the direction of adjustment for the virtual hair length is determined based on the direction of movement of the virtual brush, and the first adjustment range is determined based on the dwell time of the virtual brush after movement. The longer the dwell time, the larger the first adjustment range.

[0175] Optionally, the dwell time and the first adjustment range can have a linear correspondence or a range mapping relationship, and the embodiments of this application do not limit this.

[0176] It is worth noting that the above method of determining the first adjustment range based on the moving distance is merely an example and is not intended to limit the scope of this application.

[0177] In some embodiments, the hair length increase / decrease operation includes an adjustment area selection operation and a length adjustment operation.

[0178] To illustrate, select the adjustment area by moving the virtual brush, and then drag or long-press the virtual hair within the adjustment area to adjust the length of the virtual hair.

[0179] Alternatively, the hair length adjustment operation can be performed by dragging virtual hair using a virtual brush.

[0180] Indicatively, the virtual hair within the coverage area of ​​the virtual brush is defined as the virtual hair in the adjustment area. When the movement direction of the virtual brush is opposite to the direction of the virtual hair, the adjustment direction is determined to shorten the length of the virtual hair. When the movement direction of the virtual brush is the same as the direction of the virtual hair, the adjustment direction is determined to increase the length of the virtual hair.

[0181] The adjustment range can be determined by the dragging distance of the virtual brush. For example, when growing virtual hair, the farther the dragging distance, the longer the virtual hair will be.

[0182] The length of the hair can also be increased or decreased by long-pressing. The adjustment range is determined by the duration of the long press on the virtual hair. The duration of the long press is positively correlated with the adjustment range. For example, when increasing the length of the virtual hair, the longer the duration of the long press, the longer the virtual hair will be.

[0183] The hair length adjustment operation can also be a click operation. The target length of the virtual hair can be preset. When the virtual hair is clicked based on the virtual brush, the virtual hair within the coverage area of ​​the virtual brush will be adjusted to the target length.

[0184] Optionally, the coverage area of ​​the virtual brush can be preset or dynamically adjusted based on user actions.

[0185] The coverage area of ​​the virtual brush can be set to all virtual hairs connected to the virtual hairs at the point of the virtual brush click. Alternatively, the coverage area of ​​the virtual brush can be determined by setting the size of the virtual brush and defining the area within a preset range at the point of the virtual brush click. This application embodiment does not limit this.

[0186] This is illustrative; please refer to it. Figure 5 , Figure 5This is a schematic diagram illustrating the increase or decrease of hair length provided in an exemplary embodiment of this application, as shown below. Figure 5 As shown, for virtual hair 510 on a three-dimensional object model, in response to receiving an editing operation on the virtual hair based on the hair length increase / decrease function using a virtual brush, a first editing result 520 of the virtual hair is displayed, the first editing result 520 including the virtual hair extended according to the editing operation of the virtual brush.

[0187] It is worth noting that the operation of the above-mentioned hair length increase / decrease function is merely an example and is not limited in this application.

[0188] Taking the first hair adjustment function, which includes a hair length averaging function, as an example, the hair length averaging function is used to average the hair length of virtual hair within a selected area. Based on the hair length averaging function, the system receives the hair length averaging operation of the virtual hair through a virtual brush; and displays the second editing result of the virtual hair, which includes the virtual hair with the average hair length within the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the hair length averaging operation.

[0189] Specifically, the vertex color information of the virtual hair is automatically updated based on the average hair length operation, and the second editing result is displayed in real time based on the vertex color information. This vertex color information is used to indicate the changes in the virtual hair based on the average hair length operation.

[0190] Indicatively, the coverage area of ​​the virtual brush is defined as the selected area. The average length is calculated based on the length of the virtual hair within the selected area. The virtual hair within the selected area is then uniformly adjusted to the average length, including shortening and lengthening the virtual hair.

[0191] This is illustrative; please refer to it. Figure 6 , Figure 6 This is a schematic diagram of average hair length provided in an exemplary embodiment of this application, as shown below. Figure 6 As shown, for virtual hair 610 on a 3D object model, in response to receiving an editing operation on the virtual hair based on the average hair length function using a virtual brush, a second editing result 620 of the virtual hair is displayed. The second editing result 620 includes virtual hair with average hair length within a selected area, which is the coverage area of ​​the virtual brush based on the editing operation.

[0192] It is worth noting that the operation of the above-mentioned hair length averaging function is merely an example and is not limited in this application.

[0193] Taking the first hair adjustment function, which includes a hair combing function, as an example, the hair combing function is used to adjust the direction of the virtual hair. Based on the hair combing function, the hair combing operation of the virtual hair is received through the virtual brush. The third editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair. The third editing result includes the virtual hair after adjusting the hair direction. The direction of the virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation.

[0194] The vertex color information of the virtual hair is automatically updated based on the hair combing operation, and the third editing result is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on the hair combing operation. For example, the vertex color information is used to indicate the directional offset information of the virtual hair.

[0195] To illustrate, adjust the direction of the virtual hair within the coverage area of ​​the virtual brush along the direction of the virtual brush's movement so that the direction of the virtual hair is consistent with the direction of movement.

[0196] This is illustrative; please refer to it. Figure 7 , Figure 7 This is a schematic diagram of hair combing provided in an exemplary embodiment of this application, such as... Figure 7 As shown, for virtual hair 710 on a three-dimensional object model, in response to receiving an editing operation on the virtual hair based on the hair combing function using a virtual brush, a third editing result 720 of the virtual hair is displayed, the third editing result 720 including virtual hair extending along the combing direction of the virtual brush.

[0197] Taking the first hair adjustment function, which includes the hair gathering function, as an example, the hair gathering function is used to gather virtual hair towards a specified gathering point. Based on the hair gathering function, the hair gathering operation of the virtual hair is received through the virtual brush. The fourth editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair. The fourth editing result includes the virtual hair gathered towards the specified gathering point, which is selected by the virtual brush based on the hair gathering operation.

[0198] The vertex color information of the virtual hair is automatically updated based on the hair gathering operation, and the fourth editing result is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on the hair gathering operation. For example, the vertex color information is used to store the directional offset information of the virtual hair.

[0199] Indicatively, the virtual hair within the coverage area of ​​the virtual brush is defined as the virtual hair of the gathering area. The gathering point in the gathering area is determined. This gathering point can be the center point of the gathering area or other area points selected by the user, such as the highest point of the gathering area. In this embodiment, the gathering point is taken as the center point of the gathering area for illustration. Based on the hair gathering function, the virtual hair in the gathering area is gathered towards the center point.

[0200] This is illustrative; please refer to it. Figure 8 , Figure 8 This is a schematic diagram of hair gathering provided in an exemplary embodiment of this application, as shown below. Figure 8 As shown, for virtual hair 810 on a 3D object model, in response to receiving an editing operation on the virtual hair based on the hair gathering function using a virtual brush, a fourth editing result 820 of the virtual hair is displayed, which includes virtual hair gathering toward the gathering point.

[0201] It is worth noting that the above-mentioned hair gathering function is only an exemplary example, and the embodiments of this application do not limit it.

[0202] Taking the first hair adjustment function, which includes a hair reset function, as an example, the hair reset function is used to restore the rendering effect of the virtual hair before adjustment. Based on the hair reset function, the hair reset operation of the virtual hair is received through the virtual brush. The hair reset operation is used to select the reset area based on the moving area of ​​the virtual brush. The fifth editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair. The fifth editing result includes the rendering effect of the virtual hair before adjustment in the reset area.

[0203] Specifically, the vertex color information of the virtual hair is automatically updated based on the hair reset operation, and the fifth editing result is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on the hair reset operation. For example, the vertex color information is used to indicate at least one of the virtual hair's direction offset information and length change information.

[0204] Optionally, the degree of recovery can be dynamically determined based on the operation data of the virtual brush.

[0205] To illustrate, suppose the current virtual hair is edited to twice its original length. When a hair reset operation is received through the virtual brush, the current hair length of the virtual hair is gradually restored based on the duration of the virtual brush on the virtual hair, until the duration of the brush stays on the virtual hair and the hair length is restored to the original length.

[0206] It is worth noting that the above-mentioned hair reset function is only an example and is not limited in this application.

[0207] Taking the first hair adjustment function, which includes a random hair function, as an example, the random hair function is used to randomly adjust at least one of the length and direction of the virtual hair. Based on the random hair function, the system receives random adjustment operations on the virtual hair through a virtual brush. The random adjustment operation is used to select a random adjustment area based on the movement area of ​​the virtual brush. The system displays the sixth editing result of the virtual hair based on the vertex color information corresponding to the virtual hair. The sixth editing result includes the rendering effect of the virtual hair in the random adjustment area after being adjusted according to at least one of the random length or random direction.

[0208] Specifically, the vertex color information of the virtual hair is automatically updated based on random adjustment operations, and the sixth editing result is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on random adjustment operations. For example, the vertex color information is used to indicate at least one of the virtual hair's direction offset information and length change information.

[0209] The random length and random direction are randomly determined based on a random noise seed.

[0210] Optionally, the first hair adjustment function may include multiple selected hair adjustment functions. In response to receiving an editing operation on the virtual hair on the three-dimensional object model through virtual input, the editing result of the virtual hair is displayed. The editing result includes the rendering effect of the virtual hair adjusted according to the adjustment dimensions corresponding to the multiple hair adjustment functions.

[0211] Taking the first hair adjustment function, which includes hair length increase / decrease and hair combing functions, as an example, based on the hair length increase / decrease and hair combing functions, the editing operation of virtual hair is received through a virtual brush. Based on the vertex color information corresponding to the virtual hair, the seventh editing result of the virtual hair is displayed in real time. The seventh editing result includes the virtual hair after increasing or decreasing according to the first adjustment range and adjusting the hair direction. The first adjustment range is positively correlated with the movement distance of the virtual brush based on the editing operation, and the hair direction of the adjusted virtual hair corresponds to the movement direction of the virtual brush based on the editing operation.

[0212] Vertex color information is used to indicate the directional offset and length variation information of virtual hair.

[0213] To illustrate, taking dragging as an example, the virtual hair in the area is adjusted by dragging with a virtual brush. While the virtual hair grows according to the dragging distance based on the dragging operation, the direction of the hair is also adjusted according to the dragging direction, so that the virtual hair faces the dragging direction.

[0214] Taking the first hair adjustment function, which includes hair length increase / decrease function and hair gathering function, as an example, based on the hair length increase / decrease function and hair gathering function, the editing operation of virtual hair through virtual brush is received, and the eighth editing result of virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The eighth editing result includes virtual hair that is increased or decreased according to the first adjustment range and gathered towards the specified gathering point. The first adjustment range is positively correlated with the duration of the virtual brush operation based on the editing operation.

[0215] Vertex color information is used to indicate the directional offset and length variation information of virtual hair.

[0216] To illustrate, taking a long press as an example, by long-pressing with a virtual brush, the virtual hair in the adjustment area grows according to the duration of the long press, while the virtual hair in the adjustment area converges towards the operation point of the virtual brush.

[0217] The operation points include the position where the virtual brush touches the paper, or the position where the virtual brush stays in place for a preset duration after touching the paper.

[0218] Taking the first hair adjustment function, which includes a random hair function and a hair reset function, as an example, based on the random hair function and the hair reset function, the editing operation of virtual hair is received through a virtual brush. Based on the vertex color information corresponding to the virtual hair, the ninth editing result of the virtual hair is displayed in real time. The ninth editing result includes a comparison of the virtual hair random adjustment effect and the virtual hair reset effect.

[0219] Vertex color information is used to indicate at least one of the orientation offset information and length variation information of virtual hair.

[0220] In a schematic way, after selecting the random hair function and the hair reset function as the first hair adjustment function, the virtual hair is clicked based on the virtual brush, and the length and direction of the virtual hair within the coverage area of ​​the virtual brush are randomly adjusted. The reset effect of the randomly adjusted virtual hair is displayed in a window at a preset position.

[0221] It is worth noting that the above-mentioned hair adjustment functions and operation methods are merely illustrative examples, and the embodiments of this application do not limit them.

[0222] In summary, the method provided in this application embodiment performs editing operations on virtual hair using a virtual brush based on the selected hair adjustment function, enabling artists to explicitly adjust the virtual hair based on the operation position and trajectory of the virtual brush, thereby improving hair editing efficiency.

[0223] The method provided in this application provides a variety of hair adjustment functions, such as hair length increase / decrease, hair length averaging, hair combing, hair gathering, hair reset, and hair randomization. It eliminates the need to reconstruct the three-dimensional model structure for the virtual hair that needs adjustment and then re-render the virtual hair based on the model. It can flexibly control and edit virtual hair, expanding the expressiveness and diversity of virtual hair.

[0224] In some embodiments, the editing results are displayed based on the operation data corresponding to the virtual brush. Please refer to [the relevant documentation / reference]. Figure 9 , Figure 9 This is a flowchart of an exemplary embodiment of an editing method based on a virtual brush provided in this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment illustrates the method executed by a terminal as an example. Figure 9 As shown, the process of displaying the editing result of virtual hair in response to receiving an editing operation on virtual hair on a 3D object model using a virtual brush includes the following steps:

[0225] Step 910: In response to receiving an editing operation on the virtual hair via a virtual brush, the vertex color information corresponding to the virtual hair is automatically updated based on the operation data of the editing operation.

[0226] Vertex color information is used to indicate at least one of the editing information, namely, the directional offset information and the length change information of the virtual hair.

[0227] In some embodiments, vertex color information is preset four-dimensional channel information, consisting of four floating-point numbers with values ​​between 0 and 1. For example, the default vertex color information is (0.5, 0.5, 0.5, 0.5).

[0228] Optionally, the first two digits of the vertex color information can be used to represent the direction offset information.

[0229] This is illustrative; please refer to it. Figure 10 , Figure 10 This is a schematic diagram of directional offset information provided in an exemplary embodiment of this application, such as... Figure 10 As shown, the direction offset information corresponding to the initial hair 1001 is (0.5, 0.5). This initial hair is generated straight in the direction of the normal. When the data in the direction offset information changes, the initial hair 1001 will be offset according to the direction offset information to obtain the offset hair 1002.

[0230] Optionally, the length variation information can be represented by the third bit of the vertex color information.

[0231] This is illustrative; please refer to it. Figure 11 , Figure 11This is a schematic diagram of length variation information provided in an exemplary embodiment of this application, such as... Figure 11 As shown, the length change information corresponding to the initial hair 1101 is 0.5. When the length change information is in the range of 0.5-1, the initial hair 1101 will grow in length to become the grown hair 1102. When the length change information is in the range of 0-0.5, the initial hair 1101 will shorten in length to become the shortened hair.

[0232] Taking the first hair adjustment function as an example, the adjustment dimension corresponding to hair length includes the vertex color information, which includes length change information.

[0233] Indicatively, the length change information in the vertex color information corresponding to the virtual hair is automatically updated based on at least one of the virtual brush movement distance based on the editing operation or the virtual brush dwell time based on the editing operation. The length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or dwell time.

[0234] For example, for the hair gathering function, the center point of the area covered by the virtual brush is determined, the vertices of the virtual hairs within the coverage area are recorded, and the directional offset information is determined based on the distance between the vertices and the center point (where the greater the distance, the greater the degree of directional offset).

[0235] Taking the first hair adjustment function as an example, the adjustment dimensions include hair direction, and the vertex color information includes direction offset information.

[0236] Indicatively, based on the movement trajectory of the virtual brush according to the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, and the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

[0237] For example, for the hair gathering function, the center point of the area covered by the virtual brush is determined, the vertices of the virtual hairs within the coverage area are recorded, and the directional offset information is determined based on the distance between the vertices and the center point (where the greater the distance, the greater the degree of directional offset).

[0238] Step 920: Display the editing results of the virtual hair in real time based on the vertex color information.

[0239] To illustrate, for the hair grooming function, the movement trajectory of the virtual brush on the virtual hair is recorded, the movement direction corresponding to the movement trajectory is converted into the local coordinate system direction of the vertex as the direction offset information, the direction offset information is stored in the vertex color information of the corresponding vertex of the virtual hair, and the hair grooming result is displayed based on the vertex color information.

[0240] In a schematic example, for the hair length adjustment function, the vertex of the virtual hair covered by the virtual brush is recorded. The value corresponding to the length change information in the vertex color information is increased or decreased according to the duration of the editing operation received by the virtual brush (such as the duration of long press), and the final result is stored. The hair length adjustment result is displayed according to the final vertex color information.

[0241] To illustrate, for the hair gathering function, the center point of the area covered by the virtual brush is determined, the vertices of the virtual hairs within the coverage area are recorded, the directional offset information is determined based on the distance between the vertices and the center point (where the greater the distance, the greater the directional offset), the directional offset information is stored in the vertex color information, and the hair gathering result is displayed based on the vertex color information.

[0242] In some embodiments, vertex color information of virtual hair is stored. When the virtual scene includes virtual objects corresponding to 3D object models, the rendering result of virtual hair on the virtual objects is displayed based on the vertex color information. The rendering result includes the editing result corresponding to the vertex color information.

[0243] Taking virtual games as an example, the vertex colors generated after editing by the editor are directly stored in the model resources and processed as game resources. In this way, all game objects generated by reading this resource in the game will use a unified set of vertex color information. To achieve diverse representations of game objects, a separate set of vertex color information can be stored in memory for each loaded game object according to the game's needs and gameplay. The vertex color data of each object can be changed in real time according to gameplay mechanics (such as changes in wind or hand movements), thus enabling real-time changes to hair effects within the game.

[0244] This is illustrative; please refer to it. Figure 12 , Figure 12 This is a schematic diagram of resource management provided in an exemplary embodiment of this application, such as... Figure 12 As shown, vertex color information is stored in the model resource storage space 1200. Specifically, vertex color information 1 is stored for game object 1, vertex color information 2 is stored for game object 2, and vertex color information 3 is stored for game object 3.

[0245] As an illustration, the vertex color information of virtual hair in different states such as wind exposure, movement, and stroking can be stored for the same 3D object model. This allows for multiple different representations based on the same 3D model structure, reducing the computational resources required to build the 3D model and improving the expressiveness of the virtual hair.

[0246] The color information of the first vertex of virtual hair in the wind state is stored for the 3D object model.

[0247] The wind state refers to the state of virtual hair on a virtual object being blown by the wind when displayed in a virtual scene. The first vertex color information includes the directional offset information of the virtual hair when it is blown by the first wind force.

[0248] Indicatively, the hair adjustment area also includes a hair wind adjustment function. When the hair wind adjustment function is selected, in response to receiving a wind adjustment operation on the virtual hair via a virtual brush, the editing result of the virtual hair is displayed.

[0249] Specifically, the vertex color information of the virtual hair is updated based on the operation data of the wind adjustment operation to obtain the first vertex color information.

[0250] The directional offset information in the first vertex color information is calculated based on the wind intensity and wind direction of the first wind force.

[0251] This virtual brush is used to convey the wind strength and direction of the first wind force.

[0252] The second vertex color information of virtual hair in motion is stored for the 3D object model.

[0253] Motion state refers to the state of virtual hair on a virtual object as it moves with the virtual object when displayed in a virtual scene. The second vertex color information includes the directional offset information of the virtual hair in motion state.

[0254] To illustrate, the hair adjustment area also includes a hair motion adjustment function. When the hair motion function is selected, in response to receiving a motion adjustment operation on the virtual hair via a virtual brush, the editing result of the virtual hair is displayed.

[0255] Specifically, the vertex color information of the virtual hair is updated based on the operation data of the motion adjustment operation to obtain the second vertex color information.

[0256] Among them, the directional offset information in the second vertex color information is calculated based on motion data such as the virtual object's movement speed and direction of movement.

[0257] In some embodiments, the directional offset information in the second vertex color information can also be calculated based on the motion data and wind data of the virtual object, and this application embodiment does not limit this.

[0258] This virtual brush is used to transmit motion data and wind data.

[0259] The third vertex color information of virtual hair in the stroking state is stored for the 3D object model.

[0260] The "touching state" refers to the state of virtual hair on a virtual object when it is displayed in a virtual scene and subjected to a stroking force. The third vertex color information includes the directional offset information of the virtual hair in the stroking state.

[0261] Indicatively, the hair adjustment area also includes a hair stroking adjustment function. When the hair stroking adjustment function is selected, in response to receiving a stroking adjustment operation on the virtual hair using a virtual brush, the editing result of the virtual hair is displayed.

[0262] Specifically, the vertex color information of the virtual hair is updated based on the operation data of the stroking and adjustment operation to obtain the third vertex color information.

[0263] Among them, the directional offset information in the third vertex color information is calculated based on the stroking force and stroking direction received by the virtual object.

[0264] This virtual brush is used to convey the pressure and direction of the touch.

[0265] It is worth noting that the above-mentioned display state of virtual hair is merely an example and is not intended to limit the scope of this application.

[0266] In summary, the method provided in this application automatically updates vertex color information based on the operation data of the editing operation and displays the editing result of virtual hair based on the vertex color information, which simplifies the rendering calculation process of hair editing, provides a hair editing method, and thus enhances the performance of virtual hair.

[0267] The method provided in this application embodiment can automatically update the length change information in the vertex color information based on the moving distance or dwell time of the virtual brush, and automatically update the direction offset information in the vertex color information based on the moving trajectory of the virtual brush, thereby improving the efficiency of virtual hair editing.

[0268] In conjunction with the above embodiments, the application scenarios of the virtual hair editing method provided in this application are described. Optionally, this method can be applied to any scenario that requires hair editing, such as virtual games, 3D modeling, simulated architectural design, and extended reality (XR). XR includes technical fields such as virtual reality (VR), mixed reality (MR), and augmented reality (AR), which are not limited by this application.

[0269] I. Taking the application of virtual hair editing methods in virtual games as an example for explanation.

[0270] Virtual games correspond to virtual scenes, which include virtual objects with corresponding virtual hair. The art developers of the virtual game can edit the 3D object models of the virtual objects in a 3D editing space through a terminal, so that when the virtual game runs, the virtual objects can be rendered and displayed according to the model effects edited by the art developers.

[0271] Schematic illustration: During the game object design phase, the terminal displays a game object model rendered in a 3D editing space. The game object model includes virtual hair represented by a 3D model structure. A hair adjustment area is displayed, which includes multiple hair adjustment functions. These functions are used to edit and adjust the virtual hair from different adjustment dimensions. When a first hair adjustment function is selected, in response to receiving an editing operation on the virtual hair on the game object model using a virtual brush, the terminal updates the vertex color information corresponding to the virtual hair in real time based on the editing operation, and displays the editing result of the virtual hair in real time based on the vertex color information. The vertex color information is used to indicate the changes in the virtual hair based on the editing operation. The editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0272] Among them, the game object model is the rendering model corresponding to the virtual object that has been designed in the design and development stage. Through the virtual hair editing method provided in this application embodiment, artists can further edit and adjust the virtual hair on the basis of the existing model, improve the artists' control over the virtual hair, and expand the expressiveness and diversity of the virtual hair.

[0273] In some embodiments, in response to receiving a selection operation for a first hair adjustment function among a plurality of hair adjustment functions, the first hair adjustment function is selected; in response to receiving an editing operation on virtual hair on a game object model based on the first hair adjustment function using a virtual brush, the editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair.

[0274] Taking the first hair adjustment function, which includes the hair length increase / decrease function, as an example, the hair length increase / decrease function is used to increase or decrease the hair length of virtual hair. Based on the hair length increase / decrease function, the system receives the hair length increase / decrease operation of the virtual hair through the virtual brush. Based on the vertex color information corresponding to the virtual hair, the system displays the first editing result of the virtual hair. The first editing result includes the virtual hair that has been increased or decreased according to the first adjustment range. The adjustment range is positively correlated with the movement distance of the virtual brush based on the hair length increase / decrease operation.

[0275] Taking the first hair adjustment function, which includes a hair length averaging function, as an example, the hair length averaging function is used to average the hair length of virtual hair within a selected area. Based on the hair length averaging function, the system receives the hair length averaging operation of the virtual hair through a virtual brush. The system displays the second editing result of the virtual hair based on the vertex color information corresponding to the virtual hair. The second editing result includes the virtual hair with the average hair length within the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the hair length averaging operation.

[0276] Taking the first hair adjustment function, which includes a hair combing function, as an example, the hair combing function is used to adjust the direction of the virtual hair. Based on the hair combing function, the virtual hair is combed by a virtual brush. The third editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair. The third editing result includes the virtual hair after adjusting the direction of the hair. The direction of the virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation.

[0277] Taking the first hair adjustment function, which includes the hair gathering function, as an example, the hair gathering function is used to gather virtual hair towards a specified gathering point. Based on the hair reset function, the hair gathering function receives the hair gathering operation of the virtual hair through the virtual brush; based on the vertex color information corresponding to the virtual hair, the fourth editing result of the virtual hair is displayed. The fourth editing result includes the virtual hair gathered towards the specified gathering point, which is selected by the virtual brush based on the hair gathering operation.

[0278] Taking the first hair adjustment function, which includes a hair reset function, as an example, the hair reset function is used to reset the display state of the virtual hair. It receives the hair reset operation of the virtual hair through the virtual brush. The hair reset operation is used to select the reset area based on the moving area of ​​the virtual brush. The fifth editing result of the virtual hair is displayed based on the vertex color information corresponding to the virtual hair. The fifth editing result includes the rendering effect of the virtual hair before adjustment in the reset area.

[0279] Taking the first hair adjustment function, which includes a random hair function, as an example, the random hair function is used to randomly adjust at least one of the length and direction of the virtual hair. Based on the random hair function, the system receives random adjustment operations on the virtual hair through a virtual brush. The random adjustment operation is used to select a random adjustment area based on the movement area of ​​the virtual brush. The system displays the sixth editing result of the virtual hair based on the vertex color information corresponding to the virtual hair. The sixth editing result includes the rendering effect of the virtual hair in the random adjustment area after being adjusted according to at least one of the random length or random direction.

[0280] In some embodiments, the operation data based on the virtual brush displays the editing results.

[0281] Schematic, in response to receiving the editing operation on virtual hair via a virtual brush, the vertex color information corresponding to the virtual hair is automatically updated based on the operation data of the editing operation, the vertex color information being used to indicate at least one of the editing information of the virtual hair's direction offset information and length change information; the editing result of the virtual hair is displayed based on the vertex color information.

[0282] Optionally, based on at least one of the virtual brush's movement distance based on the editing operation, or the virtual brush's dwell time based on the editing operation, the length change information in the vertex color information corresponding to the virtual hair is automatically updated, wherein the length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or dwell time; or, based on the virtual brush's movement trajectory based on the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, wherein the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

[0283] In some embodiments, vertex color information corresponding to virtual hair is stored. When the virtual scene of the virtual game includes virtual objects corresponding to game object models, the rendering effect of virtual hair on virtual objects is displayed based on vertex color information. The rendering effect includes the editing result corresponding to the vertex color information.

[0284] II. The application of virtual hair editing methods in VR scenarios will be used as an example for explanation.

[0285] In some embodiments, virtual objects in the virtual scene provided by the VR program need to be pre-designed, and rendered and displayed based on the designed 3D model.

[0286] Virtual hair on virtual objects is usually automatically rendered and displayed based on a preset hair model. However, after the hair model is designed, it is difficult for artists to adjust the details of the virtual hair and they need to readjust the model structure, resulting in low editing efficiency. Therefore, the virtual hair editing method provided in this application embodiment can be used to edit virtual hair and improve editing efficiency.

[0287] Schematic, the terminal displays a VR object model rendered in a 3D editing space. This VR object model includes virtual hair represented by a 3D model structure. A hair adjustment area is displayed, which includes multiple hair adjustment functions. These functions are used to edit and adjust the virtual hair from different dimensions. When a first hair adjustment function is selected, in response to receiving an editing operation on the virtual hair on the VR object model using a virtual brush, the terminal updates the vertex color information corresponding to the virtual hair in real time based on the editing operation, and displays the editing result of the virtual hair in real time based on the vertex color information. The vertex color information is used to indicate the changes in the virtual hair based on the editing operation. The editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0288] It is worth noting that the above application scenarios are merely illustrative examples and are not intended to be limiting.

[0289] Figure 13 This is a structural block diagram of a virtual hair editing device provided in an exemplary embodiment of this application, such as... Figure 13 As shown, the device includes the following parts:

[0290] Display module 1310 is used to display a three-dimensional object model rendered in a three-dimensional editing space, wherein the three-dimensional object model includes virtual hair represented by a three-dimensional model structure;

[0291] The display module 1310 is also used to display a hair adjustment area, which includes multiple hair adjustment functions, each of which is used to edit and adjust the virtual hair from different adjustment dimensions.

[0292] The display module 1310 is further configured to, in response to receiving an editing operation on the virtual hair on the three-dimensional object model via a virtual brush when a first hair adjustment function is selected among the plurality of hair adjustment functions, update the vertex color information corresponding to the virtual hair in real time based on the editing operation, and display the editing result of the virtual hair in real time based on the vertex color information, wherein the vertex color information is used to indicate the changes of the virtual hair based on the editing operation, and the editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

[0293] In some embodiments, the apparatus further includes a processing module 1320, which is configured to select the first hair adjustment function in response to receiving a selection operation for the first hair adjustment function among the plurality of hair adjustment functions;

[0294] The display module 1310 is further configured to respond to receiving the editing operation of the virtual hair based on the first hair adjustment function through the virtual brush, and to display the editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair, wherein the vertex color information is automatically updated based on the editing operation.

[0295] In some embodiments, the first hair adjustment function includes a hair length increase / decrease function, which is used to increase or decrease the hair length of the virtual hair;

[0296] The processing module 1320 is also used to receive the hair length increase / decrease operation of the virtual hair through the virtual brush based on the hair length increase / decrease function;

[0297] The display module 1310 is further configured to display a first editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The first editing result includes the virtual hair that has been lengthened or shortened according to a first adjustment range. The adjustment range is positively correlated with the movement distance of the virtual brush based on the hair length increase / decrease operation. The vertex color information is automatically updated based on the hair length increase / decrease operation.

[0298] In some embodiments, the first hair adjustment function includes a hair length averaging function, which is used to average the hair length of the virtual hair within a selected area.

[0299] The processing module 1320 is further configured to receive, based on the hair length averaging function, a hair length averaging operation performed on the virtual hair using the virtual brush.

[0300] The display module 1310 is further configured to display a second editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The second editing result includes the virtual hair with an average hair length within the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the average hair length operation. The vertex color information is automatically updated based on the average hair length operation.

[0301] In some embodiments, the first hair adjustment function includes a hair combing function, which is used to adjust the direction of the virtual hair;

[0302] The processing module 1320 is further configured to receive a hair combing operation on the virtual hair using the virtual brush, based on the hair combing function.

[0303] The display module 1310 is further configured to display a third editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The third editing result includes the virtual hair after adjusting the hair direction. The hair direction of the adjusted virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation. The vertex color information is automatically updated based on the hair combing operation.

[0304] In some embodiments, the first hair adjustment function includes a hair gathering function, which is used to gather the virtual hair toward a designated gathering point.

[0305] The processing module 1320 is also used to receive a hair gathering operation on the virtual hair through the virtual brush, based on the hair gathering function.

[0306] The display module 1310 is further configured to display a fourth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The fourth editing result includes the virtual hair that is gathered toward the specified gathering point. The specified gathering point is selected by the virtual brush based on the hair gathering operation. The vertex color information is automatically updated based on the hair gathering operation.

[0307] In some embodiments, the first hair adjustment function includes a hair reset function, which is used to reset the display state of the virtual hair;

[0308] The processing module 1320 is further configured to receive a hair reset operation on the virtual hair via the virtual brush based on the hair reset function, wherein the hair reset operation is used to select a reset area based on the moving area of ​​the virtual brush.

[0309] The display module 1310 is also used to display the fifth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The fifth editing result includes the rendering effect of the virtual hair before adjustment in the reset area. The vertex color information is automatically updated based on the hair reset operation.

[0310] In some embodiments, the first hair adjustment function includes a hair randomization function, which is used to randomly adjust at least one of the length and direction of the virtual hair;

[0311] The processing module 1320 is further configured to receive a random adjustment operation on the virtual hair through the virtual brush based on the random hair function, wherein the random adjustment operation is used to select a random adjustment area based on the movement area of ​​the virtual brush.

[0312] The display module 1310 is also used to display the sixth editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The sixth editing result includes the rendering effect of the virtual hair in the random adjustment area after being adjusted according to at least one of random length or random direction. The vertex color information is automatically updated based on the random adjustment operation.

[0313] In some embodiments, the hair length increase / decrease function and the hair gathering function are as follows: the hair length increase / decrease function is used to increase or decrease the hair length of the virtual hair, and the hair gathering function is used to gather the virtual hair toward a specified gathering point.

[0314] The processing module 1320 is further configured to receive editing operations on the virtual hair via the virtual brush based on the hair length increase / decrease function and the hair gathering function. The editing operations are used to simultaneously adjust the hair length of the virtual hair and gather the virtual hair.

[0315] The display module 1310 is further configured to display the comprehensive editing result of the virtual hair in real time based on the vertex color information corresponding to the virtual hair. The comprehensive editing result includes virtual hair that is lengthened or shortened according to a first adjustment range and converges towards the designated convergence point. The first adjustment range is positively correlated with the duration of the virtual brush operation based on the editing operation. The designated convergence point corresponds to the operation point of the virtual brush based on the editing operation. The vertex color information is automatically updated based on the editing operation.

[0316] In some embodiments, the processing module 1320 is further configured to, in response to receiving the editing operation on the virtual hair via the virtual brush, automatically update the vertex color information corresponding to the virtual hair based on the operation data of the editing operation, wherein the vertex color information is used to indicate at least one of the editing information of the virtual hair's direction offset information and length change information;

[0317] The display module 1310 is also used to display the editing results of the virtual hair in real time based on the vertex color information.

[0318] In some embodiments, the processing module 1320 is further configured to:

[0319] Based on at least one of the virtual brush's movement distance during the editing operation or the virtual brush's dwell time during the editing operation, the length change information in the vertex color information corresponding to the virtual hair is automatically updated, wherein the length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or the dwell time; or...

[0320] Based on the movement trajectory of the virtual brush according to the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, and the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

[0321] In some embodiments, the processing module 1320 is further configured to store the vertex color information corresponding to the virtual hair;

[0322] The display module 1310 is further configured to display the rendering effect of the virtual hair on the virtual object based on the vertex color information when the virtual scene includes a virtual object corresponding to the three-dimensional object model, the rendering effect including the editing result corresponding to the vertex color information.

[0323] In some embodiments, the processing module 1320 is further configured to:

[0324] The first vertex color information of the virtual hair in the wind state is stored for the three-dimensional object model. The wind state refers to the state in which the virtual hair on the virtual object is blown by the wind when it is displayed in the virtual scene. The first vertex color information includes the directional offset information of the virtual hair when it is blown by the first wind force.

[0325] The second vertex color information of the virtual hair in motion state is stored in the three-dimensional object model. The motion state refers to the state in which the virtual hair on the virtual object moves with the virtual object when it is displayed in the virtual scene. The second vertex color information includes the directional offset information of the virtual hair in the motion state.

[0326] The third vertex color information of the virtual hair in the touch state is stored in the three-dimensional object model. The touch state refers to the state of the virtual hair on the virtual object when it is displayed in the virtual scene and subjected to the touch force. The third vertex color information includes the directional offset information of the virtual hair in the touch state.

[0327] In summary, the device provided in this application provides a hair adjustment area, enabling artists to adjust virtual hair on a 3D object model using different hair adjustment functions in a 3D editing space. This expands the various expressive effects of virtual hair, improves the flexibility of rendering virtual hair, and allows artists to edit and adjust virtual hair based on the virtual brush's operation position and trajectory. This allows artists to update vertex color information based on the virtual brush's operation position and trajectory, thereby explicitly adjusting the virtual hair based on the vertex color information, improving hair editing efficiency. Overall, it eliminates the need to rebuild the 3D model structure for the virtual hair that needs adjustment and then re-render the virtual hair based on the model, enabling flexible control over editing virtual hair and expanding expressiveness and diversity.

[0328] It should be noted that the virtual hair editing device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0329] Figure 14 A structural block diagram of a terminal 1400 provided in an exemplary embodiment of this application is shown. The terminal 1400 may be a smartphone, tablet computer, MP3 player, MP4 player, laptop computer, or desktop computer. The terminal 1400 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.

[0330] Typically, terminal 1400 includes a processor 1401 and a memory 1402.

[0331] Processor 1401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1401 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 1401 may also include a main processor and a coprocessor. The main processor, also known as a central processing unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1401 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1401 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0332] The memory 1402 may include one or more computer-readable storage media, which may be non-transitory. The memory 1402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1402 are used to store at least one instruction, which is executed by the processor 1401 to implement the virtual hair editing method provided in the method embodiments of this application.

[0333] In some embodiments, the terminal 1400 also includes other components 1403, the type and number of which can be selected based on the functional needs of the terminal 1400. Those skilled in the art will understand that... Figure 14 The structure shown does not constitute a limitation on terminal 1400 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0334] Embodiments of this application also provide a computer device that can be implemented as follows: Figure 1The terminal or server shown. The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the virtual hair editing method provided in the above-described method embodiments.

[0335] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the virtual hair editing method provided in the above-described method embodiments.

[0336] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual hair editing method provided in the above-described method embodiments.

[0337] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0338] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0339] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A virtual hair editing method, characterized in that, The method includes: A three-dimensional object model rendered in a three-dimensional editing space is displayed, the three-dimensional object model including virtual hair represented by a three-dimensional model structure; The display area shows a hair adjustment region, which includes multiple hair adjustment functions. These multiple hair adjustment functions are used to edit and adjust the virtual hair from different adjustment dimensions. When a first hair adjustment function is selected among the plurality of hair adjustment functions, in response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush, the vertex color information corresponding to the virtual hair is updated in real time based on the editing operation, and the editing result of the virtual hair is displayed in real time based on the vertex color information. The vertex color information is used to indicate the changes of the virtual hair based on the editing operation, and the editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

2. The method according to claim 1, characterized in that, When a first hair adjustment function is selected among the plurality of hair adjustment functions, in response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush, the vertex color information corresponding to the virtual hair is updated in real time based on the editing operation, and the editing result of the virtual hair is displayed in real time based on the vertex color information, including: In response to receiving a selection operation for the first hair adjustment function among the plurality of hair adjustment functions, the first hair adjustment function is selected; In response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, the editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair, wherein the vertex color information is automatically updated based on the editing operation.

3. The method according to claim 2, characterized in that, The first hair adjustment function includes a hair length increase / decrease function, which is used to increase or decrease the hair length of the virtual hair; The response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, and the real-time display of the editing result of the virtual hair based on the vertex color information corresponding to the virtual hair, includes: Based on the hair length increase / decrease function, the system receives operations to increase or decrease the hair length of the virtual hair using the virtual brush. The first editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The first editing result includes the virtual hair that has been lengthened or shortened according to a first adjustment range. The first adjustment range is positively correlated with the movement distance of the virtual brush based on the hair length increase / decrease operation. The vertex color information is automatically updated based on the hair length increase / decrease operation.

4. The method according to claim 2, characterized in that, The first hair adjustment function includes a hair length averaging function, which is used to average the hair length of the virtual hair within a selected area; The response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, and the real-time display of the editing result of the virtual hair based on the vertex color information corresponding to the virtual hair, includes: Based on the hair length averaging function, the system receives the hair length averaging operation of the virtual hair through the virtual brush. The second editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The second editing result includes the virtual hair with the average hair length in the selected area. The selected area corresponds to the movement area of ​​the virtual brush based on the average hair length operation. The vertex color information is automatically updated based on the average hair length operation.

5. The method according to claim 2, characterized in that, The first hair adjustment function includes a hair combing function, which is used to adjust the direction of the virtual hair; The response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, and the real-time display of the editing result of the virtual hair based on the vertex color information corresponding to the virtual hair, includes: Based on the hair combing function, the system receives hair combing operations on the virtual hair using the virtual brush. The third editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The third editing result includes the virtual hair after adjusting the hair direction. The hair direction of the adjusted virtual hair corresponds to the movement direction of the virtual brush based on the hair combing operation. The vertex color information is automatically updated based on the hair combing operation.

6. The method according to claim 2, characterized in that, The first hair adjustment function includes a hair gathering function, which is used to gather the virtual hair toward a designated gathering point. The response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, and the real-time display of the editing result of the virtual hair based on the vertex color information corresponding to the virtual hair, includes: Based on the hair gathering function, the system receives hair gathering operations on the virtual hair using the virtual brush. The fourth editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The fourth editing result includes the virtual hair that gathers towards the specified gathering point. The specified gathering point is selected by the virtual brush based on the hair gathering operation. The vertex color information is automatically updated based on the hair gathering operation.

7. The method according to claim 2, characterized in that, The first hair adjustment function includes a hair length increase / decrease function and a hair gathering function. The hair length increase / decrease function is used to increase or decrease the hair length of the virtual hair, and the hair gathering function is used to gather the virtual hair toward a specified gathering point. The response to receiving the editing operation of the virtual hair based on the first hair adjustment function using the virtual brush, and the real-time display of the editing result of the virtual hair based on the vertex color information corresponding to the virtual hair, includes: Based on the hair length increase / decrease function and the hair gathering function, the system receives editing operations on the virtual hair via the virtual brush. The editing operations are used to simultaneously adjust the hair length of the virtual hair and gather the virtual hair. The comprehensive editing result of the virtual hair is displayed in real time based on the vertex color information corresponding to the virtual hair. The comprehensive editing result includes virtual hair that is lengthened or shortened according to a first adjustment range and converges towards the specified convergence point. The first adjustment range is positively correlated with the duration of the virtual brush operation based on the editing operation. The specified convergence point corresponds to the operation point of the virtual brush based on the editing operation. The vertex color information is automatically updated based on the editing operation.

8. The method according to any one of claims 1 to 7, characterized in that, The response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush, updating the vertex color information in real time based on the editing operation, and displaying the editing result of the virtual hair in real time based on the vertex color information, includes: In response to receiving the editing operation on the virtual hair via the virtual brush, the vertex color information corresponding to the virtual hair is automatically updated based on the operation data of the editing operation, wherein the vertex color information is used to indicate at least one of the editing information of the virtual hair's direction offset information and length change information; The editing results of the virtual hair are displayed in real time based on the vertex color information.

9. The method according to claim 8, characterized in that, The automatic updating of the vertex color information corresponding to the virtual hair based on the operation data of the editing operation includes: Based on at least one of the virtual brush's movement distance during the editing operation or the virtual brush's dwell time during the editing operation, the length change information in the vertex color information corresponding to the virtual hair is automatically updated, wherein the length change amplitude indicated in the length change information is positively correlated with at least one of the movement distance or the dwell time; or... Based on the movement trajectory of the virtual brush according to the editing operation, the direction offset information in the vertex color information corresponding to the virtual hair is automatically updated, and the hair direction indicated in the direction offset information corresponds to the movement direction of the movement trajectory.

10. The method according to claim 8, characterized in that, The method further includes: Store the vertex color information corresponding to the virtual hair; When the virtual scene includes a virtual object corresponding to the three-dimensional object model, the rendering effect of the virtual hair on the virtual object is displayed based on the vertex color information, and the rendering effect includes the editing result corresponding to the vertex color information.

11. The method according to claim 10, characterized in that, The storage of the vertex color information corresponding to the virtual hair includes: The first vertex color information of the virtual hair in the wind state is stored for the three-dimensional object model. The wind state refers to the state in which the virtual hair on the virtual object is blown by the wind when it is displayed in the virtual scene. The first vertex color information includes the directional offset information of the virtual hair when it is blown by the first wind force. The second vertex color information of the virtual hair in motion state is stored in the three-dimensional object model. The motion state refers to the state in which the virtual hair on the virtual object moves with the virtual object when it is displayed in the virtual scene. The second vertex color information includes the directional offset information of the virtual hair in the motion state. The third vertex color information of the virtual hair in the touch state is stored in the three-dimensional object model. The touch state refers to the state of the virtual hair on the virtual object when it is displayed in the virtual scene and subjected to the touch force. The third vertex color information includes the directional offset information of the virtual hair in the touch state.

12. A virtual hair editing device, characterized in that, The device includes: The display module is used to display the three-dimensional object model rendered in the three-dimensional editing space, wherein the three-dimensional object model includes virtual hair represented by the three-dimensional model structure; The display module is also used to display a hair adjustment area, which includes multiple hair adjustment functions, each of which is used to edit and adjust the virtual hair from different adjustment dimensions. The display module is further configured to, in response to receiving an editing operation on the virtual hair on the 3D object model via a virtual brush when a first hair adjustment function is selected among the plurality of hair adjustment functions, update the vertex color information in real time based on the editing operation, and display the editing result of the virtual hair in real time based on the vertex color information, wherein the vertex color information is used to indicate the changes of the virtual hair based on the editing operation, and the editing result includes the rendering effect obtained after adjusting the virtual hair according to the adjustment dimension of the first hair adjustment function.

13. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the virtual hair editing method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The storage medium stores at least one computer program, which is loaded and executed by a processor to implement the virtual hair editing method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the virtual hair editing method as described in any one of claims 1 to 11.