A viewport culling method and system based on three-dimensional geocoding
Through the viewport culling method based on three-dimensional geocoding, view angle parameters are predicted and visual vertebra is constructed. Multi-level quad-tree space management is used to solve the problem of wasted computing resources in the traditional rendering process, achieving efficient rendering and improving user experience.
Patent Information
- Application Number
- CN202411803765.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In the traditional rendering process, it is irrelevant whether the object is visible in the current view, resulting in serious waste of computing resources and affecting the system response speed and user experience.
The viewport culling method based on three-dimensional geocoding is adopted. By obtaining the viewing angle parameters of the user's historical frame and the viewing angle parameters of the current frame, the viewing angle parameters of the next frame are predicted, and the predicted viewing vertebrae is constructed, and the three-dimensional geospatial objects to be removed are determined using multi-level quad-tree space.
Effectively identify and eliminate invisible objects, reduce rendering burden, improve rendering efficiency, and improve the performance and user experience of digital twin applications.
Smart Images

Figure CN119295695B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of viewport culling, and more particularly to a viewport culling method and system based on three-dimensional geocoding. Background Art
[0002] With the deepening of digital transformation, digital twin technology has become a bridge connecting the physical world and the virtual world. In particular, digital twin applications in geographic information systems (GIS), such as urban planning, disaster emergency response, and intelligent traffic management, require the processing of massive geospatial objects, including buildings, terrain, road networks, vegetation, etc., which places extremely high demands on computing resources. In the traditional rendering process, regardless of whether the object is visible in the current view, it will go through the entire rendering pipeline, resulting in serious waste of computing resources, affecting system response speed and user experience.
[0003] Therefore, there is an urgent need for an innovative viewport culling technology that can efficiently identify and cull invisible objects in the real-time rendering of digital twin models, reduce the rendering burden, and improve rendering efficiency. Summary of the invention
[0004] The embodiments of the present application provide a viewport culling method and system based on three-dimensional geocoding to solve the problems existing in the above-mentioned background technology.
[0005] In a first aspect, an embodiment of the present application provides a viewport culling method based on three-dimensional geocoding, comprising: obtaining viewing parameters of a user's historical frame and a current frame; predicting viewing parameters of a next frame of the current frame based on the viewing parameters of the historical frame and the current frame, wherein the viewing parameters include: azimuth and elevation; constructing a predicted viewing frustum based on the viewing parameters of the next frame; determining a three-dimensional geographic space object to be culled using a multi-level quadtree space corresponding to the predicted viewing frustum and a target area, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node with the viewing frustum.
[0006] Furthermore, the viewing parameters of the next frame of the current frame are predicted by utilizing the viewing parameters based on the historical frames and the viewing parameters of the current frame, including: calculating the angular velocity of the current frame based on the viewing parameters of the current frame, wherein the angular velocity includes: azimuth angular velocity and elevation angular velocity; determining the angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing parameters of the historical frames and the EMA model; determining the viewing parameters of the next frame based on the angular velocity smoothing value of the current frame.
[0007] Furthermore, based on the angular velocity of the current frame, the viewing angle parameters of the historical frames and the EMA model, an angular velocity smoothing value of the current frame is determined, including: calculating the angular velocity smoothing value of the current frame and the angular velocity smoothing value of the previous frame of the current frame based on the angular velocity smoothing value of the current frame, the viewing angle parameters of the historical frames and the EMA model; determining the target angular acceleration based on the angular acceleration smoothing value of the current frame and the angular acceleration smoothing value of the previous frame of the current frame, wherein the target angular acceleration includes: target azimuth acceleration and target elevation acceleration; based on the target angular acceleration, predicting the viewing angle parameters of the next frame.
[0008] Further, based on the target angular acceleration, predicting the viewing angle parameter of the next frame includes: based on the target azimuth acceleration, predicting the azimuth of the next frame; wherein the azimuth of the next frame is: ;in, is the azimuth of the next frame, is the azimuth of the current frame, The azimuth acceleration smoothing value of the current frame, is the time difference between two adjacent frames, is the target azimuth acceleration, , is the azimuth velocity smoothing value of the current frame, is the azimuth velocity smoothing value of the frame before the current frame, , is the average coefficient of the EMA model, is the azimuth velocity of the current frame; based on the target elevation acceleration, the elevation angle of the next frame is predicted; the elevation angle of the next frame is: ;in, is the elevation angle of the next frame, is the elevation angle of the current frame, The elevation acceleration smoothing value of the current frame, is the target elevation acceleration, , is the elevation velocity smoothing value of the current frame, is the elevation velocity smoothing value of the frame before the current frame, , is the elevation velocity of the current frame.
[0009] Furthermore, based on the predicted viewing frustum and the multi-level quadtree structure corresponding to the target area, determining the three-dimensional geographic space object to be eliminated includes: using a parallel algorithm, based on the predicted viewing frustum and the intersection data of each node and the viewing frustum, performing a target test on the space corresponding to each node and the predicted viewing frustum to obtain a test result, wherein the target test includes: a viewing frustum intersection test, a depth test and an occlusion query; and determining the three-dimensional geographic space object to be eliminated based on the test result of the target test.
[0010] Further, using a parallel algorithm, based on the predicted viewing frustum and the intersection data between each node and the viewing frustum, a target test is performed on the space corresponding to each node and the predicted viewing frustum to obtain a test result, including: using the parallel algorithm, based on the predicted viewing frustum and the intersection data between each node and the viewing frustum, the viewing frustum intersection test is performed on the space corresponding to each node and the predicted viewing frustum to determine nodes that do not intersect with the predicted viewing frustum in the multi-level quadtree space, and the three-dimensional geographic space objects contained in the space corresponding to the non-intersecting nodes are determined as target three-dimensional geographic space objects; performing the depth test and the occlusion query on the three-dimensional geographic space objects contained in the space corresponding to the nodes that intersect with the predicted viewing frustum in the multi-level quadtree space to determine invisible three-dimensional geographic space objects; and determining the target three-dimensional geographic space object and the invisible three-dimensional geographic space object as the test result.
[0011] Furthermore, the method also includes: determining a three-dimensional geographic space object to be rendered based on the three-dimensional geographic space object to be eliminated; and rendering the three-dimensional geographic space object to be rendered when the user's perspective moves to the perspective parameter of the next frame.
[0012] In a second aspect, an embodiment of the present application provides a viewport culling system based on three-dimensional geocoding, comprising: an acquisition unit, used to acquire viewing parameters of a user's historical frame and a current frame; a prediction unit, used to predict viewing parameters of a next frame of the current frame based on the viewing parameters of the historical frame and the current frame, wherein the viewing parameters include: azimuth and elevation; a component unit, used to construct a predicted viewing frustum based on the viewing parameters of the next frame; a determination unit, used to determine the three-dimensional geographic space object to be culled using a multi-level quadtree space corresponding to the predicted viewing frustum and a target area, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node with the viewing frustum.
[0013] In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method described in the first aspect above.
[0014] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, implements the method described in the first aspect above.
[0015] In an embodiment of the present invention, viewing parameters of a user's historical frame and a current frame are obtained; based on the viewing parameters of the historical frame and the current frame, viewing parameters of a next frame of the current frame are predicted; based on the viewing parameters of the next frame, a predicted viewing frustum is constructed; and three-dimensional geographic spatial objects to be eliminated are determined using a multi-level quadtree space corresponding to the predicted viewing frustum and a target area. Through intelligent prediction and efficient quadtree space management, effective management of a large number of three-dimensional geographic spatial objects is achieved, greatly improving the performance and user experience of digital twin applications.
[0016] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A flowchart of a viewport culling method based on three-dimensional geocoding provided in an embodiment of the present application;
[0019] Figure 2 A flowchart of a viewport culling system based on three-dimensional geocoding provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Embodiment 1:
[0023] According to an embodiment of the present invention, an embodiment of a viewport culling method based on three-dimensional geocoding is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 is a flow chart of a viewport culling method based on three-dimensional geocoding according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0025] Step S102, obtaining viewing angle parameters of the user's historical frames and viewing angle parameters of the current frame;
[0026] Step S104, predicting the viewing angle parameters of the next frame of the current frame based on the viewing angle parameters of the historical frame and the viewing angle parameters of the current frame, wherein the viewing angle parameters include: azimuth and elevation;
[0027] Step S106, constructing a predicted viewing frustum based on the viewing angle parameters of the next frame;
[0028] Step S108, using the predicted viewing frustum and the multi-level quadtree space corresponding to the target area, determining the three-dimensional geographic space objects to be eliminated, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node and the viewing frustum.
[0029] In the embodiment of the present invention, taking the digital twin city model as an example, when the user browses the digital twin model, the system records the viewing angle parameters of each frame, including azimuth (horizontal rotation angle) and elevation (vertical rotation angle). These data can be stored in a circular queue so that the most recent historical frame viewing angle and the current frame viewing angle can be obtained at any time.
[0030] The azimuth and elevation of the next frame are predicted using the view angle change trend of the previous frames (for example, through prediction algorithms such as linear regression and Kalman filtering). The purpose of the prediction is to build the viewing cone in advance and reduce the pressure of real-time calculation.
[0031] Based on the predicted viewing angle parameters, a virtual viewing frustum is constructed, which represents the spatial range that the user may see in the next frame. The construction of the viewing frustum takes into account the camera's field of view angle, near section, and far section distance.
[0032] The target area (i.e., the digital twin city model) is efficiently organized in advance using a multi-level quadtree spatial index. Each quadtree node not only stores the geographic range information of its child nodes, but also pre-computes the intersection of the node bounding box and the predicted viewing frustum.
[0033] By traversing the quadtree, starting from the root node, non-visible nodes and their child nodes are quickly eliminated based on the intersection of the node and the viewing frustum, and only nodes that may be in view are retained. This process efficiently selects the 3D geospatial objects to be rendered.
[0034] In the digital twin model, assuming that the user is moving the view from one end of the city to the other, the system continuously tracks the user's view changes and predicts the area that will be seen. Through the above method, the system can predict which buildings and roads should be rendered in the next view and which can be safely removed from the rendering queue.
[0035] In the embodiment of the present invention, viewport culling significantly reduces the amount of geometry that needs to be rendered, reduces the burden on the GPU, improves the frame rate, and ensures that the user can obtain a smooth visual experience even when the viewing angle moves quickly.
[0036] Especially in large or complex scenes, culling invisible objects can reduce memory usage and bandwidth requirements, allowing limited computing resources to be more focused on rendering truly visible content.
[0037] The prediction mechanism allows the system to plan rendering tasks in advance and reduce latency, which is especially important for real-time interactive applications (such as virtual reality, drone monitoring, etc.).
[0038] In summary, this viewport culling method combined with digital twin modeling realizes the effective management of a large number of three-dimensional geospatial objects through intelligent prediction and efficient quadtree space management, greatly improving the performance and user experience of digital twin applications.
[0039] In an embodiment of the present invention, predicting the viewing angle parameters of the next frame of the current frame by using the viewing angle parameters based on the historical frames and the viewing angle parameters of the current frame includes:
[0040] Calculating the angular velocity of the current frame based on the viewing angle parameter of the current frame, wherein the angular velocity includes: an azimuth velocity and an elevation velocity;
[0041] Determine an angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing angle parameters of the historical frames and the EMA model;
[0042] Based on the angular velocity smoothing value of the current frame, a viewing angle parameter of the next frame is determined.
[0043] Specifically, determining the angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing angle parameter of the historical frame and the EMA model includes:
[0044] Calculating the angular velocity smoothing value of the current frame and the angular velocity smoothing value of a frame before the current frame based on the angular velocity smoothing value of the current frame, the viewing angle parameter of the historical frame and the EMA model;
[0045] Determine a target angular acceleration based on the angular acceleration smoothing value of the current frame and the angular acceleration smoothing value of the previous frame of the current frame, wherein the target angular acceleration includes: a target azimuth acceleration and a target elevation acceleration;
[0046] Based on the target angular acceleration, the viewing angle parameter of the next frame is predicted.
[0047] Wherein, the azimuth angle of the next frame is:
[0048] ;
[0049] in, is the azimuth of the next frame, is the azimuth of the current frame, The azimuth acceleration smoothing value of the current frame, is the time difference between two adjacent frames, is the target azimuth acceleration, , is the azimuth velocity smoothing value of the current frame, is the azimuth velocity smoothing value of the frame before the current frame, , is the average coefficient of the EMA model, is the azimuth velocity of the current frame;
[0050] The elevation angle of the next frame is:
[0051] ;
[0052] in, is the elevation angle of the next frame, is the elevation angle of the current frame, The elevation acceleration smoothing value of the current frame, is the target elevation acceleration, , is the elevation velocity smoothing value of the current frame, is the elevation velocity smoothing value of the frame before the current frame, , is the elevation velocity of the current frame.
[0053] In the embodiment of the present invention, by introducing the exponential moving average technology to smooth the angular velocity changes, we can estimate the angular acceleration more accurately, thereby improving the accuracy of the view parameter prediction. This trend analysis method based on historical data performs well when the dynamic changes are not drastic, and is particularly suitable for predicting smooth changes in the user's view, thereby improving the user experience in real-time rendering and interactive applications.
[0054] In an embodiment of the present invention, determining the three-dimensional geographic space object to be removed based on the predicted visual frustum and the multi-level quadtree structure corresponding to the target area includes:
[0055] Using a parallel algorithm, based on the predicted visual frustum and the intersection data between each node and the visual frustum, a target test is performed on the space corresponding to each node and the predicted visual frustum to obtain a test result, wherein the target test includes: a visual frustum intersection test, a depth test, and an occlusion query;
[0056] Based on the test result of the target test, the three-dimensional geographic space object to be eliminated is determined.
[0057] Specifically, based on the predicted visual frustum and the intersection data between each node and the visual frustum, a target test is performed on the space corresponding to each node and the predicted visual frustum to obtain a test result, including:
[0058] Using the parallel algorithm, based on the predicted visual frustum and the intersection data between each node and the visual frustum, the visual frustum intersection test is performed on the space corresponding to each node and the predicted visual frustum, nodes that do not intersect with the predicted visual frustum in the multi-level quadtree space are determined, and the three-dimensional geographic space objects contained in the spaces corresponding to the non-intersecting nodes are determined as target three-dimensional geographic space objects;
[0059] Performing the depth test and the occlusion query on the three-dimensional geographic space objects contained in the space corresponding to the nodes intersecting with the predicted viewing frustum in the multi-level quadtree space to determine the invisible three-dimensional geographic space objects;
[0060] The target three-dimensional geographic space object and the invisible three-dimensional geographic space object are determined as the test results.
[0061] In the embodiment of the present invention, a GPU parallel computing framework, such as CUDA or OpenCL, is used to create a Kernel (computing core) and allocate a thread or thread block to each quadtree node in the digital twin city model. Each thread is responsible for the view frustum intersection test, depth test and occlusion query of a node.
[0062] Using the predicted frustum parameters, the bounding box (AABB) of each node is tested for intersection, and the nodes that are not in the frustum are quickly eliminated by comparing the relationship between the bounding box boundary and the frustum plane (as described in the formula above).
[0063] For nodes that pass the frustum intersection test, a further depth test is performed. The Z value of the farthest or nearest point stored in the node is compared with the depth range of the current frustum to remove nodes that do not meet the depth conditions.
[0064] For the remaining nodes, perform occlusion query. Through the GPU's occlusion query function (Occlusion Query), quickly determine whether the node is occluded by other objects, and if it is not visible, mark it as to be culled.
[0065] Finally, the test results of all threads or thread blocks are collected and aggregated into GPU global memory or host memory.
[0066] According to the summary results, the three-dimensional space objects represented by the nodes that failed the test (i.e., excluded by the predicted viewing frustum, failed the depth test, or were confirmed to be invisible by the occlusion query) are marked as objects to be eliminated.
[0067] Through parallel processing and early culling, the number of objects that need to be rendered is significantly reduced, greatly improving rendering efficiency, especially in digital twin applications with high performance requirements.
[0068] Combined with the prediction mechanism, the system is able to prepare upcoming perspective content in advance, reduce latency, and improve the smoothness of the user experience.
[0069] Effectively utilize GPU resources and reduce the burden on the CPU, especially when processing complex scenes, so that the system can allocate more resources to dynamic data processing and interactive response rather than basic rendering tasks.
[0070] In an embodiment of the present invention, the method further includes:
[0071] Based on the three-dimensional geographic space objects to be eliminated, determining the three-dimensional geographic space objects to be rendered;
[0072] When the user's perspective moves to the perspective parameter of the next frame, the three-dimensional geographic space object to be rendered is rendered.
[0073] In the embodiment of the present invention, after the 3D geospatial objects to be eliminated are determined, a simplified list to be rendered is generated by comparing the geospatial object list of the entire model. This list only contains those 3D spatial objects that are still considered visible after the view frustum intersection test, depth test and occlusion query.
[0074] The model's level of detail is automatically adjusted based on the distance between the object to be rendered and the viewpoint. Simplified models are used for distant objects to further improve rendering efficiency.
[0075] When the user's perspective actually moves to the predicted next frame perspective parameters, the system immediately switches to that perspective. At this time, all pre-calculated viewing frustum, depth, and occlusion information are ready.
[0076] According to the list to be rendered generated in step S5, the GPU is used to efficiently render these objects. The multi-threaded rendering capabilities of modern graphics APIs (such as OpenGL, DirectX, and Vulkan) are used to process different types of objects (such as buildings, vegetation, and dynamic vehicles) in parallel to further speed up the rendering speed.
[0077] During the rendering process, lighting effects and environmental reflections are calculated in real time to increase the realism of the scene, especially for the processing of highly reflective materials such as water surfaces and glass surfaces, ensuring that the user experience from a new perspective is natural and realistic.
[0078] For example, the user decides to turn quickly from one end of the city to the other and look at a landmark building. The system predicted this large rotation through historical perspective data, constructed a new viewing cone, and performed efficient tests on a multi-level quadtree structure. The results show that most of the buildings behind the original line of sight can be eliminated, while the new area in front needs to be prepared for rendering. In particular, for some new buildings that are close, the system automatically improves the LOD details to ensure clarity. When the user's perspective is really turned, the system seamlessly switches to the new perspective, rendering only the pre-selected buildings, streets, and sky, etc., with the correct lighting effects, so that the user can hardly feel any delay, as if he is really traveling through the city.
[0079] By combining the above-mentioned viewport culling method based on 3D geocoding with model rendering, it is ensured that users see instant and high-quality scenes without delay or lag when changing perspectives, thereby enhancing the immersive experience of the digital twin model.
[0080] By accurately eliminating invisible objects, the rendering burden is significantly reduced, allowing limited computing resources to be focused on improving rendering quality and processing dynamic content, such as dynamic lighting and shadows and pedestrian and vehicle traffic, further enhancing the interactivity and realism of the model.
[0081] The pre-computation and parallel processing mechanisms enable the system to respond quickly to user operations and maintain smooth visual feedback even in scenarios where the perspective changes rapidly. This is especially important for simulation, training, and planning decision-making applications.
[0082] Embodiment 2:
[0083] An embodiment of the present invention also provides a viewport culling system based on three-dimensional geocoding, which is used to execute the viewport culling method based on three-dimensional geocoding provided in the above content of the embodiment of the present invention. The following is a specific introduction to the viewport culling system based on three-dimensional geocoding provided in the embodiment of the present invention.
[0084] like Figure 2 As shown, Figure 2 Schematic diagram of the viewport culling system based on three-dimensional geocoding, the system includes:
[0085] An acquisition unit 10 is used to acquire viewing angle parameters of a user's historical frames and viewing angle parameters of a current frame;
[0086] The prediction unit 20 is used to predict the viewing angle parameters of the next frame of the current frame based on the viewing angle parameters of the historical frame and the viewing angle parameters of the current frame, wherein the viewing angle parameters include: azimuth and elevation
[0087] A component unit 30 is used to construct a predicted viewing frustum based on the viewing angle parameter of the next frame;
[0088] The determination unit 40 is used to determine the three-dimensional geographic space objects to be eliminated by using a multi-level quadtree space corresponding to the predicted viewing frustum and the target area, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area by using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node and the viewing frustum.
[0089] In an embodiment of the present invention, viewing parameters of a user's historical frame and a current frame are obtained; based on the viewing parameters of the historical frame and the current frame, viewing parameters of a next frame of the current frame are predicted; based on the viewing parameters of the next frame, a predicted viewing frustum is constructed; and three-dimensional geographic spatial objects to be eliminated are determined using a multi-level quadtree space corresponding to the predicted viewing frustum and a target area. Through intelligent prediction and efficient quadtree space management, effective management of a large number of three-dimensional geographic spatial objects is achieved, greatly improving the performance and user experience of digital twin applications.
[0090] Embodiment three:
[0091] The embodiment of the present invention further provides a computing device for executing a program of the method described in the first embodiment, such as Figure 3 As shown, the computing device may include a storage component 41 and a processing component 42;
[0092] The storage component 41 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 42 .
[0093] The processing component 42 may include one or more processors to execute computer instructions to complete all or part of the steps in the method of embodiment 1. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0094] The storage component 41 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0095] The display component 43 may be an electroluminescent (EL) element, a liquid crystal display or a micro display having a similar structure, or a retinal direct display or a similar laser scanning display.
[0096] Of course, a computing device may also include other components, such as input / output interfaces, communication components, etc.
[0097] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.
[0098] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.
[0099] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0100] Embodiment 4:
[0101] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The method of the illustrated embodiment.
[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0103] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A viewport culling method based on three-dimensional geocoding, characterized in that: include: Obtain the viewing angle parameters of the user's historical frames and the viewing angle parameters of the current frame; Based on the viewing angle parameters of the historical frames and the viewing angle parameters of the current frame, predicting the viewing angle parameters of the next frame of the current frame, wherein the viewing angle parameters include: azimuth and elevation; Constructing a predicted viewing frustum based on the viewing angle parameters of the next frame; Determine the three-dimensional geographic space objects to be eliminated by using the multi-level quadtree space corresponding to the predicted viewing frustum and the target area, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area by using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node and the viewing frustum; The step of predicting the viewing angle parameters of the next frame of the current frame by using the viewing angle parameters of the historical frames and the viewing angle parameters of the current frame includes: Calculating the angular velocity of the current frame based on the viewing angle parameter of the current frame, wherein the angular velocity includes: an azimuth velocity and an elevation velocity; Determine an angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing angle parameters of the historical frames and the EMA model; Based on the angular velocity smoothing value of the current frame, a viewing angle parameter of the next frame is determined.
2. The method according to claim 1, characterized in that Determining an angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing angle parameter of the historical frame and the EMA model includes: Calculating the angular velocity smoothing value of the current frame and the angular velocity smoothing value of a frame before the current frame based on the angular velocity smoothing value of the current frame, the viewing angle parameter of the historical frame and the EMA model; Determine a target angular acceleration based on the angular acceleration smoothing value of the current frame and the angular acceleration smoothing value of the previous frame of the current frame, wherein the target angular acceleration includes: a target azimuth acceleration and a target elevation acceleration; Based on the target angular acceleration, the viewing angle parameter of the next frame is predicted.
3. The method according to claim 2, characterized in that Predicting the viewing angle parameter of the next frame based on the target angular acceleration includes: Predicting the azimuth of the next frame based on the target azimuth acceleration; Wherein, the azimuth angle of the next frame is: ; in, is the azimuth of the next frame, is the azimuth of the current frame, The azimuth acceleration smoothing value of the current frame, is the time difference between two adjacent frames, is the target azimuth acceleration, , is the azimuth velocity smoothing value of the current frame, is the azimuth velocity smoothing value of the frame before the current frame, , is the average coefficient of the EMA model, is the azimuth velocity of the current frame; Predicting the elevation angle of the next frame based on the target elevation acceleration; The elevation angle of the next frame is: ; in, is the elevation angle of the next frame, is the elevation angle of the current frame, The elevation acceleration smoothing value of the current frame, is the target elevation acceleration, , is the elevation velocity smoothing value of the current frame, is the elevation velocity smoothing value of the frame before the current frame, , is the elevation velocity of the current frame.
4. The method according to claim 1, characterized in that: Based on the predicted viewing frustum and the multi-level quadtree structure corresponding to the target area, determining the three-dimensional geographic space object to be removed includes: Using a parallel algorithm, based on the predicted visual frustum and the intersection data between each node and the visual frustum, a target test is performed on the space corresponding to each node and the predicted visual frustum to obtain a test result, wherein the target test includes: a visual frustum intersection test, a depth test, and an occlusion query; Based on the test result of the target test, the three-dimensional geographic space object to be eliminated is determined.
5. The method according to claim 4, characterized in that Using a parallel algorithm, based on the predicted visual frustum and the intersection data between each node and the visual frustum, a target test is performed on the space corresponding to each node and the predicted visual frustum to obtain a test result, including: Using the parallel algorithm, based on the predicted visual frustum and the intersection data between each node and the visual frustum, the visual frustum intersection test is performed on the space corresponding to each node and the predicted visual frustum, nodes in the multi-level quadtree space that do not intersect with the predicted visual frustum are determined, and the three-dimensional geographic space objects contained in the spaces corresponding to the non-intersecting nodes are determined as target three-dimensional geographic space objects; Performing the depth test and the occlusion query on the three-dimensional geographic space objects contained in the space corresponding to the nodes intersecting with the predicted viewing frustum in the multi-level quadtree space to determine the invisible three-dimensional geographic space objects; The target three-dimensional geographic space object and the invisible three-dimensional geographic space object are determined as the test results.
6. The method according to claim 1, characterized in that The method further comprises: Based on the three-dimensional geographic space objects to be eliminated, determining the three-dimensional geographic space objects to be rendered; When the user's viewing angle moves to the viewing angle parameter of the next frame, the three-dimensional geographic space object to be rendered is rendered.
7. A viewport culling system based on three-dimensional geocoding, characterized in that: include: An acquisition unit, used to acquire viewing angle parameters of a user's historical frames and viewing angle parameters of a current frame; A prediction unit, configured to predict the viewing angle parameters of the next frame of the current frame based on the viewing angle parameters of the historical frame and the viewing angle parameters of the current frame, wherein the viewing angle parameters include: azimuth and elevation A component unit, used for constructing a predicted viewing frustum based on the viewing angle parameter of the next frame; A determination unit is used to determine the three-dimensional geographic space objects to be eliminated by using a multi-level quadtree space corresponding to the predicted viewing frustum and the target area, wherein the multi-level quadtree space is a multi-level quadtree space obtained by geocoding and hierarchically organizing the three-dimensional geographic space objects in the target area by using a multi-level quadtree space index structure, and each node in the multi-level quadtree space stores target information, and the target information includes: geographic range information of the corresponding child node and intersection data of each node and the viewing frustum; Wherein, the prediction unit is used to: Calculating the angular velocity of the current frame based on the viewing angle parameter of the current frame, wherein the angular velocity includes: an azimuth velocity and an elevation velocity; Determine an angular velocity smoothing value of the current frame based on the angular velocity of the current frame, the viewing angle parameters of the historical frames and the EMA model; Based on the angular velocity smoothing value of the current frame, a viewing angle parameter of the next frame is determined.
8. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Topographic image generation method and device, computer equipment and storage medium
CN112843700A