Method and System for Adaptive Switching of Multiple Rendering Engines Based on 3D GIS Platform, and Storage Medium
Through the adaptive switching method of multi-rendering engines, the rendering engine dynamically switches according to the loading data characteristics of the three-dimensional model, solving the problem of long rendering time of three-dimensional model in the three-dimensional GIS platform, and achieving fast and smooth three-dimensional model display.
Patent Information
- Application Number
- CN202210182488.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-02-25
AI Technical Summary
In urban construction, rendering of 3D models in the 3D GIS platform takes a long time, resulting in the display device being stuck and unable to display the 3D model smoothly.
Adaptive switching method of multi-rendering engines is adopted to obtain the load data characteristics of the three-dimensional model, determine the rendering engine group, and use different rendering engines to load the three-dimensional model data according to the preset loading method until it is fully displayed.
It realizes the rapid display of three-dimensional models, avoids the problem of display devices being stuck, and improves the rendering efficiency and display effect of three-dimensional models in the three-dimensional GIS platform.
Smart Images

Figure CN114549762B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building three-dimensional modeling, and in particular to a method and system for adaptively switching multiple rendering engines based on a three-dimensional GIS platform, and a storage medium. Background Art
[0002] In urban construction, urban regulatory planning is becoming increasingly important. A large number of building designs are required in urban construction. In order to intuitively display building design plans, building plans are generally virtually designed through three-dimensional software. In order to quickly obtain the overall effect of the displayed building design plan, different rendering engines are generally required on different computer devices to render three-dimensional models, and finally display the three-dimensional models. During the display process of the design plan effect, especially for the display platform of three-dimensional GIS models, higher requirements are put forward. It is necessary to be able to render three-dimensional models of various scenes in the three-dimensional GIS platform to obtain a better display effect. Due to the large amount of three-dimensional model data, the rendering engine may take a relatively long time to completely display on the monitor, and sometimes the display device may be stuck. Therefore, a rendering method is needed to smoothly display three-dimensional models. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method and system for adaptively switching multiple rendering engines based on a three-dimensional GIS platform, and a storage medium. This method uses multi-engine fusion technology to render three-dimensional models respectively and quickly displays the three-dimensional models.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] The method for adaptively switching multiple rendering engines based on a three-dimensional GIS platform provided by the present invention includes the following steps:
[0006] Obtain real-scene three-dimensional model data;
[0007] Determine the loading data characteristics of the real-scene three-dimensional model data that need to be displayed;
[0008] Determine a rendering engine group according to the loading data characteristics of the real-scene three-dimensional model data that need to be displayed;
[0009] Use different rendering engines in the rendering engine group to load the corresponding real-scene three-dimensional model data to be rendered according to a preset loading method;
[0010] Until the real-scene three-dimensional model is completely displayed.
[0011] Further, the real-scene three-dimensional model includes at least any one or a combination of multiple items of digital elevation model, orthophoto, laser point cloud data, real-scene three-dimensional model, manual three-dimensional model, and two-dimensional vector data.
[0012] Furthermore, the loaded data feature includes the number of loaded faces of each model in the loaded real - scene 3D model. The number of loaded faces is based on the number of faces of each model that makes up the real - scene 3D model within the current 3D scene display viewport. The number of faces is the quantity of triangular faces calculated by the triangulation method, that is, the number of all triangular patches formed by connecting each point in the discrete point cloud data.
[0013] Furthermore, the rendering engine group at least includes a game engine and a 3D engine;
[0014] The game engine is used to render the detailed scene data in the 3D real - scene;
[0015] The 3D engine is used to render the large - scale scene data in the 3D real - scene;
[0016] Furthermore, the preset loading method is as follows:
[0017] Obtain the number of faces of each model that needs to load the real - scene 3D model;
[0018] Judge whether the number of faces is less than the preset threshold. If so, it means that the model to be loaded is a small - scale scene, and the game engine is used to render the scene to be loaded; if not, it means that the model to be loaded is a large - scale scene, and the 3D engine is used to render the scene to be loaded.
[0019] Furthermore, the preset threshold can take any value between 80,000 and 120,000 in terms of the number of faces. In this embodiment, the best value is when the number of faces is 100,000. That is, when the number of faces in the perspective 3D scene ≤ 100,000, it means that the loaded 3D real - scene is a small - scale scene, and the game engine is used for scene rendering, focusing on showing the details of the 3D scene; when the number of faces ≥ 100,000, it means that the loaded 3D real - scene is a large - scale scene, and the WebGL engine is used for scene rendering, focusing on showing the loading efficiency of the 3D scene.
[0020] Furthermore, the engine group adopts the multi - engine fusion and replacement technology, fusing UE4 and WebGL into the system rendering engine. The game engine uses the game engine ue4, and the 3D engine uses the WebGL framework and engine.
[0021] Furthermore, the preset loading method further includes the following steps:
[0022] When the number of faces ≥ 100,000, the following steps can be carried out:
[0023] First, load the 3D map model of the model by using the WebGL engine;
[0024] Then, concurrently execute the building information model through the game engine;
[0025] Finally, the vector data is loaded through the game engine.
[0026] The present invention also provides a multi-rendering engine adaptive switching system based on a 3D GIS platform, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the program is executed by the processor, it implements the steps of any one of the methods described in claims 1-8.
[0027] The present invention also provides a storage medium with a computer program stored thereon. When the program is executed by the processor, it implements the steps of any one of the methods described in claims 1-8.
[0028] The beneficial effects of the present invention are as follows:
[0029] The multi-engine real-scene three-dimensional model adaptive switching method, system, and storage medium provided by the present invention use multi-engine fusion technology to construct a virtual encapsulated rendering engine, and even use a physically encapsulated rendering engine to realize the display of building three-dimensional model design. Different rendering engines are determined according to the number of scene display faces, and the engines are automatically replaced to display the three-dimensional scene. The characteristics of different rendering engines are used to load the three-dimensional scene images that match them, and the three-dimensional model is quickly displayed. Using multiple rendering engines on the 3D GIS platform can optimize the scene display effect.
[0030] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to make the objectives, technical solutions, and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0032] Figure 1 It is a flowchart of the adaptive switching method for rendering a real-scene three-dimensional model based on a multi-engine group.
[0033] Figure 2 It is to load the real-scene three-dimensional model data using a virtual dual engine. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] The following further describes the present invention in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited do not limit the present invention.
[0035] As Figure 1 shown, the adaptive switching method for rendering a real-scene three-dimensional model based on a multi-engine group provided in this embodiment includes the following steps:
[0036] Obtain real - scene three - dimensional model data;
[0037] Determine the loading data characteristics that the real - scene three - dimensional model data needs to display;
[0038] Determine the rendering engine group according to the loading data characteristics of the real - scene three - dimensional model data to be displayed;
[0039] Use different rendering engines in the rendering engine group to load the corresponding real - scene three - dimensional model data to be rendered according to the preset loading method;
[0040] Until the real - scene three - dimensional model is fully displayed.
[0041] The real - scene three - dimensional model provided in this embodiment includes at least any one or a combination of a digital elevation model, an orthophoto image, lidar point cloud data, a real - scene three - dimensional model, a manual three - dimensional model, and two - dimensional vector data.
[0042] The loading data characteristics provided in this embodiment include the number of loading faces of each model in the real - scene three - dimensional model. The number of loading faces is based on the number of faces of each model that makes up the real - scene three - dimensional model within the current three - dimensional scene display viewport. The number of faces is the number of triangular faces calculated by the triangulation method, that is, the number of all triangular patches formed by connecting each point in the discrete point cloud data.
[0043] The method for counting the number of triangular faces in the scene of this embodiment is to count according to the number of LOD slices of the loaded real - scene three - dimensional model. By real - time counting the number of Tiles of the real - scene three - dimensional model loaded under the current display window on the platform, the change situation of the Tile number is obtained, and an accurate statistical number is obtained through refreshing calculation within 10S at the backend.
[0044] In this embodiment, the rendering engine switch is not only performed by the number of triangular meshes loaded in the scene, but also a button can be set to perform the switch in the way of a manual button.
[0045] The rendering engine group provided in this embodiment includes at least a game engine and a three - dimensional engine;
[0046] The game engine is used to render the detailed scene data in the three - dimensional real - scene;
[0047] The three - dimensional engine is used to render the large - scale scene data in the three - dimensional real - scene;
[0048] The rendering engine group provided in this embodiment can also adopt other types of engines according to the actual situation.
[0049] The preset loading method provided in this embodiment is as follows:
[0050] Obtain the number of faces of each model of the real - scene 3D model to be loaded;
[0051] Determine whether the number of faces is less than a preset threshold. If so, it means that the model to be loaded is a small - scale scene, and a game engine is used to render the scene to be loaded; if not, it means that the model to be loaded is a large - scale scene, and a 3D engine is used to render the scene to be loaded.
[0052] In this embodiment, the preset threshold can be any value between 80,000 and 120,000 in terms of the number of faces. In this embodiment, when the number of faces is 100,000, it is the best value. That is, when the number of faces in the perspective 3D scene ≤ 100,000, it means that the loaded 3D real - scene is a small - scale scene, and a game engine is used for scene rendering to focus on showing the details of the 3D scene; when the number of faces ≥ 100,000, it means that the loaded 3D real - scene is a large - scale scene, and a WebGL engine is used for scene rendering to focus on showing the loading efficiency of the 3D scene.
[0053] The engine group provided in this embodiment adopts a multi - engine fusion and replacement technology, integrating UE4 and WebGL into a system rendering engine. The game engine uses the game engine ue4, and the 3D engine uses the WebGL framework and engine.
[0054] The preset loading method provided in this embodiment further includes the following steps:
[0055] When the number of faces ≥ 100,000, it can be carried out according to the following steps:
[0056] First, load the 3D map model of the model by using the WebGL engine;
[0057] Then, concurrently execute the building information model by using the game engine;
[0058] Finally, load the vector data by using the game engine.
[0059] In this embodiment, multiple loading methods can also be adopted, such as parallel and real - time switching, or parallel fusion loading and running.
[0060] In this embodiment, by carrying a multi - engine platform, the visual effect of the engine platform for 3D scene display is improved, and the rendering effect of the traditional single - engine platform is improved. This multi - engine platform can automatically switch the rendering engine according to scene changes and requirements. For example, for small - scale scenes and high requirements for effect performance, the UE engine can be used to render the scene, but for urban - level large - scale scene display, the WebGL engine can be used for scene rendering.
[0061] Since the UE4 engine has powerful physical engine technology, a perfect global illumination system, and a powerful material editor, it is suitable for rendering small - scale scenes.
[0062] WebGL consists of a series of graphics-related functional modules, mainly providing functions for scene management and graphics rendering optimization in the development of graphics and image applications. It is written in portable ANSI C++ and uses OpenGL, which has become an industry standard, as the underlying rendering API. It has the characteristics of cross-platform, can run on most types of operating systems, and also has the advantages of fast development, high quality, high performance, portability, and complete open source. Especially, it has strong advantages in the rendering of large scenes. By switching between small scenes and large scenes, it can well display the planned project site and surrounding scenes, making the review experience more comfortable.
[0063] The multi-engine group includes a task distribution unit, a first virtual engine, a second virtual engine, and a shader.
[0064] The task distribution unit is used to receive different work streams that need to be processed and distribute the work streams to different virtual rendering engines.
[0065] The first virtual engine and the second virtual engine are respectively connected to the shader, and the different virtual engines render the real-scene three-dimensional model data that needs to be processed through the shader.
[0066] The multi-engine group provided in this embodiment is set on the cloud platform. When a corresponding virtual engine needs to be called, the corresponding virtual engine is called from the cloud platform and rendered through the shader.
[0067] By the task distribution unit, different virtual engines are called to implement the multi-virtual engine rendering process in the same shader.
[0068] For example, the first workflow from the first virtual engine is sent to the shader for processing, and the second workflow from the second virtual engine is sent to the shader for processing. In order to achieve time segmentation, the first and second workflows share a part of the time of the processing components of the shader.
[0069] The virtual engines on the cloud platform provided in this embodiment reduce the cost of the hardware resources required for rendering, expand the usage range of real-scene three-dimensional model rendering, and do not have to be limited to the geographical location of the installation of hardware facilities. Different locations can use the virtual engine group on the cloud platform to achieve the rendering and display of real-scene three-dimensional models.
[0070] This embodiment adopts the multi-engine fusion and replacement technology, using UE4 and WebGL as the system rendering engines. The system runs by integrating the two rendering engines, and determines the operation of the rendering engine according to the number of faces in the perspective three-dimensional scene. When the number of faces ≤ 100,000, it is defined as a small scene, and the game engine is used for scene rendering, focusing on showing the details of the three-dimensional scene; when the number of faces ≥ 100,000, it is defined as a large scene, and the WebGL engine is used for scene rendering, focusing on showing the loading efficiency of the three-dimensional scene.
[0071] Although this embodiment uses the integrated UE4 and WebGL as the system rendering engine and can automatically switch the rendering engine according to the scene size, in actual situations, more rendering engines or other display engines can be used to cooperate with each other for switching to achieve fast display of three-dimensional scene images. Multiple switching conditions can be set according to specific rendering and display requirements to meet the needs in different situations as much as possible.
[0072] The above-described embodiments are only preferred embodiments given to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. Method for Adaptive Switching of Multiple Rendering Engines Based on 3D GIS Platform Characterized in that: Comprising the following steps: Obtain real-scene 3D model data; Determine the loading data characteristics of the real-scene 3D model data to be displayed; Determine the rendering engine group according to the loading data characteristics of the real-scene 3D model data to be rendered; Use different rendering engines in the rendering engine group to load the corresponding real-scene 3D model data to be rendered according to the preset loading method; Until the real-scene 3D model is fully displayed; The preset loading method is as follows: Obtain the number of faces of each model of the real-scene 3D model to be loaded; Judge whether the number of faces is less than the preset threshold. If so, it means that the model to be loaded is a small scene, and the game engine is used to render the scene to be loaded. If not, it means that the model to be loaded is a large scene, and the 3D engine is used to render the scene to be loaded; The preset threshold can adopt any value between 80,000 and 120,000 in terms of the number of faces.
2. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 1 Characterized in that: The real-scene 3D model at least includes any one or a combination of a digital elevation model, an orthophoto image, lidar point cloud data, a real-scene 3D model, a manual 3D model, and 2D vector data.
3. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 1 Characterized in that: The loading data characteristics include the loading number of faces of each model in the real-scene 3D model. The loading number of faces is based on the number of faces of each model in the current 3D scene display viewport of the real-scene 3D model. The number of faces is the number of triangular faces calculated by the triangulation method, that is, the number of all triangular patches formed by connecting each point in the discrete point cloud data.
4. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 1 Characterized in that: The rendering engine group at least includes a game engine and a 3D engine; The game engine is used to render the detailed scene data in the 3D real-scene; The 3D engine is used to render the large scene data in the 3D real-scene.
5. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 1 Characterized in that: When the number of faces is 100,000, it is the optimal value. That is, when the number of faces in the perspective 3D scene ≤ 100,000, it means that the loaded 3D real-scene is a small scene, and the game engine is used for scene rendering, focusing on showing the details of the 3D scene. When the number of faces ≥ 100,000, it means that the loaded 3D real-scene is a large scene, and the WebGL engine is used for scene rendering, focusing on showing the loading efficiency of the 3D scene.
6. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 1 Characterized in that: The game engine uses the game engine ue4, and the 3D engine uses the WebGL framework and engine.
7. The method for adaptive switching of multiple rendering engines based on 3D GIS platform according to claim 5 Characterized in that: The preset loading method further includes the following steps: When the number of faces ≥ 100,000, proceed according to the following steps: First, load the 3D map model of the model by adopting the WebGL engine; Then, concurrently execute the building information model through the game engine; Finally, load the vector data through the game engine.
8. A multi-rendering engine adaptive switching system based on a 3D GIS platform, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the program is executed by the processor, the steps of any one of the methods described in claims 1-7 are implemented.
9. A storage medium, on which a computer program is stored, characterized in that, when the program is executed by the processor, the steps of any one of the methods described in claims 1-7 are implemented.
Citation Information
Patent Citations
Picture rendering method, device, terminal, and storage medium
CN109285211A
Three-dimensional graphic image player capable of real-time interaction
CN112802192A
Dual-engine-driven digital twin system
CN113902866A