A scene rendering method, device, apparatus and storage medium

CN116059632BActive Publication Date: 2026-09-18BEIJING ZITIAO NETWORK TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310063943.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2026-09-18
Estimated Expiration
2043-01-12

AI Technical Summary

Technical Problem

[0004]上述对所有景物的频繁渲染,造成了GPU渲染算力的过度消耗

Benefits of technology

[0019]The technical solution of this disclosure, through the provided scene rendering method, responds to the scene rendering operation of the target scene at the current rendering execution time. First, it obtains the information of the objects to be rendered in the scene to be rendered and the current position of the virtual camera. Then, using the information of the objects to be rendered and the current position, it searches for a pre-determined set of scene attribute information corresponding to the target scene, thereby determining the visible scene objects at the current rendering execution time. Finally, it renders only the visible scene objects, thus presenting the scene image corresponding to the target scene at the current rendering execution time. The above technical solution can filter the information of the objects to be rendered based on whether they are visible at the current rendering execution time by searching the set of scene attribute information of the target scene, thereby retaining only the visible scene objects in the information of the objects to be rendered and rendering only the visible scene objects. While ensuring rendering quality, this technical solution, unlike existing rendering methods that render all scene objects, only renders visible scene objects, effectively reducing rendering computational power consumption. Furthermore, unlike existing methods that directly reduce renderable scene objects through view frustum culling, this technical solution can simply and effectively filter invisible objects at the current location by querying and matching the scene attribute information set, effectively reducing computational resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116059632B_ABST
    Figure CN116059632B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a scene rendering method, device and equipment and storage medium, the method comprising: in response to the scene rendering operation of the target scene at the current rendering execution time, obtaining the to-be-rendered object information and the current position; through the to-be-rendered object information and the current position, searching for the scene attribute information set determined in advance relative to the target scene to determine the visible scene object at the current rendering execution time, the scene attribute information set comprising the visible object information related to the position; rendering the visible scene object to present the scene picture corresponding to the target scene at the current rendering execution time. By using the method, the to-be-rendered object information is filtered according to whether it is visible at the current rendering execution time, only the visible scene object in the to-be-rendered object information is retained, and only the visible scene object is rendered, thereby ensuring the rendering effect and effectively reducing the rendering computing power consumption of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer vision technology, and in particular to a scene rendering method, apparatus, device, and storage medium. Background Technology

[0002] Currently, applications such as virtual reality and games involve the rendering and presentation of three-dimensional spatial scenes. The rendering of three-dimensional spatial scenes depends on the three-dimensional spatial scene materials set in the design stage. That is, the objects presented in the three-dimensional spatial scene through rendering need to be pre-designed and stored as scene materials.

[0003] In traditional 3D scene rendering, the central processing unit (CPU) calls an interface to command the graphics processing unit (GPU) to render pre-designed scene materials. In practical applications, the scene is continuously rendered as the virtual camera's capture perspective changes within the 3D scene, and each rendering renders all objects within the scene, regardless of whether the rendered objects are within the scene's camera view.

[0004] The frequent rendering of all objects in the scene caused excessive consumption of GPU rendering computing power. In an improved implementation, the CPU can first perform view frustum culling calculation on the scene to be rendered to remove objects that do not need to be rendered. However, the entire view frustum culling calculation also caused excessive consumption of CPU computing power. Summary of the Invention

[0005] This disclosure provides a scene rendering method, apparatus, device, and storage medium to reduce the consumption of computing resources by computer devices during scene rendering.

[0006] In a first aspect, embodiments of this disclosure provide a scene rendering method, which includes:

[0007] In response to the scene rendering operation of the target scene at the current rendering execution time, obtain the information of the object to be rendered and its current position;

[0008] Using the information of the object to be rendered and the current position, the scene attribute information set relative to the target scene is searched to determine the visible scene objects at the current rendering execution time, wherein the scene attribute information set includes visible object information related to the position;

[0009] The visible scene objects are rendered to present the scene image of the target scene at the current rendering execution time.

[0010] Secondly, embodiments of this disclosure also provide a scene rendering apparatus, which includes:

[0011] The response module is used to respond to the scene rendering operation of the target scene at the current rendering execution time, and to obtain information about the object to be rendered and its current position;

[0012] The determination module is used to search for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and to determine the visible scene objects at the current rendering execution time. The set of scene attribute information includes visible object information related to the position.

[0013] The rendering module is used to render the visible scene objects and present the scene image of the target scene at the current rendering execution time.

[0014] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0015] One or more processors;

[0016] Storage device for storing one or more programs.

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the scene rendering method as described in any embodiment of the present invention.

[0018] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the scene rendering method as described in any embodiment of the present invention.

[0019] The technical solution of this disclosure, through the provided scene rendering method, responds to the scene rendering operation of the target scene at the current rendering execution time. First, it obtains the information of the objects to be rendered in the scene to be rendered and the current position of the virtual camera. Then, using the information of the objects to be rendered and the current position, it searches for a pre-determined set of scene attribute information corresponding to the target scene, thereby determining the visible scene objects at the current rendering execution time. Finally, it renders only the visible scene objects, thus presenting the scene image corresponding to the target scene at the current rendering execution time. The above technical solution can filter the information of the objects to be rendered based on whether they are visible at the current rendering execution time by searching the set of scene attribute information of the target scene, thereby retaining only the visible scene objects in the information of the objects to be rendered and rendering only the visible scene objects. While ensuring rendering quality, this technical solution, unlike existing rendering methods that render all scene objects, only renders visible scene objects, effectively reducing rendering computational power consumption. Furthermore, unlike existing methods that directly reduce renderable scene objects through view frustum culling, this technical solution can simply and effectively filter invisible objects at the current location by querying and matching the scene attribute information set, effectively reducing computational resource consumption. Attached Figure Description

[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 This is a schematic diagram of a scene rendering method provided in an embodiment of the present disclosure;

[0022] Figures 1a-1f The following is a demonstration of the scene texture map captured from different orientations at a certain location when determining the scene attribute information set in the scene rendering method provided in this embodiment;

[0023] Figure 2 A flowchart illustrating a scene rendering method provided in an embodiment of this disclosure is given;

[0024] Figure 3 This is a schematic diagram of the structure of a scene rendering device provided in an embodiment of the present disclosure;

[0025] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0026] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0027] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0028] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0030] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0031] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0032] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0033] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0034] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0035] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0036] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0037] It should be noted that the application scenario of this embodiment can be described as follows: After running, applications such as games or virtual reality applications that rely on three-dimensional spatial scenes need to perform scene rendering on the three-dimensional spatial scenes they rely on, thereby presenting a three-dimensional game scene or virtual display scene containing various scene objects. Currently, during scene rendering, regardless of the position of the virtual camera or virtual object presenting the scene, all scene objects contained in the three-dimensional scene model need to be rendered, and this rendering is required at every rendering moment. Considering that scene rendering mainly relies on the GPU, the aforementioned large amount and frequent rendering causes excessive consumption of GPU computing power, thus posing a significant challenge to the performance configuration of computer devices running games or virtual reality applications.

[0038] Existing methods also consider performing frustum culling on the scene objects to be rendered before rendering the scene. However, in the implementation of frustum culling in large-scale scenes, it will cause excessive consumption of computing resources of computer equipment, which will also bring great challenges to the performance configuration of computer equipment.

[0039] The scene rendering method provided in this embodiment can significantly reduce the consumption of computing resources of computer equipment during scene rendering while ensuring the scene rendering effect.

[0040] Figure 1 This is a schematic diagram of a scene rendering method provided in an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to the rendering of three-dimensional spatial scenes. The method can be executed by a scene rendering device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0041] like Figure 1As shown, the method in this embodiment may specifically include:

[0042] S101. In response to the scene rendering operation of the target scene at the current rendering execution time, obtain the information of the object to be rendered and its current position.

[0043] In this embodiment, the target scene can be a three-dimensional spatial application scene to be rendered in the running application software. This three-dimensional spatial scene can be a game scene in a game application, a virtual reality scene in a virtual reality application, or a three-dimensional map scene in an application such as an electronic map. The running application software needs to render its target scene in real time to ensure the visual presentation of the scene content within the application scene.

[0044] This embodiment can record the time point in the running application software where scene rendering is to be performed as the rendering execution time. For example, the rendering execution time can be the time corresponding to each frame change. Specifically, this embodiment can use the current time point where scene rendering is to be performed as the current rendering execution time. At each rendering execution time where scene rendering is to be performed, the scene rendering execution will be triggered by the scene rendering operation generated at the rendering execution time.

[0045] This step responds to scene rendering operations generated during the current rendering execution. By responding to these operations, all scene objects within the target scene are identified. These objects serve as the object information to be rendered in the current rendering execution, and their object information can be obtained. In this embodiment, this information can be referred to as the object information to be rendered. The object information to be rendered may include object identifiers for the scene objects, which can be unique identifiers assigned to the scene objects during their creation.

[0046] It's important to note that a key step in rendering a 3D scene is projecting it onto a 2D plane for display. This projection is primarily achieved using a virtual camera within the 3D scene. This virtual camera is analogous to a real camera in a real 3D space, or a person's perspective in real 3D space. Just as a real camera captures objects in a 3D space, creating a 2D photograph, the virtual 3D scene can be viewed as a virtual camera capturing images of objects within the scene, or as the viewpoint of a virtual object (like a virtual character), thus presenting a 2D plane containing the scene's content.

[0047] In this embodiment, to render the target scene at the current rendering execution time, it is also necessary to obtain the current capture position of the virtual camera in the target scene at the current rendering time, or the position of the virtual object at the current rendering time. This embodiment can use the current capture position or the position of the virtual object as, but is not limited to, the current position in this embodiment. It is known that when rendering the scene from the perspective of the virtual object, the position where the virtual object moves can also be regarded as the capture position from the perspective of the virtual object. Therefore, for ease of description, the following description of the scene rendering method will use the current capture position of the virtual camera as, but is not limited to, the current position.

[0048] Understandably, in different virtual space scenarios, the capture position of a virtual camera can move as the associated scene character moves. The scene image captured by the virtual camera is equivalent to the scene image that the associated scene character can see from their current position in the virtual space. For example, in virtual reality applications, the virtual camera is associated with the user wearing the virtual reality device, and the virtual reality image captured by the virtual camera can be considered the scene image currently visible to the user. When the user's position changes (e.g., walking forward, backward, jumping, etc.), the capture position of the virtual camera also changes, and the scene rendered also changes.

[0049] S102. Using the information of the object to be rendered and the current position, search for the set of scene attribute information relative to the target scene, and determine the visible scene objects at the current rendering execution time.

[0050] As is known, in existing scene rendering, after determining the information of the object to be rendered and the current capture position of the virtual camera, interface commands can be called to render the information of the object to be rendered. Then, based on the current capture position of the virtual camera, the scene image within the capture range is presented, and the scene image includes the rendered image content of the scene objects within that capture range. When the target scene is a large scene containing a large number of scene objects, the existing scene rendering method will cause excessive consumption of image processing computing resources.

[0051] In this embodiment, this step is equivalent to screening the information of the object to be rendered before rendering. This step can determine whether the information of the object to be rendered can be captured by the camera when the virtual camera is in the current capture position by querying the scene attribute information set of the target scene, and if it is a camera-captureable object, it is determined as a visible scene object at the current rendering execution time.

[0052] This step uses the obtained object-to-be-rendered information to query the scene attribute information set to determine all visible scene objects that can be captured at the current capture position. This is equivalent to determining the visible scene objects at the current rendering execution time. The scene image formed by the virtual camera capturing scene objects within its capture range at the current capture position is equivalent to only including the image information of visible scene objects; while the filtered non-visible scene objects, even if rendered, cannot be presented in the rendered scene image due to the virtual camera's current capture position. Therefore, by determining the visible scene objects in this step before rendering the object-to-be-rendered information in the target scene, we can ensure the image quality of the rendered scene image while effectively saving the image processing computing power consumption of scene rendering.

[0053] In this embodiment, the scene attribute information set can be understood as a set of scene information related to the rendering of the target scene. The scene attribute information set includes visible object information related to the capture position of the virtual camera, as well as object-related information of scene objects in the target scene. The scene attribute information set can be determined during the creation stage of the target scene.

[0054] Specifically, when executing the logic of searching the scene attribute information set, this step can determine whether the object information to be rendered belongs to the scene objects contained in the target scene by using the object-related information contained therein (in practical applications, there are some cases where it does not belong to the scene object itself but can still be used as the object information to be rendered). If it does not exist, the object information to be rendered can be directly determined as the visible scene object at the current rendering time. If it exists, the visible object information can be searched in the scene attribute information set by the current capture position, and when it is determined that the visible object information matching the current capture position contains the object information to be rendered, the corresponding scene object to be rendered is determined as the visible scene object at the current rendering time.

[0055] It should be noted that the set of scene attribute information for the target scene can be determined during the offline creation stage of the target scene, and the key to determining the set of scene attribute information lies in determining the information of the visible objects included.

[0056] One approach to determining visible object information can be described as follows: During the offline creation phase of the target scene, the virtual camera capture position can be sampled in the spatial region of the target scene model associated with the target scene, thereby determining a certain number of sampling points, which can be used as the capture positions of the virtual camera. Then, the capture image that the virtual camera can present at each capture position can be obtained. Each capture image can be formed based on the color data information of the scene objects in the target scene, and the color data information of the scene objects in the target scene can be determined after the target scene is created and offline scene rendering is performed.

[0057] As described above, based on the color data information contained in the captured image, it can be determined which scene objects are included in the captured image. The included scene objects can be considered as the scene objects that the virtual camera can capture at this capture position. Finally, based on the scene objects that can be captured at different sampling positions, the visible object information related to the position can be used to construct the scene attribute information set.

[0058] S103. Render the visible scene objects to present the scene image of the target scene at the current rendering execution time.

[0059] In this embodiment, after filtering out the visible scene objects at the current rendering moment from the scene objects to be rendered through the above steps, this step can be used to render only the visible scene objects. The rendered scene image includes the scene objects that the virtual camera can capture within its current capture range. This scene image can also be considered as the image displayed on the device screen after scene rendering at the current rendering moment.

[0060] This embodiment provides a scene rendering method that, during the rendering execution phase, filters the information of objects to be rendered based on whether they are visible at the current rendering execution time by searching the scene attribute information set of the target scene. This retains only visible scene objects from the object information to be rendered, and only renders visible scene objects. While ensuring rendering quality, unlike existing rendering methods that render all scene objects, this technical solution effectively reduces rendering computational power consumption by rendering only visible scene objects. Furthermore, unlike existing methods that directly reduce renderable scene objects through view frustum culling, this technical solution only needs to query and match the scene attribute information set to simply and effectively filter invisible objects at the current capture position, effectively reducing the consumption of computer resources.

[0061] To improve scene rendering, a technical improvement has been proposed that filters out non-visible objects by determining the visibility of scene objects before frustum culling. In implementing this improvement, it is necessary to first confirm the visible object information of the 3D scene. The existing method of determination requires combining the intersection of light rays and geometric objects in the scene to detect whether there is a collision between the light ray point and the geometric object. If there is a collision, it is considered a visible scene object.

[0062] The above-mentioned method for determining visible objects has the following problems: 1) This method only has a good effect on determining some convex hull objects in the scene, but it is difficult to effectively determine objects in scenes with holes; 2) This method cannot guarantee the rationality of the sampling perspective. When determining visible objects in the scene from different sampling perspectives, it is difficult to guarantee the stability of the determination results; 3) When finding the intersection between light rays and geometric objects in the scene, it is necessary to perform complex tree structure management on the 3D scene model, which increases the computational power consumption. At the same time, when finding the intersection with some complex-shaped geometric objects, the stability of the intersection results cannot be guaranteed. Therefore, when filtering out non-visible objects using the visible objects determined by the above method, it is neither able to save computational resources well nor can it guarantee the accuracy of the filtering results.

[0063] From the above description, it can be understood that the key to implementing the scene attribute information set in the above embodiments is as follows: As a first optional embodiment of this embodiment, the steps for determining the scene attribute information set of the target scene are further given. The scene attribute information set of the target scene can be determined during the creation stage of the target scene. Specifically, based on the above optimization, the determination of the scene attribute information set may include the following steps:

[0064] a1) Divide the feasible space region in the target scene model into blocks to obtain at least one subspace block.

[0065] In this embodiment, the target scene model can be considered as a three-dimensional spatial model presented on the corresponding creation interface during the target scene creation stage. Scene creators can add scene objects to the created three-dimensional spatial model. Each scene object can be an independently created object material. After the object material is created, it can be added to the target scene model to form a scene object.

[0066] It should be noted that any object assets existing in the target scene model can serve as scene objects in the target scene, and the type of scene object is not limited. It can be any object that can be presented in a real scene, such as rivers, roads, flowers, trees, etc., or it can be buildings such as walls and houses, or even virtual scene characters. Furthermore, for target scenes containing a large number of scene objects, the presented scene objects may contain nested sub-scenes. For example, a house may be a scene object in the target scene, but the interior of the house, as a walkable area, is equivalent to a nested sub-scene within the house. Therefore, the more scene objects a scene contains, the higher its complexity.

[0067] In this embodiment, determining the scene attribute information set hinges on identifying the visible object information included within it. Since the visible object information is related to the virtual camera's capture position, determining this information requires sampling the capture position within the target scene model. In conventional implementations, sampling points can be randomly selected directly within the target scene model as the virtual camera's capture position.

[0068] However, this method suffers from the problem of invalid selected capture positions. Specifically, when the target scene model is a complex, large-scale scene model, random sampling within such a model results in weak representativeness. Furthermore, the capture position determined by random sampling may lack meaningful capture information. For example, if the capture position is located in front of a wall that prevents movement, other scene objects may not be visible within the virtual camera's capture range, rendering the visible object information determined based on that capture position largely meaningless. In other words, the stability of determining the virtual camera capture position using conventional methods is poor.

[0069] To better address the aforementioned issues, this embodiment first considers dividing the target scene into spatial regions before sampling the capture position of the virtual camera. The target scene is divided into multiple sub-space blocks, and then the capture position is sampled in each sub-space block. At the same time, to ensure that each capture position determined by the sampling has capture significance, this embodiment further considers determining a walkable space region in the target scene model before dividing the target scene model into regions. The walkable space can be understood as the area in the target scene where the virtual character or immersive experiencer can walk or pass through.

[0070] Understandably, for applications such as games and virtual reality that primarily present three-dimensional spatial scenes, the virtual camera's capture perspective is mainly the player's perspective. That is, the capture position of the virtual camera is often the player's position in the three-dimensional spatial scene, and the player's position is mostly a traversable area within the three-dimensional spatial scene. Therefore, this embodiment considers dividing the traversable area in the target scene model into sub-space blocks, reducing the number of sub-space block divisions while ensuring that the determined capture position has capture significance.

[0071] In this embodiment, the walkable space area can be determined based on the object attributes of the scene objects contained in the target scene model. For example, one can view the object attributes as roads, rivers, blocks, squares, etc. from the panoramic view of the entire target scene model and take the space area formed by these areas as the walkable space area. In addition, when a scene object is determined to be a building, the space inside the building can be taken as a sub-scene and then the walkable space area can be determined. For example, a room can be taken as a walkable space area, or a staircase or other passable area in a building can also be taken as a walkable space area.

[0072] This embodiment can limit the size of the drivable space region based on its location information in the target scene model, and form region attribute information (which may include the region's start and end positions and size).

[0073] In this embodiment, the partitioning information upon which the subspace blocks depend can be determined by combining the regional attribute information of the determined drivable space region. The partitioning information can be the block size of the subspace blocks to be partitioned. For example, assuming a road constitutes a drivable space region, the region size of this drivable space region can be the width and length of the road. In this embodiment, half the road width can be used as the length, width, and height of the subspace block, and the determined length, width, and height values ​​are also used as the block size of the subspace blocks in this drivable space region. This step can divide each drivable space region into subspace blocks according to the determined block size, thereby obtaining at least one subspace block for each drivable space region.

[0074] Based on this first optional embodiment, the feasible space region in the target scene model can be further divided into blocks to obtain at least one sub-space block. Specifically, this can be optimized as follows:

[0075] a11) Obtain the feasible space region from the target scene model.

[0076] As can be seen, in the target scene construction phase, a target scene model is used to represent the constructed target scene. This embodiment can determine the feasible spatial region within the target scene model.

[0077] Specifically, the process involves iterating through all the object assets added to the target scene model. By analyzing the object assets' attributes, it can be determined whether they belong to scene objects that players can walk on, drive into, or climb, such as roads, rivers, or plazas. It can also be determined whether the object assets are scene objects with accessible interior spaces, such as buildings. Once an object asset is identified as possessing these attributes, it can be used to construct the corresponding walkable space area. This step yields all walkable space areas contained in the target scene model.

[0078] a12) Based on the area size information of the feasible space area, obtain the block division size of the feasible space area.

[0079] In this embodiment, regional attribute information representing each region within the traversable space can be obtained. The regional attribute information includes the regional size information of the traversable space region, such as the traversable length and width of the space region. This step determines the block size when dividing the subspace block based on the width or length value of the traversable space region. For example, half of the width value can be used as the length, width, and height of the subspace block to be divided, and the length, width, and height constitute the block size.

[0080] In one implementation, the movable space region can also be uniformly divided according to the region size information, as well as the number of rows and columns of the subspace blocks to be formed by the desired division. This can also obtain the length, width and height of each subspace block to be divided, and use it as the block division size.

[0081] a13) Divide the feasible space region according to the block division size to obtain at least one subspace block.

[0082] This step allows for the division of the feasible spatial region into sub-blocks. Each sub-block has the block size determined above.

[0083] Subspace blocks obtained from the division of the drivable space region also have drivable attributes. Sampling the capture position of the virtual camera in each subspace block greatly improves the stability of the scene objects that can be included in the captured image at the sampled capture position.

[0084] b1) Determine the visible object material of the subspace block and obtain the visible object information of the subspace block.

[0085] In this embodiment, the object material can be considered as the object model that the scene objects contained in the target scene depend on during the construction phase. Each scene object to be presented in the target scene needs to be constructed independently during the creation process, and after the construction is completed, it can be used as the object material in the target scene model.

[0086] It's important to understand that this embodiment decomposes the determination of visible object information contained in the scene attribute information set into the determination of visible object information for each sub-space block. Specifically, each sub-space block can be considered an independent space, and to determine the visible object information of a sub-space block, it is necessary to determine which visible object materials are included in the sub-space block. However, when the virtual camera is in different capture positions within a sub-space block, the object materials captured within the capture range will differ.

[0087] In this embodiment, to determine which visible object materials are contained in the sub-space block, capture positions can be sampled within the sub-space block. Using a given sampling logic (using the center point of the sub-space block as a fixed sampling point, and then randomly sampling a certain number of additional sampling points), a certain number of sampling points are determined from the sub-space block, each serving as a different capture position for the virtual camera within the sub-space block. This step then allows the determination of the visible object material corresponding to each capture position.

[0088] The existing method for determining the visible object material at the capture position of the virtual camera can be described as follows: take the capture position as the origin, emit a ray at the origin, and make the ray intersect with the geometric objects (object material in the target scene model) in the scene (the overall target scene model without subspace blocks). In this way, we can detect whether there is a collision between the ray point and the geometric object. If there is a collision, the geometric object (object material) can be considered as the visible object material of the virtual camera at the capture position of the scene.

[0089] The existing methods for determining visible objects have the following problems: 1) This method only has a good effect on determining some convex hull objects in the scene, but it is difficult to effectively determine objects in scenes with holes; 2) This method cannot guarantee the rationality of the sampling perspective (it does not perform the subspace block division in the drivable space region proposed in this embodiment), and it is difficult to guarantee the stability of the determination results when determining visible objects in different sampling perspectives; 3) When intersecting light rays with geometric objects in the scene, it is necessary to perform complex tree structure management on the 3D scene model (such as the target scene model), which increases the computational power consumption of computing resources. At the same time, when intersecting with some complex-shaped geometric objects, the stability of the intersection results cannot be guaranteed.

[0090] Based on this, to solve the above problems, this embodiment, in addition to dividing the space into sub-blocks before determining the visible object materials, also improves the method for determining the visible object materials. Specifically, for a target scene model containing various object materials, offline scene rendering can be performed first to obtain the color data information of each object material after rendering; for each sub-space block, after determining a certain number of capture positions for the virtual camera through sampling, regardless of which capture position the virtual camera is in, the scene texture map corresponding to each capture viewpoint when the virtual camera is in that capture position can be determined from the rendered scene texture map.

[0091] As described above, this embodiment can directly determine the color data information contained in the scene texture map, and then determine which object materials are contained in the scene texture map based on the conversion relationship between the color data information and object identifiers. The object materials contained in the scene texture map of each capture viewpoint can constitute the visible object materials of the virtual camera at that capture position. The visible object materials determined by the virtual camera at each capture position of the subspace block can constitute the visible object materials under the subspace block. Finally, based on the relevant object information of each visible object material, the visible object information under the subspace block can be constructed.

[0092] The above-described method for determining visible object information effectively avoids the problems existing in current methods for determining visible object information.

[0093] Based on this first optional embodiment, in order to better understand the determination of visible object information under a subspace block, this embodiment can specifically expand the determination of visible object material of the subspace block and the acquisition of visible object information of the subspace block into the following steps:

[0094] b11) Render the target scene based on the object material contained in the target scene model to obtain the color data information corresponding to the rendered object material.

[0095] In this embodiment, for the target scene model, after the target scene model is created, offline scene rendering can be performed on the target scene based on all the object materials added to the target scene model, thereby obtaining the color data information corresponding to each object material after rendering.

[0096] It should be noted that one way to implement the color data information of object materials in scene rendering can be described as follows: obtain the object identifier assigned to each object material when it is added to the target scene model (the value range of the object identifier can be 0 to 65535), and then perform RGB8 or RGB32 color encoding on the object identifier of the object material to obtain the color data information of the corresponding object material.

[0097] For each object asset, the process of obtaining its object identifier and then performing RGB8 color encoding on the object identifier can be described as follows:

[0098] In the color data information, R can be a floating-point value equal to id / (255*255), where id is the object identifier of the object material;

[0099] In the color data information, G can be equal to a floating-point value of (id-R*255*255) / 255, where R is the R channel color data information determined above;

[0100] In the color data information, B can be equal to the result of id-R*255*255-G*255, where G is the color data information of the G channel determined above.

[0101] In addition, in order to ensure that the color data information of different object materials obtained by the above calculation method is distinguishable, this embodiment can assign an interval value to the object identifier of two object materials that are adjacent in the target scene model. For example, the interval value can be 20. When the object identifier of an object material is 20, the object identifier assigned to the adjacent object material can be 40 or 0.

[0102] The above describes one rendering method for object material using RGB8 color encoding. To ensure rendering accuracy, RGB32 rendering can be used to obtain the color data information of the object material. In this case, the object ID of the object material can be used as the RGB value of the object material.

[0103] b12) Based on the spatial coordinate information of the subspace block, determine the center point of the subspace block, and obtain at least one sampling point in the subspace block through random scattering.

[0104] After rendering the object material in the target scene model through the above steps, the color data information of each object material after rendering can be obtained. Then, for each subspace block, the position can be sampled through this step. The sampled position can be regarded as the sampled virtual camera capture position or the sampled virtual object position.

[0105] Specifically, the spatial coordinates of the subspace block within the spatial coordinate system of the target scene model can be obtained. This spatial coordinate information can include the spatial coordinate values ​​of each vertex of the subspace block. Using this spatial coordinate information, the coordinates of the center point of the subspace block can be determined, thereby locating the center point of the subspace block. Then, random sampling can be performed on the subspace block using a random scattering method to obtain at least one sampling point in the subspace block.

[0106] b13) The center point and the sampling point are respectively used as sampling positions, and the visible object material corresponding to the sampling position is determined according to the color data information.

[0107] This step uses the center point and sampling point determined above as the capture position of the virtual camera in the subspace block, or the position of the virtual object, which is denoted as the sampling position in this embodiment. Then, this step combines the color data information of the object material determined above to determine the visible object material corresponding to image capture at each sampling position.

[0108] As one implementation method, this embodiment can optimize the determination of the visible object material corresponding to the sampling position based on the color data information into the following steps:

[0109] b131) Based on the color data information, obtain the scene texture map corresponding to the sampling position.

[0110] It is known that after obtaining the color data information of the object material in the target scene model through rendering operations, and combining the different sampling positions, a scene texture map that can be rendered at that sampling position can be formed.

[0111] For example, when rendering the scene at the sampling location, the color data information of the object material can be combined to render the scene from six directional perspectives (the virtual camera's upward, downward, leftward, rightward, forward, and backward perspectives), thereby obtaining a scene texture map for each of the six directions. Figures 1a-1f This embodiment presents a demonstration image of the scene texture map captured from different orientations at a specific location during the determination of the scene attribute information set in the scene rendering method provided in this embodiment. Among them, Figure 1a The image shown is a front-view scene texture map 11. Figure 1b The image shown is a rear-view scene texture map 12. Figure 1c The image shown is a scene texture map with an upward perspective (image 13). Figure 1d The image shown is a downward-view scene texture map 14. Figure 1e The image shown is a scene texture map 15 viewed from the left. Figure 1f The image shown is a scene texture map 16 viewed from the right. It can be seen that the visible scene objects in the scene texture maps are different depending on the viewing angle.

[0112] b132) Based on the pixel values ​​of the pixels in the scene texture map, and combined with the conversion relationship between pixel values ​​and object identifiers, determine the object materials contained in the scene texture map, and record them as visible object materials.

[0113] In this embodiment, for each acquired scene texture map, the color data information contained in the scene texture map can be converted through the operation in this step. Specifically, this step can obtain the pixel value of the pixel in the scene texture map in the RGB color space. Through this pixel value, the color channel value of the pixel in each color channel of RGB can be obtained. Then, the pixel value can be converted and calculated by using the pre-set conversion relationship between the pixel value in the RGB color space and the object identifier of the object material.

[0114] For example, the conversion relationship between object identifier and object material in RGB color space and color data information can be expressed as: id = R*255*255 + G*255 + B, where id is the object identifier and RGB are the color data values ​​of the object material in the RGB color channels.

[0115] As described above, the calculation result of the above conversion is equivalent to the calculated object identifier. The object identifier determines which object assets are contained in the scene texture map. These contained object assets can be considered as visible object assets at that sampling location and facing viewpoint. After this step converts the scene texture map corresponding to each facing viewpoint at the sampling location, all the obtained object assets can be considered as visible object assets corresponding to that sampling location.

[0116] b14) Based on the object identifiers of the visible object material, the visible object information of the subspace block is constituted.

[0117] In this embodiment, for a subspace block, after capturing position sampling in the subspace block and obtaining multiple sampling positions, the visible object material at each sampling position can be determined by the methods given in steps b131) and b132).

[0118] Considering that object materials in the target scene model are distinguished by object identifiers, for each subspace block, the object identifiers of the visible object materials corresponding to each sampling position in the subspace block can be summarized, and then the visible object information of the subspace block can be constructed through each object identifier.

[0119] In the implementation of the scene rendering method provided in this embodiment, the implementation of the aforementioned visible object information determination differs from existing visible object information determination methods. It does not require the additional introduction of light rays needed for intersection calculation. Furthermore, since the key to the entire determination lies in the conversion between the color data information of scene objects and object identifiers, it does not involve the geometric shape of scene objects, thus avoiding the problem that existing technologies have difficulty in determining the visibility of objects in scenes with holes. At the same time, when sampling the capture position, the decoupling of large target scenes is considered, dividing them into multiple sub-space blocks. When sampling in the sub-space blocks, the use of the center point of the sub-space block is fixed, making the capture position sampling more reasonable. Determining visible objects at the reasonably sampled capture position also ensures the stability of the determination result.

[0120] Furthermore, this embodiment does not involve the use of the tree structure of the target scene model when determining visible object information. After decoupling the target scene model into multiple sub-space blocks, it is only necessary to determine the color data information of the object materials in the target scene model. Subsequently, based on the color data information and a given transformation formula, the visible object information of the sub-space blocks can be easily determined. The entire implementation process does not require more computing resources, greatly reducing the computational power consumption. It can be seen that the improved visible object determination method in this embodiment effectively avoids the problems existing in the current visible object determination method.

[0121] c1) Determine the scene attribute information set of the target scene corresponding to the target scene model, wherein the scene attribute information includes the visible object information.

[0122] It should be noted that the visible object information at different sampling locations is key information contained in the scene attribute information set. However, considering the overall nature of the target scene model and the specific implementation of determining the visible object information, it is not possible to record the visible object information at different sampling locations as the smallest unit of information.

[0123] This embodiment considers the visible object information corresponding to the subspace block as the smallest unit of information. Furthermore, considering that the subspace block is related to the drivable space region, the visible object information of the subspace block needs to be recorded in the scene attribute information set. It is also necessary to record the subspace block's own information and the information of the drivable space region to which it belongs.

[0124] Therefore, the scene attribute information set decomposes the description of visible object information into: region attribute information of the drivable space region, subspace block information of the subspace blocks contained in each drivable space region, and visible object information corresponding to each subspace block. Among them, the visible object information corresponding to the subspace block can be represented by the object identifier set of the visible object material, and the subspace block information can be characterized by the number of subspace blocks contained in each direction of the drivable space region and the spacing information between the subspace blocks; the region attribute information can be represented by the upper left corner and lower right corner of the entire space region to indicate the beginning and end of the space region.

[0125] In addition to containing information about visible objects, the scene attribute information set can also record the object information of all object materials contained in the target scene model. Therefore, the scene attribute information set also contains object material information.

[0126] The steps of the first optional embodiment described above specifically illustrate the determination of the scene attribute information set corresponding to the target scene. The determined scene attribute information set can be used to filter whether the information of the object to be rendered is visible at the current rendering execution time, thereby retaining only visible scene objects from the information of the object to be rendered, and rendering only visible scene objects. As a core feature of the scene rendering method provided in this embodiment, the scene attribute information set provides core information data support for the implementation of the method provided in this first optional embodiment.

[0127] Based on the first optional embodiment described above, as one implementation method, the scene attribute information set corresponding to the target scene model, wherein the scene attribute information includes the visible object information, can be further optimized into the following steps:

[0128] c11) Obtain the object material information of the object material contained in the target scene model and the region attribute information of the drivable space area.

[0129] In this embodiment, all object assets contained in the target scene model can be recorded within the scene attribute information set. Specifically, the object asset information can be obtained through this step, whereby the object asset information includes at least the object identifier of the object asset. It can be understood that the object assets added to the target scene model during the target scene creation stage are equivalent to the scene objects to be rendered during the target scene runtime stage. The object identifier of the object asset can also be considered as the object identifier of the scene object, and can be used as object information to distinguish different scene objects.

[0130] In this embodiment, in the above-described implementation of determining visible object information, sub-space blocks are divided based on the drivable space regions in the target scene model. This step can obtain the region attribute information of each drivable space region determined from the target scene model. For example, the region attribute information includes the region start position and region end position of the drivable space region.

[0131] c12) Obtain the subspace block information of the subspace blocks contained in the traversable space region, and obtain the visible object information corresponding to the subspace blocks.

[0132] In this embodiment, this step allows for the acquisition of subspace block information formed by dividing different drivable spatial regions, and also provides information on visible objects after determining the visible objects within each subspace block. For example, this subspace block information includes the number of subspace blocks in each spatial direction within the spatial coordinate system constructed by the drivable spatial region, as well as the interval values ​​between the subspace blocks. Simultaneously, a set of visible object identifiers, equal to the number of subspace blocks, corresponds to each drivable spatial region. Each set of visible object identifiers corresponds to the visible object information of one subspace block.

[0133] c13) Summarize the object material information, region attribute information, subspace block information, and visible object information of the subspace block to form the scene attribute information set of the target scene corresponding to the target scene model.

[0134] This step summarizes the information obtained above, thus forming the scene attribute information set of the target scene. In practical applications, this scene attribute information set can be represented in the form of a data table. The data table can at least include a set of object identifiers representing object material information, the top-left and bottom-right corner position information representing region attribute information, the number of subspace blocks in different spatial directions representing subspace block information, and the interval between subspace blocks. Most importantly, it also includes a set of visible object identifier sequences representing visible object information.

[0135] The above provides a detailed description of the specific content contained within the scene attribute information set, which more clearly demonstrates the determination logic for defining the scene attribute information set.

[0136] As a second optional embodiment of this example, based on the above optimizations... Figure 2 A flowchart illustrating a scene rendering method provided in an embodiment of this disclosure is given, as follows: Figure 2 As shown, the scene rendering method provided in this embodiment may include the following steps:

[0137] S201. In response to the scene rendering operation of the target scene at the current rendering execution time, obtain the information of the object to be rendered and its current position.

[0138] For example, when the application associated with the target scene is running, scene rendering can be performed in units of one frame or according to a set rendering cycle or set rendering conditions. The current rendering execution time can be considered as the current execution time that satisfies scene rendering. This step can respond to the scene rendering operation triggered by the current rendering execution time.

[0139] The execution subject of the method provided in this embodiment can obtain the information of the objects to be rendered associated with the target scene at the current rendering execution time, as well as the current capture position of the virtual camera or the current position of the virtual object, through the relevant running information of the application associated with the target scene.

[0140] The following steps S202 to S205 provide a specific implementation for determining the visibility of objects in the scene to be rendered. It can be understood that the following steps apply to all objects in the scene to be rendered that require visibility determination, corresponding to the target scene.

[0141] S202. Locate the scene attribute information set of the target scene and obtain the object material information in the scene attribute information set.

[0142] In this embodiment, this step can be used to obtain all object material information contained in the scene attribute information set, that is, to obtain the object identifiers of all object materials added to the target scene model during the creation stage.

[0143] S203. Determine whether the information of the object to be rendered is included in the object material information. If yes, execute S204; if no, execute S205.

[0144] In this embodiment, the object identifier to be rendered contained in the object information to be rendered can be compared with the object identifiers contained in the object material information to determine whether the object identifier to be rendered is contained in the object material information. If the object material information contains the object identifier to be rendered, then S204 can be executed; otherwise, it can be considered that the scene object to be rendered does not belong to the object material added to the target scene model in the scene stage, and the operation of S205 can be executed.

[0145] S204. Based on the current position and the region attribute information, subspace block information, and visible object information of the subspace block in the scene attribute information set, determine the visible scene objects at the current rendering execution time.

[0146] As one of the above-mentioned judgment results, this step can determine the visible scene objects within the capture range at the current rendering execution time by combining the area attribute information, subspace block information, and visible object information in the scene attribute information set with the current position when the object material information contains the information of the object to be rendered.

[0147] For example, this embodiment can determine which traversable space region the scene rendering location currently belongs to based on the current location and region attribute information. Generally, the current location changes with the player's location. Since the player can only move within traversable space regions, it can be determined that the current location should belong to one of these regions. However, there are also cases where the current location is not within a traversable space region. If it is within a traversable space region, it can be further determined which sub-space block the current location is within based on sub-space block information. After determining the sub-space block, the visible object information corresponding to the sub-space block can be used as the visible object information corresponding to the current location. The visible object information contains a series of object identifiers for visible object materials. When it is determined that the identifier of the object to be rendered is within the visible object information, the scene object to be rendered can be considered a visible scene object.

[0148] As one implementation method, the visible scene objects at the current rendering execution time can be specified based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set as follows:

[0149] a2) Compare the current location with the location of the traversable space region in the region attribute information.

[0150] In this embodiment, the location of the drivable space region in the region attribute information includes the region start position and the region end position. If the current capture position is within the space range formed by the region start position and the region end position, the comparison result can be considered as the current capture position being within the drivable space region being compared.

[0151] It should be noted that the current capture position in this step can be considered as a comparison with the regional positions of each drivable space region included in the scene attribute information set. As long as the current capture position is in one of the drivable space regions, the comparison result can be considered as being in a drivable space region; if the current capture position is not in any drivable space region, the scene object to be rendered can be directly considered as an invisible object.

[0152] b2) If the comparison result indicates that the location is within the drivable space region, then based on the subspace block information, determine the target subspace block in the drivable space region where the current location is located, and obtain the target visible object information of the target subspace block.

[0153] As one of the execution logics for the determination result, this step can, after determining that it is in a certain drivable space region, continue to determine which subspace block it is currently in by using the subspace block information and the current position, and take the subspace block it is in as the target subspace block, thereby obtaining the target visible object information corresponding to the target subspace block.

[0154] c2) If the object information to be rendered belongs to the target visible object information, the scene object to be rendered corresponding to the object information to be rendered shall be used as the visible scene object at the current rendering execution time.

[0155] As described above, after determining the target visible object information, the identifier of the object to be rendered can be compared with the target object identifier contained in the target visible object information. If the identifier of the object to be rendered exists in the target visible object information, then the object to be rendered is considered to belong to the target visible object information. In this case, the corresponding scene object to be rendered can be used as the visible scene object at the current rendering execution time.

[0156] The above technical description of this embodiment provides an implementation for determining the visibility of objects in the scene to be rendered when they belong to object materials added during the creation phase of the target scene. As an implementation method for filtering and determining visible scene objects, it provides technical support for the entire scene rendering process.

[0157] S205. The scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

[0158] This step serves as the execution logic for another determination result of the aforementioned S203 determination. When it is determined that the object to be rendered does not belong to the object material added during the creation stage of the target scene, the object to be rendered can be directly treated as a visible scene object.

[0159] The above technical description of this embodiment provides an implementation for determining the visibility of objects in the scene to be rendered when they do not belong to the object materials added during the creation phase of the target scene. As one method for filtering and determining visible scene objects, it also provides technical support for the entire scene rendering process.

[0160] S206. Render the visible scene objects to present the scene image of the target scene at the current rendering execution time.

[0161] After determining all visible scene objects in the scene to be rendered through the above steps S202-S205, this step can be used to render only the visible scene objects to obtain the scene image at the current rendering execution time.

[0162] The scene rendering method provided in this second optional embodiment uses a pre-determined set of scene attribute information, which can simply and effectively filter and determine visible scene objects. The scene attribute information set determined by the above method in this embodiment ensures the stability and rationality of the determination of visible scene objects while saving computational resources and improving the accuracy of visible scene object determination. The implementation of this technical solution, which only renders visible scene objects, also effectively reduces the rendering computational power consumption of image processing.

[0163] As a third optional embodiment of this embodiment, the method provided in this embodiment may further include, after determining the visible scene objects at the current rendering execution time: performing frustum culling on the visible scene objects, and taking the remaining visible scene objects after the culling process as new visible scene objects.

[0164] In this embodiment, after performing visibility filtering on the objects in the scene to be rendered through the above steps, a frustum culling operation can be performed on the filtered visible scene objects again before rendering them.

[0165] It is understandable that the objects in the scene to be rendered are not all objects added to the target scene model during the target scene creation phase. During the running phase of the target scene-related applications, some scene objects can also be dynamically added. However, the dynamically added scene objects are not necessarily suitable for rendering at the current rendering execution time. They can be culled according to the view frustum principle of 3D spatial image presentation.

[0166] This step can use the remaining visible scene objects after the view frustum culling process as new visible scene objects, and then render based on the new visible scene objects to obtain the rendered scene at the current rendering execution time.

[0167] This embodiment places the frustum culling after the visible scene objects are determined, which effectively reduces the computational resources consumed by frustum culling.

[0168] The scene rendering method provided in this embodiment allows the CPU in a computer device to determine the visible scene objects required for rendering simply by searching for the scene attribute information set corresponding to the target scene based on the acquired information of the object to be rendered and its current position. The CPU only needs to provide computing resources for information retrieval and matching to complete the determination of visible scene objects. Compared to existing methods that require finding intersections between light rays and geometric objects in the scene, and using a tree structure to obtain relevant information about the geometric objects, the implementation of the execution logic in this embodiment significantly reduces the computing power consumption of the CPU in determining visible scene objects, thus greatly reducing the performance requirements of the computer device.

[0169] Meanwhile, after the CPU identifies the visible scene objects through the aforementioned logic, it only needs to send API commands for each visible scene object to the GPU, allowing the GPU to render the image based solely on these objects. Compared to existing rendering implementations where the CPU frequently sends API commands to the GPU for each object to be rendered, and the GPU renders all objects, this embodiment reduces the number of API command calls from the CPU to the GPU, effectively reducing frequent interactions between the two. More importantly, it also effectively reduces the excessive consumption of rendering computing resources by the GPU in scene rendering, ensuring scene rendering speed and minimizing the impact on computer performance.

[0170] Furthermore, unlike existing methods that use the CPU to directly perform frustum culling on all objects to be rendered, in this embodiment the CPU can perform frustum culling only on the selected visible scene objects, which also reduces the CPU's computing power consumption.

[0171] Figure 3 This is a schematic diagram of the structure of a scene rendering device provided in an embodiment of this disclosure, as shown below. Figure 3 As shown, the device includes: a response module 31, a determination module 32, and a rendering module 33, wherein,

[0172] The response module 31 is used to respond to the scene rendering operation of the target scene at the current rendering execution time, and to obtain the information of the object to be rendered and its current position.

[0173] The determination module 32 is used to search for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and to determine the visible scene objects at the current rendering execution time, wherein the set of scene attribute information includes visible object information related to the position;

[0174] The rendering module 33 is used to render the visible scene objects and present the scene image of the target scene at the current rendering execution time.

[0175] This disclosure provides a scene rendering apparatus whose execution logic can, during the rendering execution, filter the information of objects to be rendered based on whether they are visible at the current rendering execution time by searching the scene attribute information set of the target scene. This retains only visible scene objects from the object information to be rendered, and only renders visible scene objects. While ensuring rendering quality, unlike existing rendering methods that render all scene objects, this technical solution effectively reduces the computational power consumption of image rendering by rendering only visible scene objects. Furthermore, unlike existing methods that directly reduce renderable scene objects through view frustum culling, this technical solution only needs to query and match the scene attribute information set to simply and effectively filter invisible objects at the current position, effectively reducing the computational power consumption of computing resources.

[0176] Furthermore, the device also includes:

[0177] The region division module is used to divide the feasible space region in the target scene model into blocks to obtain at least one subspace block.

[0178] The visible object determination module is used to determine the visible object material of the subspace block and obtain the visible object information of the subspace block;

[0179] The information set determination module is used to determine the scene attribute information set of the target scene corresponding to the target scene model, wherein the scene attribute information includes the visible object information.

[0180] Furthermore, the region division module can specifically be used for:

[0181] Obtain the feasible space region from the target scene model;

[0182] Based on the area size information of the feasible space region, the block division size of the feasible space region is obtained;

[0183] The feasible space region is divided according to the block size to obtain at least one subspace block.

[0184] Furthermore, the visible object determination module may specifically include:

[0185] The color data acquisition unit is used to render the target scene based on the object material contained in the target scene model and obtain the color data information corresponding to the rendered object material.

[0186] The sampling point determination unit is used to determine the center point of the subspace block based on the spatial coordinate information of the subspace block, and to obtain at least one sampling point in the subspace block through random scattering.

[0187] The visible object determination unit is used to take the center point and the sampling point as sampling positions respectively, and determine the visible object material corresponding to the sampling position based on the color data information;

[0188] The information determination unit is used to construct the visible object information of the subspace block based on the object identifier of the visible object material.

[0189] Furthermore, the visible object determination unit is specifically used for:

[0190] The center point and the sampling point are respectively used as sampling locations;

[0191] Based on the color data information, obtain the scene texture map corresponding to the sampling position;

[0192] Based on the pixel values ​​of the pixels in the scene texture map, and combined with the conversion relationship between pixel values ​​and object identifiers, the object materials contained in the scene texture map are determined and recorded as visible object materials.

[0193] Furthermore, the information set determination module can specifically be used for:

[0194] Obtain object material information and region attribute information of the drivable space area contained in the target scene model;

[0195] Obtain subspace block information of subspace blocks contained in the traversable space region, and obtain visible object information corresponding to the subspace blocks;

[0196] The object material information, region attribute information, subspace block information, and visible object information of the subspace blocks are summarized to form the scene attribute information set of the target scene corresponding to the target scene model.

[0197] Furthermore, module 32 may specifically include:

[0198] The search unit is used to search for the scene attribute information set of the target scene and obtain the object material information in the scene attribute information set;

[0199] The first execution unit is used to determine the visible scene objects at the current rendering execution time based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set when the object information to be rendered is included in the object material information.

[0200] The second execution unit is used for

[0201] Furthermore, module 32 may specifically include:

[0202] The third execution unit is used to, when the object information to be rendered is not included in the object material information, take the scene object to be rendered corresponding to the object information to be rendered as the visible scene object at the current rendering execution time.

[0203] Furthermore, the second execution unit can specifically be used for:

[0204] Compare the current location with the location of the traversable space region in the region attribute information;

[0205] If the comparison result indicates that the location is within the drivable space region, then based on the subspace block information, the target subspace block in which the current location is located within the drivable space region is determined, and the target visible object information of the target subspace block is obtained.

[0206] If the object information to be rendered belongs to the target visible object information, the scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

[0207] Furthermore, the device may also include:

[0208] The view frustum culling module is used to perform view frustum culling on the visible scene objects after determining the visible scene objects at the current rendering execution time, and to take the remaining visible scene objects after the culling process as new visible scene objects.

[0209] The scene rendering apparatus provided in this disclosure can execute the scene rendering method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.

[0210] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0211] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 4 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 4The diagram below shows the structure of the terminal device or server 400. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0212] like Figure 4 As shown, electronic device 400 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. An edit / output (I / O) interface 405 is also connected to bus 404.

[0213] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0214] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0215] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0216] The electronic device provided in this embodiment and the scene rendering method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0217] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the scene rendering method provided in the above embodiments.

[0218] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0219] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0220] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0221] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to a scene rendering operation of the target scene at the current rendering execution time, acquire information about the object to be rendered and its current position; use the information about the object to be rendered and the current position to search for a set of scene attribute information relative to the target scene, determine the visible scene objects at the current rendering execution time, wherein the set of scene attribute information includes visible object information related to the position; and render the visible scene objects to present the scene image of the target scene corresponding to the current rendering execution time.

[0222] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0223] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0224] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0225] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0226] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0227] According to one or more embodiments of this disclosure, [Example 1] provides a scene rendering method, the method comprising:

[0228] In response to the scene rendering operation of the target scene at the current rendering execution time, obtain the information of the object to be rendered and its current position;

[0229] Using the information of the object to be rendered and the current position, the scene attribute information set relative to the target scene is searched to determine the visible scene objects at the current rendering execution time, wherein the scene attribute information set includes visible object information related to the position;

[0230] The visible scene objects are rendered to present the scene image of the target scene at the current rendering execution time.

[0231] According to one or more embodiments of this disclosure, [Example 2] provides a scene rendering method, wherein the step of determining the scene attribute information set in the method may include:

[0232] Divide the feasible space region in the target scene model into blocks to obtain at least one subspace block;

[0233] Determine the visible object material of the subspace block and obtain the visible object information of the subspace block;

[0234] Determine the set of scene attribute information corresponding to the target scene model, wherein the scene attribute information includes the visible object information.

[0235] According to one or more embodiments of this disclosure, [Example 3] provides a scene rendering method, which may further include:

[0236] Optionally, the step of dividing the feasible space region in the target scene model into blocks to obtain at least one sub-space block includes:

[0237] Obtain the feasible space region from the target scene model;

[0238] Based on the area size information of the feasible space region, the block division size of the feasible space region is obtained;

[0239] The feasible space region is divided according to the block size to obtain at least one subspace block.

[0240] According to one or more embodiments of this disclosure, [Example 4] provides a scene rendering method, which may further include:

[0241] Optionally, determining the visible object material of the subspace block and obtaining the visible object information of the subspace block includes:

[0242] Render the target scene based on the object materials contained in the target scene model, and obtain the color data information corresponding to the rendered object materials;

[0243] Based on the spatial coordinate information of the subspace block, the center point of the subspace block is determined, and at least one sampling point in the subspace block is obtained by random scattering.

[0244] The center point and the sampling point are respectively used as sampling positions, and the visible object material corresponding to the sampling position is determined according to the color data information;

[0245] The visible object information of the subspace block is constituted by the object identifiers based on the visible object material.

[0246] According to one or more embodiments of this disclosure, [Example 5] provides a scene rendering method, the method comprising:

[0247] Optionally, determining the visible object material corresponding to the sampling position based on the color data information includes:

[0248] Based on the color data information, obtain the scene texture map corresponding to the sampling position;

[0249] Based on the pixel values ​​of the pixels in the scene texture map, and combined with the conversion relationship between pixel values ​​and object identifiers, the object materials contained in the scene texture map are determined and recorded as visible object materials.

[0250] According to one or more embodiments of this disclosure, [Example Six] provides a scene rendering method, the method comprising:

[0251] Optionally, determining the scene attribute information set of the target scene corresponding to the target scene model, wherein the scene attribute information includes the visible object information, including:

[0252] Obtain object material information and region attribute information of the drivable space area contained in the target scene model;

[0253] Obtain subspace block information of subspace blocks contained in the traversable space region, and obtain visible object information corresponding to the subspace blocks;

[0254] The object material information, region attribute information, subspace block information, and visible object information of the subspace blocks are summarized to form the scene attribute information set of the target scene corresponding to the target scene model.

[0255] According to one or more embodiments of this disclosure, [Example Seven] provides a scene rendering method, the method comprising:

[0256] Optionally, the step of searching for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and determining the visible scene objects at the current rendering execution time, includes:

[0257] Locate the scene attribute information set of the target scene and obtain the object material information in the scene attribute information set;

[0258] If the object information to be rendered is included in the object material information, then the visible scene objects at the current rendering execution time are determined based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set.

[0259] According to one or more embodiments of this disclosure, [Example Eight] provides a scene rendering method, which further includes:

[0260] Optionally, if the object information to be rendered is not included in the object material information, then the scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

[0261] According to one or more embodiments of this disclosure, [Example Nine] provides a scene rendering method, the method comprising:

[0262] Optionally, based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set, the visible scene objects at the current rendering execution time are determined, including:

[0263] Compare the current location with the location of the traversable space region in the region attribute information;

[0264] If the comparison result indicates that the location is within the drivable space region, then based on the subspace block information, the target subspace block in which the current location is located within the drivable space region is determined, and the target visible object information of the target subspace block is obtained.

[0265] If the object information to be rendered belongs to the target visible object information, the scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

[0266] According to one or more embodiments of this disclosure, [Example 10] provides a scene rendering method, the method comprising:

[0267] Optionally, after determining the visible scene objects at the current rendering execution time, the method further includes:

[0268] The visible scene objects are subjected to frustum culling, and the remaining visible scene objects after the culling process are taken as new visible scene objects.

[0269] According to one or more embodiments of this disclosure, [Example Fourteen] provides a scene rendering apparatus, the apparatus comprising:

[0270] The response module is used to respond to the scene rendering operation of the target scene at the current rendering execution time, and to obtain information about the object to be rendered and its current position;

[0271] The determination module is used to search for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and to determine the visible scene objects at the current rendering execution time, wherein the set of scene attribute information includes visible object information related to the position;

[0272] The rendering module is used to render the visible scene objects and present the scene image of the target scene at the current rendering execution time.

[0273] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0274] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0275] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A scene rendering method, characterized in that, include: In response to the scene rendering operation of the target scene at the current rendering execution time, obtain the information of the object to be rendered and its current position; Using the information of the object to be rendered and the current position, the scene attribute information set relative to the target scene is searched to determine the visible scene objects at the current rendering execution time. The scene attribute information set includes visible object information related to the capture position. The capture position includes the center point of at least one subspace block and at least one sampling point sampled from the subspace block. The subspace block is obtained by dividing the target scene. The visible scene objects are rendered to present the scene image of the target scene at the current rendering execution time.

2. The method according to claim 1, characterized in that, The steps for determining the scene attribute information set include: Divide the feasible space region in the target scene model into blocks to obtain at least one subspace block; Determine the visible object material of the subspace block and obtain the visible object information of the subspace block; Determine the set of scene attribute information corresponding to the target scene model, wherein the scene attribute information includes the visible object information.

3. The method according to claim 2, characterized in that, The step of dividing the feasible space region in the target scene model into blocks to obtain at least one sub-space block includes: Obtain the feasible space region from the target scene model; Based on the area size information of the feasible space region, the block division size of the feasible space region is obtained; The feasible space region is divided according to the block size to obtain at least one subspace block.

4. The method according to claim 2, characterized in that, The step of determining the visible object material of the subspace block and obtaining the visible object information of the subspace block includes: Render the target scene based on the object materials contained in the target scene model, and obtain the color data information corresponding to the rendered object materials; Based on the spatial coordinate information of the subspace block, the center point of the subspace block is determined, and at least one sampling point in the subspace block is obtained by random scattering. The center point and the sampling point are respectively used as sampling positions, and the visible object material corresponding to the sampling position is determined according to the color data information; The visible object information of the subspace block is constituted by the object identifiers based on the visible object material.

5. The method according to claim 4, characterized in that, The step of determining the visible object material corresponding to the sampling position based on the color data information includes: Based on the color data information, obtain the scene texture map corresponding to the sampling position; Based on the pixel values ​​of the pixels in the scene texture map, and combined with the conversion relationship between pixel values ​​and object identifiers, the object materials contained in the scene texture map are determined and recorded as visible object materials.

6. The method according to claim 2, characterized in that, The step of determining the scene attribute information set corresponding to the target scene model includes: Obtain object material information and region attribute information of the drivable space area contained in the target scene model; Obtain subspace block information of subspace blocks contained in the traversable space region, and obtain visible object information corresponding to the subspace blocks; The object material information, region attribute information, subspace block information, and visible object information of the subspace blocks are summarized to form the scene attribute information set of the target scene corresponding to the target scene model.

7. The method according to claim 1, characterized in that, The step of searching for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and determining the visible scene objects at the current rendering execution time, includes: Locate the scene attribute information set of the target scene and obtain the object material information in the scene attribute information set; If the object information to be rendered is included in the object material information, then the visible scene objects at the current rendering execution time are determined based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set.

8. The method according to claim 7, characterized in that, Also includes: If the object information to be rendered is not included in the object material information, then the scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

9. The method according to claim 7, characterized in that, Based on the current position and the region attribute information, subspace block information, and visible object information of the subspace blocks in the scene attribute information set, determine the visible scene objects at the current rendering execution time, including: Compare the current location with the location of the traversable space region in the region attribute information; If the comparison result indicates that the location is within the drivable space region, then based on the subspace block information, the target subspace block in which the current location is located within the drivable space region is determined, and the target visible object information of the target subspace block is obtained. If the object information to be rendered belongs to the target visible object information, the scene object to be rendered corresponding to the object information to be rendered is taken as the visible scene object at the current rendering execution time.

10. The method according to any one of claims 1-9, characterized in that, After determining the visible scene objects at the current rendering execution time, the process also includes: The visible scene objects are subjected to frustum culling, and the remaining visible scene objects after the culling process are taken as new visible scene objects.

11. A scene rendering device, characterized in that, include: The response module is used to respond to the scene rendering operation of the target scene at the current rendering execution time, and to obtain information about the object to be rendered and its current position; The determination module is used to search for a set of scene attribute information relative to the target scene using the information of the object to be rendered and the current position, and to determine the visible scene objects at the current rendering execution time. The scene attribute information set includes visible object information related to the capture position. The capture position includes the center point of at least one subspace block and at least one sampling point sampled from the subspace block. The subspace block is obtained by dividing the target scene. The rendering module is used to render the visible scene objects and present the scene image of the target scene at the current rendering execution time.

12. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Visibility data processing method of virtual scene and rendering method of virtual scene

    CN111080798A

  • Picture display method and device, information generation method and device, equipment and storage medium

    CN113457161A