A rendering method, apparatus, electronic device, and computer-readable storage medium

By using a 3D rendering model composed of rectangular rendering units in 3D games, and determining the size and coordinates of the rendering units according to the rendering granularity requirements, the problem of wasted computer resources in existing technologies is solved, and rendering efficiency is improved.

CN114419222BActive Publication Date: 2025-11-11BEIJING PIXEL SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111613894.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-11-11
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing technologies waste computer resources and storage space when rendering scenes in 3D games that do not require detailed rendering.

Method used

A 3D rendering model composed of rectangular rendering units is used. The size of the rendering unit is determined according to the rendering granularity requirements, the set of 3D coordinates of the feature vertices is determined, and rendering is performed according to the rendering path sequence.

Benefits of technology

It effectively avoids the waste of computing power caused by detailed rendering methods, improves rendering efficiency, and optimizes the utilization of computer resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419222B_ABST
    Figure CN114419222B_ABST
Patent Text Reader

Abstract

This invention provides a rendering method, apparatus, electronic device, and computer-readable storage medium, relating to the field of computer technology. First, based on the rendering granularity requirements of the scene to be rendered, the rendering unit size information is determined. Then, based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined. This 3D rendering model consists of multiple rendering units with their own size information. Next, based on the rendering unit size information, a set of 3D coordinates corresponding to all feature vertices in the 3D rendering model is determined. These feature vertices represent the vertices of the rendering units. Finally, the 3D rendering model is rendered based on the set of 3D coordinates. By determining the rendering unit size information based on the rendering granularity requirements, and then further obtaining the 3D rendering model and the set of 3D coordinates for rendering, rendering can be performed specifically according to the rendering granularity requirements of the scene, avoiding the waste of computing power caused by solely using a fine-grained rendering method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a rendering method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In 3D games, the user's gaming experience depends on game effects, game scenes, game rules, sound effects, and so on. The presentation of game scenes is closely related to the rendering method. A good rendering method can greatly enhance the visual effects of a game and make the most efficient use of computer resources.

[0003] Current techniques for detailed rendering typically involve dividing the object into numerous triangles and then rendering it according to a sequence of vertex sequences from these triangles. However, for scenarios that don't require such detailed rendering, this method wastes computer resources and storage space. Summary of the Invention

[0004] The purpose of this invention is to provide a rendering method, apparatus, electronic device, and computer-readable storage medium to improve the problems existing in the prior art.

[0005] The embodiments of the present invention can be implemented as follows:

[0006] In a first aspect, the present invention provides a rendering method, comprising:

[0007] The rendering unit size information is determined based on the rendering granularity requirements of the scene to be rendered.

[0008] Based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined, and the 3D rendering model is composed of multiple rendering units having the rendering unit size information;

[0009] Based on the rendering unit size information, determine the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model; the feature vertices represent the vertices of the rendering unit;

[0010] The 3D rendering model is rendered based on the set of 3D coordinates.

[0011] In an optional implementation, the rendering unit is a rectangle containing the four feature vertices. The step of determining the size information of the rendering unit based on the rendering granularity requirements of the scene to be rendered includes:

[0012] Based on the smoothness of the scene to be rendered and the rendering accuracy requirements, the size information of the rendering unit is determined, and the size information of the rendering unit represents the side length information of the rendering unit.

[0013] In an optional implementation, the step of determining the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model based on the rendering unit size information includes:

[0014] Based on the rendering unit size information, determine the horizontal and vertical coordinates of the feature vertex;

[0015] Based on the horizontal and vertical coordinates of the feature vertex, the corresponding vertical coordinate is determined to obtain the three-dimensional coordinates of the feature vertex;

[0016] A set of three-dimensional coordinates is determined based on the horizontal, vertical, and axial coordinates corresponding to the feature vertices of each rendering unit.

[0017] In an optional implementation, the step of determining the corresponding vertical coordinate based on the horizontal and vertical coordinates of the feature vertex to obtain the three-dimensional coordinates of the feature vertex includes:

[0018] Obtain the height function corresponding to the 3D rendered model;

[0019] Based on the horizontal and vertical coordinates of the feature vertex, the corresponding vertical coordinates are obtained using the height function to obtain the corresponding three-dimensional coordinates.

[0020] In an optional implementation, the step of rendering the 3D rendering model based on the set of 3D coordinates includes:

[0021] By removing duplicates from the three-dimensional coordinate set, a vertex coordinate set is obtained;

[0022] Based on the vertex coordinate set, a rendering path sequence is determined, and the rendering path sequence corresponds to the rendering order of the multiple rendering units;

[0023] The 3D rendering model is rendered according to the rendering path sequence.

[0024] In a second aspect, the present invention provides a rendering apparatus, comprising:

[0025] The processing module is used to determine the rendering unit size information based on the rendering granularity requirement information corresponding to the scene to be rendered; it is also used to determine the three-dimensional rendering model corresponding to the scene to be rendered based on the rendering unit size information, wherein the three-dimensional rendering model is composed of multiple rendering units having the rendering unit size information; it is also used to determine the three-dimensional coordinate set corresponding to all feature vertices in the three-dimensional rendering model based on the rendering unit size information; wherein the feature vertices represent the vertices of the rendering unit.

[0026] The rendering module is used to render the three-dimensional rendering model based on the set of three-dimensional coordinates.

[0027] In an optional implementation, the rendering unit is a rectangle containing the four feature vertices, and the processing module is specifically used for:

[0028] Based on the smoothness of the scene to be rendered and the rendering accuracy requirements, the size information of the rendering unit is determined, and the size information of the rendering unit represents the side length information of the rendering unit.

[0029] In an optional implementation, the rendering module is specifically used to deduplicate the three-dimensional coordinate set to obtain a vertex coordinate set; it is also specifically used to determine a rendering path sequence based on the vertex coordinate set; and it is also specifically used to render the three-dimensional rendering model based on the rendering path sequence.

[0030] Thirdly, the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the rendering method as described in any of the foregoing embodiments.

[0031] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in any of the foregoing embodiments.

[0032] In summary, the embodiments of the present invention provide a rendering method, apparatus, electronic device, and computer-readable storage medium. First, based on the rendering granularity requirements of the scene to be rendered, the rendering unit size information is determined. Based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined, and the 3D rendering model is composed of multiple rendering units with rendering unit size information. Based on the rendering unit size information, the set of 3D coordinates corresponding to all feature vertices in the 3D rendering model is determined, where feature vertices represent the vertices of the rendering units. The 3D rendering model is then rendered based on the set of 3D coordinates.

[0033] The beneficial effects of this invention include: determining the rendering unit size information based on the rendering granularity requirement information, then further obtaining the three-dimensional rendering model, obtaining the three-dimensional coordinate set for rendering, enabling targeted rendering according to the rendering granularity requirements of the rendering scene, and avoiding the waste of computing power caused by using only fine rendering methods. Attached Figure Description

[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a flowchart illustrating a rendering method provided in an embodiment of the present invention.

[0036] Figure 2 This is another schematic diagram of a rendering method provided in an embodiment of the present invention.

[0037] Figure 3 This is another schematic diagram of a rendering method provided in an embodiment of the present invention.

[0038] Figure 4 This is another schematic diagram of a rendering method provided in an embodiment of the present invention.

[0039] Figure 5 This is another schematic diagram of a rendering method provided in an embodiment of the present invention.

[0040] Figure 6 This is a schematic diagram of the functional modules of a rendering device provided in an embodiment of the present invention.

[0041] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0042] Icons: 200 - Rendering device; 210 - Processing module; 220 - Rendering module; 300 - Electronic device; 310 - Processor; 320 - Memory; 330 - Bus. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0044] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0045] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0046] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0047] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0048] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0049] In 3D games, the user's gaming experience depends on game effects, game scenes, game rules, sound effects, and so on. Among these, the presentation of game scenes is closely related to the rendering method. A good rendering method can greatly enhance the visual effects of a game and make the most efficient use of computer computing resources.

[0050] Current high-resolution rendering techniques typically involve dividing the object into numerous triangles and then rendering it according to a sequence of vertex sequences. However, games often require rendering specific scenes containing distant terrain that doesn't require detailed rendering. Therefore, using this method in scenes where detailed rendering isn't necessary would waste computing resources and storage space.

[0051] In view of this, embodiments of the present invention provide a rendering method, the core improvement of which lies in: for special objects to be rendered that do not require fine rendering, a three-dimensional rendering model composed of rectangular rendering units is used to render them. The following description is provided through various embodiments and in conjunction with the corresponding accompanying drawings.

[0052] Please see Figure 1 , Figure 1 This is a flowchart illustrating a rendering method provided in an embodiment of the present invention, the method comprising steps S110 to S140:

[0053] Step S110: Determine the rendering unit size information based on the rendering granularity requirements of the scene to be rendered.

[0054] Step S120: Determine the 3D rendering model corresponding to the scene to be rendered based on the rendering unit size information.

[0055] It can be understood that rendering granularity corresponds to the size of the rendering unit. Accordingly, this 3D rendering model can be composed of multiple rendering units with rendering unit size information.

[0056] Step S130: Determine the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model based on the rendering unit size information.

[0057] Feature vertices represent the vertices of a rendering unit. Since a 3D rendering model can be composed of multiple rendering units, it can correspondingly contain multiple feature vertices. In other words, in a 3D rendering model, each rendering unit contains multiple vertices, and the vertices of the rendering unit correspond to the feature vertices on the 3D rendering model.

[0058] In this embodiment, each feature vertex has its corresponding three-dimensional coordinates. The set of three-dimensional coordinates can contain the three-dimensional coordinates of all feature vertices.

[0059] Step S140: Render the 3D rendering model based on the 3D coordinate set.

[0060] It can be understood that a 3D rendering model is derived from the scene to be rendered based on the size information of the rendering units. Rendering a 3D rendering model is equivalent to rendering the scene to be rendered. The scene to be rendered can be some distant scenery in a 3D game, such as the sea, terrain, lakes, sky, etc., without limitation.

[0061] Accordingly, based on the 3D coordinate set, the 3D rendering model can be rendered with a preset color, or it can be rendered based on resource files. Resource files can contain corresponding texture files. Preset colors can be set according to actual needs and are not limited here.

[0062] This invention provides a rendering method that first determines the rendering unit size information based on the rendering granularity requirements of the scene to be rendered. Then, based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined. This 3D rendering model consists of multiple rendering units with their own size information. Next, based on the rendering unit size information, a set of 3D coordinates corresponding to all feature vertices in the 3D rendering model is determined. These feature vertices represent the vertices of the rendering units. Finally, the 3D rendering model is rendered based on the set of 3D coordinates. This method, by determining the rendering unit size information based on the rendering granularity requirements and then obtaining the 3D rendering model and its coordinate set for rendering, allows for targeted rendering according to the rendering granularity requirements of the scene, avoiding the waste of computational power caused by solely using fine-grained rendering methods.

[0063] In one possible implementation, in the 3D rendering model, the rendering unit can be a rectangle containing four vertices, where the vertices are feature vertices. The rendering granularity requirements can include the smoothness of the scene to be rendered and the required rendering precision. See also... Figure 2 , Figure 2 This is another schematic flowchart of a rendering method provided in an embodiment of the present invention. For step S110, its sub-steps include:

[0064] S110-1. Determine the rendering unit size information based on the smoothness of the scene to be rendered and the rendering accuracy requirements.

[0065] It can be understood that the rendering unit size information represents the side length information of the rendering unit. That is, when the rendering unit is a rectangle, the rendering unit size information can represent the side length information of the rectangle.

[0066] In one scenario, when the scene to be rendered is a lake in a 3D game, the rendering unit size information can meet the first preset size information because the lake is relatively flat and its rendering accuracy requirements meet the preset requirements.

[0067] In another scenario, when the scene to be rendered is a mountainous area in a 3D game, since the mountainous area has low flatness and high undulation, the rendering unit size information can meet the second preset size information if the rendering accuracy requirement meets the preset requirements.

[0068] It should be noted that the preset requirements in the above two scenarios are set according to the actual situation and are not limited here. The first preset dimension in the first preset dimension information is larger than the second preset dimension in the second preset dimension information.

[0069] Optionally, the three-dimensional coordinates consist of horizontal, vertical, and triangular coordinates. This embodiment of the invention provides a possible implementation for obtaining the horizontal, vertical, and triangular coordinates of a feature vertex. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a second schematic diagram of a rendering method provided in an embodiment of the present invention. For step S130, its sub-steps include:

[0070] Step S130-1: Determine the horizontal and vertical coordinates of the feature vertices based on the rendering unit size information.

[0071] It is understandable that a three-dimensional coordinate system is established with any feature vertex of the three-dimensional rendering model as the origin, and the horizontal and vertical coordinates of each feature vertex can be calculated from the rendering unit size information.

[0072] Step S130-2: Based on the horizontal and vertical coordinates of the feature vertex, determine the corresponding vertical coordinates to obtain the three-dimensional coordinates of the feature vertex.

[0073] The vertical axis coordinate can be calculated and determined from the horizontal axis coordinate and the vertical axis coordinate.

[0074] Step S130-3: Determine the three-dimensional coordinate set based on the horizontal, vertical, and axial coordinates corresponding to the feature vertices of each rendering unit.

[0075] In other words, after obtaining the horizontal, vertical, and y-axis coordinates corresponding to the feature vertices of each rendering unit, integrating them can determine the set of three-dimensional coordinates.

[0076] It can be understood that steps S130-1 to S130-3 are performed between steps S120 and S140.

[0077] Optionally, the 3D rendering model can correspond to a height function, and the 3D coordinates of each feature vertex on the 3D rendering model can be obtained from the height function. Figure 3 Based on this, embodiments of the present invention provide a possible implementation method for obtaining three-dimensional coordinates from a height function. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a third schematic diagram of another rendering method provided in an embodiment of the present invention. For step S130-2, its sub-steps include:

[0078] Step S130-2a: Obtain the height function corresponding to the 3D rendering model.

[0079] Accordingly, this height function corresponds to the scene to be rendered.

[0080] Optionally, the height function can be a binary function z = f(x, y) representing the spatial surface corresponding to the scene to be rendered, where x can represent the horizontal coordinate of the feature vertex, y can represent the vertical coordinate of the feature vertex, and z can represent the vertical coordinate of the feature vertex. This binary function z = f(x, y) can be predetermined by the spatial surface corresponding to the scene to be rendered in the actual situation, and is not limited here.

[0081] Step S130-2b: Based on the horizontal and vertical coordinates of the feature vertices, obtain the corresponding vertical coordinates using the height function to obtain the corresponding three-dimensional coordinates.

[0082] Optionally, by substituting the x-axis and y-axis coordinates of each feature vertex into the height function, the y-axis coordinates of each feature vertex can be obtained.

[0083] Optionally, the rendering of the 3D model is performed according to a rendering path sequence, which can be obtained from a set of 3D coordinates. Figure 1 Based on this, embodiments of the present invention provide a possible implementation to obtain a rendering path sequence corresponding to a set of three-dimensional coordinates. Please refer to... Figure 5 , Figure 5 This is another schematic flowchart of a rendering method provided in an embodiment of the present invention. For step S140, its sub-steps include:

[0084] Step S140-1: Remove duplicates from the three-dimensional coordinate set to obtain the vertex coordinate set.

[0085] It is understandable that when the rendering unit is rectangular, the four corresponding three-dimensional coordinates can be calculated for the four feature vertices of each rendering unit and stored in the three-dimensional coordinate set.

[0086] Accordingly, the set of 3D coordinates contains multiple duplicate 3D coordinates, which need to be deduplicated to obtain the set of vertex coordinates. This set of vertex coordinates contains the 3D coordinates of all feature vertices in the 3D rendering model.

[0087] Step S140-2: Determine the rendering path sequence based on the vertex coordinate set.

[0088] It should be noted that this rendering path sequence corresponds to the rendering order of multiple rendering units. In other words, the rendering path sequence represents the rendering order of multiple rendering units in a 3D rendering model.

[0089] Step S140-3: Render the 3D rendering model according to the rendering path sequence.

[0090] It is understandable that multiple rendering units in a 3D rendering model can be rendered in an orderly manner according to the rendering path sequence.

[0091] In one optional scenario, when a player accidentally switches screens to exit the game and then re-enters, the 3D rendering model can be rendered directly according to the rendering path sequence.

[0092] In another optional scenario, the material of each rendering unit needs to be confirmed before rendering. The material can be the color or texture corresponding to the rendering unit. Confirmation can be done in two ways:

[0093] The first method involves rendering a 3D model according to the rendering path sequence, and before rendering each rendering unit, using a confirmation function to confirm the material of that unit. This confirmation function can be a pre-defined function that confirms the material of the rendering unit.

[0094] The second approach is to divide the 3D model into multiple sub-sequences when rendering according to the rendering path sequence. Each sub-sequence corresponds to a preset number of rendering units. In this case, the 3D model is rendered sequentially according to the multiple sub-sequences, and the material of the rendering unit corresponding to each sub-sequence is confirmed before rendering each sub-sequence.

[0095] In other words, during the rendering process, material verification is performed every preset number of rendering units. In practical applications, the preset number can be set according to the actual situation, such as 5, 8, or 10. This example is merely one illustration and is not intended to be limiting.

[0096] It should be noted that the two methods of material confirmation mentioned above are merely examples and are not intended to limit the scope of the study.

[0097] Based on the rendering method described above, this embodiment of the invention also provides a rendering device 200. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a functional module diagram of a rendering device provided in an embodiment of the present invention. It should be noted that its basic principle and the resulting technical effects are the same as those in the aforementioned corresponding method embodiments. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiments. The device includes:

[0098] The processing module 210 is used to determine the rendering unit size information based on the rendering granularity requirement information corresponding to the scene to be rendered.

[0099] The processing module 210 is also used to determine the three-dimensional rendering model corresponding to the scene to be rendered based on the rendering unit size information. The three-dimensional rendering model is composed of multiple rendering units with rendering unit size information.

[0100] The processing module 210 is also used to determine the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model based on the rendering unit size information.

[0101] Among them, feature vertices represent the vertices of the rendering unit.

[0102] In this embodiment, the processing module 210 can be used to execute... Figure 1 For steps S110 to S130 shown, the relevant content of processing module 210 can be found in the corresponding detailed description above.

[0103] Rendering module 220 is used to render the 3D rendering model based on the set of 3D coordinates.

[0104] In this embodiment, the rendering module 220 can be used to perform... Figure 1For details regarding the rendering module 220 in step S140, please refer to the previous description of step S140.

[0105] Furthermore, the rendering unit can be a rectangle containing four feature vertices, and the rendering granularity requirements can include the smoothness of the scene to be rendered and the rendering accuracy requirements.

[0106] The processing module 210 is specifically used to determine the rendering unit size information based on the smoothness of the scene to be rendered and the rendering accuracy requirements.

[0107] Among them, the rendering unit size information represents the side length information of the rendering unit.

[0108] Furthermore, the rendering of the 3D rendering model is performed according to a rendering path sequence, which can be obtained from a set of 3D coordinates.

[0109] Accordingly, the rendering module 220 is specifically used to remove duplicates from the three-dimensional coordinate set to obtain the vertex coordinate set.

[0110] The rendering module 220 is also used to determine the rendering path sequence based on the set of vertex coordinates.

[0111] The rendering module 220 is also used to render the 3D rendering model according to the rendering path sequence.

[0112] The rendering device 200 described above is used to execute the method provided in the foregoing embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0113] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together to form a System-on-a-Chip (SoC).

[0114] Furthermore, based on the rendering method described above, please refer to... Figure 7 , Figure 7This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 300 includes a processor 310, a memory 320, and a bus 330. The memory 320 stores machine-readable instructions that can be executed by the processor 310. When the electronic device is running, the processor 310 and the memory 320 communicate through the bus 330. The processor 310 executes the machine-readable instructions, which implement the above-described method embodiment.

[0115] Furthermore, based on the above rendering method, this embodiment of the invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above method embodiment.

[0116] In summary, the embodiments of the present invention provide a rendering method, apparatus, electronic device, and computer-readable storage medium. First, based on the rendering granularity requirements of the scene to be rendered, the rendering unit size information is determined. Based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined. The 3D rendering model is composed of multiple rendering units with rendering unit size information. Based on the rendering unit size information, the 3D coordinate set corresponding to all feature vertices in the 3D rendering model is determined. Feature vertices represent the vertices of the rendering units. The 3D rendering model is then rendered based on the 3D coordinate set. By determining the rendering unit size information based on the rendering granularity requirements, and then further obtaining the 3D rendering model and rendering the 3D coordinate set, rendering can be performed specifically according to the rendering granularity requirements of the scene, avoiding the waste of computing power caused by solely using a fine-grained rendering method.

[0117] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A rendering method, characterized in that, include: Determine the rendering unit size information based on the smoothness of the scene to be rendered and the rendering accuracy requirements; The scene to be rendered is a distant view in a 3D game. The rendering unit size information represents the side length information of the rendering unit. The rendering unit is a rectangle containing four feature vertices. When the scene to be rendered is a lake scene, the rendering unit size information satisfies the first preset size information. When the scene to be rendered is a mountain scene, the rendering unit size information satisfies the second preset size information. The first preset dimension in the first preset dimension information is larger than the second preset dimension in the second preset dimension information; Based on the rendering unit size information, a 3D rendering model corresponding to the scene to be rendered is determined, and the 3D rendering model is composed of multiple rendering units having the rendering unit size information; Based on the rendering unit size information, determine the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model; The feature vertices represent the vertices of the rendering unit; By removing duplicates from the three-dimensional coordinate set, a vertex coordinate set is obtained; Based on the vertex coordinate set, a rendering path sequence is determined, and the rendering path sequence corresponds to the rendering order of the multiple rendering units; The 3D rendering model is rendered according to the rendering path sequence; wherein, during the rendering process, a material confirmation is performed before rendering each preset number of rendering units, and the material is the color or texture corresponding to the rendering unit. When a player accidentally exits the game and then re-enters the game due to a screen-switching operation, the 3D rendering model is re-rendered according to the rendering path sequence.

2. The method as described in claim 1, characterized in that, The step of determining the set of 3D coordinates corresponding to all feature vertices in the 3D rendering model based on the rendering unit size information includes: Based on the rendering unit size information, determine the horizontal and vertical coordinates of the feature vertex; Based on the horizontal and vertical coordinates of the feature vertex, the corresponding vertical coordinate is determined to obtain the three-dimensional coordinates of the feature vertex; A set of three-dimensional coordinates is determined based on the horizontal, vertical, and axial coordinates corresponding to the feature vertices of each rendering unit.

3. The method as described in claim 2, characterized in that, The step of determining the corresponding vertical coordinate based on the horizontal and vertical coordinates of the feature vertex to obtain the three-dimensional coordinates of the feature vertex includes: Obtain the height function corresponding to the 3D rendered model; Based on the horizontal and vertical coordinates of the feature vertex, the corresponding vertical coordinates are obtained using the height function to obtain the corresponding three-dimensional coordinates.

4. A rendering apparatus, characterized in that, include: The processing module is used to determine the size information of the rendering unit based on the smoothness of the scene to be rendered and the rendering accuracy requirements. The scene to be rendered is a distant view in a 3D game. The rendering unit size information represents the side length information of the rendering unit. The rendering unit is a rectangle containing four feature vertices. When the scene to be rendered is a lake scene, the rendering unit size information satisfies the first preset size information. When the scene to be rendered is a mountain scene, the rendering unit size information satisfies the second preset size information. The first preset size in the first preset size information is greater than the second preset size in the second preset size information. The processing module is further configured to determine the three-dimensional rendering model corresponding to the scene to be rendered based on the rendering unit size information, wherein the three-dimensional rendering model is composed of multiple rendering units having the rendering unit size information; and is further configured to determine the set of three-dimensional coordinates corresponding to all feature vertices in the three-dimensional rendering model based on the rendering unit size information. The feature vertices represent the vertices of the rendering unit; The rendering module is used to remove duplicates from the three-dimensional coordinate set to obtain the vertex coordinate set; The rendering module is further configured to determine a rendering path sequence based on the vertex coordinate set, wherein the rendering path sequence corresponds to the rendering order of the plurality of rendering units; The rendering module is also used to render the three-dimensional rendering model according to the rendering path sequence; wherein, during the rendering process, a material confirmation is performed before rendering each preset number of rendering units, and the material is the color or texture corresponding to the rendering unit. When a player accidentally exits the game and then re-enters the game due to a screen-switching operation, the rendering module is also used to re-render the 3D rendering model according to the rendering path sequence.

5. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the rendering method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method of any one of claims 1 to 3.

Citation Information

Patent Citations

  • Rendering control method, rendering control device and mobile terminal

    CN106101533A

  • Component rendering method and device

    CN111290754A