Method, device, medium and program product for efficient real-time game image rendering

By combining interpolation and shell rendering methods, along with vertex baking models and virtual particles, the problem of layering in in-game animal fur rendering was solved, achieving efficient and realistic fur rendering effects suitable for real-time rendering on mobile platforms.

CN118823201BActive Publication Date: 2025-11-04BEIJING DELPHI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410749884.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2025-11-04
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Existing technologies produce poor results in rendering animal fur in games, are prone to tearing, and have low rendering efficiency, making them unsuitable for real-time rendering on mobile platforms.

Method used

The outer layer of hair and the inner layer of down are created using insert and shell methods. Combined with vertex baking models and virtual particles, the position and shape of the hair are accurately rendered by adjusting second-order Bézier curves and physical parameters.

Benefits of technology

It improves rendering quality and accuracy, reduces computation and video memory usage, and achieves efficient real-time rendering on mobile platforms, making it suitable for physical representation and real-time interaction on mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823201B_ABST
    Figure CN118823201B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method, device, medium and program product for efficient real-time game image rendering, the method comprising: establishing outer hair of a target object in a to-be-rendered picture using a patch manner, and establishing undercoat of the target object using a shell manner; obtaining hair root vertex information of the outer hair and the undercoat according to a vertex baking model, wherein the vertex baking model is composed of N triangular faces, N is a vertex number of the target object, and one triangular face corresponds to one pixel of a map; generating each position from a hair root to a hair top according to the hair root vertex information and a virtual particle position, and corresponding the each position to a corresponding pixel on a screen, performing rasterization processing on the pixel, and obtaining a target rendering image. Some embodiments of the present application can improve rendering quality, so that the rendered image is more realistic.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of picture rendering, and in particular, to a method, device, medium and program product for efficient real-time game image rendering. BACKGROUND

[0002] In the field of picture rendering, there are many rendering scenes, including rendering of animal hair in a game. In related technologies, a scheme for real-time rendering of animal hair in a game includes: manually creating hair patches on the surface of an object by an art personnel in a digital asset generation software, then assigning a separate material to the hair patches during rendering, and rendering the model stack multiple times, moving the vertices along the normal direction by a distance each time, and cooperating with pixel-level clipping to stack the shape of the hair. However, the above technical scheme has poor rendering effect, and is prone to the situation of broken layers, and the hair may disappear when viewed from the side.

[0003] Therefore, how to improve the rendering quality to make the rendered image more realistic becomes a problem to be solved. SUMMARY

[0004] Embodiments of the present application provide a method, device, medium and program product for efficient real-time game image rendering, which can at least improve the rendering quality and make the rendered image more realistic through some embodiments of the present application.

[0005] In a first aspect, the present application provides a method for efficient real-time game image rendering, the method comprising: establishing outer hair of a target object in a to-be-rendered picture using a patch method, and establishing undercoat of the target object using a shell method; obtaining hair root vertex information of the outer hair and the undercoat according to a vertex baking model, wherein the vertex baking model is composed of N triangular faces, N is the number of vertices of the target object, and one triangular face corresponds to one pixel of a map; generating each position from a hair root to a hair top according to the hair root vertex information and a position of a virtual mass point, and corresponding the each position to a corresponding pixel on a screen, performing rasterization processing on the pixel, and obtaining a target rendering image.

[0006] Therefore, embodiments of the present application can simulate animal hair realistically and improve the realism of rendering by rendering the outer hair and the undercoat of the target object; and can accurately render each position by generating each position from the hair root to the hair top, thereby improving the rendering accuracy.

[0007] In an embodiment of the first aspect, the method further comprises: obtaining the hair root vertex information of the outer layer hair and the under layer fluff according to a vertex baking model, including: calculating vertex animation in the process of rendering and writing the position of the target object in the vertex baking model into a corresponding pixel point; calculating vertex animation and writing the normal and tangent information of the vertex of the target object in the vertex baking model into a corresponding pixel point to obtain the hair root vertex information.

[0008] Therefore, the embodiments of the present application can ensure that the pixel point corresponding to the target object includes accurate data through twice rendering, thereby improving the rendering accuracy.

[0009] In an embodiment of the first aspect, the method further comprises: determining the position of a virtual particle corresponding to each vertex of the target object before generating each position from the hair root to the hair top according to the hair root vertex information and the position of the virtual particle, wherein the virtual particle is arranged on the target object, and the position of the virtual particle includes position information of a current frame and position information of a previous frame.

[0010] Therefore, the embodiments of the present application can reduce the amount of positioning data by arranging the virtual particle, and can reduce the amount of calculation by arranging the virtual particle on the target object, thereby ensuring the rendering efficiency.

[0011] In an embodiment of the first aspect, the method further comprises: generating a position map of the virtual particle corresponding to each vertex and updating the position of the virtual particle and writing into a corresponding pixel point; and performing interpolation calculation on the hair root vertex information and the position map of the virtual particle to obtain each position from the hair root to the hair top, wherein the interpolation calculation is completed through the second-order Bezier curve.

[0012] Therefore, the embodiments of the present application can accurately obtain each position from the hair root to the hair top by performing interpolation calculation on the hair root vertex information and the position map of the virtual particle.

[0013] In an embodiment of the first aspect, the method further comprises: generating an insert piece perpendicular to the normal direction of the surface of the target object for each edge of the target object, and using the insert piece to establish the outer layer hair of the target object in the to-be-rendered picture.

[0014] In combination with the first aspect, in an embodiment of the present application, the vertex information of the target object comprises a vertex ID, an X channel of a vertex texture map coordinate, and a Y channel of the vertex texture map coordinate.

[0015] In combination with the first aspect, in an embodiment of the present application, before the step of corresponding the each position to a corresponding pixel on the screen, the method further comprises: obtaining parameters for characterizing inertia, gravity, and wind force; adjusting the each position by using the parameters to obtain each target position; and the step of corresponding the each position to a corresponding pixel on the screen comprises corresponding the each target position to a corresponding pixel on the screen.

[0016] Therefore, by using the parameters for characterizing inertia, gravity, and wind force to adjust and render each position, the embodiment of the present application can simulate the swing style of the hair of the target object in the moving process, thereby improving the accuracy and reality of the rendering.

[0017] In a second aspect, the present application provides a device for efficiently and real-timely rendering a game image, and the device comprises:

[0018] The model establishing module is configured to establish outer hair of a target object in a to-be-rendered picture by using a patch mode, and establish undercoat of the target object by using a shell mode.

[0019] The vertex calculating module is configured to obtain hair root vertex information of the outer hair and the undercoat according to a vertex baking model, wherein the vertex baking model is composed of N triangular faces, N is a vertex number of the target object, and one triangular face corresponds to one pixel of a map.

[0020] The image rendering module is configured to generate each position from a hair root to a hair top according to the hair root vertex information and a position of a virtual mass point, and correspond the each position to a corresponding pixel on the screen, perform rasterization processing on the pixel, and obtain a target rendering image.

[0021] In combination with the second aspect, in an embodiment of the present application, the vertex calculating module is further configured to: solve vertex animation in a rendering process and write a position of the target object in the vertex baking model into a corresponding pixel point; solve vertex animation and write normal and tangent information of a vertex of the target object in the vertex baking model into the corresponding pixel point, to obtain the hair root vertex information.

[0022] In combination with the second aspect, in an embodiment of the present application, the image rendering module is further configured to determine the position of each virtual particle corresponding to each vertex included in the target object, wherein the virtual particle is arranged on the target object, and the position of the virtual particle includes position information of a current frame and position information of a previous frame.

[0023] In combination with the second aspect, in an embodiment of the present application, the image rendering module is further configured to render a position map of the virtual particle corresponding to each vertex, and update the position of the virtual particle and write the corresponding pixel point; perform interpolation calculation on the hair root vertex information and the position map of the virtual particle to obtain each position from the hair root to the hair top, wherein the interpolation calculation is completed through the second-order Bezier curve.

[0024] In combination with the second aspect, in an embodiment of the present application, the model establishing module is further configured to generate a patch perpendicular to the normal direction of the surface of each edge of the target object, and use the patch to establish the outer hair of the target object in the to-be-rendered picture.

[0025] In combination with the second aspect, in an embodiment of the present application, the vertex information of the target object includes a vertex ID, an X channel of vertex texture mapping coordinates, and a Y channel of vertex texture mapping coordinates.

[0026] In combination with the second aspect, in an embodiment of the present application, the image rendering module is further configured to obtain parameters for representing inertia, gravity, and wind force; adjust the each position through the parameters to obtain each target position; and correspond the each target position to a corresponding pixel on the screen.

[0027] In a third aspect, the present application provides an electronic device, comprising a processor, a memory, and a bus; the processor is connected to the memory through the bus, the memory stores a computer program, and the computer program is executed by the processor to implement the method according to any embodiment of the first aspect.

[0028] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed to implement the method according to any embodiment of the first aspect.

[0029] In a fifth aspect, the present application provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed to implement the method according to any embodiment of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1A method flowchart of game image rendering shown by an embodiment of the present application;

[0031] Figure 2 One of the rendering schematic diagrams shown by an embodiment of the present application;

[0032] Figure 3 The second rendering schematic diagram shown by an embodiment of the present application;

[0033] Figure 4 The third rendering schematic diagram shown by an embodiment of the present application;

[0034] Figure 5 The fourth rendering schematic diagram shown by an embodiment of the present application;

[0035] Figure 6 A device composition schematic diagram of the method of game image rendering shown by an embodiment of the present application;

[0036] Figure 7 An electronic device composition schematic diagram shown by an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the accompanying drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0038] In the related art, an artist uses a digital asset production software to place a hair plug model on a model surface and render a separate material, with defects as follows: first, the artistic production process is complex, the industrial production and iteration cycle is long, resulting in extremely high production cost; second, the flexibility is poor, and it is impossible to dynamically adjust according to platform performance, detail level, etc., resulting in performance waste; third, the effect is not ideal, and it is difficult to express the messy, dense and fine fur effect of animals.

[0039] In addition, the runtime renders the model stack multiple times, each time moving the vertices along the normal direction by a distance, and in combination with pixel-level clipping, the technical solution of stacking the shape of the hair is defective in that: first, the effect is not ideal, and there are faults in the performance, and the hair disappears when viewed from the side; second, the rendering efficiency is low, the number of vertices is huge, and a large number of pixels are discarded, causing great performance waste.

[0040] In addition, the above two hair rendering schemes also do not solve the physical performance, shadow rendering, production process, and the like of the target object, and therefore, the rendering scheme in the related art is not applicable to real-time rendering of mobile platform games.

[0041] The embodiments of the present application can be applied to the scene of real-time rendering of mobile platform games, and specifically, the animal hair in the scene can be rendered, including real-time hair rendering of a mobile terminal, hair animation support, and physical simulation of hair.

[0042] The following illustrates a specific implementation of a real-time rendering method provided by some embodiments of the present application by taking a mobile device as an example. It can be understood that the execution subject of the embodiments of the present application can be any electronic device capable of running the method, which can be a computer, a tablet computer, and the like, and the above mobile device is only an example, and the present application does not limit this.

[0043] At least to solve the problems in the background art, as Figure 1 illustrated, some embodiments of the present application provide a method for efficient real-time game image rendering, which includes:

[0044] S110, using a patch to establish the outer hair of the target object in the to-be-rendered picture, and using a shell to establish the bottom fur of the target object.

[0045] Specifically, a patch perpendicular to the normal direction of the surface of each edge of the target object is generated, and the patch is used to establish the outer hair of the target object in the to-be-rendered picture.

[0046] That is, as Figures 2-5 illustrated, the original model of the target object in the to-be-rendered picture can be as Figure 2 illustrated, for example, Figure 2 may be a bird without rendered feathers, based on Figure 2 each edge of the original model as illustrated in the original model, each edge of the original model is first confirmed, and then a patch perpendicular to the surface normal direction on each edge is established, to obtain a patch model as Figure 3 illustrated, the hair of the target object is established based on the patch model.

[0047] After obtaining the patch model, the long and thick outer layer guard hairs of the target object in the picture to be rendered are established by using the patch, and the outer layer hairs are as shown in Figure 4 It can be understood that the length of the outer layer hairs can be greater than the length of the bottom layer down hairs, and the top points are moved along the normal direction by a distance by using the shell to stack, to obtain the disordered and thin bottom layer down hairs of the target object close to the skin as shown in Figure 5

[0048] Therefore, by rendering the outer layer hairs and the bottom layer down hairs of the target object, the embodiment of the present application can simulate the animal hairs realistically, and combines the advantages of the patch and the shell, to improve the reality of rendering.

[0049] As a specific embodiment of the present application, the vertex information of the target object includes: a vertex ID, an X channel of a vertex texture map coordinate, and a Y channel of the vertex texture map coordinate.

[0050] That is, the embodiment of the present application optimizes the bandwidth occupation while integrating the rendering, animation and physical simulation steps. That is, each drawing step uses a specific pre-generated model for drawing. Since the position, vector and physical information of the hair vertex are baked into the map in advance, only the minimum vertex information needs to be retained on the pre-generated model.

[0051] The patch model for drawing needs to determine the vertex position, the vertex color and the triangle index:

[0052] The vertex position includes: an X channel (that is, a vertex ID, used to identify the position of the vertex corresponding to the vertex information graph), a Y channel (that is, an X channel of a vertex texture map coordinate, used for main texture sampling) and a Z channel (that is, a Y channel of a vertex texture map coordinate, used for main texture sampling).

[0053] The vertex color includes: an R channel (that is, a current hair layer ID), a G channel (that is, a total number of current hair layers), a B channel (that is, a transition value of a current hair layer (gradual change from hair root 0 to hair tip 1)) and an A channel (not used, reserved).

[0054] The triangle index includes: a triangle number.

[0055] The model for drawing the shell needs to determine the vertex position and the triangle index:

[0056] The vertex position includes: an X channel (that is, a vertex ID, used to identify the position of the vertex corresponding to the vertex information graph), a Y channel (that is, an X channel of a vertex texture map coordinate, used for main texture sampling) and a Z channel (that is, a Y channel of a vertex texture map coordinate, used for main texture sampling).

[0057] ​The triangle index includes: triangle number.

[0058] Therefore, by the above embodiment, the GPU does not need to load useless data (such as normal, tangent, model space position, etc.) when binding the model, which can greatly reduce the bandwidth occupation, and has a significant effect on reducing the memory occupation, heat and power consumption.

[0059] S120, obtaining the hair root vertex information of the outer layer hair and the bottom layer fluff according to the vertex baked model.

[0060] It can be understood that the vertex baked model is composed of N triangles, N is the number of vertices of the target object, and one triangle corresponds to one pixel of the map.

[0061] In an embodiment of the present application, the specific execution steps of S120 include: first, calculating the vertex animation in the rendering process and writing the position of the target object in the vertex baked model into the corresponding pixel point, then calculating the vertex animation and writing the normal and tangent information of the vertex of the target object in the vertex baked model into the corresponding pixel point to obtain the hair root vertex information.

[0062] That is, in order to enable the hair of the target object to follow the surface movement of the model, wherein the movement includes overall displacement, rotation, scaling and animation deformation, and is compatible with mobile platforms, the present application uses a special way to bake the vertex position of each frame, which specifically includes:

[0063] A vertex baked model is pre-baked, and for each vertex of the original model of the target object in the vertex baked model, there is a triangle, that is, there are N triangles for N vertices, and the three vertices of the triangle store the vertex information of the original model of the target object.

[0064] In the running process, the above-mentioned vertex baked model is rendered twice every frame, wherein each triangle corresponds to one pixel of the map, that is, each map only needs a small size (for example, only 128x64 for mobile terminals), so as to occupy less bandwidth. In the first rendering process, after calculating the vertex animation, the local space position is written into the corresponding pixel of the screen to obtain the first map, and in the second rendering process, after calculating the vertex animation, the normal and tangent information of the vertex is written into the corresponding pixel to obtain the second map. When rendering the hair, the first map and the second map are read as the hair root vertex information.

[0065] It can be understood that the hair root is the end close to the skin in the animal hair.

[0066] Therefore, by twice rendering, the embodiments of the present application can ensure that the pixel points corresponding to the target object include accurate data, thereby improving the rendering accuracy.

[0067] S130, generating each position from the hair root to the hair top according to the hair root vertex information and the position of the virtual particle, and corresponding each position to the corresponding pixel on the screen, rasterizing the pixel to obtain a target rendering image.

[0068] In an embodiment of the present application, the specific implementation steps of S130 are as follows:

[0069] S1301: determining the position of the virtual particle corresponding to each vertex included in the target object.

[0070] It should be noted that the virtual particle is arranged on the target object, and the position of the virtual particle includes the position information of the current frame and the position information of the last frame.

[0071] That is, because the range of the world map is too extensive, if the world map is used in the rendering process, a large amount of calculation and inaccurate positioning may occur. Therefore, the position of the virtual particle is used as a reference point in the present application, and the position of the virtual particle is placed on the target object. Using the position of the virtual particle as a reference point in the process of calculating the vertex can reduce the amount of calculation, and because the position of the virtual particle is relatively close to the position of each vertex of the target object, the positioning is relatively accurate.

[0072] For example, if the target object is a bird, the position of the virtual particle can be the beak or the eye. The above examples are only examples, and the present application is not limited thereto.

[0073] Therefore, by setting the virtual particle, the present application embodiment can reduce the amount of positioning data, and by setting the virtual particle on the target object, the amount of calculation can be reduced to ensure the rendering efficiency.

[0074] S1302: rendering the position map of each vertex corresponding to the virtual particle, and updating the position of the particle and writing into the corresponding pixel.

[0075] That is, still using the vertex baking model for rendering the position map and the vector map in the above technical solution, a virtual particle is set for each vertex in the original model of the target object for subsequent physical simulation (including inertia, gravity and wind force) rendering, wherein each particle only needs to record the position information of the current and last frame. The vertex baking model is rendered once every frame at runtime, the particle position map is rendered, and the particle position is updated using the Verlet integration and written into the corresponding pixel.

[0076] It can be understood that the above-described updating of the position of the particle using the Verlet integration is only one embodiment of updating the position of the particle, and the present application is not limited thereto.

[0077] S1303: Interpolating the hair root vertex information and the position map of the virtual particle to obtain each position from the hair root to the hair top, wherein the interpolation is completed by a second-order Bezier curve.

[0078] That is, the position map of the particle is read when rendering the hair to affect the shape of the hair. According to the hair root vertex information and the position of the particle, each position of the hair from the hair root to the hair tip can be interpolated by a second-order Bezier curve, and each position also needs to be mapped to a corresponding pixel on the screen. The starting point of the Bezier curve is the hair root position, the end point of the Bezier curve is the particle position, and the control point of the Bezier curve is set as an external parameter by the user.

[0079] Therefore, the embodiment of the present application can accurately obtain each position from the hair root to the hair top by interpolating the hair root vertex information and the position map of the virtual particle, and can accurately render each position by generating each position from the hair root to the hair top, thereby improving the rendering accuracy.

[0080] S1304: Obtain parameters representing inertia, gravity and wind force, and then adjust each position by the parameters to obtain each target position.

[0081] That is, in order to ensure that the hair rendering is more realistic, the physical changes of the hair in the real world due to environmental influences need to be rendered. The change parameters of inertia, gravity and wind force need to be set in advance, and after obtaining each position from the hair root to the hair top, each position from the hair root to the hair top needs to be adjusted by these parameters, for example, after the target object accelerates and flies, each position from the hair root to the hair top still moves forward in the next frame after the current frame stops due to inertia.

[0082] It can be understood that the above-mentioned parameters of physical changes are only examples, and the present application does not limit this.

[0083] Therefore, the embodiment of the present application can simulate the swinging style of the hair of the target object during movement by adjusting and rendering each position by the parameters representing inertia, gravity and wind force, thereby improving the accuracy and reality of the rendering.

[0084] S1305: Map each target position to a corresponding pixel on the screen, and perform rasterization processing on the pixel to obtain a target rendering image.

[0085] That is, after obtaining each target position from the hair root to the hair top after the physical change adjustment, each target position is mapped to a corresponding pixel, and then the pixel is processed in color, gloss, etc. to obtain a target rendering image.

[0086] Therefore, based on the above-mentioned embodiments, the application has better rendering performance, that is, no fault feeling, and good plush feeling when viewed from the side; physical performance suitable for mobile terminals, that is, mobile terminals can also obtain real-time physical feedback when objects move, and even achieve real-time physical interaction with surrounding objects; higher production and iteration efficiency, that is, the process can be programmed and automated, and the user can observe the effect change in real time by one-key updating; better flexibility, that is, the number of hair layers drawn and the animation update frequency can be automatically adjusted according to platform performance and detail level, and performance grading can be better; high rendering efficiency suitable for mobile platforms, that is, the number of vertices and the number of triangular faces that need to be drawn are greatly reduced, and the bandwidth occupancy is improved compared with related technologies under the same performance.

[0087] The above describes a specific embodiment of a method for efficient real-time game image rendering, and the following will describe a method for efficient real-time game image rendering.

[0088] As shown in Figure 6 Some embodiments of the application provide a device 600 for real-time rendering, which comprises a model establishing module 610, a vertex calculation module 620, and an image rendering module 630.

[0089] The model establishing module 610 is configured to establish the outer hair of a target object in a picture to be rendered in the form of a patch, and to establish the undercoat of the target object in the form of a shell.

[0090] The vertex calculation module 620 is configured to obtain hair root vertex information of the outer hair and the undercoat according to a vertex baking model, wherein the vertex baking model is composed of N triangular faces, N is the number of vertices of the target object, and one triangular face corresponds to one pixel of a map.

[0091] The image rendering module 630 is configured to generate each position from a hair root to a hair top according to the hair root vertex information and the position of a virtual mass point, and to correspond each position to a corresponding pixel on a screen, to perform rasterization processing on the pixel, and to obtain a target rendering image.

[0092] In an embodiment of the application, the vertex calculation module 620 is further configured to solve vertex animation during rendering and write the position of the target object in the vertex baking model into a corresponding pixel point; to solve vertex animation and write normal and tangent information of the vertex of the target object in the vertex baking model into a corresponding pixel point, to obtain the hair root vertex information.

[0093] In an embodiment of the present application, the image rendering module 630 is further configured to determine the position of each virtual particle corresponding to each vertex included in the target object, wherein the virtual particle is arranged on the target object, and the position of the virtual particle includes position information of a current frame and position information of a previous frame.

[0094] In an embodiment of the present application, the image rendering module 630 is further configured to render a position map of each virtual particle, and update the position of the virtual particle and write a corresponding pixel point; perform interpolation calculation on the hair root vertex information and the position map of the virtual particle to obtain each position from the hair root to the hair top, wherein the interpolation calculation is completed through the second-order Bezier curve.

[0095] In an embodiment of the present application, the model establishing module 610 is further configured to generate a patch perpendicular to the normal direction of the surface of each edge of the target object, and use the patch to establish the outer hair of the target object in the to-be-rendered picture.

[0096] In an embodiment of the present application, the vertex information of the target object includes a vertex ID, an X channel of vertex texture map coordinates, and a Y channel of vertex texture map coordinates.

[0097] In an embodiment of the present application, the image rendering module 630 is further configured to obtain parameters for representing inertia, gravity, and wind force; adjust each position through the parameters to obtain each target position; and map each target position to a corresponding pixel on the screen

[0098] In an embodiment of the present application, Figure 6 The modules shown in the figures can implement Figures 1 to 5 the processes in the method embodiments. Figure 6 The operations and / or functions of the modules in the figures are respectively for implementing Figures 1 to 5 the corresponding flows in the method embodiments. For details, refer to the descriptions in the method embodiments, and the detailed descriptions are appropriately omitted here.

[0099] As Figure 7 shown, the electronic device 700 provided in an embodiment of the present application includes a processor 710, a memory 720, and a bus 730, wherein the processor is connected to the memory through the bus, and the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the computer readable instructions are used to implement the method in any one of all the embodiments described above. For details, refer to the descriptions in the method embodiments, and the detailed descriptions are appropriately omitted here.

[0100] The bus is configured to enable direct connection and communication among the components. In an embodiment of the present application, the processor can be an integrated circuit chip, which has the ability to process signals. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), or the like. The processor can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor can implement or execute the various methods, steps, and logical block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0101] The memory can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or the like. The memory stores computer readable instructions, which, when executed by the processor, can perform the methods described in the above embodiments.

[0102] It can be understood that Figure 7 The structure shown is only schematic, and can further include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 7 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 7 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 7 The components shown in the figures can be implemented in hardware, software, or a combination thereof.

[0103] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a server to implement the method described in any one of the above embodiments. For details, refer to the description of the method embodiments. To avoid repetition, the detailed description is appropriately omitted here.

[0104] The above descriptions are only the preferred embodiment of the present application, but not intended to limit the present application. Any modification, equivalent replacement and improvement made within the principle and technical scope of the present application should be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, thus, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0105] The above descriptions are only the specific embodiments of the present application, but the protection scope of the present application is not limited to this. Any modification, equivalent replacement and improvement made within the technical range disclosed by the present application can be easily thought by any person skilled in the art, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for efficient real-time game image rendering, characterized in that, The method comprises: establishing the outer layer hair of the target object in the picture to be rendered by using a patch, and establishing the under layer fluff of the target object by using a shell; obtaining the hair root vertex information of the outer layer hair and the under layer fluff according to a vertex baking model, wherein the vertex baking model is composed of N triangular surfaces, N is the number of vertices of the target object, and one triangular surface corresponds to one pixel of a map; generating each position from the hair root to the hair top according to the hair root vertex information and the position of a virtual particle, and corresponding the each position to a corresponding pixel on the screen, performing rasterization processing on the pixel, and obtaining a target rendering image; the method further comprises: solving vertex animation in the process of rendering and writing the position of the target object in the vertex baking model into a corresponding pixel point; solving vertex animation and writing the normal and tangent information of the vertex of the target object in the vertex baking model into a corresponding pixel point, and obtaining the hair root vertex information; before the step of generating each position from the hair root to the hair top according to the hair root vertex information and the position of a virtual particle, the method further comprises: determining the position of a corresponding virtual particle of each vertex included in the target object, wherein the virtual particle is arranged on the target object, and the position of the virtual particle includes position information of a current frame and position information of a previous frame; the step of generating each position from the hair root to the hair top according to the hair root vertex information and the position of a virtual particle comprises: generating a position map of the virtual particle corresponding to each vertex, updating the position of the virtual particle, and writing into a corresponding pixel point; performing interpolation calculation on the hair root vertex information and the position map of the virtual particle to obtain each position from the hair root to the hair top, wherein the interpolation calculation is completed through a second-order Bezier curve.

2. The method of claim 1, wherein, the step of establishing the outer layer hair of the target object in the picture to be rendered by using a patch comprises: generating a patch perpendicular to the normal direction of the surface of the target object for each edge of the target object, and establishing the outer layer hair of the target object in the picture to be rendered by using the patch.

3. The method of claim 1, wherein, The vertex information of the target object comprises a vertex ID, an X channel of vertex texture map coordinates and a Y channel of vertex texture map coordinates.

4. The method of claim 1, wherein, before the step of corresponding the each position to a corresponding pixel on the screen, the method further comprises: obtaining parameters for representing inertia, gravity and wind force; adjusting the each position through the parameters to obtain each target position; the step of corresponding the each position to a corresponding pixel on the screen comprises: corresponding the each target position to a corresponding pixel on the screen.

5. An electronic device, comprising: comprise: a processor, a memory and a bus; the processor is connected with the memory through the bus, the memory stores a computer program, and the computer program is executed by the processor to realize the method according to any one of claims 1-4.

6. A computer readable storage medium characterized by, The computer program is stored on the computer readable storage medium and, when executed, implements the method of any one of claims 1-4.

7. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions, when executed, implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Hair treatment method, device and equipment for virtual object, medium and program product

    CN115641375A

  • Fluff rendering method and device

    CN116883567A