Method and device for rendering a virtual model of hair, computer device and storage medium

By breaking down hair into particle models and adjusting the pixel spacing, the problems of high memory usage and jagged edges in hair rendering are solved, improving rendering efficiency and realism.

CN114782605BActive Publication Date: 2026-02-06NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210488443.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2026-02-06
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

Existing technologies cause a rapid increase in the computer's video memory usage during hair rendering, resulting in low rendering efficiency and hair display issues such as distortion and jagged edges.

Method used

By rendering hair as a separate hair particle model, and determining the target hair particles based on particle attribute information and order parameters, the pixel spacing at the hair edges is adjusted to improve rendering efficiency and anti-aliasing effect.

Benefits of technology

It reduces the video memory usage of computer devices, improves hair rendering efficiency, enhances hair color smoothing and anti-aliasing effects, and improves the realism of hair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782605B_ABST
    Figure CN114782605B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a hair virtual model rendering method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect; obtaining a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate the distance sequence of each hair particle and a specified reference point in a model space; then, determining a target hair particle currently participating in rendering based on the hair particle sequence; finally, determining a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, rendering the hair segment rendering area, and obtaining a rendered hair virtual model. By splitting the hair into hair particles and then rendering, the memory occupation of the computer equipment can be reduced, the efficiency of hair rendering can be improved, and the color moderation and anti-aliasing effect of the hair during hair rendering can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer image processing technology, specifically to a rendering method, apparatus, computer device, and storage medium for a virtual hair model. Background Technology

[0002] With the continuous development of computer communication technology and the widespread use of terminals such as smartphones, tablets, and laptops, terminals are becoming increasingly diversified and personalized, becoming indispensable in people's lives and work. To satisfy people's pursuit of spiritual enrichment, entertainment games that can be played on these terminals have emerged, resulting in a growing number of such games. Terminal games have become an indispensable form of entertainment. To provide users with a better gaming experience, many terminal games are often based on real-world characters and scenes. Therefore, when designing games, the implementation of game scenes aims to be as close to reality as possible.

[0003] In actual game design projects, it's common to simulate human and animal characters, such as simulating their fur. To ensure proper fur display and avoid display errors due to changes in the game's perspective, semi-transparent sorting rendering and anti-aliasing are typically used for fur simulation. However, current techniques for implementing semi-transparent sorting rendering and anti-aliasing cause a rapid increase in the computer's video memory usage, resulting in low fur rendering efficiency. Summary of the Invention

[0004] This application provides a rendering method, apparatus, computer device, and storage medium for a virtual hair model. By simulating a hair particle model, the hair is broken down into hair particles before rendering, thereby reducing the video memory usage of the computer device and improving the efficiency of hair rendering. Furthermore, by adjusting the pixel spacing of the hair edges, the color smoothness and anti-aliasing effect of the hair can be improved during rendering.

[0005] This application provides a method for rendering a virtual hair model, including:

[0006] Obtain particle attribute information of hair particles in the hair particle model that simulates the target hair rendering effect;

[0007] Obtain the hair particle order parameters corresponding to the hair particle model, wherein the hair particle order parameters are used to indicate the proximity order of each hair particle to a specified reference point in the model space.

[0008] The target hair particles currently participating in rendering are determined based on the order of the hair particles.

[0009] Based on the particle attribute information of the target hair particle, a hair segment rendering area corresponding to the target hair particle is determined, the hair segment rendering area is rendered, and a rendered hair virtual model is obtained.

[0010] In some embodiments, after obtaining the hair particle sequence parameter corresponding to the hair particle model, the method further comprises:

[0011] Obtaining a hair layer particle number corresponding to the hair particle model, wherein the hair layer particle number is used to indicate the number of hair particles in each hair layer of the hair particle model, and the hair layer is obtained by layering the model space of the hair particle model based on the specified reference point;

[0012] Based on the hair layer particle number and the hair particle sequence, a target hair particle currently participating in rendering is determined.

[0013] In some embodiments, before obtaining the hair particle sequence parameter corresponding to the hair particle model, the method further comprises:

[0014] Based on the relative distance between the hair particle model and the specified reference point, and the specified coordinate axis of the model space, the model space is layered to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers;

[0015] Based on the relative distance and the total number of hair layers, a hair layer number corresponding to the hair layer in which all the hair particles in the hair particle model are located is determined;

[0016] Based on the hair layer number corresponding to the hair layer in which all the hair particles in the hair particle model are located, a hair layer particle number and a hair particle sequence parameter are determined.

[0017] In some embodiments, the method of layering the model space based on the relative distance between the hair particle model and the specified reference point, and the specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers comprises:

[0018] Determining a first distance value and a second distance value between the hair particle model and the specified reference point in the model space, wherein the first distance value is the closest distance between the hair particle model and the specified reference point, and the second distance value is the farthest distance between the hair particle model and the specified reference point;

[0019] Based on the first distance value, the second distance value, and the specified coordinate axis of the model space, the model space is layered to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers.

[0020] In some embodiments, after the model space is layered based on the first distance value, the second distance value, and the specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers, the method further comprises:

[0021] Determining a hair layer number corresponding to a hair layer in which the hair particle is located based on the first distance value, the second distance value, and a target distance value corresponding to the hair particle, wherein the target distance value is a distance value between the hair particle and the specified reference point;

[0022] Generating a hair layer identifier according to the hair layer number, and associating the hair layer identifier with the hair particle;

[0023] Performing prefix sum processing on the hair layer identifiers corresponding to all hair particles of the hair particle model to obtain a hair layer particle number.

[0024] In some embodiments, after the model space is layered based on the first distance value, the second distance value, and the specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers, the method further comprises:

[0025] Based on the hair layer identifiers corresponding to all hair particles of the hair particle model, sorting all hair particles of the hair particle model according to distance from the specified reference point from near to far to generate a hair particle order parameter.

[0026] In some embodiments, the method further comprises:

[0027] Based on the hair layer particle number and the hair particle order parameter, performing classification processing on all hair particles in the hair particle model to obtain a plurality of hair particle sets, wherein all hair particles in each hair particle set belong to the same hair layer, and all hair particles in each hair particle set are sequentially arranged in the hair particle set;

[0028] Generating a hair particle order result based on the plurality of hair particle sets;

[0029] Determining a target hair particle currently participating in rendering according to the hair particle order result.

[0030] In some embodiments, the determining of the hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, and the rendering of the hair segment rendering area to obtain a rendered hair virtual model, comprises:

[0031] Obtaining an initial hair width corresponding to the target hair particle based on the particle attribute information of the target hair particle;

[0032] determine a width adjustment value of the initial hair width according to a distance between the target hair particle and the specified reference point;

[0033] adjust the initial hair width based on the width adjustment value to obtain an adjusted hair width;

[0034] determine a plurality of area rendering vertices corresponding to a hair segment rendering area based on the adjusted hair width;

[0035] render a plurality of polygon meshes according to the plurality of area rendering vertices;

[0036] generate a hair virtual model based on the plurality of polygon meshes.

[0037] In some embodiments, after generating the hair virtual model based on the plurality of polygon meshes, the method further comprises:

[0038] determine a hair rendering pixel located in the hair segment rendering area;

[0039] determine a relative distance between the hair rendering pixel and a tangent of the hair particle as a pixel interval according to the tangent;

[0040] adjust a current transparency of the hair rendering pixel according to the pixel interval.

[0041] In some embodiments, the adjusting the current transparency of the hair rendering pixel according to the pixel interval comprises:

[0042] perform smoothness calculation based on a pixel width of the hair rendering pixel, the pixel interval, a preset conversion ratio, and a specified constant to obtain a transparency adjustment value of the hair rendering pixel;

[0043] adjust the current transparency of the hair rendering pixel based on the transparency adjustment value to obtain an adjusted hair rendering pixel.

[0044] Correspondingly, the present application also provides a rendering device of a hair virtual model, comprising:

[0045] a first obtaining unit configured to obtain particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect;

[0046] a second obtaining unit configured to obtain a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate a distance order of each hair particle from a specified reference point in a model space;

[0047] a first determining unit configured to determine a target hair particle currently participating in rendering based on the hair particle sequence.

[0048] The second determining unit is configured to determine a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, and render the hair segment rendering area to obtain a rendered virtual hair model.

[0049] In some embodiments, the apparatus further includes:

[0050] The first obtaining sub-unit is configured to obtain a hair layer particle number corresponding to the hair particle model, where the hair layer particle number is used to indicate a number of hair particles in each hair layer of the hair particle model, and the hair layer is obtained by layering a model space of the hair particle model based on the specified reference point.

[0051] The first determining sub-unit is configured to determine a target hair particle currently participating in rendering based on the hair layer particle number and the hair particle sequence.

[0052] In some embodiments, the apparatus further includes:

[0053] The first processing unit is configured to perform layering processing on the model space based on a relative distance between the hair particle model and the specified reference point and a specified coordinate axis of the model space, to obtain a plurality of hair layers and a total number of the plurality of hair layers.

[0054] The second determining sub-unit is configured to determine a hair layer number corresponding to a hair layer in which all hair particles in the hair particle model are located, based on the relative distance and the total number of the plurality of hair layers.

[0055] The second determining sub-unit is further configured to determine a hair layer particle number and a hair particle sequence parameter based on the hair layer number corresponding to the hair layer in which all hair particles in the hair particle model are located.

[0056] In some embodiments, the apparatus further includes:

[0057] The third determining sub-unit is configured to determine a first distance value and a second distance value between the hair particle model and the specified reference point in the model space, where the first distance value is a nearest distance between the hair particle model and the specified reference point, and the second distance value is a farthest distance between the hair particle model and the specified reference point.

[0058] The second processing unit is configured to perform layering processing on the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space, to obtain a plurality of hair layers and a total number of the plurality of hair layers.

[0059] In some embodiments, the apparatus further includes:

[0060] a fourth determining sub-unit, configured to determine a hair layer number corresponding to a hair layer where the hair particle is located based on the first distance value, the second distance value, and a target distance value corresponding to the hair particle, wherein the target distance value is a distance value between the hair particle and the specified reference point;

[0061] an association unit, configured to generate a hair layer identifier according to the hair layer number, and associate the hair layer identifier with the hair particle;

[0062] a third processing unit, configured to perform prefix sum processing on the hair layer identifiers corresponding to all the hair particles of the hair particle model, to obtain a hair layer particle number.

[0063] In some embodiments, the apparatus further includes:

[0064] a first generating unit, configured to sort all the hair particles of the hair particle model in order of distance from the specified reference point based on the hair layer identifiers corresponding to all the hair particles of the hair particle model, and generate a hair particle order parameter.

[0065] In some embodiments, the apparatus further includes:

[0066] a fourth processing unit, configured to perform classification processing on all the hair particles of the hair particle model based on the hair layer particle number and the hair particle order parameter, to obtain a plurality of hair particle sets, wherein all the hair particles in each hair particle set belong to a same hair layer, and all the hair particles in each hair particle set are arranged in order in the hair particle set;

[0067] a second generating unit, configured to generate a hair particle order result based on the plurality of hair particle sets;

[0068] a fifth determining sub-unit, configured to determine a target hair particle currently participating in rendering according to the hair particle order result.

[0069] In some embodiments, the apparatus further includes:

[0070] a second acquiring sub-unit, configured to acquire an initial hair width corresponding to the target hair particle based on particle attribute information of the target hair particle;

[0071] a sixth determining sub-unit, configured to determine a width adjustment value of the initial hair width according to a distance between the target hair particle and the specified reference point;

[0072] a first adjusting unit, configured to adjust the initial hair width based on the width adjustment value, to obtain an adjusted hair width;

[0073] The sixth determining sub-unit is further configured to determine a plurality of region rendering vertices corresponding to the hair segment rendering region based on the adjusted hair width.

[0074] The rendering unit is configured to render a plurality of polygon meshes according to the plurality of region rendering vertices.

[0075] The third generating unit is configured to generate a hair virtual model based on the plurality of polygon meshes.

[0076] In some embodiments, the apparatus further comprises:

[0077] The seventh determining sub-unit is configured to determine a hair rendering pixel located in the hair segment rendering region.

[0078] The seventh determining sub-unit is further configured to determine a relative distance between the hair rendering pixel and a tangent of the hair particle as a pixel interval according to the tangent.

[0079] The second adjusting unit is configured to adjust a current transparency of the hair rendering pixel according to the pixel interval.

[0080] In some embodiments, the apparatus further comprises:

[0081] The calculating unit is configured to perform smoothness calculation based on a pixel width of the hair rendering pixel, the pixel interval, a preset conversion ratio and a specified constant to obtain a transparency adjustment value of the hair rendering pixel.

[0082] The third adjusting unit is configured to adjust the current transparency of the hair rendering pixel based on the transparency adjustment value to obtain an adjusted hair rendering pixel.

[0083] Correspondingly, an embodiment of the present application further provides a computer device, which comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, and the computer program is executed by the processor to implement steps of any one of the rendering methods of the hair virtual model.

[0084] Correspondingly, an embodiment of the present application further provides a storage medium, which stores a computer program, and the computer program is executed by a processor to implement steps of any one of the rendering methods of the hair virtual model.

[0085] The embodiment of the present application provides a rendering method and device of a virtual hair model, computer equipment and a storage medium, the rendering method comprises the following steps: obtaining particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect; then, obtaining a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used for indicating the distance sequence of each hair particle and a specified reference point in a model space; then, determining a target hair particle currently participating in rendering based on the hair particle sequence; finally, determining a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, rendering the hair segment rendering area, and obtaining a rendered virtual hair model. The embodiment of the present application simulates a hair particle model, and renders the hair after the hair is split into hair particles, so that the memory occupation of the computer equipment is reduced, and the efficiency of hair rendering is improved; and by adjusting the pixel spacing of the hair edge, the color moderation of the hair and the anti-aliasing effect of the hair during hair rendering can be improved, so that the authenticity of the target hair is improved. BRIEF DESCRIPTION OF DRAWINGS

[0086] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0087] Figure 1 A flowchart of a rendering method of a virtual hair model provided by the embodiment of the present application.

[0088] Figure 2 A flowchart of a rendering method of a virtual hair model provided by the embodiment of the present application.

[0089] Figure 3 A structure diagram of a rendering device of a virtual hair model provided by the embodiment of the present application.

[0090] Figure 4 A structure diagram of a computer equipment provided by the embodiment of the present application. DETAILED DESCRIPTION

[0091] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0092] The embodiment of the present application provides a rendering method, device, computer equipment and storage medium of a hair virtual model. Specifically, the rendering method of the hair virtual model of the embodiment of the present application can be executed by a computer equipment, and the computer equipment can be a terminal equipment. The terminal equipment can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game machine, a personal computer (PC), a personal digital assistant (PDA) and the like.

[0093] For example, when the rendering method of the hair virtual model is executed by a terminal, the terminal equipment can provide a graphical user interface to a user in various ways, for example, the graphical user interface can be rendered and displayed on a display screen of the terminal equipment, or the graphical user interface can be presented by holographic projection. For example, the terminal equipment can include a touch display screen and a processor, the touch display screen is used to present a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface, the graphical user interface includes a display screen, and the processor is used to generate the graphical user interface, respond to the operation instruction and control the display of the graphical user interface on the touch display screen.

[0094] The embodiment of the present application provides a rendering method, device, computer equipment and storage medium of a hair virtual model, which are described in detail below. It should be noted that the order of the following embodiments is not limited as the preferred order of the embodiments.

[0095] Please refer to Figure 1 , Figure 1 A flowchart of a rendering method of a hair virtual model provided by the embodiment of the present application is shown, and the specific process can include the following steps 101 to 104.

[0096] 101, obtain particle attribute information of a hair particle in a hair particle model simulating a rendering effect of target hair.

[0097] In the embodiment of the present application, the particle attribute information includes a position of the hair particle in a model space and a tangent attribute of the hair particle.

[0098] 102, obtain a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate a distance order of each hair particle and a specified reference point in the model space.

[0099] In an embodiment, after the step of "obtaining the hair particle sequence parameter corresponding to the hair particle model", the method can include:

[0100] obtaining a hair layer particle number corresponding to the hair particle model, wherein the hair layer particle number is used to indicate a number of hair particles in each hair layer of the hair particle model, and the hair layer is obtained by layering a model space of the hair particle model based on the specified reference point;

[0101] determining a target hair particle currently participating in rendering based on the hair layer particle number and the hair particle sequence.

[0102] In another embodiment, before the step of "obtaining a hair particle sequence parameter corresponding to the hair particle model", the method can include:

[0103] layering the model space based on a relative distance between the hair particle model and the specified reference point and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers;

[0104] determining a hair layer number corresponding to a hair layer in which all hair particles in the hair particle model are located based on the relative distance and the total number of the plurality of hair layers;

[0105] determining a hair layer particle number and a hair particle sequence parameter based on the hair layer number corresponding to the hair layer in which all hair particles in the hair particle model are located.

[0106] Specifically, the step of "layering the model space based on a relative distance between the hair particle model and the specified reference point and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers", the method can include:

[0107] determining a first distance value and a second distance value between the hair particle model and the specified reference point in the model space, wherein the first distance value is a nearest distance between the hair particle model and the specified reference point, and the second distance value is a farthest distance between the hair particle model and the specified reference point;

[0108] layering the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers.

[0109] Further, after the step of "layering the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers", the method can include:

[0110] determine a hair layer number corresponding to the hair layer in which the hair particle is located based on the first distance value, the second distance value, and a target distance value corresponding to the hair particle, wherein the target distance value is a distance value between the hair particle and the specified reference point;

[0111] generate a hair layer identifier according to the hair layer number, and associate the hair layer identifier with the hair particle;

[0112] perform prefix and suffix processing on the hair layer identifiers corresponding to all the hair particles of the hair particle model to obtain a hair layer particle number.

[0113] In another embodiment, after the step of "performing hierarchical processing on the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers", the method can include:

[0114] sort all the hair particles of the hair particle model according to distance from the specified reference point from near to far based on the hair layer identifiers corresponding to all the hair particles of the hair particle model to generate a hair particle order parameter.

[0115] Optionally, in the embodiments of the present application, all the hair particles in the hair particle model can also be classified based on the hair layer particle number and the hair particle order parameter to obtain a plurality of hair particle sets, wherein all the hair particles in each hair particle set belong to the same hair layer, and all the hair particles in each hair particle set are arranged in order in the hair particle set; a hair particle order result is generated based on the plurality of hair particle sets; and a target hair particle currently participating in rendering is determined according to the hair particle order result.

[0116] 103, determine a target hair particle currently participating in rendering based on the hair particle order.

[0117] 104, determine a hair segment rendering area corresponding to the target hair particle based on particle attribute information of the target hair particle, render the hair segment rendering area, and obtain a rendered hair virtual model.

[0118] In order to make the target hair more realistic, the step of "determining a hair segment rendering area corresponding to the target hair particle based on particle attribute information of the target hair particle, rendering the hair segment rendering area, and obtaining a rendered hair virtual model" can include:

[0119] obtain an initial hair width corresponding to the target hair particle based on the particle attribute information of the target hair particle;

[0120] determining a width adjustment value of the initial hair width according to a distance between the target hair particle and the specified reference point;

[0121] adjusting the initial hair width based on the width adjustment value to obtain an adjusted hair width;

[0122] determining a plurality of area rendering vertices corresponding to a hair segment rendering area based on the adjusted hair width;

[0123] rendering a plurality of polygon meshes according to the plurality of area rendering vertices;

[0124] generating a virtual hair model based on the plurality of polygon meshes.

[0125] Further, after the step of “generating a virtual hair model based on the plurality of polygon meshes”, the method can comprise:

[0126] determining a hair rendering pixel located in the hair segment rendering area;

[0127] determining a relative distance between the hair rendering pixel and a tangent of the hair particle according to the tangent as a pixel interval;

[0128] adjusting a current transparency of the hair rendering pixel according to the pixel interval.

[0129] In order to improve the anti-aliasing effect of the target hair, the step of “adjusting a current transparency of the hair rendering pixel according to the pixel interval” can comprise:

[0130] performing smoothness calculation based on a pixel width of the hair rendering pixel, the pixel interval, a preset conversion ratio and a specified constant to obtain a transparency adjustment value of the hair rendering pixel;

[0131] adjusting the current transparency of the hair rendering pixel based on the transparency adjustment value to obtain an adjusted hair rendering pixel.

[0132] In summary, the embodiment of the present application provides a rendering method of a virtual hair model. On the one hand, the particle attribute information of the hair particles in a hair particle model simulating the rendering effect of target hair is obtained; then, the hair particle sequence parameter corresponding to the hair particle model is obtained; the target hair particle currently participating in rendering is determined based on the hair particle sequence; the hair segment rendering area corresponding to the target hair particle is determined based on the particle attribute information of the target hair particle, and the hair segment rendering area is rendered to obtain a rendered virtual hair model. By simulating a hair particle model and rendering the hair after being split into hair particles, the semi-transparent effect of the target hair can be accurately obtained. Moreover, since the embodiment of the present application does not need to create a linked list for each pixel, the consumption of computing resources during hair rendering is small, thereby reducing the memory occupation of the computer device and improving the efficiency of hair rendering. On the other hand, the embodiment of the present application can also expand each hair particle along the direction perpendicular to the hair tangent, and adjust the current transparency of the hair rendering pixel by adjusting the pixel spacing of the hair edge, so as to improve the color moderation of the hair and the anti-aliasing effect of the hair during hair rendering, thereby improving the authenticity of the target hair.

[0133] Specifically, the embodiment of the present application further provides a specific application method of the rendering method of the virtual hair model, and the specific method is as follows:

[0134] (1) The nearest distance Min and the farthest distance Max of the hair particles in the hair particle model from a virtual camera (i.e., a specified reference point) can be estimated at the central processing unit (CPU) end; then, the model space between the nearest distance Min and the farthest distance Max is divided into a specified number of hair layers (LayerCount) of hair layers (Layer); then, the hair particles are put into different Layers according to the distance between each hair particle and the specified reference point to realize approximate ordering. In the embodiment of the present application, the specified number can be 1024 or 2048, etc., which can be adjusted according to actual conditions. For example, by calculation, it can be obtained that the nearest distance Min and the farthest distance Max of the hair particle model are 20 cm and 40 cm respectively, and the embodiment of the present application can divide the model space between 20 cm and 40 cm into 1024 hair layers, and (40-20) / 1024 cm is the thickness of each hair layer, and each hair layer represents a distance interval.

[0135] (2) A data storage, as a LayerCount empty memory (Buffer), can be built on the GPU side, and the empty Buffer is named as CounterBuffer, which is used to store how many hair particles in each layer of hair layer; and a Buffer with a length of the total number of hair particle models (ParticleCount) can also be built on the GPU side, and the Buffer is named as RenderKeyBuffer, which is used to record the hair particle identification from near to far from the specified reference point.

[0136] (3) The position Xi of the hair particle i in the model space can be read on the GPU side in parallel, and after calculating the distance between the hair particle and the virtual camera, the layer number corresponding to the hair particle is calculated according to the following hair particle identification calculation formula, and then CounterBuffer[LayerId] is atomically incremented.

[0137]

[0138] Wherein, dis is the distance between the hair particle and the virtual camera, min is the nearest distance of the hair particle from the virtual camera (i.e. the specified reference point), and max is the farthest distance of the hair particle from the virtual camera (i.e. the specified reference point).

[0139] (4) After obtaining the layer number corresponding to each hair particle of the hair particle model, the CounterBuffer is calculated in parallel on the GPU side to obtain the total number of hair particles in each hair layer.

[0140] (5) After obtaining the layer number corresponding to each hair particle of the hair particle model, record [LayerId] in CounterBuffer as WritingPoint, and atomically increment CounterBuffer[LayerId]. Set RenderKeyBuffer[WritingPoint] as i, at this time, RenderKeyBuffer stores the Id of HairParticle from near to far.

[0141] (6) Please refer to Figure 2In the Vertex Shader, the target hair particle actually needed to be rendered in the RenderKeyBuffer is read according to the rendered hair mark, and the position of each rendering vertex of the hair particle is calculated according to the position and tangent attribute of the target hair particle in the model space. Then, in the Vertex Shader, the position corresponding to a PixelWidth is calculated according to the distance of the target hair particle from the virtual camera. The target width of the target hair particle is obtained by adding the hair width and the PixelWidth.

[0142] (7) In the Pixel Shader, the PixelWidth and the PixelDistance are determined respectively. The coverage degree of the hair on the current pixel is calculated according to the smoothness calculation formula, so as to calculate the Alpha value of the current pixel. Finally, the GPU hardware is used for Alpha blending of the pixel.

[0143] smoothstep(0, 1, Pixelwidth-lengthtopixel x (Pixeldistance) + 0.5)

[0144] Wherein, LenghtToPixel is the conversion ratio of the length in the world space to the length in the pixel space under the current depth; 0.5 is an empirical value, which can be replaced according to the actual situation.

[0145] Specifically, for y = smoothstep(0, 1, x), wherein x is replaced by the above

Pixelwidth-lengthtopixel x (Pixeldistance) + 0.5

[0146] In order to better implement the rendering method of the hair virtual model provided in the embodiments of the present application, the embodiments of the present application further provide a rendering device based on the above hair virtual model. The meanings of the terms are the same as those in the rendering method of the hair virtual model, and the specific implementation details can be referred to the description in the method embodiments.

[0147] Please refer to Figure 3 , Figure 3 A structure diagram of a rendering device of a hair virtual model provided in the embodiments of the present application is shown in the figure, and the device comprises:

[0148] The first obtaining unit 201 is configured to obtain particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect.

[0149] The second obtaining unit 202 is configured to obtain a hair particle sequence parameter corresponding to the hair particle model, where the hair particle sequence parameter is used to indicate a distance order of each hair particle from a specified reference point in a model space.

[0150] The first determining unit 203 is configured to determine a target hair particle currently participating in rendering based on the hair particle sequence.

[0151] The second determining unit 204 is configured to determine a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, and perform rendering on the hair segment rendering area to obtain a rendered virtual hair model.

[0152] In some embodiments, the apparatus further includes:

[0153] The first obtaining sub-unit is configured to obtain a number of hair layer particles corresponding to the hair particle model, where the number of hair layer particles is used to indicate a number of hair particles in each hair layer of the hair particle model, and the hair layer is obtained by layering the model space of the hair particle model based on the specified reference point.

[0154] The first determining sub-unit is configured to determine a target hair particle currently participating in rendering based on the number of hair layer particles and the hair particle sequence.

[0155] In some embodiments, the apparatus further includes:

[0156] The first processing unit is configured to perform layering processing on the model space based on a relative distance between the hair particle model and the specified reference point and a specified coordinate axis of the model space, to obtain a plurality of hair layers and a total number of the plurality of hair layers.

[0157] The second determining sub-unit is configured to determine a hair layer number corresponding to a hair layer in which all hair particles in the hair particle model are located, based on the relative distance and the total number of the plurality of hair layers.

[0158] The second determining sub-unit is further configured to determine the number of hair layer particles and the hair particle sequence parameter based on the hair layer number corresponding to the hair layer in which all hair particles in the hair particle model are located.

[0159] In some embodiments, the apparatus further includes:

[0160] a third determining sub-unit, configured to determine a first distance value and a second distance value between the hair particle model and the specified reference point in the model space, wherein the first distance value is a nearest distance between the hair particle model and the specified reference point, and the second distance value is a farthest distance between the hair particle model and the specified reference point;

[0161] a second processing unit, configured to perform hierarchical processing on the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space, to obtain a plurality of hair layers and a total number of the plurality of hair layers.

[0162] In some embodiments, the apparatus further includes:

[0163] a fourth determining sub-unit, configured to determine a hair layer number corresponding to a hair layer in which the hair particle is located based on the first distance value, the second distance value, and a target distance value corresponding to the hair particle, wherein the target distance value is a distance value between the hair particle and the specified reference point;

[0164] an associating unit, configured to generate a hair layer identifier according to the hair layer number, and associate the hair layer identifier with the hair particle;

[0165] a third processing unit, configured to perform prefix sum processing on hair layer identifiers corresponding to all hair particles of the hair particle model, to obtain a hair layer particle number.

[0166] In some embodiments, the apparatus further includes:

[0167] a first generating unit, configured to sort all hair particles of the hair particle model in order of distance from the specified reference point from near to far based on hair layer identifiers corresponding to the hair particles, to generate a hair particle order parameter.

[0168] In some embodiments, the apparatus further includes:

[0169] a fourth processing unit, configured to perform classification processing on all hair particles in the hair particle model based on the hair layer particle number and the hair particle order parameter, to obtain a plurality of hair particle sets, wherein all hair particles in each hair particle set belong to a same hair layer, and all hair particles in each hair particle set are arranged in order in the hair particle set;

[0170] a second generating unit, configured to generate a hair particle ordering result based on the plurality of hair particle sets.

[0171] a fifth determining sub-unit, configured to determine a target hair particle currently participating in rendering according to the hair particle ordering result.

[0172] In some embodiments, the apparatus further includes:

[0173] a second obtaining sub-unit, configured to obtain an initial hair width corresponding to the target hair particle based on the particle attribute information of the target hair particle;

[0174] a sixth determining sub-unit, configured to determine a width adjustment value of the initial hair width according to a distance between the target hair particle and the specified reference point;

[0175] a first adjusting unit, configured to adjust the initial hair width based on the width adjustment value to obtain an adjusted hair width;

[0176] The sixth determining sub-unit is further configured to determine a plurality of area rendering vertices corresponding to a hair segment rendering area based on the adjusted hair width.

[0177] a rendering unit, configured to render a plurality of polygon meshes according to the plurality of area rendering vertices.

[0178] a third generating unit, configured to generate a virtual hair model based on the plurality of polygon meshes.

[0179] In some embodiments, the apparatus further includes:

[0180] a seventh determining sub-unit, configured to determine a hair rendering pixel located in the hair segment rendering area;

[0181] The seventh determining sub-unit is further configured to determine a relative distance between the hair rendering pixel and a tangent of the hair particle as a pixel interval according to the tangent.

[0182] a second adjusting unit, configured to adjust a current transparency of the hair rendering pixel according to the pixel interval.

[0183] In some embodiments, the apparatus further includes:

[0184] a calculating unit, configured to perform smoothness calculation based on a pixel width of the hair rendering pixel, the pixel interval, a preset conversion ratio, and a specified constant to obtain a transparency adjustment value of the hair rendering pixel;

[0185] a third adjusting unit, configured to adjust the current transparency of the hair rendering pixel based on the transparency adjustment value to obtain an adjusted hair rendering pixel.

[0186] The embodiment of the present application provides a rendering device of a hair virtual model, the particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect is acquired by a first acquisition unit 201; a hair particle sequence parameter corresponding to the hair particle model is acquired by a second acquisition unit 202, wherein the hair particle sequence parameter is used for indicating the far and near sequence of each hair particle and a specified reference point in a model space; a target hair particle currently participating in rendering is determined based on the hair particle sequence by a first determination unit 203; the hair segment rendering area corresponding to the target hair particle is determined based on the particle attribute information of the target hair particle by a second determination unit 204, the hair segment rendering area is rendered, and a rendered hair virtual model is obtained. The embodiment of the present application can accurately simulate the translucent effect of the target hair by simulating the generation of a hair particle model and rendering the hair after the hair is split into hair particles, and can effectively reduce the video memory occupation of the computer device and improve the efficiency of hair rendering. On the other hand, the embodiment of the present application can also expand each hair particle along the direction perpendicular to the hair tangent, adjust the pixel spacing of the hair edge, adjust the current transparency of the hair rendering pixel, improve the color moderation of the hair and the anti-aliasing effect of the hair during hair rendering, and thus improve the authenticity of the target hair.

[0187] Correspondingly, the embodiment of the present application also provides a computer device, which can be a terminal or a server, and the terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA) and the like. As shown in Figure 4 Figure 4 The computer device provided by the embodiment of the present application is a structural schematic diagram. The computer device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected with the memory 302. Those skilled in the art can understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0188] The processor 301 is the control center of the computer device 300, and connects all parts of the computer device 300 through various interfaces and lines. By running or loading the software program and / or module stored in the memory 302 and calling the data stored in the memory 302, the processor 301 performs various functions and processes data of the computer device 300, thereby overall monitoring the computer device 300.​

[0189] In the embodiments of the present application, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more application programs into the memory 302 and runs the application programs stored in the memory 302 by the processor 301 to implement various functions according to the following steps:

[0190] Obtain particle attribute information of the hair particles in the hair particle model simulating the target hair rendering effect;

[0191] Obtain a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate the distance order of each hair particle from a specified reference point in a model space;

[0192] Determine a target hair particle currently participating in rendering based on the hair particle sequence;

[0193] Determine a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, render the hair segment rendering area, and obtain a rendered hair virtual model.

[0194] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described here.

[0195] Optionally, as shown in FIG. 3, Figure 4 The computer device 300 further includes a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected with the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that the computer device structure shown in FIG. 3 does not constitute a limitation on the computer device, and can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements. Figure 4 The computer device structure shown in FIG. 3 does not constitute a limitation on the computer device, and can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements.

[0196] The touch display screen 303 can be used to display a graphical player interface and receive operation instructions generated by the player acting on the graphical player interface. The touch display screen 303 can include a display panel and a touch panel. The display panel can be used to display information input by the player or provided to the player and various graphical player interfaces of the computer device, which can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations (such as operations of the player using a finger, a stylus or any suitable object or accessory on or near the touch panel) on or near it and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the player and detects the signals generated by the touch operation, and transmits the signals to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 301, and can receive commands from the processor 301 and execute them. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits to the processor 301 to determine the type of touch event, and then the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can realize the input and output functions as two independent components. That is, the touch display screen 303 can also realize the input function as part of the input unit 306.

[0197] In the embodiments of the present application, the processor 301 executes the game application to generate a graphical player interface on the touch display screen 303. The touch display screen 303 is used to present the graphical player interface and receive operation instructions generated by the player acting on the graphical player interface.

[0198] The radio frequency circuit 304 can be used to transceive radio frequency signals to establish wireless communication with network devices or other computer devices, and transceive signals between network devices or other computer devices.

[0199] The audio circuit 305 can be used to provide an audio interface between the player and the computer device through a speaker and a microphone. The audio circuit 305 can convert the received audio data into an electrical signal and transmit the electrical signal to the speaker for conversion into a sound signal and output; on the other hand, the microphone collects a sound signal and converts the sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then output to the processor 301 for processing, and then transmitted to another computer device through the radio frequency circuit 304, or output to the memory 302 for further processing. The audio circuit 305 can also include a earphone jack to provide communication between an external earphone and the computer device.

[0200] The input unit 306 can be used to receive inputted numbers, character information or player feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to player settings and function controls.

[0201] The power supply 307 is used to supply power to various components of the computer device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can realize functions such as management of charging, discharging and power consumption management. The power supply 307 can also include one or more direct current or alternating current power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.

[0202] Although Figure 4 The computer device 300 can also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which are not shown in the embodiment.

[0203] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0204] As can be seen from the above, the computer device provided by the embodiment can simulate a hair particle model to split the hair into hair particles for rendering, can accurately achieve the translucent effect of the target hair, and can effectively reduce the memory occupation of the computer device and improve the efficiency of hair rendering. On the other hand, the embodiment of the present application can also expand each hair particle along the direction perpendicular to the hair tangent, adjust the pixel spacing of the hair edge, adjust the current transparency of the hair rendering pixel, improve the color moderation of the hair and the anti-aliasing effect of the hair during hair rendering, and thus improve the authenticity of the target hair.

[0205] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by relevant hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0206] To this end, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of computer programs capable of being loaded by a processor to execute the steps in any of the rendering methods of the virtual hair model provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0207] Obtaining particle attribute information of a hair particle in a hair particle model simulating a rendering effect of a target hair;

[0208] Obtaining a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate a distance sequence of each hair particle from a specified reference point in a model space;

[0209] Determining a target hair particle currently participating in rendering based on the hair particle sequence;

[0210] Determining a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, rendering the hair segment rendering area, and obtaining a rendered virtual hair model.

[0211] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described here.

[0212] The storage medium can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0213] Since the computer program stored in the storage medium can execute the steps in any of the rendering methods of the virtual hair model provided by the embodiments of the present application, the beneficial effects of any of the rendering methods of the virtual hair model provided by the embodiments of the present application can be achieved, which will not be described here in detail.

[0214] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0215] The rendering method and device of the virtual hair model, the computer device, and the storage medium are described in detail above, and the principles and implementation manners of the present application are described by using specific examples. The above embodiment description is only used to help understand the technical solutions and core ideas of the present application. Those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of rendering a virtual model of hair, the method comprising: The method comprises: obtaining particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect; obtaining a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate the order of distance of each hair particle from a specified reference point in a model space; determining a target hair particle currently participating in rendering based on the hair particle sequence; determining a hair segment rendering area corresponding to the target hair particle based on the particle attribute information of the target hair particle, rendering the hair segment rendering area, and obtaining a rendered virtual hair model; The method comprises: obtaining an initial hair width corresponding to the target hair particle based on the particle attribute information of the target hair particle; determining a width adjustment value of the initial hair width according to the distance of the target hair particle from the specified reference point; adjusting the initial hair width based on the width adjustment value to obtain an adjusted hair width; determining a plurality of area rendering vertices corresponding to the hair segment rendering area based on the adjusted hair width; rendering a plurality of polygon meshes according to the plurality of area rendering vertices; generating a virtual hair model based on the plurality of polygon meshes.

2. The method of rendering a virtual model of hair of claim 1, wherein, After obtaining the hair particle sequence parameter corresponding to the hair particle model, the method further comprises: obtaining a hair layer particle number corresponding to the hair particle model, wherein the hair layer particle number is used to indicate the number of hair particles in each hair layer of the hair particle model, and the hair layer is obtained by layering the model space of the hair particle model based on the specified reference point; determining a target hair particle currently participating in rendering based on the hair layer particle number and the hair particle sequence.

3. The method of rendering a virtual model of hair of claim 2, wherein, Before obtaining the hair particle sequence parameter corresponding to the hair particle model, the method further comprises: layering the model space based on the relative distance between the hair particle model and the specified reference point and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of the plurality of hair layers; determining the hair layer number corresponding to the hair layer in which all the hair particles in the hair particle model are located based on the relative distance and the total number of the plurality of hair layers; determining the hair layer particle number and the hair particle sequence parameter based on the hair layer number corresponding to the hair layer in which all the hair particles in the hair particle model are located.

4. The method of rendering a virtual model of hair of claim 3, wherein, The method comprises: determining a first distance value and a second distance value between the hair particle model and the specified reference point in the model space, wherein the first distance value is the closest distance between the hair particle model and the specified reference point, and the second distance value is the farthest distance between the hair particle model and the specified reference point; Layer the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers.

5. The method of rendering a virtual model of hair of claim 4, wherein, After layering the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers, the method further comprises: Determine the hair layer number corresponding to the hair particle based on the first distance value, the second distance value, and a target distance value corresponding to the hair particle, wherein the target distance value is the distance value between the hair particle and the specified reference point; Generate a hair layer identifier according to the hair layer number and associate the hair layer identifier with the hair particle; Perform prefix and suffix processing on the hair layer identifiers corresponding to all hair particles of the hair particle model to obtain a hair layer particle number.

6. The method of rendering a virtual model of hair of claim 5, wherein, After layering the model space based on the first distance value, the second distance value, and a specified coordinate axis of the model space to obtain a plurality of hair layers and a total number of hair layers of the plurality of hair layers, the method further comprises: Sort all hair particles of the hair particle model according to the distance from the specified reference point from near to far based on the hair layer identifiers corresponding to all hair particles of the hair particle model to generate a hair particle sequence parameter.

7. The method of rendering a virtual model of hair of claim 5, wherein, Further comprising: Classify all hair particles in the hair particle model based on the hair layer particle number and the hair particle sequence parameter to obtain a plurality of hair particle sets, wherein all hair particles in each hair particle set belong to the same hair layer, and all hair particles in each hair particle set are sequentially arranged in the hair particle set; Generate a hair particle sorting result based on the plurality of hair particle sets; Determine the target hair particle currently participating in rendering according to the hair particle sorting result.

8. The method of rendering a virtual model of hair of claim 1, wherein, After generating the virtual hair model based on the plurality of polygon meshes, the method further comprises: Determine a hair rendering pixel located in the hair segment rendering area; Determine the relative distance between the hair rendering pixel and the tangent line as a pixel interval according to the tangent line of the hair particle; Adjust the current transparency of the hair rendering pixel according to the pixel interval.

9. The method of rendering a virtual model of hair according to claim 8, wherein, The adjustment of the current transparency of the hair rendering pixel according to the pixel interval comprises: Perform smoothness calculation based on the pixel width of the hair rendering pixel, the pixel interval, a preset conversion ratio, and a specified constant to obtain a transparency adjustment value of the hair rendering pixel; Adjust the current transparency of the hair rendering pixel based on the transparency adjustment value to obtain an adjusted hair rendering pixel.

10. A rendering apparatus of a virtual model of hair, characterized in that, The method comprises: A first acquisition unit configured to acquire particle attribute information of a hair particle in a hair particle model simulating a target hair rendering effect; A second acquisition unit is configured to acquire a hair particle sequence parameter corresponding to the hair particle model, wherein the hair particle sequence parameter is used to indicate the order of distance of each hair particle from a specified reference point in a model space. A first determination unit is configured to determine a target hair particle currently participating in rendering based on the hair particle sequence. A second determination unit is configured to determine a hair segment rendering region corresponding to the target hair particle based on particle attribute information of the target hair particle, and perform rendering on the hair segment rendering region to obtain a rendered hair virtual model. The determination of the hair segment rendering region corresponding to the target hair particle based on the particle attribute information of the target hair particle, and the rendering on the hair segment rendering region to obtain the rendered hair virtual model, include: acquiring an initial hair width corresponding to the target hair particle based on the particle attribute information of the target hair particle; determining a width adjustment value of the initial hair width according to the distance of the target hair particle from the specified reference point; adjusting the initial hair width based on the width adjustment value to obtain an adjusted hair width; determining a plurality of region rendering vertices corresponding to the hair segment rendering region based on the adjusted hair width; rendering a plurality of polygon meshes according to the plurality of region rendering vertices; generating a hair virtual model based on the plurality of polygon meshes.

11. A computer device, characterized by The computer device includes a memory and a processor, the memory stores a computer program, and the processor calls the computer program stored in the memory to execute the steps in the rendering method of the hair virtual model according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the rendering method of the hair virtual model according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system of rendering particle

    US20070159049A1

  • Display rendering method and system

    WO2019123213A1