Shielding elimination method and device, computer equipment and storage medium

By using objects with fewer surfaces instead of object game objects in a large number of architectural scenes, the problem of low execution efficiency caused by excessive occlusion decent surfaces is solved, and the effect of improving software occlusion and improving game fluency is achieved.

CN119888032APending Publication Date: 2025-04-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311386519.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In a large number of architectural scenarios, excessive occlusion decent number leads to low execution efficiency of software occlusion culling, affecting frame rate, causing equipment to heat up and quickly power outage, making it difficult to directly use in these scenarios.

Method used

By pre-creating and storing the set of object substitutes corresponding to the scene, using object substitutes with fewer surfaces to replace a large number of object game objects, thereby reducing the time-consuming of soft gratings and improving the execution efficiency of software occlusion.

Benefits of technology

It realizes the execution efficiency of software occlusion and removal in a large number of architectural scenarios, reduces the time-consuming of soft gratings, avoids equipment overheating and rapid power loss, and improves the smoothness of game operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888032A_ABST
    Figure CN119888032A_ABST
Patent Text Reader

Abstract

The invention provides a shielding elimination method and device, equipment and a storage medium, and relates to the technical field of computers, the field of games and the like. The method comprises the following steps: determining candidate shielding bodies from unrejected object objects in a current frame image, determining that the candidate shielding body can be mapped to an object replacer according to a pre-stored object replacer set of a scene of the current frame image for each determined candidate shielding body, and determining that the candidate shielding body can be mapped to the object replacer according to the object replacer set of the scene of the current frame image. If yes, marking the data of the object replacer as a to-be-submitted state, the object replacer set comprises object replacers corresponding to a plurality of object game objects of the same type, the object replacer is a replacer corresponding to one object, submitting the data of the object replacer in the to-be-submitted state to a soft grating process, and submitting the data of the object replacer in the to-be-submitted state to the soft grating process; and performing shielding elimination on the object replacer of which the state is to be submitted through a soft grating process to obtain a shielding elimination result of the object in the current frame image. The execution efficiency of software shielding elimination can be improved, and software shielding elimination can be used in a large number of building scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an occlusion culling method, apparatus, device and storage medium. Background Art

[0002] At present, many applications use image rendering technology, such as games and other applications using virtual reality technology. Usually, in order to reduce the rendering workload of the graphics engine and improve rendering efficiency to ensure smooth operation of the application, before rendering the image, objects that are invisible due to occlusion in the image to be rendered are often removed, and only the currently visible objects are rendered. Software occlusion culling (OC) is a commonly used occlusion culling method. Software OC refers to the implementation of software rasterization on the central processing unit (CPU) side, thereby achieving pure CPU occlusion culling.

[0003] In scenes with a large number of buildings, there are a large number of building modules. A large number of building modules will result in a very high number of occlusion faces. For software OC, a high number of occlusion faces will cause the soft grating to be time-consuming, resulting in low execution efficiency of software OC, affecting the frame rate and causing serious heat generation / rapid power loss of the terminal equipment running the software OC. Therefore, it is difficult to directly use software OC in a large number of building scenes. Summary of the invention

[0004] The embodiments of the present application provide an occlusion culling method, apparatus, device and storage medium, which can reduce the time consumption of soft grating and improve the execution efficiency of software occlusion culling, so that software occlusion culling can be directly used in a large number of architectural scenes.

[0005] In a first aspect, an occlusion culling method is provided, comprising:

[0006] Determine candidate occluders from objects that have not been eliminated in the current frame image;

[0007] For each determined candidate occluder, according to a pre-stored set of object substitutes of the scene of the current frame image, it is determined that the candidate occluder can be mapped to an object substitute, and the data of the object substitute is marked as pending submission, the object substitute set includes object substitutes corresponding to multiple object game objects of the same type, and the object substitute is a substitute corresponding to one object;

[0008] Submitting data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process, and obtaining the occlusion culling result of the object object in the current frame image.

[0009] In a second aspect, an occlusion culling device is provided, comprising:

[0010] A determination module, used to determine candidate occluders from objects that have not been eliminated in the current frame image;

[0011] A processing module, for determining, for each determined candidate occluder, that the candidate occluder can be mapped to an object substitute according to a pre-stored set of object substitutes of the scene of the current frame image, and marking the data of the object substitute as a pending submission state, wherein the set of object substitutes includes object substitutes corresponding to a plurality of object game objects of the same type, and the object substitute is a substitute corresponding to one object;

[0012] The processing module is also used to submit the data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process to obtain the occlusion culling result of the object object in the current frame image.

[0013] In a third aspect, the present application provides a computer device, comprising:

[0014] a processor adapted to implement computer instructions; and,

[0015] The memory stores computer instructions, where the computer instructions are suitable for being loaded by the processor and executing the method of the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the method of the first aspect above.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the first aspect above.

[0018] Through the above technical solution, the embodiment of the present application first determines the candidate occluder from the object objects that have not been eliminated in the current frame image, and for each determined candidate occluder, according to the pre-stored object substitute set of the scene of the current frame image, determines that the candidate occluder can be mapped to an object substitute, then marks the data of the object substitute as a pending state, and submits the data of the object substitute in the pending state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending state through the soft raster process, and obtain the occlusion culling result of the object object in the current frame image. Because when using the soft raster process for occlusion culling, a large number of object game objects are replaced by object substitutes with a small number of faces, thereby reducing the time consumption of soft raster and improving the execution efficiency of software occlusion culling. When the object game object is a building game object, the object substitute is a substitute corresponding to a building, so that the software occlusion culling can be directly used in a large number of building scenes, improving the smoothness of game operation.

[0019] Furthermore, in the embodiment of the present application, by combining PVS and software occlusion culling, most of the static objects are first cut out with PVS to reduce the number of objects that need to be processed by software occlusion culling, thereby improving the execution efficiency of software occlusion culling, effectively reducing the number of drawing instructions, and helping to stabilize / improve the frame rate and improve the smoothness of game operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of an application scenario of an occlusion culling method provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a set of building substitutes provided for an embodiment of the present application;

[0022] Figure 3 A flowchart of an occlusion culling method provided in an embodiment of the present application;

[0023] Figure 4 A flowchart of an occlusion culling method provided in an embodiment of the present application;

[0024] Figure 5 A flowchart of an occlusion culling method provided in an embodiment of the present application;

[0025] Figure 6 is a schematic block diagram of an occlusion removal device according to an embodiment of the present application;

[0026] Figure 7 A structural block diagram of a terminal device 700 provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0029] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based only on A, and B can also be determined based on A and / or other information.

[0030] In the description of the present application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more than two. In addition, "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0031] It should also be understood that the specific features, structures or characteristics related to the embodiments in the specification are included in at least one embodiment of the present application. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0032] In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0033] The solution provided in this application may involve artificial intelligence technology.

[0034] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0035] It should be understood that artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0036] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, games, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0037] The embodiments of the present application may involve computer vision (CV) technology in artificial intelligence technology. Computer vision is a science that studies how to make machines "see". To put it more concretely, it refers to machine vision such as using cameras and computers to replace human eyes to identify, monitor and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies.

[0038] First, the relevant terms involved in the embodiments of the present application are described.

[0039] Unreal Engine (UE): A game development platform that provides a large number of core technologies, data generation tools, and basic support required by game developers.

[0040] Occlusion Cull (OC): Object-based occlusion culling technology.

[0041] Software Occlusion Cull (SOC) is an OC technology implemented by pure CPU simulation rasterization.

[0042] Precomputed Visibility Set (PVS), the precomputed visibility set in UE.

[0043] Occluder: used to optimize rendering performance. Usually understood as a geometric body in the scene, used to block other objects, thereby reducing the GPU's rendering workload and improving game performance.

[0044] Mesh: A mesh asset. It refers to a three-dimensional model composed of triangular patches, used to represent objects, characters, props, etc. in game scenes. Mesh is usually composed of a series of vertices, normals, texture coordinates, and patches, created by 3D modeling software and imported into UE.

[0045] Simple model: The abbreviation of simplified model, which can be understood as the simplification of Mesh and is an implementation of Imposter.

[0046] LOD: Short for Level of Detail, it is an optimization technology. LOD technology pre-makes multiple models and texture maps to represent different levels of detail of objects at different distances and angles, and then automatically switches different levels of detail to display objects according to the distance and angle relationship between the camera and the object, thereby improving the performance and frame rate of the game.

[0047] Occluder Data: Submitted to the SOC soft rasterization process. Usually it is the pure geometric data of a certain LOD of the primitive associated with the Mesh asset.

[0048] Static Mesh Component (SM): SM is a component used to render static mesh models. It can add static mesh models to the scene and control their display and interaction in the game.

[0049] Instanced Static Mesh Component (ISM): An extension of SM that allows multiple identical static mesh instances to be rendered in the same component. Using ISM can improve game performance because it can instantiate multiple identical static mesh models into a rendering batch, thereby reducing the number of rendering calls and improving rendering efficiency.

[0050] Scene objects (Primitive): exist in the game thread in the form of scene object components (Primitive Componet) and their inherited classes (such as SM, ISM), and in the rendering thread in the form of Primitive SceneProxy and its inherited classes.

[0051] Central Processing Unit (CPU): It is one of the core components of a computer, also known as the central processing unit. The main functions of the CPU include instruction decoding, data processing, control flow and interrupt handling. It can perform arithmetic and logical operations, access memory, control input and output devices, etc.

[0052] Game object (Actor): In UE, Actor is a game object in the game world. It can be regarded as a placeable, movable, rotatable, and scalable object that can be interacted with in the game and can contain some components (such as SM, collision component, etc.) to achieve different functions.

[0053] Hierarchical Level of Detail (HLOD): is a performance optimization technology. It is mainly suitable for large scenes and open world games. HLOD works by merging multiple mesh objects at a longer distance into a single mesh object with a lower number of polygons, thereby reducing the rendering burden.

[0054] The occlusion culling method provided in the embodiment of the present application can be applied to a computer device. In some embodiments, the computer device is a terminal device or a server. The following first takes the computer device as an example to introduce the application scenario of the occlusion culling method provided in the embodiment of the present application. Figure 1 A schematic diagram of an application scenario of an occlusion culling method provided in an embodiment of the present application. Figure 1 , this application scenario involves a terminal device 101 and a server 102 .

[0055] The terminal device 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0056] In some embodiments, the terminal device 101 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., including but not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminal devices, etc., but not limited thereto. The terminal device 101 is installed and runs an application that supports a virtual scene, and the virtual scene is a three-dimensional virtual space. The application may be any one of a first-person shooting game (First-Person Shooting game, FPS), a third-person shooting game, a multiplayer online tactical competitive game (Multiplayer Online Battle Arena games, MOBA), a virtual reality application, a three-dimensional map program, or a multiplayer survival game. Schematically, the terminal device 101 is a terminal device used by a user, and the user uses the terminal device 101 to operate a virtual object located in a virtual scene to perform an activity, and the activity includes but is not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, attacking, and throwing. Schematically, the virtual object is a virtual character, such as a simulated character or an anime character.

[0057] In some embodiments, the server 102 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 102 is used to provide background services for applications that support virtual scenes. In some embodiments, server 102 undertakes the main computing work and terminal device 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work and terminal device 101 undertakes the main computing work; or, server 102 and terminal device 101 use a distributed computing architecture for collaborative computing.

[0058] It should be understood that Figure 1 This is merely an exemplary description and does not specifically limit the application scenarios of the embodiments of the present application.

[0059] The occlusion culling method provided in the embodiment of the present application can be applied to image rendering technology with a large number of building scenes. In order to reduce the rendering workload of the graphics engine and improve the rendering efficiency to ensure smooth operation of the application, before rendering the image, the objects in the image to be rendered that are invisible due to occlusion are culled, and only the currently visible objects are rendered.

[0060] First, several terms involved in the embodiments of the present application and the relationship between the terms are explained, wherein the terms include building game objects (BuildingActor), building substitute sets (ImposterActor), building substitutes (Building Imposter) and substitutes (Imposter). Among them, the building game object is a building game object in the game application, which is composed of a variety of building modules, and each building module is represented by SM / ISM. Substitutes are a technology for optimizing rendering performance. It can replace distant objects with a plane or a simple geometric body, and use the texture of the object (called substitutes) to replace real objects, thereby reducing the rendering workload of the GPU and improving the performance of the game. A building substitute is a substitute corresponding to a building. A building substitute set is a substitute made for a building in a game application, and is presented as a building substitute set in the scene. A building substitute set corresponds to multiple building game objects, and a building substitute set includes substitutes corresponding to multiple building game objects.

[0061] In the scene building workflow of the game, the imposter of each building is pre-generated. In order to improve rendering efficiency, each imposter set corresponds to multiple buildings, that is, each imposter set represents multiple building imposters. Building game objects (BuildingActor) are building game objects in game applications, which are composed of multiple building modules, and each building module is represented by SM / ISM. Figure 2 A schematic diagram of a set of building substitutes provided for an embodiment of the present application, such as Figure 2 As shown, when the user selects a building substitute set 2 in the right window, the white highlighted lines 10 in the left window outline multiple buildings, that is, the building substitute set 2 corresponds to multiple buildings, and the building substitute set 2 represents multiple building substitutes (BuildingImposter).

[0062] When the game is running, each building exists in the form of a building game object (BuildingActor). When the building game object is close to the camera / protagonist, multiple SMs or ISMs will be mounted under the building game object, that is, the building is assembled from multiple high-precision modules; when the building game object is far away from the camera / protagonist, it will switch to the corresponding substitute. The specific logic of the building game object switching to the corresponding substitute is: 1) The components (Component) mounted under the building game object are hidden / uninstalled; 2) According to the building substitute set and substitute identifier (ID) recorded by the building game object, the corresponding building substitute set is notified to display the corresponding building substitute.

[0063] In the related technology, since there are a large number of building modules in a scene with a large number of buildings, a large number of building modules will cause the number of occlusion faces to be very high. For software OC, too high a number of occlusion faces will cause the soft grating to be time-consuming, resulting in low execution efficiency of software OC. Therefore, it is difficult to directly use software OC in scenes with a large number of buildings.

[0064] In view of this, the embodiments of the present application provide an occlusion culling method, apparatus, device and storage medium, which pre-generate and store a set of object substitutes corresponding to the scene, wherein the object substitute set includes object substitutes corresponding to multiple object game objects of the same type, and the number of faces of the object substitutes is much less than the number of faces of the occluding body. When using the soft grating process for occlusion culling, a large number of object game objects are replaced by object substitutes with fewer faces, thereby reducing the time consumption of the soft grating and improving the execution efficiency of the software OC. When the object game object is a building game object, the object substitute is a substitute corresponding to a building, so that the software OC can be directly used in a large number of building scenes to improve the smoothness of the game operation.

[0065] Specifically, candidate occluders can be determined from the objects that have not been culled in the current frame image. For each determined candidate occluder, it is determined that the candidate occluder can be mapped to an object substitute based on a pre-stored set of object substitutes for the scene of the current frame image. The data of the object substitute is marked as being in a pending submission state. The object substitute set includes object substitutes corresponding to multiple object game objects of the same type. The object substitute is a substitute corresponding to an object. The data of the object substitute in the pending submission state is submitted to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process to obtain the occlusion culling result of the object object in the current frame image.

[0066] It should be noted that the occlusion culling method of the embodiment of the present application can be applied to the process of graphics rendering, which can reduce the rendering workload of the GPU and improve the performance of the game. The application scenarios include but are not limited to game scenes with a large number of buildings, and can also include scenes with other game objects.

[0067] The technical solutions of the embodiments of the present application are described in detail below through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0068] Figure 3 A flowchart of an occlusion culling method provided in an embodiment of the present application. The execution subject of the embodiment of the present application is a device with an occlusion culling function, which may be a terminal device, such as Figure 3 As shown, the method may include:

[0069] S101 : Determine candidate occluders from objects that have not been eliminated in the current frame image.

[0070] In the embodiment of the present application, the current frame image may be a processed image or an unprocessed image. For example, the current frame image may be an image after distance-based cropping and visual cone cropping by the UE, or an image after distance-based cropping, visual cone cropping, and PVS cropping by the UE. Optionally, it may also be an image after other types of cropping. Therefore, in the present embodiment, it is necessary to determine the candidate occluder from the objects that are not eliminated in the current frame image.

[0071] In an embodiment of the present application, a candidate occluder is first determined from the object objects that have not been eliminated in the current frame image. The candidate occluder can be called a potential occluder, and then the determined candidate occluder is subsequently processed. Specifically, the object objects that have not been eliminated in the current frame image can be traversed, and the traversed object objects are judged to determine whether they are candidate occluders. The object objects can be scene objects, and the scene objects exist in the form of scene object components (Primitive Componet) and their inherited classes (such as SM, ISM) in the game thread, and in the form of PrimitiveSceneProxy and its inherited classes in the rendering thread.

[0072] Optionally, in an implementable manner, determining a candidate occluder from objects that have not been eliminated in the current frame image in S101 may specifically be:

[0073] S1011. Determine candidate occluders from objects that have not been eliminated in the current frame image according to preset conditions, where the preset conditions include: the occluder identifier of the object is a first identifier, the distance between the object and the current viewpoint is less than a preset threshold, the screen-to-body ratio of the object is greater than a preset value, and the object has occluder information, and the first identifier is used to indicate that the object can be used as an occluder.

[0074] Specifically, not all objects in the game scene can be used as occluders, and the occluder identifier of each object is pre-set. If an object can be used as an occluder, the occluder identifier of the object is set to the first identifier. If an object cannot be used as an occluder, the occluder identifier of the object is set to the second identifier, where the first identifier is used to indicate that the object can be used as an occluder. Among them, in the preset conditions, the distance between the object and the current viewpoint is less than a preset threshold, such as 200m, and the screen ratio of the object is greater than a preset value, such as 0.075.

[0075] In one embodiment, an object needs to satisfy four of the preset conditions to be determined as a candidate occluder. The four conditions in the preset conditions may be determined sequentially or in the following manner.

[0076] Optionally, in one embodiment, according to a preset condition, a candidate occluder is determined from objects that are not eliminated in the current frame image, which may be:

[0077] S10111. For each object that has not been eliminated in the current frame image, if the identifier of the object is the first identifier, and the object has occluder information, the distance between the object and the current viewpoint is less than a preset threshold, and the screen ratio of the object is greater than a preset value, then the object is determined to be a candidate occluder.

[0078] S10112: If the identifier of the object is not the first identifier, determine that the object is not a candidate occluder.

[0079] In this method, for each object that has not been eliminated in the current frame image, it is first determined whether the identifier of the object is the first identifier. If it is not the first identifier, it can be directly determined that the object is not a candidate occluder. If it is the first identifier, it is then determined whether the subsequent three conditions are met. This can improve the efficiency of determining candidate occluders.

[0080] S102. For each determined candidate occluder, determine that the candidate occluder can be mapped to an object substitute based on a pre-stored set of object substitutes for the scene of the current frame image, and mark the data of the object substitute as pending submission. The object substitute set includes object substitutes corresponding to multiple object game objects of the same type, and an object substitute is a substitute corresponding to one object.

[0081] Specifically, the following terms involved in this embodiment are first introduced:

[0082] Imposter: It is a technology to optimize rendering performance. It can replace distant objects with a plane or a simple geometric body, and use the texture of the object (called the imposter) to replace the real object, thereby reducing the GPU rendering workload and improving the performance of the game.

[0083] Object Game Object: An object game object in the game application, composed of multiple corresponding modules, each module is represented by SM / ISM.

[0084] Object Substitute Set: Substitutes created for a certain type of object (such as a building) in a game application, presented as an object substitute set in the scene. An object substitute set includes substitutes corresponding to multiple object game objects.

[0085] Object substitute: A substitute (also called a replacement) for an object.

[0086] In the embodiment of the present application, the game application is developed based on UE, and the native code of UE only collects the occluder information of SM and ISM. Generally speaking, the occluder information of SM and ISM comes from the lowest precision LOD of the Mesh associated with them. For example, in a game scene with a large number of buildings, each building has a large number of modules. Directly using the Mesh occluder information of these modules will cause the software rasterization to be overwhelmed. Therefore, in the embodiment of the present application, the occluder information of a large number of modules of the building is replaced by an object substitute, which can improve the execution efficiency of the software OC.

[0087] In this embodiment, a set of object substitutes corresponding to the scene is pre-generated and stored. The object substitute set includes object substitutes corresponding to multiple object game objects of the same type. The number of faces of the object substitutes is much less than the number of faces of the occluding body. When using the soft raster process for occlusion culling, a large number of object game objects are replaced by object substitutes with fewer faces, thereby reducing the time consumption of the soft raster and improving the execution efficiency of the software OC.

[0088] In this embodiment, after the candidate occluder is determined, for example, there are N candidate occluders, for each of the N candidate occluders, it is determined whether the candidate occluder can be mapped to an object substitute according to the set of object substitutes of the pre-stored scene. If it is determined that it can be mapped to an object substitute, the data of the object substitute is first marked as pending submission. Specifically, if it is determined that the candidate occluder can be mapped to an object substitute, the occluder information in the original associated Mesh resource of the candidate occluder (SM / ISM) does not need to be submitted to the soft grating process, and the data of the object substitute is not submitted to the soft grating process temporarily. Instead, the data of the object substitute is marked as pending submission, and submitted at the same time after all candidate occluders are judged, which can avoid repeated submission of object substitute data.

[0089] Specifically, in an implementable manner, according to a pre-stored set of object substitutes of the scene of the current frame image, it is determined that the candidate occluder can be mapped to an object substitute, which can be specifically:

[0090] S1021. If the game object to which the component of the candidate occluder belongs is an object game object, and an object substitute corresponding to the game object to which the component of the candidate occluder belongs can be found from the object substitute set, it is determined that the candidate occluder can be mapped to the found object substitute.

[0091] Specifically, the object object that can be mapped to an object substitute is the SM and ISM under the object game object with a substitute pre-made. For each object game object, a set of object substitutes corresponding to the object game object and the identifier of the object object or the identifier of the object substitute are pre-generated. When the game application is run to dynamically create the SM and ISM of the object game object, the object substitute information (including the substitute name and the identifier of the object object or the identifier of the object substitute) is written into the SM and ISM, so that the object substitute can be mapped from the SM and ISM.

[0092] S103, submitting the data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process, and obtaining the occlusion culling result of the object in the current frame image.

[0093] In the embodiment of the present application, the number of faces of the object substitute is far less than the number of faces of the candidate occluder. The data of the object substitute is submitted to the soft grating process, so that the object substitute in the submitted state is occluded by the soft grating process. Compared with the software OC directly processing the candidate occluder, the time consumption of the soft grating can be reduced and the execution efficiency of the software OC can be improved.

[0094] Optionally, the soft raster process of this embodiment may use an existing SOC algorithm, such as a UE built-in SOC, or mask-based software occlusion culling.

[0095] Optionally, the method of this embodiment may further include:

[0096] S104. Determine, based on a pre-stored set of object substitutes for the scene of the current frame image, that a candidate occluder cannot be mapped to an object substitute, and submit the occluder information of the candidate occluder to a soft raster process to perform occlusion culling on the candidate occluder through the soft raster process.

[0097] Specifically, if it is determined that the candidate occluder cannot be mapped to the object replacement, the occluder information of the candidate occluder is directly submitted to the soft raster process, so as to perform occlusion culling on the candidate occluder through the soft raster process.

[0098] Optionally, in an practicable manner, before submitting the data of the object substitute in the pending submission state to the soft grating process in S103, the following may also be included:

[0099] S105: Mark the data of the object substitutes visible to the virtual object in the object substitute set as being in a pending submission state.

[0100] Specifically, in this embodiment, virtual scenes and virtual objects are first explained. A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal device. The virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any one of a two-dimensional virtual space, a 2.5-dimensional virtual space, or a three-dimensional virtual space. The embodiment of the present application does not limit the dimension of the virtual scene. For example, a virtual scene includes the sky, land, ocean, etc. The land includes environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene.

[0101] A virtual object refers to an object that can be moved in a virtual scene. The movable object can be a virtual person, a virtual animal, a cartoon character, etc. For example: a person, an animal, a plant, an oil drum, a wall, a stone, etc. displayed in a virtual scene. The virtual object can be a virtual image in the virtual scene that represents the user. A virtual scene can include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.

[0102] In this embodiment, the data of the object substitutes visible to the virtual objects in the object substitute set are marked as pending submission. Taking a large number of building scenes as an example, due to the mechanism of building LOD, some of the buildings visible to the naked eye in the scene are building game objects, and some are building game object sets (part or all). The building game object set, as a building complex, may also appear in the scene. The building game objects are processed in S102, and the visible part of the building game object set is supplemented in S105, so that the information of the building occluders is relatively complete.

[0103] Optionally, in one embodiment, before marking the data of the visible object substitutes in the object substitute set as being in a pending submission state in S103, the following may also be included:

[0104] S106: Determine whether each determined candidate occluder has been traversed, or determine whether the number of traversed candidate occluders is equal to a preset number.

[0105] Specifically, it is determined that each determined candidate occluder has been traversed in the manner of S102, or it is determined that the number of traversed candidate occluders is equal to a preset number, such as 150. Then the data of the visible object substitutes in the object substitute set are marked as pending submission.

[0106] In a game application, the occlusion culling method of this embodiment is used to reduce the number of soft grating faces from 6267 to 3746, and the time consumption of soft grating is reduced from 1.58ms to 1.04ms, which can significantly reduce the time consumption of soft grating.

[0107] Optionally, in one embodiment, the method of this embodiment may further include, before S101:

[0108] S107: Perform PVS cropping on the current frame image.

[0109] Specifically, since PVS is first performed on the current frame image before S101, cutting off as many objects as possible can reduce the number of objects that the software OC needs to process, thereby improving the execution efficiency of the software OC. By combining PVS with the software OC, using PVS to cut off most static objects first, reducing the number of objects that the software OC needs to process, the execution efficiency of the software OC can be improved, the number of draw calls can be effectively reduced, and it is helpful to stabilize / improve the frame rate and improve the smoothness of the game operation.

[0110] The occlusion culling method of this embodiment, in a game application, combines PVS with software OC, reduces the number of soft grating faces from 4164 to 3411, reduces the time consumption of soft grating from 0.94ms to 0.73ms, and slightly reduces the number of overall drawing commands, which can significantly reduce the time consumption of soft grating and improve the execution efficiency of software OC.

[0111] Figure 4 A flowchart of an occlusion culling method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, optionally, before the above S101, the current frame image may be subjected to distance-based cropping, view cone cropping and PVS cropping in sequence, that is, the cropping process of the scene objects is: distance-based cropping, view cone cropping, PVS cropping and SOC cropping.

[0112] Optionally, in the above embodiment, specifically in a scene with a large number of buildings, the object substitute set is a building substitute set, the object substitute is a building substitute, and the building substitute is a substitute corresponding to a building. Optionally, the object substitute in this embodiment can be an overall simplified model, such as a customized HLOD.

[0113] The occlusion culling method provided in this embodiment first determines a candidate occluder from the objects that have not been culled in the current frame image, and for each determined candidate occluder, determines that the candidate occluder can be mapped to an object substitute according to the pre-stored object substitute set of the scene of the current frame image, then marks the data of the object substitute as a pending submission state, and submits the data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process, and obtain the occlusion culling result of the object object in the current frame image. Since a large number of object game objects are replaced by object substitutes with a small number of faces when using the soft raster process for occlusion culling, the time consumption of the soft raster can be reduced, and the execution efficiency of the software occlusion culling can be improved. When the object game object is a building game object, the object substitute is a substitute corresponding to a building, so that the software occlusion culling can be directly used in a large number of building scenes, improving the fluency of the game operation.

[0114] The technical solution of the present application is further described in detail below in conjunction with a specific embodiment. In the following embodiment, the occlusion culling method provided in the embodiment of the present application is applied to a scene with a large number of buildings as an example. In this scene, accordingly, the object substitute set is a building substitute set, the object substitute is a building substitute, and the building substitute is a substitute corresponding to a building.

[0115] Figure 5 A flowchart of an occlusion culling method provided in an embodiment of the present application. The execution subject of the embodiment of the present application is a device with an occlusion culling function, which may be a terminal device, such as Figure 5 As shown, the method may include:

[0116] S201, performing PVS cropping on the current frame image to obtain a cropped image.

[0117] S202: Determine candidate occluders from objects that have not been eliminated in the cropped image.

[0118] Optionally, in an implementable manner, determining a candidate occluder from objects that have not been eliminated in the current frame image in S202 may specifically be:

[0119] S2021. Determine candidate occluders from objects that have not been eliminated in the current frame image according to preset conditions, where the preset conditions include: the occluder identifier of the object is a first identifier, the distance between the object and the current viewpoint is less than a preset threshold, the screen-to-body ratio of the object is greater than a preset value, and there is occluder information on the object, and the first identifier is used to indicate that the object can be used as an occluder.

[0120] Specifically, not all objects in the game scene can be used as occluders, and the occluder identifier of each object is pre-set. If an object can be used as an occluder, the occluder identifier of the object is set to the first identifier. If an object cannot be used as an occluder, the occluder identifier of the object is set to the second identifier, where the first identifier is used to indicate that the object can be used as an occluder. Among them, in the preset conditions, the distance between the object and the current viewpoint is less than a preset threshold, such as 200m, and the screen ratio of the object is greater than a preset value, such as 0.075.

[0121] In one embodiment, an object needs to satisfy four of the preset conditions to be determined as a candidate occluder. The four conditions in the preset conditions may be determined sequentially or in the following manner.

[0122] Optionally, in one embodiment, according to a preset condition, a candidate occluder is determined from objects that are not eliminated in the current frame image, which may be:

[0123] S20211. For each object that has not been eliminated in the current frame image, if the identifier of the object is the first identifier, and the object has occluder information, the distance between the object and the current viewpoint is less than a preset threshold, and the screen ratio of the object is greater than a preset value, then the object is determined to be a candidate occluder.

[0124] S20212: If the identifier of the object is not the first identifier, determine that the object is not a candidate occluder.

[0125] In this method, for each object that has not been eliminated in the current frame image, it is first determined whether the identifier of the object is the first identifier. If it is not the first identifier, it can be directly determined that the object is not a candidate occluder. If it is the first identifier, it is then determined whether the subsequent three conditions are met. This can improve the efficiency of determining candidate occluders.

[0126] S203: Take out a candidate occluder, and determine whether the candidate occluder can be mapped to a building substitute according to a pre-stored set of building substitutes of the scene of the current frame image.

[0127] In the embodiment of the present application, the game application is developed based on UE, and the native code of UE only collects the occluder information of SM and ISM. Generally speaking, the occluder information of SM and ISM comes from the lowest precision LOD of the Mesh associated with them. In a game scene with a large number of buildings, each building has a large number of modules. Directly using the Mesh occluder information of these modules will cause the software rasterization to be overwhelmed. Therefore, in the embodiment of the present application, the occluder information of a large number of modules of the building is replaced by a building substitute, which can improve the execution efficiency of the software OC.

[0128] Specifically, the determined candidate occluders are traversed, and for each traversed candidate occluder, it is determined whether the candidate occluder can be mapped to a building substitute according to a pre-stored set of building substitutes of the scene of the current frame image.

[0129] If yes, execute S204, if no, execute S205.

[0130] S204: Submit the occluder information of the candidate occluder to the soft grating process, so as to perform occlusion culling on the candidate occluder through the soft grating process.

[0131] S205. Mark the data of the building substitute as pending submission.

[0132] S206: Determine whether each determined candidate occluder has been traversed, or determine whether the number of traversed candidate occluders is equal to a preset number.

[0133] In this embodiment, after the candidate occluders are determined, for example, there are N candidate occluders, for each of the N candidate occluders, it is determined whether the candidate occluder can be mapped to a building substitute according to the set of building substitutes of the pre-stored scene. If it is determined that it can be mapped to a building substitute, the data of the building substitute is first marked as pending submission. Specifically, if it is determined that the candidate occluder can be mapped to a building substitute, the occluder information in the original associated Mesh resource of the candidate occluder (SM / ISM) does not need to be submitted to the soft grating process, and the data of the building substitute is not submitted to the soft grating process temporarily. Instead, the data of the building substitute is marked as pending submission, and submitted at the same time after all candidate occluders are judged, which can avoid repeated submission of the data of the building substitute.

[0134] Specifically, in an implementable manner, according to a pre-stored set of building substitutes of the scene of the current frame image, it is determined that the candidate occluder can be mapped to a building substitute, which can be specifically:

[0135] S2031. If the game object to which the component of the candidate occluder belongs is a building game object, and a building substitute corresponding to the game object to which the component of the candidate occluder belongs can be found from the building substitute set, it is determined that the candidate occluder can be mapped to the found building substitute.

[0136] Specifically, the object that can be mapped to a building substitute is the SM and ISM under the building game object with a substitute pre-made. For each building game object, a set of building substitutes and the identifier of the object or the identifier of the building substitute corresponding to the building game object are pre-generated. When the game application is run to dynamically create the SM and ISM of the building game object, the building substitute information (including the substitute name and the identifier of the building object or the identifier of the building substitute) is written into the SM and ISM, so that the SM and ISM can be mapped to the building substitute.

[0137] S207: Mark the data of the building substitutes visible to the virtual object in the building substitute set as being in a pending submission state.

[0138] In this embodiment, the data of the building substitutes visible to the virtual objects in the building substitute set are marked as pending submission. Taking a large number of building scenes as an example, due to the mechanism of building LOD, some of the buildings visible to the naked eye in the scene are building game objects, and some are building game object sets (part or all). The building game object set, as a building complex, may also appear in the scene. The building game objects are processed in S203, and the visible part of the building game object set is supplemented in S207, so that the information of the building occluders is relatively complete.

[0139] S208, submitting the data of the building substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the building substitute in the pending submission state through the soft raster process, and obtaining the occlusion culling result of the building object in the current frame image.

[0140] In the embodiment of the present application, the number of faces of the building substitute is far less than the number of faces of the candidate occluders. The data of the building substitute is submitted to the soft grating process, so that the building substitute in the submitted state is occluded by the soft grating process. Compared with the software OC directly processing the candidate occluders, the time consumption of the soft grating can be reduced and the execution efficiency of the software OC can be improved.

[0141] The occlusion culling method provided in this embodiment can reduce the time consumption of soft grating and improve the execution efficiency of software occlusion culling by replacing a large number of building game objects with building substitutes with fewer faces when using the soft grating process for occlusion culling, so that software occlusion culling can be directly used in a large number of building scenes, thereby improving the smoothness of game operation. In addition, by combining PVS and software occlusion culling, most static objects are first cut off with PVS, reducing the number of objects that need to be processed by software occlusion culling, the execution efficiency of software occlusion culling can be improved, the number of drawing instructions can be effectively reduced, and it is helpful to stabilize / improve the frame rate and improve the smoothness of game operation.

[0142] The specific implementation modes of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above implementation modes. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific implementation modes can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different implementation modes of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0143] It should also be understood that in the various method embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. It should be understood that these sequence numbers can be interchanged where appropriate, so that the embodiments of the present application described can be implemented in an order other than those shown or described.

[0144] The above describes the method embodiment of the present application in detail. Figures 6 to 8 , describe in detail the device embodiments of the present application.

[0145] Figure 6 is a schematic block diagram of an occlusion removal device according to an embodiment of the present application. Figure 6 As shown, the occlusion culling device may include a determination module 11 and a processing module 12 .

[0146] The determination module 11 is used to determine the candidate occluders from the objects that have not been eliminated in the current frame image;

[0147] The processing module 12 is used to determine, for each determined candidate occluder, based on a pre-stored set of object substitutes of the scene of the current frame image, that the candidate occluder can be mapped to an object substitute, and then mark the data of the object substitute as a pending submission state, wherein the set of object substitutes includes object substitutes corresponding to multiple object game objects of the same type, and the object substitute is a substitute corresponding to one object;

[0148] The processing module 12 is also used to submit the data of the object substitute in the pending state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending state through the soft raster process to obtain the occlusion culling result of the object in the current frame image.

[0149] In one embodiment, the processing module 12 is further used to: determine, based on a pre-stored set of object substitutes for the scene of the current frame image, that a candidate occluder cannot be mapped to an object substitute, and then submit the occluder information of the candidate occluder to the soft grating process to perform occlusion culling on the candidate occluder through the soft grating process.

[0150] In one embodiment, the processing module 12 is further configured to: before submitting the data of the object substitutes in the pending submission state to the soft rasterization process, mark the data of the object substitutes visible to the virtual object in the object substitute set as pending submission state.

[0151] In one embodiment, the determination module 11 is used to: determine a candidate occluder from objects that have not been eliminated in the current frame image according to preset conditions, the preset conditions including: the occluder identifier of the object is a first identifier, the distance between the object and the current viewpoint is less than a preset threshold, the screen ratio of the object is greater than a preset value, and the object has occluder information, and the first identifier is used to indicate that the object can be used as an occluder.

[0152] In one embodiment, the determination module 11 is specifically used for:

[0153] For each object that is not eliminated in the current frame image, if the identifier of the object is the first identifier, the object has occluder information, the distance between the object and the current viewpoint is less than a preset threshold, and the screen ratio of the object is greater than a preset value, then the object is determined to be a candidate occluder;

[0154] If the identifier of the object is not the first identifier, it is determined that the object is not a candidate occluder.

[0155] In one embodiment, the processing module 12 is used to:

[0156] If the game object to which the component of the candidate occluder belongs is an object game object, and an object substitute corresponding to the game object to which the component of the candidate occluder belongs can be found from the object substitute set, it is determined that the candidate occluder can be mapped to the found object substitute.

[0157] In one embodiment, the processing module 12 is further configured to:

[0158] Before marking the data of the visible object substitutes in the object substitute set as a pending submission state, it is determined that each determined candidate occluder has been traversed, or it is determined that the number of traversed candidate occluders is equal to a preset number.

[0159] In one embodiment, the processing module 12 is further configured to:

[0160] Before the determination module 11 determines the candidate occluders from the objects that have not been eliminated in the current frame image, the current frame image is subjected to pre-calculated visibility PVS clipping.

[0161] In one embodiment, the object substitute set is a building substitute set, the object substitute is a building substitute, and the building substitute is a substitute corresponding to a building.

[0162] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 6 The device shown can execute the above-mentioned occlusion culling method, and the above-mentioned and other operations and / or functions of each module in the device are respectively for realizing the corresponding processes in each of the above-mentioned methods, which will not be described in detail here for the sake of brevity.

[0163] The above describes the device and system of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0164] In the embodiments of the present application, the computer device can be configured as a terminal device or a server. When the computer device is configured as a terminal device, the terminal device can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The technical solution provided in the present application can also be implemented through interaction between the terminal device and the server. The embodiments of the present application do not limit this.

[0165] When a computer device is configured as a terminal device, Figure 7A block diagram of a terminal device 1100 provided in an embodiment of the present application. The terminal device 700 may be a portable mobile terminal device, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal device 700 may also be referred to as a user device, a portable terminal device, a laptop terminal device, a desktop terminal device or other names.

[0166] Typically, the terminal device 700 may include: a processor 701 and a memory 702 .

[0167] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0168] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one computer program, which is used to be executed by the processor 701 to implement the occlusion clipping method of the scene object provided in the method embodiment of the present application.

[0169] In some embodiments, the terminal device 700 may further optionally include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707 and a power supply 708.

[0170] The peripheral device interface 703 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 701 and the memory 702. In some embodiments, the processor 701, the memory 702, and the peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral device interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0171] The radio frequency circuit 704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 704 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 704 can communicate with other terminal devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0172] The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to collect touch signals on the surface or above the surface of the display screen 705. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 705 can be one, set on the front panel of the terminal device 700; in other embodiments, the display screen 705 can be at least two, respectively set on different surfaces of the terminal device 700 or in a folding design; in other embodiments, the display screen 705 can be a flexible display screen, set on a curved surface or a folding surface of the terminal device 700. Even, the display screen 705 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 705 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0173] The camera assembly 706 is used to capture images or videos. In some embodiments, the camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal device, and the rear camera is disposed on the back of the terminal device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and the VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 706 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0174] The audio circuit 707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 701 for processing, or input them into the radio frequency circuit 704 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal device 700. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 707 may also include a headphone jack.

[0175] The power supply 708 is used to power various components in the terminal device 700. The power supply 708 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 708 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0176] In some embodiments, the terminal device 700 further includes one or more sensors 709 , including but not limited to: an acceleration sensor 710 , a gyroscope sensor 711 , a pressure sensor 712 , an optical sensor 713 , and a proximity sensor 714 .

[0177] The acceleration sensor 710 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal device 700. For example, the acceleration sensor 710 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 701 can control the display screen 705 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 710. The acceleration sensor 710 can also be used for collecting game or user motion data.

[0178] The gyroscope sensor 711 can detect the body direction and rotation angle of the terminal device 700, and the gyroscope sensor 711 can cooperate with the acceleration sensor 710 to collect the user's 3D actions on the terminal device 700. The processor 701 can implement the following functions based on the data collected by the gyroscope sensor 711: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0179] The pressure sensor 712 can be set on the side frame of the terminal device 700 and / or the lower layer of the display screen 705. When the pressure sensor 712 is set on the side frame of the terminal device 700, it can detect the user's holding signal of the terminal device 700, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 712. When the pressure sensor 712 is set on the lower layer of the display screen 705, the processor 701 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0180] The optical sensor 713 is used to collect the ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the display screen 705 according to the ambient light intensity collected by the optical sensor 713. Specifically, when the ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is reduced. In another embodiment, the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 713.

[0181] The proximity sensor 714, also called a distance sensor, is usually arranged on the front panel of the terminal device 700. The proximity sensor 714 is used to collect the distance between the user and the front of the terminal device 700. In one embodiment, when the proximity sensor 714 detects that the distance between the user and the front of the terminal device 700 is gradually decreasing, the processor 701 controls the display screen 705 to switch from the screen-on state to the screen-off state; when the proximity sensor 714 detects that the distance between the user and the front of the terminal device 700 is gradually increasing, the processor 701 controls the display screen 705 to switch from the screen-off state to the screen-on state.

[0182] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal device 700, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0183] Figure 8A schematic diagram of the structure of a server provided in an embodiment of the present application, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and one or more memories 802, wherein the memory 802 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 801 to implement the occlusion and clipping methods of scene objects provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.

[0184] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by the processor of the terminal device to implement the operation performed by the terminal device in the occlusion clipping method of the scene object in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0185] The embodiment of the present application also provides a computer program product, which includes a computer program code, and the computer program code is stored in a computer-readable storage medium. The processor of the computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device executes the occlusion clipping method of the scene object provided in the above various optional implementations.

[0186] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0187] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. An occlusion culling method, characterized in that: include: Determine candidate occluders from objects that have not been eliminated in the current frame image; For each determined candidate occluder, according to a pre-stored set of object substitutes of the scene of the current frame image, it is determined that the candidate occluder can be mapped to an object substitute, and the data of the object substitute is marked as pending submission, the object substitute set includes object substitutes corresponding to multiple object game objects of the same type, and the object substitute is a substitute corresponding to one object; Submitting data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process, and obtaining the occlusion culling result of the object object in the current frame image.

2. The method according to claim 1, characterized in that The method further comprises: According to a pre-stored set of object substitutes of the scene of the current frame image, it is determined that the candidate occluder cannot be mapped to an object substitute, and the occluder information of the candidate occluder is submitted to the soft grating process to perform occlusion culling on the candidate occluder through the soft grating process.

3. The method according to claim 1, characterized in that Before submitting the data of the object substitute in the pending submission state to the soft grating process, the method further includes: The data of the object substitutes visible to the virtual object in the object substitute set are marked as being in a pending submission state.

4. The method according to claim 1, characterized in that: The step of determining a candidate occluder from objects that have not been eliminated in the current frame image includes: According to preset conditions, candidate occluders are determined from objects that have not been eliminated in the current frame image, and the preset conditions include: the occluder identifier of the object object is a first identifier, the distance between the object object and the current viewpoint is less than a preset threshold, the screen-to-body ratio of the object object is greater than a preset value, and the object object has occluder information, and the first identifier is used to indicate that the object object can be used as an occluder.

5. The method according to claim 4, characterized in that The step of determining a candidate occluder from objects that have not been eliminated in the current frame image according to a preset condition includes: For each object that is not eliminated in the current frame image, if the identifier of the object is the first identifier, and the object has occluder information, the distance between the object and the current viewpoint is less than the preset threshold, and the screen ratio of the object is greater than the preset value, then determine that the object is a candidate occluder; If the identifier of the object is not the first identifier, it is determined that the object is not a candidate occluder.

6. The method according to claim 1, characterized in that The determining that the candidate occluder can be mapped to an object substitute according to a pre-stored set of object substitutes of the scene of the current frame image includes: If the game object to which the component of the candidate occluder belongs is an object game object, and an object substitute corresponding to the game object to which the component of the candidate occluder belongs can be found from the object substitute set, it is determined that the candidate occluder can be mapped to the found object substitute.

7. The method according to claim 1, characterized in that Before marking the data of the visible object substitutes in the object substitute set as a pending submission state, the method further includes: It is determined that each determined candidate occluder has been traversed, or it is determined that the number of traversed candidate occluders is equal to a preset number.

8. The method according to any one of claims 1 to 7, characterized in that: Before determining the candidate occluders from the objects that have not been eliminated in the current frame image, the method further includes: Pre-calculated visibility PVS clipping is performed on the current frame image.

9. The method according to any one of claims 1 to 7, characterized in that: The object substitute set is a building substitute set, the object substitute is a building substitute, and the building substitute is a substitute corresponding to a building.

10. An occlusion culling device, characterized in that: include: A determination module, used to determine candidate occluders from objects that have not been eliminated in the current frame image; A processing module, for determining, for each determined candidate occluder, that the candidate occluder can be mapped to an object substitute according to a pre-stored set of object substitutes of the scene of the current frame image, and marking the data of the object substitute as a pending submission state, wherein the set of object substitutes includes object substitutes corresponding to a plurality of object game objects of the same type, and the object substitute is a substitute corresponding to one object; The processing module is also used to submit data of the object substitute in the pending submission state to the soft raster process, so as to perform occlusion culling on the object substitute in the pending submission state through the soft raster process to obtain the occlusion culling result of the object object in the current frame image.

11. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the processor executes the method according to any one of claims 1 to 9.

12. A computer storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for executing the method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The method comprises a computer program code, and when the computer program code is executed by a computer device, the computer device is caused to perform the method according to any one of claims 1 to 9.