CN115761093A - Rendering method, rendering device, electronic equipment and storage medium - Google Patents
Rendering method, rendering device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115761093A CN115761093A CN202211459437.2A CN202211459437A CN115761093A CN 115761093 A CN115761093 A CN 115761093A CN 202211459437 A CN202211459437 A CN 202211459437A CN 115761093 A CN115761093 A CN 115761093A
- Authority
- CN
- China
- Prior art keywords
- scene
- displayed
- window
- dependency relationship
- objects
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure provides a rendering method, a rendering device, electronic equipment and a storage medium, relates to the technical fields of computer vision, augmented reality, virtual reality and the like, and can be applied to scenes such as a meta universe and the like. The specific implementation scheme is as follows: acquiring at least one window object, wherein the window objects correspond to windows to be displayed one by one; traversing each window object to obtain a scene object having a first dependency relationship with each window object, wherein the scene objects correspond to scenes to be displayed one by one; traversing each scene object to acquire object objects having a second dependency relationship with each scene object, wherein the object objects correspond to the objects to be displayed one by one; and rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed. Thus, at least one scene content can be displayed in one window, and at least one scene content can be displayed in a plurality of windows.
Description
Technical Field
The present disclosure relates to the field of artificial intelligence technologies, and in particular, to the technical fields of computer vision, AR (Augmented Reality), VR (Virtual Reality), and the like, which can be applied to scenes such as the meta universe, and in particular, to a rendering method, an apparatus, an electronic device, and a storage medium.
Background
With the rapid development of computer technology, VR or AR technology can be applied to a plurality of fields such as virtual games, virtual libraries, vehicle displays, and building displays, and can render virtual objects in a virtual scene to a screen for display. With the rapid increase of the Processing capabilities of a CPU (Central Processing Unit) and a GPU (Graphic Processing Unit), for an AR rendering engine, rendering only a single virtual scene content and displaying the single virtual scene content to a single window may not meet the use requirements of a user.
Disclosure of Invention
The present disclosure provides a rendering method, apparatus, electronic device, and storage medium.
According to an aspect of the present disclosure, there is provided a rendering method including:
acquiring at least one window object; each window object corresponds to a window to be displayed;
traversing each window object to obtain a scene object having a first dependency relationship with each window object; each scene object corresponds to a scene to be displayed;
traversing each scene object to acquire an object having a second dependency relationship with each scene object; wherein each object corresponds to an object to be displayed;
rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed, in which the object to be displayed and the scene to be displayed are displayed.
According to another aspect of the present disclosure, there is provided a rendering apparatus including:
the first acquisition module is used for acquiring at least one window object; each window object corresponds to a window to be displayed;
the second acquisition module is used for traversing each window object to acquire a scene object having a first dependency relationship with each window object; each scene object corresponds to a scene to be displayed;
the third acquisition module is used for traversing each scene object to acquire an object having a second dependency relationship with each scene object; wherein each object corresponds to an object to be displayed;
and the rendering module is used for rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship so as to obtain at least one window to be displayed, in which the object to be displayed and the scene to be displayed are displayed.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a rendering method set forth in the above aspect of the disclosure.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium of computer instructions for causing a computer to perform a rendering method set forth in the above aspect of the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the rendering method set forth in the above aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of a rendering method according to a first embodiment of the disclosure;
fig. 2 is a schematic flowchart of a rendering method according to a second embodiment of the disclosure;
fig. 3 is a schematic flowchart of a rendering method according to a third embodiment of the disclosure;
fig. 4 is a schematic flowchart of a rendering method according to a fourth embodiment of the disclosure;
fig. 5 is a schematic flowchart of a rendering method according to a fifth embodiment of the disclosure;
FIG. 6 is a schematic diagram of class dependencies provided by an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of windows after rendering according to an embodiment of the present disclosure;
FIG. 8 is a timing diagram illustrating traversal and update of objects provided by an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a rendering apparatus according to a sixth embodiment of the present disclosure;
FIG. 10 shows a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
With the rapid increase of CPU and GPU processing power, user demands are also increasing, for example, for an AR rendering engine, a user may have a demand to render different virtual scene contents and display the different virtual scene contents to different windows. However, in the related art, it is only possible to display a single virtual scene content in one window, it is not possible to display a plurality of virtual scene contents in a plurality of windows, and it is also not possible to display the same virtual scene content in a plurality of windows.
In view of at least one of the above problems, the present disclosure provides a rendering method, an apparatus, an electronic device, and a storage medium.
A rendering method, an apparatus, an electronic device, and a storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings. Before describing embodiments of the present disclosure in detail, for ease of understanding, reference will first be made to the following commonly used technical terms:
and the scene manager (PassGroup) object is used for managing the scene node (PassNode) object and ensuring that the tick can be updated to all the PassNode objects every time the tick is updated.
The PassNode object is used for managing one or more Scene (Scene) objects and window objects (or referred to as screen objects), wherein one PassNode object corresponds to one display window.
Scene objects, which are used to manage object (Entity) objects in a Scene, may have one or more object objects in a Scene.
An Entity object, representing an object in the scene, is also the thing that is finally rendered.
Fig. 1 is a schematic flowchart of a rendering method according to a first embodiment of the disclosure.
The embodiment of the present disclosure is exemplified by the rendering method being configured in a rendering apparatus, and the rendering apparatus may be applied to any electronic device, so that the electronic device may perform a rendering function.
The electronic device may be any device with computing capability, for example, a PC (Personal Computer), a mobile terminal, a server, and the like, and the mobile terminal may be a hardware device with various operating systems, touch screens, and/or display screens, such as an in-vehicle device, a mobile phone, a tablet Computer, a Personal digital assistant, and a wearable device.
As shown in fig. 1, the rendering method may include the steps of:
In the disclosed embodiments, a window object may also be referred to as a screen object. The number of the window objects may be one or multiple, which is not limited in this disclosure.
In the embodiment of the present disclosure, each window object corresponds to one window to be displayed. For example, when the number of window objects is N, the number of windows to be displayed is also N. Wherein N is a positive integer.
In this embodiment of the present disclosure, each window object may be created according to window information of a window to be displayed corresponding to the window object. The window information may include a shape, a size, a position, and the like of a window to be displayed.
In this embodiment of the present disclosure, the number of the scene objects having the first dependency relationship with each window object may be one, or may also be multiple, which is not limited by the present disclosure. That is to say, in the window to be displayed corresponding to one window object, the window to be displayed is used for displaying the scene to be displayed corresponding to the scene object having the first dependency relationship with the window object.
In the embodiment of the present disclosure, the window objects may be traversed to determine scene objects having a first dependency relationship with the window objects, where each scene object corresponds to one scene to be displayed.
In the embodiment of the present disclosure, the number of the object objects having the second dependency relationship with each scene object may be one, or may also be multiple, and the present disclosure does not limit this. That is to say, in the scene to be displayed corresponding to each scene object, the object to be displayed corresponding to the object having the second dependency relationship with the scene object is displayed.
In the embodiment of the present disclosure, the scene objects may be traversed to determine object objects having a second dependency relationship with the scene objects, where each object corresponds to one object to be displayed.
And 104, rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed.
In the embodiment of the present disclosure, each object, each scene object, and each window object may be rendered based on a first dependency relationship and a second dependency relationship to obtain at least one to-be-displayed scene, where each to-be-displayed window displays a to-be-displayed scene corresponding to a scene object having a first dependency relationship with a corresponding window object, and the to-be-displayed scene displays a to-be-displayed object corresponding to an object having a second dependency relationship with a corresponding scene object.
That is to say, the object to be displayed corresponding to the object having the dependency relationship and the scene to be displayed corresponding to the scene object may be rendered into the window to be displayed corresponding to the window object having the dependency relationship corresponding to the scene object for display.
The rendering method of the embodiment of the disclosure includes the steps of obtaining at least one window object, wherein each window object corresponds to a window to be displayed; traversing each window object to acquire scene objects having a first dependency relationship with each window object, wherein each scene object corresponds to a scene to be displayed; traversing each scene object to obtain object objects having a second dependency relationship with each scene object, wherein each object corresponds to one object to be displayed; and rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed. Therefore, the scene to be displayed and the object to be displayed can be rendered into one window to be displayed for display, or the scene to be displayed and the object to be displayed can be rendered into a plurality of windows to be displayed for display, namely, one or more scene contents can be displayed in one window, one or more scene contents can be displayed in a plurality of windows, and the flexibility and the applicability of the method can be improved.
In the technical scheme of the present disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the related user are all performed under the premise of obtaining the consent of the user, and all meet the regulations of the related laws and regulations, and do not violate the good custom of the public order.
In order to clearly illustrate how each window object is obtained in the above embodiments of the present disclosure, the present disclosure also provides a rendering method.
Fig. 2 is a schematic flowchart of a rendering method according to a second embodiment of the disclosure.
As shown in fig. 2, the rendering method may include the steps of:
In the embodiment of the disclosure, the number of the windows to be displayed can be set by a user according to the requirement of the user. Specifically, the number of scenes to be displayed may be configured in response to a first configuration operation triggered by a user.
In the embodiment of the present disclosure, the scene node (PassNode) objects of the number may be created according to the number of windows to be displayed.
In the embodiment of the present disclosure, window objects corresponding to scene node objects may be created, where the scene node objects correspond to the window objects one to one, for example, the number of windows to be displayed is N, the number of scene node objects is N, and the number of window objects is also N.
That is, one scene node object is used to manage a window object corresponding to one window to be displayed, and is used to manage a scene object corresponding to at least one scene to be displayed in the window to be displayed.
In a possible implementation manner of the embodiment of the present disclosure, a user may set window information (for example, a shape, a size, a position, and the like of a window to be displayed) of a window to be displayed according to a requirement of the user, so that a window object corresponding to the window to be displayed and a scene node object may be created according to the window information of the window to be displayed.
As an example, window information of each window to be displayed may be configured in response to a second configuration operation triggered by a user, where the window information may include at least one of a shape, a size, and a position of a corresponding window to be displayed, so that a window object corresponding to each window to be displayed and each scene node may be created according to the window information of each window to be displayed.
Therefore, the user can set the window information of the window to be displayed according to the self requirement, and the window object is created according to the window information so as to meet the individual use requirements of different users.
And step 206, rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed.
For the explanation of steps 204 to 206, reference may be made to the related description in any embodiment of the present disclosure, and details are not repeated herein.
The rendering method disclosed by the embodiment of the disclosure can configure the number of the windows to be displayed according to the user requirements, so as to meet the personalized use requirements of different users.
In order to clearly illustrate how the first dependency relationship between the window object and the scene object is generated in the above embodiments, the present disclosure also proposes a rendering method.
Fig. 3 is a schematic flowchart of a rendering method according to a third embodiment of the disclosure.
As shown in fig. 3, the rendering method may include the steps of:
For the explanation of step 301, reference may be made to the related description in any embodiment of the present disclosure, which is not described herein again.
In the disclosed embodiment, the scene information may include information such as the shape, size, position, and color of the scene to be displayed.
In the embodiment of the present disclosure, the number of the scenes to be displayed in each window to be displayed may be one, or may also be multiple, which is not limited by the present disclosure.
In the embodiment of the present disclosure, for any window object, a scene object that the window object depends on may be created according to scene information of at least one scene to be displayed in a window to be displayed corresponding to the window object. The scene objects correspond to scenes to be displayed one by one.
In a possible implementation manner of the embodiment of the present disclosure, the user may set the scene information of each scene to be displayed according to the user's own requirements.
As an example, in response to a third configuration operation triggered by a user, configuring scene information of at least one to-be-displayed scene in a to-be-displayed window corresponding to the window object, where the scene information may include at least one of a shape, a size, a position, and a color of the corresponding to-be-displayed scene, so that a scene object corresponding to the at least one to-be-displayed scene may be created according to the scene information of the at least one to-be-displayed scene, where the scene object is in one-to-one correspondence with the to-be-displayed scene.
Therefore, the scene information of the scene to be displayed can be configured according to the user requirements, and the scene object can be created according to the scene information so as to meet the individual use requirements of different users.
In another possible implementation manner of the embodiment of the present disclosure, the scene to be displayed may be a VR scene, and the scene information of the scene to be displayed may be directly obtained from a pre-generated VR scene, and the scene object may be created according to the scene information of the scene to be displayed.
In the embodiment of the present disclosure, the window object may be added to a scene node object corresponding to the window object, and a scene object on which the window object depends may be added to a scene node object corresponding to the window object, so as to generate a first dependency relationship among the scene node object, the window object, and the scene object.
And step 306, rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed, in which the object to be displayed and the scene to be displayed are displayed.
The rendering method provided by the embodiment of the disclosure can effectively generate the first dependency relationship between the window object and the scene object by adding the window object and the scene object having the dependency relationship to the same scene node object.
In a possible implementation manner of the embodiment of the present disclosure, object objects having a dependency relationship with a part of the at least one scene node object may be further updated to meet an actual use requirement of a user. The above process is explained in detail with reference to fig. 4.
Fig. 4 is a flowchart illustrating a rendering method according to a fourth embodiment of the disclosure.
As shown in fig. 4, on the basis of any of the above embodiments, the rendering method may further include the following steps:
In the embodiment of the present disclosure, a target scene node object to be updated may be determined from the number of scene node objects in response to a first update instruction triggered by a user. The number of the target scene node objects may be one, or may also be multiple, which is not limited by the present disclosure.
As a possible implementation, a scene node object whose field indicates that updating is required may be used as the target scene node object.
As an example, in response to a fourth configuration operation triggered by the user, a target field of each scene object node may be configured, where the target field is used to indicate whether to update the corresponding scene node object. Therefore, in the present disclosure, the target scene node object to be updated may be determined from the scene node objects according to the target field of each scene node object. For example, a scene node object whose target field indicates that an update is required may be taken as the target scene node object.
Therefore, the user can set which objects to be displayed in the window objects corresponding to the scene node objects need to be updated according to the requirement of the user, and the personalized updating requirements of different users can be met.
In the disclosed embodiment, target scene objects having a first dependency relationship with each target scene node object may be queried. The target scene node object may be in a one-to-one correspondence relationship with the target scene object, or may be in a one-to-many relationship, which is not limited by the present disclosure.
In step 403, a target object having a second dependency relationship with the target scene object is queried.
In the embodiment of the present disclosure, a target object having a second dependency relationship with each target scene object may also be queried. The target scene object and the target object may be in a one-to-one correspondence relationship, or may also be in a one-to-many relationship, which is not limited by the present disclosure.
In the embodiment of the present disclosure, each object may have a corresponding update policy, for example, the update policy may be used to indicate a moving position, a moving direction, a moving speed, a scaling scale, and the like of the object to be displayed corresponding to the object.
In the embodiment of the present disclosure, a first update policy corresponding to each target object may be queried, and the corresponding target object may be updated according to the first update policy.
For example, for each target object, the object information of the object to be displayed corresponding to the target object may be updated according to the corresponding first update instruction, and the target object may be updated according to the updated object information of the object to be displayed, so as to obtain an updated target object.
In the embodiment of the present disclosure, the updated target object may be rendered based on the first dependency relationship and the second dependency relationship, so as to obtain a window to be displayed, where the window to be displayed displays an object corresponding to the updated target object.
That is to say, the object to be displayed corresponding to the updated object having the dependency relationship and the scene to be displayed corresponding to the object scene object may be rendered into the window to be displayed corresponding to the window object having the dependency relationship with the object scene object for display.
The rendering method provided by the embodiment of the disclosure can update the object objects having a dependency relationship with part of the scene node objects, so as to meet the actual update requirements of users.
In order to clearly illustrate how the second dependency relationship between the scene object and the object is generated in the embodiment of the present disclosure, the present disclosure further provides a rendering method.
Fig. 5 is a schematic flowchart of a rendering method according to a fifth embodiment of the present disclosure.
As shown in fig. 5, the rendering method may include the steps of:
For the explanation of steps 501 to 502, reference may be made to the related description in any embodiment of the present disclosure, which is not described herein again.
In the embodiment of the present disclosure, for any scene object, an object may be created according to object information of an object to be displayed in a scene to be displayed corresponding to the scene object.
In a possible implementation manner of the embodiment of the present disclosure, the object information of each object to be displayed may be set by the user according to the user's own needs.
As an example, object information of an object to be displayed in a scene to be displayed corresponding to the scene object may be configured in response to a fifth configuration operation triggered by a user, where the object information may include physical attribute information and display attribute information corresponding to the object to be displayed, the physical attribute information may include at least one of a shape, a size, a transparency, and a material, and the display attribute information may include at least one of whether to display, a display position, and a display type (such as a top display, a bottom display, and the like). Thus, in the present disclosure, an object corresponding to at least one object to be displayed may be created according to object information of the at least one object to be displayed.
Therefore, the object information of the object to be displayed can be configured by the user according to the self requirement, and the object can be created according to the object information so as to meet the individual use requirements of different users.
In another possible implementation manner of the embodiment of the present disclosure, the object to be displayed may be a virtual object in a VR scene, object information of the object to be displayed may be directly obtained from a pre-generated VR scene, and an object is created according to the object information of the object to be displayed.
At step 504, an object is added to the scene object to generate a second dependency relationship between the scene object and the object.
In the embodiment of the present disclosure, the object may be added to the scene object to generate a second dependency relationship between the scene object and the object.
For the explanation of steps 505 to 506, reference may be made to the related description in any embodiment of the present disclosure, which is not described herein again.
In any of the disclosed embodiments, object objects having a dependency relationship with all scene node objects may also be updated to meet actual use requirements of users.
As an example, in response to a second update instruction triggered by the user, a second update policy corresponding to all object objects may be obtained, and each object may be updated according to the second update policy of each object. For example, for any object, the object information of the object to be displayed corresponding to the object may be updated according to the second update policy corresponding to the object, and the object may be updated according to the updated object information of the object to be displayed, so as to obtain an updated object. And then, rendering the updated object objects based on the first dependency relationship and the second dependency relationship to obtain a window to be displayed, in which the objects to be displayed corresponding to the updated object objects are displayed.
Therefore, all object objects can be updated to meet the actual updating requirements of users.
According to the rendering method, the object can be added into the scene object, and the second dependency relationship between the object and the scene object can be effectively generated.
In any embodiment of the present disclosure, the multi-window rendering may be implemented based on the following steps:
1. after the AR rendering engine is started, a global PassGroup object may be created, a corresponding PassNode object may be created according to the number of windows that need to be displayed (which is referred to as the number of windows to be displayed in this disclosure), and the window object (or the screen-up object) may be bound to the PassNode object, so as to ensure that one PassNode object corresponds to one window to be displayed.
2. And assembling scene objects according to the virtual scene information displayed in the window to be displayed, and adding the scene objects into the PassNode objects, wherein if the same virtual scene information needs to be displayed in a plurality of windows, the same scene object can be added into a plurality of PassNode objects.
3. And assembling each object according to the object information displayed in the virtual scene, and adding the object objects to the scene objects. The same object may be added to multiple scene objects if the same object needs to be displayed in different virtual scenes.
As an example, taking a window object as int _ fbo for example, the PassNode object may be added to the PassGroup object, and when there are multiple PassNode objects, a pass _ list may be added to the PassGroup object, where the list includes multiple PassNode objects. Also, a Scene (Scene) object may be added to the PassNode object, and a window object int _ fbo may be bound with the PassNode object. Finally, the object may be added to the Scene object, resulting in the class dependency graph shown in fig. 6.
4. The object may be rendered according to the class dependency graph shown in fig. 6, resulting in a plurality of display windows.
As an example, taking the number of windows to be displayed as 2, the rendered 2 windows may be as shown in fig. 7, where the scene information displayed in the area 71 in fig. 7 is different from the scene information displayed in the area 72, and the object information displayed in the area 73 is different from the object information displayed in the area 74.
Optionally, when the object in the window needs to be updated, the object objects in the scene objects in all PassNode objects in the PassGroup object may be updated; or, the object in the Scene object in the PassNode object whose field indicates that updating is required may be updated, that is, the object information of each Entity object may be updated by traversing the PassNode object and Scene object in the PassNode object. For example, object information corresponding to the object may be updated, where the object information may include a position, a transparency, a material, whether to display, and the like. After the object is updated, the object may be rendered based on the class dependency graph shown in fig. 6, so as to obtain a plurality of updated display windows.
As an example, a timing diagram of traversal and update of objects may be as shown in FIG. 8.
In summary, different virtual scene contents can be displayed in different windows, the same virtual scene content can be displayed in multiple windows, and the same object can be displayed in different virtual scenes. That is, different virtual scenes and virtual objects can be assembled according to actual application requirements, and any combination mode can be realized.
Corresponding to the rendering method provided in the embodiments of fig. 1 to 5, the present disclosure also provides a rendering apparatus, and since the rendering apparatus provided in the embodiments of the present disclosure corresponds to the rendering method provided in the embodiments of fig. 1 to 5, the implementation of the rendering method is also applicable to the rendering apparatus provided in the embodiments of the present disclosure, and is not described in detail in the embodiments of the present disclosure.
Fig. 9 is a schematic structural diagram of a rendering apparatus according to a sixth embodiment of the present disclosure.
As shown in fig. 9, the rendering apparatus 900 may include: a first obtaining module 901, a second obtaining module 902, a third obtaining module 903, and a rendering module 904.
The first obtaining module 901 is configured to obtain at least one window object; each window object corresponds to one window to be displayed.
A second obtaining module 902, configured to traverse each window object to obtain a scene object having a first dependency relationship with each window object; each scene object corresponds to a scene to be displayed.
A third obtaining module 903, configured to traverse each scene object to obtain an object having a second dependency relationship with each scene object; wherein each object corresponds to an object to be displayed.
And a rendering module 904, configured to render, based on the first dependency relationship and the second dependency relationship, each object, each scene object, and each window object, so as to obtain at least one window to be displayed, where the object to be displayed and the scene to be displayed are displayed.
In a possible implementation manner of the embodiment of the present disclosure, the first obtaining module 901 is configured to: responding to the first configuration operation, and configuring the number of the windows to be displayed; creating a number of scene node objects according to the number of windows to be displayed; window objects corresponding to the scene node objects are created.
In a possible implementation manner of the embodiment of the present disclosure, the first obtaining module 901 is configured to: responding to the second configuration operation, and configuring window information of each window to be displayed; according to the window information of each window to be displayed, creating a window object corresponding to each scene node object and each window to be displayed; wherein the window information includes at least one of a shape, a size, and a position corresponding to the window to be displayed.
In a possible implementation manner of the embodiment of the present disclosure, the rendering apparatus 900 may further include:
and the first creating module is used for creating a scene object according to the scene information of the scene to be displayed in the window to be displayed corresponding to the window object aiming at any window object.
And the first adding module is used for adding the window object to the corresponding scene node object and adding the scene object to the corresponding scene node object so as to generate a first dependency relationship among the scene node object, the window object and the scene object.
In a possible implementation manner of the embodiment of the present disclosure, the first creating module is configured to: responding to the third configuration operation, and configuring scene information of at least one scene to be displayed in the window to be displayed corresponding to the window object; according to the scene information of at least one scene to be displayed, creating a scene object corresponding to the at least one scene to be displayed; wherein the scene information includes at least one of a shape, a size, a position, and a color corresponding to the scene to be displayed.
In a possible implementation manner of the embodiment of the present disclosure, the rendering apparatus 900 may further include:
and the first determining module is used for responding to the first updating instruction and determining a target scene node object to be updated from the number of scene node objects.
And the first query module is used for querying the target scene object with the first dependency relationship with the target scene node object.
And the second query module is used for querying the target object with the second dependency relationship with the target scene object.
And the third query module is used for querying the first updating strategy corresponding to the target object.
And the first updating module is used for updating the target object according to the first updating strategy.
The rendering module 904 is further configured to render the updated target object based on the first dependency relationship and the second dependency relationship, so as to obtain a window to be displayed, where the window to be displayed displays an object corresponding to the updated target object.
In a possible implementation manner of the embodiment of the present disclosure, the rendering apparatus 900 may further include:
the configuration module is used for responding to the fourth configuration operation and configuring the target field of each scene node object; wherein the target field is used to indicate whether to update the scene node object.
Accordingly, a first determining module is configured to: and in response to the first updating instruction, determining a target scene node object to be updated from the number of scene node objects according to the target fields of the number of scene node objects.
In a possible implementation manner of the embodiment of the present disclosure, the rendering apparatus 900 may further include:
and the second creating module is used for creating an object according to the object information of the object to be displayed in the corresponding scene to be displayed aiming at any scene object.
And the second adding module is used for adding the object into the scene object so as to generate a second dependency relationship between the scene object and the object.
In a possible implementation manner of the embodiment of the present disclosure, the second creating module is configured to: responding to the fifth configuration operation, and configuring object information corresponding to at least one object to be displayed in the scene to be displayed; according to the object information of at least one object to be displayed, creating an object corresponding to the at least one object to be displayed; the object information comprises physical attribute information and display attribute information corresponding to an object to be displayed, the physical attribute information comprises at least one of shape, size, transparency and material, and the display attribute information comprises at least one of whether to display, display position and display type.
In a possible implementation manner of the embodiment of the present disclosure, the rendering apparatus 900 may further include:
and the fourth obtaining module is used for responding to the second updating instruction and obtaining a second updating strategy corresponding to each object.
And the second updating module is used for updating the object according to a corresponding second updating strategy aiming at any object.
The rendering module 904 is further configured to render the updated object objects based on the first dependency relationship and the second dependency relationship, so as to obtain a window to be displayed, where the object to be displayed corresponding to the updated object objects is displayed.
The rendering device of the embodiment of the disclosure obtains at least one window object, wherein each window object corresponds to one window to be displayed; traversing each window object to acquire scene objects having a first dependency relationship with each window object, wherein each scene object corresponds to a scene to be displayed; traversing each scene object to obtain object objects having a second dependency relationship with each scene object, wherein each object corresponds to one object to be displayed; and rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed. Therefore, the scene to be displayed and the object to be displayed can be rendered into one window to be displayed for display, or the scene to be displayed and the object to be displayed can be rendered into a plurality of windows to be displayed for display, namely, one or a plurality of scene contents can be displayed in one window, one or a plurality of scene contents can be displayed in a plurality of windows, and the flexibility and the applicability of the method can be improved.
To implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the rendering method according to any of the above embodiments of the disclosure.
In order to achieve the above embodiments, the present disclosure also provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the rendering method proposed by any of the above embodiments of the present disclosure.
In order to implement the above embodiments, the present disclosure further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the rendering method proposed by any one of the above embodiments of the present disclosure.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 10 shows a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure. The electronic device may include the server and the client in the above embodiments. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic apparatus 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1002 or a computer program loaded from a storage unit 1008 into a RAM (Random Access Memory) 1003. In the RAM1003, various programs and data necessary for the operation of the electronic apparatus 1000 can also be stored. The calculation unit 1001, the ROM 1002, and the RAM1003 are connected to each other by a bus 1004. An I/O (Input/Output) interface 1005 is also connected to the bus 1004.
A number of components in the electronic device 1000 are connected to the I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the electronic device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Various implementations of the systems and techniques described here above may be realized in digital electronic circuitry, integrated circuitry, FPGAs (Field Programmable Gate arrays), ASICs (Application-Specific Integrated circuits), ASSPs (Application Specific Standard products), SOCs (System On Chip, system On a Chip), CPLDs (Complex Programmable Logic devices), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an EPROM (erasable Programmable Read-Only-Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only-Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a Display device (e.g., a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), internet and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in a conventional physical host and a VPS (Virtual Private Server). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be noted that artificial intelligence is a subject for studying a computer to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware and software technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
Deep learning is a new research direction in the field of machine learning. It is an intrinsic rule and a presentation hierarchy of learning sample data, and information obtained in the learning process is very helpful for interpretation of data such as characters, images and sounds. The final aim of the method is to enable a machine to have analysis and learning capabilities like a human, and to recognize data such as characters, images and sounds.
Cloud computing (cloud computing) refers to a technology system that accesses a flexibly extensible shared physical or virtual resource pool through a network, where resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in an on-demand, self-service manner. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
According to the technical scheme of the embodiment of the disclosure, at least one window object is obtained, wherein each window object corresponds to one window to be displayed; traversing each window object to obtain scene objects having a first dependency relationship with each window object, wherein each scene object corresponds to a scene to be displayed; traversing each scene object to acquire object objects having a second dependency relationship with each scene object, wherein each object corresponds to one object to be displayed; and rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed for displaying the object to be displayed and the scene to be displayed. Therefore, the scene to be displayed and the object to be displayed can be rendered into one window to be displayed for display, or the scene to be displayed and the object to be displayed can be rendered into a plurality of windows to be displayed for display, namely, one or more scene contents can be displayed in one window, one or more scene contents can be displayed in a plurality of windows, and the flexibility and the applicability of the method can be improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions proposed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Claims (23)
1. A method of rendering, the method comprising:
acquiring at least one window object; each window object corresponds to a window to be displayed;
traversing each window object to obtain a scene object having a first dependency relationship with each window object; each scene object corresponds to a scene to be displayed;
traversing each scene object to acquire an object having a second dependency relationship with each scene object; wherein each object corresponds to an object to be displayed;
rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship to obtain at least one window to be displayed, in which the object to be displayed and the scene to be displayed are displayed.
2. The method of claim 1, wherein said obtaining at least one window object comprises:
responding to a first configuration operation, and configuring the number of the windows to be displayed;
creating the scene node objects of the number according to the number of the windows to be displayed;
and creating window objects corresponding to the scene node objects.
3. The method of claim 2, wherein said creating a window object corresponding to each of said scene node objects comprises:
responding to a second configuration operation, and configuring window information of each window to be displayed;
creating window objects corresponding to the scene node objects and the windows to be displayed according to the window information of the windows to be displayed;
wherein the window information includes at least one of a shape, a size, and a position of a corresponding window to be displayed.
4. The method of claim 2, wherein the method further comprises:
aiming at any one window object, creating a scene object according to scene information of a scene to be displayed in a window to be displayed corresponding to the window object;
adding the window object to a corresponding scene node object, and adding the scene object to the corresponding scene node object, to generate a first dependency relationship among the scene node object, the window object, and the scene object.
5. The method according to claim 4, wherein the generating a scene object according to the scene information of the scene to be displayed in the window to be displayed corresponding to the window object includes:
responding to a third configuration operation, and configuring scene information of at least one scene to be displayed in the window to be displayed corresponding to the window object;
according to the scene information of the at least one scene to be displayed, creating a scene object corresponding to the at least one scene to be displayed;
wherein the scene information includes at least one of a shape, a size, a position, and a color of a corresponding scene to be displayed.
6. The method of claim 4, wherein the method further comprises:
in response to a first update instruction, determining a target scene node object to be updated from the number of scene node objects;
querying a target scene object having a first dependency relationship with the target scene node object;
querying a target object having a second dependency relationship with the target scene object;
inquiring a first updating strategy corresponding to the target object, and updating the target object according to the first updating strategy;
rendering the updated target object based on the first dependency relationship and the second dependency relationship to obtain a window to be displayed for displaying an object to be displayed corresponding to the updated target object.
7. The method of claim 6, wherein the method further comprises:
responding to a fourth configuration operation, and configuring a target field of each scene node object;
wherein the target field is used for indicating whether to update the scene node object;
correspondingly, the determining, in response to the first update instruction, a target scene node object to be updated from the number of scene node objects includes:
and responding to a first updating instruction, and determining a target scene node object to be updated from the number of scene node objects according to the target fields of the number of scene node objects.
8. The method of any of claims 1-7, wherein the method further comprises:
aiming at any scene object, creating an object according to object information of an object to be displayed in a scene to be displayed;
adding the object to the scene object to generate a second dependency between the scene object and the object.
9. The method of claim 8, wherein generating the object according to the object information corresponding to the object to be displayed in the scene to be displayed comprises:
responding to a fifth configuration operation, and configuring object information of at least one object to be displayed in the corresponding scene to be displayed;
creating an object corresponding to the at least one object to be displayed according to the object information of the at least one object to be displayed;
the object information comprises physical attribute information and display attribute information corresponding to an object to be displayed, the physical attribute information comprises at least one of shape, size, transparency and material, and the display attribute information comprises at least one of whether to display, display position and display type.
10. The method according to any one of claims 1-7, wherein the method further comprises:
responding to a second updating instruction, and acquiring a second updating strategy corresponding to each object;
for any one object, updating the object according to a corresponding second updating strategy;
rendering each updated object based on the first dependency relationship and the second dependency relationship to obtain a window to be displayed, in which the object to be displayed corresponding to each updated object is displayed.
11. An apparatus for rendering, the apparatus comprising:
the first acquisition module is used for acquiring at least one window object; each window object corresponds to a window to be displayed;
the second acquisition module is used for traversing each window object to acquire a scene object having a first dependency relationship with each window object; each scene object corresponds to a scene to be displayed;
a third obtaining module, configured to traverse each of the scene objects to obtain an object having a second dependency relationship with each of the scene objects; wherein each object corresponds to an object to be displayed;
and the rendering module is used for rendering each object, each scene object and each window object based on the first dependency relationship and the second dependency relationship so as to obtain at least one window to be displayed, in which the object to be displayed and the scene to be displayed are displayed.
12. The apparatus of claim 11, wherein the first obtaining means is configured to:
responding to a first configuration operation, and configuring the number of the windows to be displayed;
creating the scene node objects of the number according to the number of the windows to be displayed;
and creating a window object corresponding to each scene node object.
13. The apparatus of claim 12, wherein the first obtaining means is configured to:
responding to a second configuration operation, and configuring window information of each window to be displayed;
creating window objects corresponding to the scene node objects and the windows to be displayed according to the window information of the windows to be displayed;
wherein the window information includes at least one of a shape, a size, and a position corresponding to a window to be displayed.
14. The apparatus of claim 12, wherein the apparatus further comprises:
the first creating module is used for creating a scene object according to scene information of a scene to be displayed in a window to be displayed corresponding to any window object;
a first adding module, configured to add the window object to a corresponding scene node object, and add the scene object to the corresponding scene node object, so as to generate a first dependency relationship among the scene node object, the window object, and the scene object.
15. The apparatus of claim 14, wherein the first creation module is to:
responding to a third configuration operation, and configuring scene information of at least one scene to be displayed in the window to be displayed corresponding to the window object;
according to the scene information of the at least one scene to be displayed, creating a scene object corresponding to the at least one scene to be displayed;
wherein the scene information includes at least one of a shape, a size, a position, and a color of a corresponding scene to be displayed.
16. The apparatus of claim 14, wherein the apparatus further comprises:
a first determining module, configured to determine, in response to a first update instruction, a target scene node object to be updated from the number of scene node objects;
the first query module is used for querying a target scene object with a first dependency relationship with the target scene node object;
the second query module is used for querying a target object with a second dependency relationship with the target scene object;
the third query module is used for querying the first updating strategy corresponding to the target object;
the first updating module is used for updating the target object according to the first updating strategy;
the rendering module is further configured to render the updated target object based on the first dependency relationship and the second dependency relationship, so as to obtain a window to be displayed, where the window to be displayed displays the object to be displayed corresponding to the updated target object.
17. The apparatus of claim 16, wherein the apparatus further comprises:
the configuration module is used for responding to a fourth configuration operation and configuring the target field of each scene node object;
wherein the target field is used to indicate whether to update the scene node object;
accordingly, the first determining module is configured to:
and responding to a first updating instruction, and determining a target scene node object to be updated from the number of scene node objects according to the target fields of the number of scene node objects.
18. The apparatus of any of claims 11-17, wherein the apparatus further comprises:
the second creating module is used for creating an object according to object information of an object to be displayed in a scene to be displayed aiming at any scene object;
a second adding module, configured to add the object to the scene object to generate a second dependency relationship between the scene object and the object.
19. The apparatus of claim 18, wherein the second creating module is to:
responding to a fifth configuration operation, and configuring object information of at least one object to be displayed in the corresponding scene to be displayed;
creating an object corresponding to the at least one object to be displayed according to the object information of the at least one object to be displayed;
the object information comprises physical attribute information and display attribute information corresponding to an object to be displayed, the physical attribute information comprises at least one of shape, size, transparency and material, and the display attribute information comprises at least one of whether to display, display position and display type.
20. The apparatus of any of claims 11-17, wherein the apparatus further comprises:
the fourth obtaining module is used for responding to a second updating instruction and obtaining a second updating strategy corresponding to each object;
the second updating module is used for updating the object according to a corresponding second updating strategy aiming at any object;
the rendering module is further configured to render the updated object objects based on the first dependency relationship and the second dependency relationship, so as to obtain a window to be displayed, where the updated object objects correspond to the objects to be displayed.
21. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the rendering method of any one of claims 1-10.
22. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the rendering method according to any one of claims 1-10.
23. A computer program product comprising a computer program which, when executed by a processor, carries out the steps of the rendering method according to any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211459437.2A CN115761093A (en) | 2022-11-21 | 2022-11-21 | Rendering method, rendering device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211459437.2A CN115761093A (en) | 2022-11-21 | 2022-11-21 | Rendering method, rendering device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115761093A true CN115761093A (en) | 2023-03-07 |
Family
ID=85334050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211459437.2A Pending CN115761093A (en) | 2022-11-21 | 2022-11-21 | Rendering method, rendering device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115761093A (en) |
-
2022
- 2022-11-21 CN CN202211459437.2A patent/CN115761093A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9754018B2 (en) | Rendering interpreter for visualizing data provided from restricted environment container | |
US10672161B2 (en) | Increasing readability of visualization nodes | |
CN113656587B (en) | Text classification method, device, electronic equipment and storage medium | |
CN112527281B (en) | Operator upgrading method and device based on artificial intelligence, electronic equipment and medium | |
CN115511779B (en) | Image detection method, device, electronic equipment and storage medium | |
CN113641677A (en) | Data processing method and device, electronic equipment and storage medium | |
CN112015468A (en) | Interface document processing method and device, electronic equipment and storage medium | |
CN112100302A (en) | Map information point display method, device, equipment and readable storage medium | |
CN113656533A (en) | Tree control processing method and device and electronic equipment | |
CN112947916B (en) | Method, apparatus, device and storage medium for implementing online canvas | |
CN112862934B (en) | Method, apparatus, device, medium, and product for processing animation | |
CN114417780A (en) | State synchronization method and device, electronic equipment and storage medium | |
CN114111813A (en) | High-precision map element updating method and device, electronic equipment and storage medium | |
CN113254043A (en) | Web front-end project processing method and device, electronic equipment and storage medium | |
CN113312560A (en) | Group detection method and device and electronic equipment | |
CN113326403A (en) | Flowchart rendering method and device, electronic equipment and medium | |
CN114564268A (en) | Equipment management method and device, electronic equipment and storage medium | |
CN115761093A (en) | Rendering method, rendering device, electronic equipment and storage medium | |
CN113849164A (en) | Data processing method and device, electronic equipment and memory | |
CN112765975B (en) | Word segmentation disambiguation processing method, device, equipment and medium | |
CN115309375B (en) | Processing method and device of application programming interface, electronic equipment and medium | |
CN116991693B (en) | Test method, device, equipment and storage medium | |
CN117827207A (en) | Dynamic construction method, device, equipment and medium of primitive panel | |
CN115983281A (en) | Information extraction and model acquisition method and device, electronic equipment and storage medium | |
CN114494950A (en) | Video processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |