Solving Method for Visual Surface Effect Offset Jitter in Multi-Engine Scenarios and Related Devices
By reorganizing data, building grids and using shaders, the jitter and offset problems of surface effects in 3D geoengines are solved, and stability and accuracy are achieved. They are suitable for a variety of geoengines, improving user experience and data visualization effects.
Patent Information
- Application Number
- CN202111306787.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-11-05
AI Technical Summary
The prior art has problems with surface effect jitter and position offset in three-dimensional geographic engines, especially in large scenarios that affect user experience and data accuracy, and are not universal enough to be used normally in spherical scenarios.
By reorganizing data, building mesh, generating face-like geometry and using shaders, combining multiple rendering methods, the face-like effect jitter and offset problems in different geographic engines are solved, and a variety of map engines such as ArcGIS, Mapbox, and Baidu are supported.
The stability and position accuracy of surface effects are achieved, and the effect does not shake regardless of the perspective movement. It is suitable for a variety of geographic engines, improving the accuracy of user experience and data visualization.
Smart Images

Figure CN114119825B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visualization technology, and in particular, to a method for solving the offset and jitter of the visualization surface effect in a multi-engine scenario and related devices. Background Art
[0002] In currently common visualization editors, the use of three-dimensional visualization effects can be roughly divided into two types. One is applied to small scenes built, and the other is applied to scenes combined with a geographic engine. Currently, there is a problem of jitter when pulling the viewing angle in some surface drawing functions combined with the geographic engine. It is relatively simple to implement the surface effect in a small scene, and there will be no offset and jitter problems in normal use scenarios. However, when the scene is large enough, these problems will occur, especially obvious in map scenarios. A planar map can be regarded as an extreme case of a small scene. When it is necessary to draw a surface based on longitude and latitude coordinates in a planar map, the received longitude and latitude coordinate values are relatively large, and even larger if they are Mercator coordinates. Using the previous method of drawing a surface will cause numerical errors in its floating-point numbers, and there will be a jitter phenomenon at the vertices when pulling the camera to update the rendering. In a spherical map, in addition to the jitter situation that occurs in the plane, there will also be a problem of position offset. This problem is mainly because when the geographic engine is integrated with WebGL, the camera and the renderer are synchronized, and the effect objects themselves will not be changed. The map becomes spherical, but the surface effect will not follow to become a curved surface, so there will be a problem of vertex position offset. To sum up, the disadvantages of the prior art are:
[0003] (1) Effect jitter. When the effect is enlarged to a certain extent, there is a jitter situation again, which will affect the user experience.
[0004] (2) Position offset. In three-dimensional map visualization, the accuracy of position is a very important indicator. On the one hand, it will mislead users, and on the other hand, it will also lose the function of data visualization.
[0005] (3) Weak generality. Currently, most of these surface effects can only be used normally in planar scenes and cannot be used in spherical scenes with a similarly high usage rate. Summary of the Invention
[0006] The present invention addresses the above problems and provides a method for solving the offset and jitter of the visualization surface effect in a multi-engine scenario and related devices, which can not only accurately render in the three-dimensional spherical and planar surfaces of ArcGIS, but also be applicable to most of the currently commonly used geographic engines.
[0007] In the first aspect of the present invention, a method for solving the offset and jitter of the visualization surface effect in a multi-engine scenario is provided, including:
[0008] Recombine the data according to different attributes of the incoming data;
[0009] Construct a grid based on the recombined data;
[0010] Add the grids generated from data with different attributes to the scene to obtain a complete scene that fits the plane and the spherical surface;
[0011] Among them, the specific implementation steps for constructing a grid based on the recombined data are as follows:
[0012] Convert all geographical coordinates in the recombined data into Cartesian coordinates to obtain Cartesian coordinate data;
[0013] Take the first coordinate point in the Cartesian coordinate data as the standard point, calculate the relative distance between each other point and the standard point, and use the relative distance between each other point and the standard point as a new set of face coordinates;
[0014] Generate a planar geometry based on the new set of face coordinates. Create an empty geometry, and superimpose the vertex data, face data, and normal data of each generated planar geometry and integrate them into the empty geometry to generate a grid;
[0015] Obtain a shader according to the attributes of the data and apply it to the grid to obtain a complete grid;
[0016] Move the complete grid to the position of the standard point.
[0017] A further technical solution of the present invention is that the method further includes building a rendering engine that supports multiple data types and data attributes, and through a simulated encapsulation of classification rendering and score rendering, different rendering methods are selected for the incoming data.
[0018] A further technical solution of the present invention is that selecting different rendering methods for the incoming data specifically includes: each data has a specific description field, and classification is performed according to the differences in each description field. The classification is for a single data or a class of data. Classification rendering stipulates that different rendering parameters are used in multiple intervals. By judging the interval in which the specific description field in the data is located, each data is assigned a corresponding rendering method; score rendering specifies unique value rendering, and only when the description field in the data is the same as the specified value will the rendering method corresponding to the specified value be used.
[0019] A further technical solution of the present invention is that the data attributes supported by the method include simple, class-breaks, and unique-value.
[0020] In a second aspect of the present invention, a cloud server is provided, including: a processor; and a memory, wherein a computer-executable program is stored in the memory, and when the computer-executable program is executed by the processor, the above-mentioned solution method for offset jitter of the visualization surface effect in a multi-engine scenario is executed.
[0021] In a third aspect of the present invention, a computer-readable storage medium is provided, on which instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the above-mentioned solution method for offset jitter of the visualization surface effect in a multi-engine scenario.
[0022] A solution method for offset jitter of the visualization surface effect in a multi-engine scenario and related devices provided by the present invention. The developed surface visualization effect components support a relatively comprehensive range of editors and geographic engines in the future. It includes not only ArcGis planar maps, Mapbox maps, planar maps such as Amap and Baidu, but also supports ArcGis spherical and Cesium spherical maps. The WebGL technology is used to develop the surface effect. Compared with traditional Web3D technologies, such as VRML, X3D, etc., WebGL can achieve 3D graphics acceleration without installing plugins in the vast majority of browsers and obtain a better rendering effect. In addition, more diverse surface effects can be developed using shader programming. The surface effect is mainly used to emphasize and annotate a range. One of the more important types is the fence effect. For this effect, the polygon surface drawn according to multiple vertex data needs to be lifted and the upper and lower bottom surfaces removed. For this presentation method, generally, two-dimensional graphics in Three.JS are used to draw polygons, and then a prism geometry is generated by stretching the geometry, plus a customized shader to achieve a rich variety of fence effects. The above is a relatively common method for generating prisms. The fence effect made by this method is more suitable for planar maps, but there will be a problem of position offset on the sphere. In the present invention, a suitable method is also adopted to generate prisms to solve this problem. The beneficial effects finally achieved are: stable effect, no matter how the camera view is moved, the effect will not jitter. Greatly guarantee the user experience; accurate position, whether in a planar scene or a spherical map, each position of the effect is guaranteed to be consistent with the position passed in by the user; strong versatility, the surface effects generated by the present invention can be presented on most mainstream geographic engines on the current market. Description of the Drawings
[0023] Figure 1 It is a flowchart of the solution method for offset jitter of the visualization surface effect in a multi-engine scenario in an embodiment of the present invention;
[0024] Figure 2 It is a flowchart of the method for constructing a grid according to the reorganized data in an embodiment of the present invention.
[0025] Figure 3 is the implementation flowchart of the fence effect in the embodiments of the present invention;
[0026] Figure 4 is the generation flowchart of the prism geometric body in the embodiments of the present invention;
[0027] Figure 5 is the architecture of the cloud server in the embodiments of the present invention. Specific Embodiments
[0028] To further elaborate on the technical solution of the present invention in detail, this embodiment is implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific steps are given.
[0029] The specific process of a solution method for offset jitter of the visualization surface effect in a multi-engine scenario provided by the present invention is as Figure 1 shown, specifically as follows:
[0030] S1. Reorganize the data according to different attributes of the input data. After the input data and attributes enter the effect class, the data will first be classified according to the input attributes inside, so as to ensure that the data with the same attributes can apply the same material after being fused in the subsequent steps of generating geometric bodies. The data attributes supported by the method include simple, class-breaks, and unique-value.
[0031] S2. Construct a grid according to the reorganized data;
[0032] S3. Add the grids generated from data with different attributes to the scene to obtain a complete scene that fits the plane and the spherical surface;
[0033] Among them, the implementation steps of constructing the grid according to the reorganized data in S2 are as Figure 2 shown, specifically as follows:
[0034] S21. Convert all geographical coordinates in the reorganized data into Cartesian coordinates to obtain Cartesian coordinate data;
[0035] S22. Use the first coordinate point in the Cartesian coordinate data as the standard point, calculate the relative distance between each other point and the standard point, and use the relative distance between each other point and the standard point as a new set of face coordinates. The face generated by this relative position method greatly reduces the vertex data error caused by excessive coordinate values and floating-point operations, so as to avoid jitter.
[0036] S23. Generate a surface geometry based on the new set of surface coordinates. Create an empty geometry, and superimpose the vertex data, face data, and normal data of each generated surface geometry with the same attributes onto each other, and integrate them into the empty geometry to generate a mesh. By using the method of geometry merging, the overall number of meshes is greatly reduced, and the time to add to the scene is reduced.
[0037] S24. Obtain a shader according to the attributes of the data, and apply it to the mesh to obtain a complete mesh;
[0038] S25. Move the complete mesh to the standard point position.
[0039] The method of the present invention also includes building a rendering engine that supports multiple data types and data attributes. By performing a simulation encapsulation of classification rendering and score rendering, different rendering methods are selected for the incoming data. This function mainly performs a simulation encapsulation of the classification rendering and score rendering that originally only supported in ArcGis. Each data received in the effect will carry its specific description field, and it can be classified according to the differences of each description field. This classification can be for a single data or for a class of data, which is the essence of classification and score.
[0040] The surface class effect developed by the present invention supports effects for multiple geographic engines by synchronizing the cameras and renderers of each engine, and also has high flexibility in the accessed data and attributes. In terms of the accessed data, it supports accessing ArcGis services, backend interfaces, GeoJson data, and custom data; in terms of the accessed attributes, the classification rendering and score rendering of ArcGis are introduced. In this way, only by adding a specified distinguishing character to the identification parameter of each data, different rendering attributes can be assigned to many different data in a set of configurations. Selecting different rendering methods for the incoming data specifically includes: each data carries a specific description field, and is classified according to the differences of each description field. The classification is for a single data or for a class of data. The classification rendering stipulates that different rendering parameters are used in multiple intervals. By judging the interval in which the specific description field in the data is located, the corresponding rendering method is assigned to each data; the score rendering specifies unique value rendering, and only when the description field in the data is the same as the specified value will the rendering method corresponding to the specified value be used.
[0041] A specific example is given below. The specific example takes a relatively important type of fence effect as an example, such as Figure 3As shown in the figure, first, the data is reorganized according to the different attributes of the incoming data, and all the fence data with the same attributes is traversed, and each fence is processed separately. Determine the bottom surface data in the data and the high-rise data of the fence, and convert the original coordinates and each coordinate after adding the high-rise into Cartesian coordinates. At this time, a data that fits the ground plane in both planar and spherical scenarios is obtained, which ensures that there will be no offset.
[0042] Using the relative position method, select the first converted Cartesian coordinate in the data as the reference point and calculate it with other converted Cartesian coordinates to obtain a new set of face coordinates. Generate a prism geometric body based on the new set of face coordinates according to the vertex data of the upper and lower bottom surfaces.
[0043] After the prism geometric bodies are generated for the data with the same attributes respectively, they are merged into a complete geometric body, which can reduce the overall time for adding the mesh to the scene later. Then, obtain the custom shader material according to the incoming attributes and generate a complete mesh. At this time, the position of the mesh is at the origin of the coordinates, so finally, the mesh needs to be moved to the previous standard point position to reach the accurate position. In this way, a mesh is generated for a set of data with the same attributes. Next, continue to use the same steps to process the arrays of other attributes, and thus complete the development of the entire fence effect.
[0044] Among them, generating the prism geometric body according to the new set of face coordinates and the vertex data of the upper and lower bottom surfaces is specifically as Figure 4 shown: Solve the problem that the geometric bodies provided by ThreeJS cannot handle fitting the bottom surface in a spherical environment by constructing the geometric body by itself. This method can limit the type of the prism, including whether the generated prism has upper and lower bottom surfaces, or only the upper bottom surface or the lower bottom surface. Receive the fence bottom data converted to the Cartesian coordinate system and the data after adding the high-rise. Based on these data, the vertex data of the geometric body can be obtained. And respectively use the triangle face generation method in Earcut according to the vertex data of the upper and lower bottom surfaces. By passing in all the vertex data of a face, connect each vertex data together in the form of triangle faces without omission to form a complete face. What is returned is also the vertex indices of all the triangle faces that make up this complete irregular plane. Every three of these vertex indices form a face, thus forming the complete face data. Immediately process the uv texture mapping coordinate data on each vertex for texture coloring in the shader, and the normal data is used to calculate the lighting in the shader later. In this way, the geometric body of the prism can be obtained for forming the mesh later.
[0045] The device of the embodiment of the present invention can be implemented with the help of a Figure 5 cloud server as shown in the figure. Figure 5The structure of the cloud server is shown, including a computer system 201, a system bus 203, one or more CPUs 204, input / output components 202, a memory 205, etc. The memory 205 can store various data or files used for computer processing and / or communication, as well as program instructions executed by the CPU. When the CPU executes the executable program of the cloud server, the solution method for the offset jitter of the multi-engine scenario visualization surface effect is executed. Figure 5 The architecture shown is only exemplary. When implementing different devices, adjust one or more components according to actual needs. Figure 5 in it.
[0046] Embodiments of the present invention can also be implemented as a computer-readable storage medium, on which computer-readable instructions are stored according to the embodiments. When the computer-readable instructions are run by a processor, the solution method for the offset jitter of the multi-engine scenario visualization surface effect according to the embodiments of the present invention described with reference to the above drawings can be executed.
[0047] A solution method for the offset jitter of the multi-engine scenario visualization surface effect and related devices provided by the present invention. The developed surface visualization effect components support a relatively comprehensive range of editors and geographic engines in the future, including not only planar maps such as ArcGis, Mapbox, Amap, and Baidu maps, but also ArcGis spherical and Cesium spherical maps. The WebGL technology is used to develop the surface effect. Compared with traditional Web3D technologies such as VRML and X3D, WebGL can achieve 3D graphics acceleration without installing plugins in the vast majority of browsers and obtain a better rendering effect. In addition, more diverse surface effects can be developed using shader programming. The surface effect is mainly used to emphasize and annotate a range. One of the more important types is the fence effect. For this effect, the polygon surface drawn based on multiple vertex data needs to be raised and the upper and lower bases removed. Generally, the two-dimensional graphics in Three.JS are used to draw the polygon, and then a prism geometry is generated using stretching geometry, plus a customized shader to achieve a rich variety of fence effects. The above is a relatively common method for generating a prism. The fence effect made by this method is more suitable for planar maps, but there will be a problem of position offset on the sphere. In the present invention, a suitable method is also adopted to generate the prism to solve this problem. The beneficial effects finally achieved are: stable effect, no matter how the camera view is moved, the effect will not jitter. Greatly guarantee the user experience; accurate position, whether in a planar scene or a spherical map, each position of the effect is guaranteed to be consistent with the position passed in by the user; strong versatility, the surface effect generated using the present invention can be presented on most mainstream geographic engines on the current market.
[0048] In this text, the terms "comprising", "including" or any other variants thereof are intended to cover non-exclusive inclusion, such that a step or method comprising a series of elements includes not only those elements but also other elements not expressly listed, or further includes elements inherent to such step or method.
[0049] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as falling within the protection scope of the present invention.
Claims
1. A solution to the offset jitter of the visualization surface effect in a multi-engine scenario, characterized in that, The method includes: Recombining data according to different attributes of the incoming data; Constructing a grid based on the recombined data; Adding the grids generated from different attribute data to the scene to obtain a complete scene that fits the plane and the sphere; Among them, the specific implementation steps of constructing a grid according to the recombined data are: Converting all geographical coordinates in the recombined data into Cartesian coordinates to obtain Cartesian coordinate data of different attributes; Taking the first coordinate point in the Cartesian coordinate data of the same attribute as the standard point, calculating the relative distances between other points in the Cartesian coordinate data of the same attribute and the standard point, and generating a new set of face coordinates based on the relative distances between other points in the Cartesian coordinate data of the same attribute and the standard point; Generating a planar geometric body according to the new set of face coordinates, creating an empty geometric body, and superimposing the vertex data, face data, and normal data of each generated planar geometric body on each other and integrating them into the empty geometric body to generate a grid; Obtaining a shader according to the attributes of the data and applying it to the grid to obtain a complete grid; Moving the complete grid to the position of the standard point.
2. The solution method for visual surface effect offset jitter in a multi-engine scenario according to claim 1, characterized in that, The method further includes building a rendering engine that supports multiple data types and data attributes, and through a simulation encapsulation of classification rendering and score rendering, different rendering methods are selected for the incoming data.
3. The solution method for visual surface effect offset jitter in a multi-engine scenario according to claim 2, characterized in that Selecting different rendering methods for the incoming data specifically includes: each data has a specific description field, classifying according to the differences of each description field, the classification is for a single data or a class of data, the classification rendering stipulates that different rendering parameters are used in multiple intervals, and by judging the interval in which the specific description field in the data is located, each data is assigned a corresponding rendering method; the score rendering specifies unique value rendering, and only when the description field in the data is the same as the specified value will the rendering method corresponding to the specified value be used.
4. The solution method for visual surface effect offset jitter in a multi-engine scenario according to claim 1, characterized in that The data attributes supported by the method include simple, class-breaks, and unique-value.
5. A cloud server, characterized in that, Including: A processor; And a memory, wherein, computer-executable programs are stored in the memory, and when the computer-executable programs are executed by the processor, the method described in any one of claims 1-4 is executed.
6. A computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the processor executes the method described in any one of claims 1-4.
Citation Information
Patent Citations
GIS data visualization method and device based on WebGL
CN112380309A
Using render bin parallelism for rendering scene graph based graphics data
US20020063704A1