A rendering procedure determination method, device and electronic equipment

By obtaining the relationships between rendering nodes and determining the relationships between rendering nodes and rendering textures, the problem of high rendering process complexity is solved, and simple and flexible rendering process management is achieved.

CN114170364BActive Publication Date: 2025-10-21BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111509505.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-10-21
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

Existing technologies have high rendering complexity due to the large number of rendering nodes during image rendering, especially when using camera components and setting rendering textures, which require frequent modification of binding relationships, further increasing complexity.

Method used

By obtaining the relationships between multiple rendering nodes, the relationship between rendering nodes and rendering textures can be determined, directly defining the rendering process. This avoids creating a camera component and specifying a rendering texture for each rendering node, simplifying the process and reducing modification complexity.

Benefits of technology

It implements a simplified rendering process, reduces the complexity of modifying the rendering process, and eliminates the need to modify the binding relationship between the camera component and the rendering texture when adding a rendering stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170364B_ABST
    Figure CN114170364B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a rendering process determination method, in particular to the technical field of image processing. The method comprises: obtaining a first association relationship of a plurality of rendering nodes; determining at least two rendering textures corresponding to the plurality of rendering nodes and a second association relationship according to the first association relationship, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two rendering textures; and determining a rendering process according to the second association relationship. The embodiments of the present disclosure are used to solve the problem of complicated rendering process and high process complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a rendering process determination method, device, and electronic device. Background Art

[0002] Currently, when implementing image rendering, multiple rendering nodes are usually required to implement the complete rendering process. Due to the large number of rendering nodes, it is necessary to reasonably design the rendering process when using the camera component (Camera) and setting the render texture (Render Texture, RT). Therefore, it is urgent to implement a low-complexity rendering process determination method for multiple rendering nodes. Summary of the Invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a rendering process determination method, device and electronic device, which can simplify the rendering process and reduce the complexity of modifying the rendering process.

[0004] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:

[0005] In a first aspect, a rendering process determination method is provided, comprising:

[0006] Obtaining a first association relationship of multiple rendering nodes;

[0007] Determining, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes and a second association relationship, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two rendering textures;

[0008] A rendering process is determined according to the second association relationship.

[0009] As an optional implementation of the embodiment of the present disclosure, determining, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes and the second association relationship includes:

[0010] Determine an output rendering texture for each rendering node and an input rendering texture for each rendering node according to the first association relationship, so as to determine the at least two rendering textures;

[0011] The second association relationship is determined according to the output rendering texture and the input rendering texture of each rendering node.

[0012] As an optional implementation of the embodiment of the present disclosure, determining, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes and the second association relationship includes:

[0013] Determine an output rendering texture for each rendering node according to the first association relationship, and determine an input rendering texture for other rendering nodes other than the initial rendering node, so as to determine the at least two rendering textures;

[0014] The second association relationship is determined according to the output rendering texture of the initial rendering node and the input rendering textures and output rendering textures of other rendering nodes.

[0015] As an optional implementation of the embodiment of the present disclosure, determining the output rendering texture for each rendering node according to the first association relationship includes:

[0016] Determining, based on the first association relationship, whether there is an available render texture for a first target render node among the created render textures, where the available render texture refers to a render texture among the created render textures that is not used as an input render texture for the first target render node;

[0017] If the available render texture exists in the created render textures, using the available render texture as the output render texture of the first target render node;

[0018] If the available render texture does not exist in the created render textures, creating a new render texture as the output render texture of the first target render node;

[0019] The first target rendering node is any one of the multiple rendering nodes.

[0020] As an optional implementation of the embodiment of the present disclosure, determining the input rendering texture for each rendering node according to the first association relationship includes:

[0021] If, according to the first association relationship, the first target rendering node is determined to be an initial rendering node, then determining the designated rendering texture as an input rendering texture of the first target rendering node;

[0022] If it is determined according to the first association relationship that the first target rendering node is another rendering node, the output rendering texture of the rendering node one level above the first target rendering node is determined as the input rendering texture of the first target rendering node.

[0023] As an optional implementation of the embodiment of the present disclosure, determining the input rendering texture for other rendering nodes according to the first association relationship includes:

[0024] If it is determined according to the first association relationship that the first target rendering node is another rendering node, then determining the output rendering texture of the rendering node one level above the first target rendering node as the input rendering texture of the first target rendering node;

[0025] The method further comprises:

[0026] If, according to the first association relationship, the first target rendering node is determined to be an initial rendering node, no input rendering texture is determined for the first target rendering node.

[0027] As an optional implementation of the embodiment of the present disclosure, before determining the output rendering texture for each rendering node according to the first association relationship, the method further includes:

[0028] Get the render texture size configured for each render node;

[0029] Determining an output rendering texture for each rendering node according to the first association relationship includes:

[0030] According to the first association relationship, a first rendering texture having a size greater than or equal to the rendering texture size is determined as the output rendering texture of each rendering node.

[0031] As an optional implementation of the embodiment of the present disclosure, determining the second association relationship according to the first association relationship includes:

[0032] Determining, based on the first association relationship, a target association relationship between the plurality of rendering nodes and the at least two rendering textures;

[0033] If the output render texture of the last render node in the target association relationship is not the final render texture, swapping the output render texture of the last render node with the output render texture of a second target render node, so as to update the target association relationship to the second association relationship, wherein the second target render node is a render node other than the last render node among the plurality of render nodes, the input render texture of which is the final render texture;

[0034] If, in the target association relationship, the output rendering texture of the last rendering node is the final rendering texture, the target association relationship is used as the second association relationship.

[0035] As an optional implementation of the embodiment of the present disclosure, obtaining the first association relationship of the plurality of rendering nodes includes:

[0036] Obtaining a configuration file, wherein the configuration file includes: an input rendering node corresponding to each rendering node;

[0037] Acquire the first association relationship according to the configuration file;

[0038] or,

[0039] Obtaining the configuration file, and drawing a correlation diagram based on the configuration file;

[0040] According to the association relationship diagram, the first association relationship is obtained.

[0041] In a second aspect, a rendering process determination device is provided, comprising:

[0042] An acquisition module, configured to acquire a first association relationship between multiple rendering nodes;

[0043] a determining module, configured to determine, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes and a second association relationship, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two rendering textures;

[0044] A rendering process is determined according to the second association relationship.

[0045] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0046] Determine an output rendering texture for each rendering node and an input rendering texture for each rendering node according to the first association relationship, so as to determine the at least two rendering textures;

[0047] The second association relationship is determined according to the output rendering texture and the input rendering texture of each rendering node.

[0048] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0049] Determine an output rendering texture for each rendering node according to the first association relationship, and determine an input rendering texture for other rendering nodes other than the initial rendering node, so as to determine the at least two rendering textures;

[0050] The second association relationship is determined according to the output rendering texture of the initial rendering node and the input rendering textures and output rendering textures of other rendering nodes.

[0051] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0052] Determining, based on the first association relationship, whether there is an available render texture for a first target render node among the created render textures, where the available render texture refers to a render texture among the created render textures that is not used as an input render texture for the first target render node;

[0053] If the available render texture exists in the created render textures, using the available render texture as the output render texture of the first target render node;

[0054] If the available render texture does not exist in the created render textures, creating a new render texture as the output render texture of the first target render node;

[0055] The first target rendering node is any one of the multiple rendering nodes.

[0056] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0057] If, according to the first association relationship, the first target rendering node is determined to be an initial rendering node, then determining the designated rendering texture as an input rendering texture of the first target rendering node;

[0058] If it is determined according to the first association relationship that the first target rendering node is another rendering node, the output rendering texture of the rendering node one level above the first target rendering node is determined as the input rendering texture of the first target rendering node.

[0059] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0060] If it is determined according to the first association relationship that the first target rendering node is another rendering node, then determining the output rendering texture of the rendering node one level above the first target rendering node as the input rendering texture of the first target rendering node;

[0061] The determining module is further configured to:

[0062] If, according to the first association relationship, the first target rendering node is determined to be an initial rendering node, no input rendering texture is determined for the first target rendering node.

[0063] As an optional implementation of the embodiment of the present disclosure, the acquisition module is further configured to:

[0064] Before the determining module determines the output rendering texture for each rendering node according to the first association relationship, obtaining the rendering texture size configured for each rendering node;

[0065] The determining module is specifically configured to:

[0066] According to the first association relationship, a first rendering texture having a size greater than or equal to the rendering texture size is determined as the output rendering texture of each rendering node.

[0067] As an optional implementation of the embodiment of the present disclosure, the determining module is specifically configured to:

[0068] Determining, based on the first association relationship, a target association relationship between the plurality of rendering nodes and the at least two rendering textures;

[0069] If the output render texture of the last render node in the target association relationship is not the final render texture, swapping the output render texture of the last render node with the output render texture of a second target render node, so as to update the target association relationship to the second association relationship, wherein the second target render node is a render node other than the last render node among the plurality of render nodes, the input render texture of which is the final render texture;

[0070] If, in the target association relationship, the output rendering texture of the last rendering node is the final rendering texture, the target association relationship is used as the second association relationship.

[0071] As an optional implementation of the embodiment of the present disclosure, the acquisition module is specifically configured to:

[0072] Obtaining a configuration file, wherein the configuration file includes: an input rendering node corresponding to each rendering node;

[0073] Acquire the first association relationship according to the configuration file;

[0074] or,

[0075] Obtaining the configuration file, and drawing a correlation diagram based on the configuration file;

[0076] According to the association relationship diagram, the first association relationship is obtained.

[0077] In a third aspect, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and runnable on the processor, wherein when the computer program is executed by the processor, the rendering process determination method as described in the first aspect or any one of its optional embodiments is implemented.

[0078] In a fourth aspect, a computer-readable storage medium is provided, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the rendering process determination method as described in the first aspect or any optional embodiment thereof is implemented.

[0079] In a fifth aspect, a computer program product is provided, characterized in that it includes: when the computer program product is run on a computer, the computer implements the rendering process determination method as described in the first aspect or any optional embodiment thereof.

[0080] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: at least two RTs to be used and the second association relationship between these rendering nodes and the at least two RTs can be directly determined based on the first association relationship between multiple rendering nodes. In this way, the rendering process can be determined based on the second association relationship, without having to create a Camera for each Pass and specifying an RT for each Camera. Such a rendering process can be implemented using only one Camera, so the rendering process is simple. Moreover, since the RT is no longer bound to the Camera, the binding relationship between the RT and the Camera does not need to be modified after adding a Pass. The rendering process can be automatically determined based on the association relationship between the updated multiple Passes, thereby simplifying the rendering process and reducing the complexity of modifying the rendering process. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0082] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0083] Figure 1 A schematic diagram of a rendering process for alternate rendering using four rendering nodes provided in an embodiment of the present disclosure;

[0084] Figure 2 A flowchart of a rendering process determination method provided by an embodiment of the present disclosure;

[0085] Figure 3 A schematic diagram of generating an association relationship diagram according to the content of a configuration file provided in an embodiment of the present disclosure;

[0086] Figure 4A schematic diagram of a second association relationship provided in an embodiment of the present disclosure Figure 1 ;

[0087] Figure 5 A schematic diagram of a second association relationship provided in an embodiment of the present disclosure Figure 2 ;

[0088] Figure 6 A schematic diagram of a second association relationship provided in an embodiment of the present disclosure Figure 3 ;

[0089] Figure 7 A structural block diagram of a rendering process determination device provided by an embodiment of the present disclosure;

[0090] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0091] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0092] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0093] Currently, when implementing image rendering, one method is to use multiple rendering nodes to implement the complete rendering process. Due to the large number of rendering nodes, it is necessary to reasonably design the rendering process when using the Camera and setting the RT. Therefore, it is urgent to implement a low-complexity rendering process determination method for multiple rendering nodes.

[0094] In related technologies, there is an optional implementation method that creates a Camera for each Pass to specify the render texture (RT) obtained after rendering. It is necessary to create the required RT in advance, and then specify the corresponding RT for the input and output of each Pass.

[0095] In the above optional implementation, since each RT is bound to a Camera, RT management is very complex and repetitive and time-consuming. In addition, when it is necessary to add, delete, or adjust the order of rendering passes, all Camera-specified RTs must be modified to ensure correct results and optimal RT reuse.

[0096] For example, Figure 1As shown in the figure, it is a schematic diagram of a rendering process for alternating rendering through four rendering nodes. We need to specify the corresponding input RT and output RT for the Camera of each rendering node in advance. Figure 1 There are 4 rendering nodes in the image, identified as P1, P2, P3 and P4 respectively; each of these 4 rendering nodes is set with a Camera, the Camera identified as C1 for P1, the Camera identified as C2 for P2, the Camera identified as C3 for P3, and the Camera identified as C4 for P4; and the input RT and output RT corresponding to the Camera are formulated, where, Figure 1 As shown in (a), the output RT corresponding to C1 is RT1; Figure 1 As shown in (b), the input RT corresponding to C2 is RT1, and the output RT corresponding to C2 is RT2; Figure 1 As shown in (c), the input RT corresponding to C3 is RT2, and the output RT corresponding to C2 is RT1; Figure 1 As shown in (d), the input RT corresponding to C4 is RT1, and the output RT corresponding to C4 is RT2. Figure 1 The rendering process shown needs to specify RT for the Camera, and a Camera is created for each Pass. This makes the determination of the entire rendering process very complicated, and the complexity of modifying the rendering process is very high.

[0097] In order to solve the above problems, the present disclosure provides a rendering process determination method.

[0098] The at least two RTs to be used and the second association relationship between these rendering nodes and the at least two RTs can be directly determined based on the first association relationship between multiple rendering nodes. In this way, the rendering process can be determined based on the second association relationship. Compared with creating a Camera for each Pass and specifying an RT for each Camera, the RT is no longer bound to the Camera. Such a rendering process can be implemented through only one Camera, so the rendering process is simple. Moreover, since the RT is no longer bound to the Camera, there is no need to modify the binding relationship between the RT and the Camera after adding a Pass. The rendering process can be automatically determined only through the binding relationship between the updated multiple Passes, thereby simplifying the rendering process and reducing the complexity of modifying the rendering process.

[0099] The embodiments of the present disclosure provide a rendering process determination method, device, and electronic device, which can be implemented by a rendering process determination device or an electronic device, wherein the rendering process determination device can be a functional entity or functional module in the electronic device for implementing the rendering process determination method.

[0100] In the embodiment of the present disclosure, the electronic device may be a tablet computer, a mobile phone, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, etc., and the embodiment of the present disclosure does not specifically limit this. Figure 2 FIG. 1 is a flow chart of a method for determining a rendering process, the method comprising:

[0101] 201. Obtain a first association relationship between multiple rendering nodes.

[0102] The first association relationship may be used to represent the association relationship between multiple rendering nodes.

[0103] In the embodiment of the present disclosure, the first association relationship mentioned above may represent a data transmission relationship between each rendering node and other rendering nodes among multiple rendering nodes. After obtaining the first association relationship of multiple rendering nodes, the flow direction of input data and output data between the multiple rendering nodes can be known.

[0104] For example, the association between render node A, render node B, and render node C may indicate that data output by render node A will be used as input data for render node B. Data output by render node B will be used as input data for render node C. In some embodiments, the first association between multiple render nodes may be obtained by obtaining a configuration file, which may include an input render node corresponding to each render node, and then obtaining the first association based on the configuration file.

[0105] In some embodiments, the first association relationship of the plurality of rendering nodes may be obtained by obtaining a configuration file, the configuration file including an input rendering node corresponding to each rendering node, drawing an association relationship graph based on the configuration file, and then obtaining the first association relationship according to the association relationship graph.

[0106] In an embodiment of the present invention, the above embodiment can be implemented through a rendering engine. After drawing the association relationship diagram, the association relationship diagram can also be displayed on an interface in the rendering engine to intuitively present the association relationship between each node.

[0107] Optionally, the above configuration file may further include an output rendering node for each rendering node.

[0108] For example, Figure 3 As shown, it is a schematic diagram of generating an association relationship diagram based on the content of a configuration file. Figure 3 In the example, there are four rendering nodes, which are represented as P1, P2, P3 and P4 respectively. Figure 3As shown in (a) of the figure, the configuration file shows that P1 is the initial rendering node. It has no input rendering node and the input is the initial image data. The input rendering node of P2 is P1, the initial input node of P3 is P2, and the initial input node of P4 is P3. Based on this, the association relationship diagram of the four rendering nodes can be obtained as follows: Figure 3 As shown in (b) in .

[0109] 202. Determine at least two RTs corresponding to the plurality of rendering nodes and a second association relationship according to the first association relationship.

[0110] 203. Determine a rendering process according to the second association relationship.

[0111] In the rendering process, the initial rendering node may or may not have an input RT.

[0112] The second association relationship is an association relationship between multiple rendering nodes and at least two RTs, that is, a data transmission relationship between the multiple rendering nodes and the at least two RTs. After obtaining the second association relationship between the multiple rendering nodes, the flow of input data and output data between the multiple rendering nodes and the at least two RTs can be known.

[0113] (1) In some embodiments, in the case where an initial rendering node has an input RT, the method for determining at least two RTs corresponding to multiple rendering nodes and the second association relationship based on the first association relationship is as follows: first, based on the first association relationship, an output RT is determined for each rendering node, and an input RT is determined for each rendering node to determine at least two RTs; finally, the second association relationship is determined based on the output RT and input RT of each rendering node.

[0114] (2) In some embodiments, in the case where the initial rendering node does not have an input RT, the method for determining at least two RTs corresponding to the multiple rendering nodes and the second association relationship based on the first association relationship is as follows: first, based on the first association relationship, an output RT is determined for each rendering node, and an input RT is determined for the rendering nodes other than the initial rendering node in the multiple rendering nodes to determine at least two RTs; then, based on the output RT of the initial rendering node and the input RT and output RT of the other rendering nodes, a second association relationship is determined.

[0115] In the above two types of embodiments (1) and (2), the method for determining the output RT for each rendering node according to the first association relationship may be: first, according to the first association relationship, determining whether there is an available RT for the first target rendering node in the created RTs, where the available RT refers to the RT in the created RTs that is not used as the input RT of the first target rendering node; if there is an available RT in the created RTs, then using the available RT as the output RT of the first target rendering node; if there is no available RT in the created RTs, then creating a new RT as the output RT of the first target rendering node;

[0116] The first target rendering node is any one of the plurality of rendering nodes. That is, the output RT can be determined for each of the plurality of rendering nodes by executing the method described above for the first target rendering node in the rendering order. In this way, the output RT of each of the plurality of rendering nodes can be determined.

[0117] Generally, since the input RT and output RT of a rendering node cannot be the same RT, that is, the number of RTs is at least 2, you can create two different RTs at the beginning for selection. Later, when determining the output RT for multiple rendering nodes, you can consider adding the newly created RT or not according to the actual situation.

[0118] The above method of determining the output RT uses a greedy algorithm to select the output RT of the current rendering node from the created RTs. If there is an available RT among the created RTs, an available RT is directly used as the output RT of the current rendering node. If there is no available RT among the created RTs, it means that the number of currently created RTs cannot meet the demand, and a new RT needs to be created as the output RT.

[0119] In some embodiments, the RT size configured for each rendering node can be obtained, and then an output RT can be determined for each rendering node based on the first association relationship. Specifically, based on the first association relationship, a first RT whose size is greater than or equal to the RT size can be determined as the output RT for each rendering node. In other words, when selecting an output RT, the output RT size must meet certain RT size requirements. The RT size can refer to the number of pixels corresponding to the rendered texture. This method of selecting an output RT ensures that an output RT that meets the RT size requirements is selected for each rendering node.

[0120] In the embodiment corresponding to (1) above, the method for determining the input RT for each rendering node according to the first association relationship may be: if the first target rendering node is determined to be the initial rendering node according to the first association relationship, the designated RT is determined to be the input RT of the first target rendering node; if the first target rendering node is determined to be another rendering node according to the first association relationship, the output RT of the rendering node one level above the first target rendering node is determined to be the input RT of the first target rendering node.

[0121] For example, assuming that the created RTs include RT1 and RT2, where RT1 is the designated RT of the initial input, if the initial rendering node has an input RT, the following is followed: Figure 3 When determining RT in the node graph shown in (b): the input RT of P1 can be the specified RT1. When selecting the output RT for P1, if it is determined that there is an available RT2 in the created RT, then RT2 can be used as the output RT of P1. This RT2 is also the input RT of P2. When selecting the output RT for RT2, if it is determined that there is an available RT1 in the created RT, then RT1 can be used as the input RT of P2. This RT1 is also the input RT of P3. When selecting the output RT for P3, if it is determined that there is an available RT2 in the created RT, then RT2 can be used as the output RT of P3. This RT2 is also the input RT of P4. When selecting the output RT for P4, if it is determined that there is an available RT1 in the created RT, then RT1 can be used as the output RT of P4. The second association relationship finally determined in this example is as follows: Figure 4 As shown, Figure 4 The dotted arrows in the middle indicate the association relationship between the four rendering nodes, and the solid arrows indicate the second association relationship.

[0122] In the embodiment corresponding to (2) above, determining the input RT for the other rendering nodes according to the first association relationship includes: if the first target rendering node is determined to be the other rendering node according to the first association relationship, determining the output RT of the upper-level rendering node of the first target rendering node as the input RT of the first target rendering node;

[0123] Further, if the first target rendering node is determined to be the initial rendering node according to the first association relationship, no input RT is determined for the first target rendering node.

[0124] For example, assuming that the created RTs include RT1 and RT2, and there is no designated RT for initial input, in the case where the initial rendering node does not have an input RT, the following is followed: Figure 3When selecting RT in the node graph shown in (b): P1 has no input RT. When selecting output RT for P1, it is determined that there are available RT1 and RT2 in the created RT. Then, any RT can be selected from RT1 and RT2 as the output RT of P1. Assuming that RT2 is selected as the output RT, and RT2 is also the input RT of P2, when selecting output RT for RT2, it is determined that there is available RT1 in the created RT. Then, RT1 can be used as the input RT of P2. This RT1 is also the input RT of P3. When selecting output RT for P3, it is determined that there is available RT2 in the created RT. Then, RT2 can be used as the output RT of P3. This RT2 is also the input RT of P4. When selecting output RT for P4, it is determined that there is available RT1 in the created RT. Then, RT1 can be used as the output RT of P4. The second association relationship finally determined in this example is as follows: Figure 5 shown. Figure 5 The dotted arrows in the middle indicate the association relationship between the four rendering nodes, and the solid arrows indicate the second association relationship.

[0125] During the actual rendering process, the output of the last rendering node must be guaranteed to be the final RT (i.e., outputRT). This RT is usually the RT to be displayed, so this RT is generally specified. Therefore, after obtaining the number of RTs of multiple rendering nodes and the second association relationship according to the greedy algorithm above, it is also necessary to determine whether the output RT of the last rendering node is outputRT. If not, it is exchanged with the output RTs of all rendering nodes whose outputs are outputRT.

[0126] That is, in some embodiments, determining the second association relationship based on the first association relationship may include: first determining a target association relationship between the plurality of rendering nodes and at least two RTs based on the first association relationship; then, if the output RT of the last rendering node in the target association relationship is not the final RT, swapping the output RT of the last rendering node with the output RT of a second target rendering node to update the target association relationship to a second association relationship, wherein the second target rendering node is a rendering node other than the last rendering node in the plurality of rendering nodes whose input RT is the final RT; and if the output RT of the last rendering node in the target association relationship is the final RT, setting the target association relationship as the second association relationship.

[0127] For example, it is assumed that the association relationship between the multiple rendering nodes and at least two RTs obtained at the beginning of the greedy algorithm is as follows: Figure 5 As shown in, but Figure 5The output RT of the last rendering node P4 is RT1, which is not the final RT. RT2 is the final RT. Then RT1 and RT2 can be swapped, so that the association relationship obtained at the beginning can be updated, and the result is as follows: Figure 6 The solid arrows indicate the relationship.

[0128] The method for determining the rendering process provided in the embodiment of the present disclosure is implemented by the RT manager of the rendering engine. For example, all RT creation processes can be handed over to the RT manager, and the RT manager creates RT and determines the corresponding input RT and output RT for each rendering node based on the connection status of the nodes. In this way, it is possible to automatically generate an RT manager including at least two RTs according to the node graph (that is, the first association relationship), and then implement the entire rendering process based on the RT manager. With this set of RT managers including at least two RTs, there is no need to manually set the input and output RT for each node. Moreover, there is no need to know whether the output RT of a certain Pass is RT1 or RT2, you only need to care about the association relationship between multiple Passes. This greatly simplifies the process of determining the rendering process.

[0129] The rendering process determination method provided by the embodiments of the present disclosure can directly determine at least two RTs to be used, and the second association relationship between these rendering nodes and the at least two RTs, based on the first association relationship between multiple rendering nodes. In this way, the rendering process can be determined based on the second association relationship. Compared with the method of creating a Camera for each Pass and specifying an RT for each Camera, the RT is no longer bound to the Camera. Such a rendering process can be implemented using only one Camera, so the rendering process is simple. Moreover, since the RT is no longer bound to the Camera, there is no need to modify the binding relationship between the RT and the Camera after adding a Pass. The rendering process can be automatically determined based on the updated binding relationship between the multiple Passes, thereby simplifying the rendering process and reducing the complexity of modifying the rendering process.

[0130] like Figure 7 As shown, an embodiment of the present disclosure provides a rendering process determination device, the device comprising:

[0131] An acquisition module 701 is configured to acquire a first association relationship between multiple rendering nodes;

[0132] A determination module 702 is configured to determine, based on the first association relationship, at least two RTs corresponding to the plurality of rendering nodes and a second association relationship, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two RTs;

[0133] According to the second association relationship, a rendering process is determined.

[0134] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0135] Determine an output RT for each rendering node according to the first association relationship, and determine an input RT for each rendering node to determine at least two RTs;

[0136] A second association relationship is determined according to the output RT and input RT of each rendering node.

[0137] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0138] Determine an output RT for each rendering node according to the first association relationship, and determine an input RT for other rendering nodes other than the initial rendering node, to determine at least two RTs;

[0139] A second association relationship is determined according to the output RT of the initial rendering node and the input RT and output RT of other rendering nodes.

[0140] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0141] Determine, based on the first association relationship, whether there is an available RT for the first target rendering node in the created RTs, where the available RT refers to an RT in the created RTs that is not used as an input RT of the first target rendering node;

[0142] If there is an available RT among the created RTs, the available RT is used as the output RT of the first target rendering node;

[0143] If there is no available RT in the created RT, create a new RT as the output RT of the first target rendering node;

[0144] The first target rendering node is any rendering node among the multiple rendering nodes.

[0145] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0146] If the first target rendering node is determined to be the initial rendering node according to the first association relationship, the specified RT is determined as the input RT of the first target rendering node;

[0147] If it is determined that the first target rendering node is another rendering node according to the first association relationship, the output RT of the upper-level rendering node of the first target rendering node is determined as the input RT of the first target rendering node.

[0148] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0149] If it is determined that the first target rendering node is another rendering node according to the first association relationship, the output RT of the rendering node one level above the first target rendering node is determined as the input RT of the first target rendering node;

[0150] The determination module 702 is further configured to:

[0151] If the first target rendering node is determined to be the initial rendering node according to the first association relationship, no input RT is determined for the first target rendering node.

[0152] As an optional implementation of the embodiment of the present disclosure, the acquisition module 701 is further configured to:

[0153] Before the determination module 702 determines the output RT for each rendering node according to the first association relationship, the RT size configured for each rendering node is obtained;

[0154] The determination module 702 is specifically configured to:

[0155] According to the first association relationship, a first RT whose size is greater than or equal to the RT size is determined as an output RT of each rendering node.

[0156] As an optional implementation of the embodiment of the present disclosure, the determination module 702 is specifically configured to:

[0157] Determining target association relationships between the plurality of rendering nodes and at least two RTs according to the first association relationship;

[0158] If the output RT of the last rendering node in the target association relationship is not the final RT, swapping the output RT of the last rendering node with the output RT of the second target rendering node to update the target association relationship to a second association relationship, wherein the second target rendering node is a rendering node whose input RT is the final RT among the rendering nodes other than the last rendering node among the plurality of rendering nodes;

[0159] If the output RT of the last rendering node in the target association relationship is the final RT, the target association relationship is used as the second association relationship.

[0160] As an optional implementation of the embodiment of the present disclosure, the acquisition module 701 is specifically configured to:

[0161] Obtain a configuration file, which includes: an input rendering node corresponding to each rendering node;

[0162] According to the configuration file, obtain the first association relationship;

[0163] or,

[0164] Obtain the configuration file and draw a correlation diagram based on the configuration file;

[0165] According to the association relationship diagram, a first association relationship is obtained.

[0166] like Figure 8 As shown, an embodiment of the present disclosure provides an electronic device, comprising: a processor 801, a memory 802, and a computer program stored in the memory 802 and executable on the processor 801. When the computer program is executed by the processor 801, each process of the rendering process determination method in the above-mentioned method embodiment is implemented. The same technical effects can be achieved, and to avoid repetition, they are not described here.

[0167] An embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the various processes of the rendering process determination method in the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0168] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0169] An embodiment of the present invention provides a computer program product, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of the rendering process determination method in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0170] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0171] In the present disclosure, a processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0172] In this disclosure, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

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

[0174] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.

[0175] The above are merely specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to these embodiments, but is to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A rendering process determination method, characterized in that: include: Obtaining a first association relationship of multiple rendering nodes; Determining at least two rendering textures corresponding to the plurality of rendering nodes based on the first association relationship, and determining a second association relationship based on the at least two rendering textures corresponding to the plurality of rendering nodes, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two rendering textures; A rendering process is determined according to the second association relationship.

2. The method according to claim 1, characterized in that The determining, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes, and determining a second association relationship based on the at least two rendering textures corresponding to the plurality of rendering nodes includes: Determine an output rendering texture for each rendering node and an input rendering texture for each rendering node according to the first association relationship, so as to determine the at least two rendering textures; The second association relationship is determined according to the output rendering texture and the input rendering texture of each rendering node.

3. The method according to claim 1, characterized in that The determining, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes, and determining a second association relationship based on the at least two rendering textures corresponding to the plurality of rendering nodes includes: Determine an output rendering texture for each rendering node according to the first association relationship, and determine an input rendering texture for other rendering nodes other than the initial rendering node, so as to determine the at least two rendering textures; The second association relationship is determined according to the output rendering texture of the initial rendering node, and the input rendering textures and output rendering textures of the other rendering nodes.

4. The method according to claim 2 or 3, characterized in that Determining an output rendering texture for each rendering node according to the first association relationship includes: Determining, based on the first association relationship, whether there is an available render texture for a first target render node among the created render textures, where the available render texture refers to a render texture among the created render textures that is not used as an input render texture for the first target render node; If the available render texture exists in the created render textures, using the available render texture as the output render texture of the first target render node; If the available render texture does not exist in the created render textures, creating a new render texture as the output render texture of the first target render node; The first target rendering node is any one of the multiple rendering nodes.

5. The method according to claim 2, characterized in that Determining an input rendering texture for each rendering node according to the first association relationship includes: If the first target rendering node is determined to be the initial rendering node according to the first association relationship, then the designated rendering texture is determined as the input rendering texture of the first target rendering node; If it is determined according to the first association relationship that the first target rendering node is another rendering node, the output rendering texture of the rendering node one level above the first target rendering node is determined as the input rendering texture of the first target rendering node.

6. The method according to claim 3, characterized in that The step of determining input rendering textures for other rendering nodes according to the first association relationship includes: If it is determined according to the first association relationship that the first target rendering node is another rendering node, then determining the output rendering texture of the rendering node one level above the first target rendering node as the input rendering texture of the first target rendering node; The method further comprises: If, according to the first association relationship, the first target rendering node is determined to be an initial rendering node, no input rendering texture is determined for the first target rendering node.

7. The method according to claim 2, characterized in that Before determining the output rendering texture for each rendering node according to the first association relationship, the method further includes: Get the render texture size configured for each render node; Determining an output rendering texture for each rendering node according to the first association relationship includes: According to the first association relationship, a first rendering texture having a size greater than or equal to the rendering texture size is determined as the output rendering texture of each rendering node.

8. The method according to claim 1, characterized in that The determining the second association relationship according to the first association relationship includes: Determining, based on the first association relationship, a target association relationship between the plurality of rendering nodes and the at least two rendering textures; If the output render texture of the last render node in the target association relationship is not the final render texture, swapping the output render texture of the last render node with the output render texture of a second target render node, so as to update the target association relationship to the second association relationship, wherein the second target render node is a render node other than the last render node among the plurality of render nodes, the input render texture of which is the final render texture; If, in the target association relationship, the output rendering texture of the last rendering node is the final rendering texture, the target association relationship is used as the second association relationship.

9. The method according to claim 1 or 2, characterized in that The obtaining of the first association relationship of the plurality of rendering nodes includes: Obtaining a configuration file, wherein the configuration file includes: an input rendering node corresponding to each rendering node; Acquire the first association relationship according to the configuration file; or, Obtaining the configuration file, and drawing a correlation diagram based on the configuration file; According to the association relationship diagram, the first association relationship is obtained.

10. A rendering process determination device, characterized in that: include: An acquisition module, configured to acquire a first association relationship between multiple rendering nodes; a determining module, configured to determine, based on the first association relationship, at least two rendering textures corresponding to the plurality of rendering nodes, and determine a second association relationship based on the at least two rendering textures corresponding to the plurality of rendering nodes, wherein the second association relationship is an association relationship between the plurality of rendering nodes and the at least two rendering textures; A rendering process is determined according to the second association relationship.

11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the rendering process determination method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the rendering process determination method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • File rendering system and method and electronic equipment

    CN110599576A

  • Map rendering method and device

    CN111435548A