CN116704146A - Three-dimensional electronic map dynamic loading method based on game rendering engine - Google Patents

Three-dimensional electronic map dynamic loading method based on game rendering engine Download PDF

Info

Publication number
CN116704146A
CN116704146A CN202310799261.3A CN202310799261A CN116704146A CN 116704146 A CN116704146 A CN 116704146A CN 202310799261 A CN202310799261 A CN 202310799261A CN 116704146 A CN116704146 A CN 116704146A
Authority
CN
China
Prior art keywords
primitive
grid
model
grids
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310799261.3A
Other languages
Chinese (zh)
Inventor
于鹏
郭玉娇
王建红
吴强
陈蕊
元静静
沈忱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Tianyunhe Information Technology Co ltd
Original Assignee
Shandong Tianyunhe Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Tianyunhe Information Technology Co ltd filed Critical Shandong Tianyunhe Information Technology Co ltd
Priority to CN202310799261.3A priority Critical patent/CN116704146A/en
Publication of CN116704146A publication Critical patent/CN116704146A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Computing Systems (AREA)
  • Image Generation (AREA)

Abstract

The invention provides a method for dynamically loading a three-dimensional electronic map based on a game rendering engine, which relates to the technical field of dynamic loading of the three-dimensional electronic map and comprises the following steps: the method comprises the steps of obtaining a map model from a cloud storage space, dividing the map model into a plurality of grids with the same size, obtaining grids where a user side views the model, and buffering the grids which are possibly observed; and (3) carrying out rasterization processing on the model in the grid, judging the position relation between the map model subjected to perspective projection at the view angle of the user side and the view cone, carrying out rendering processing on the primitives in the range of the view cone, and not carrying out rendering processing on the primitives outside the view cone, so as to solve the problems that more calling resources are required when the user side is reloaded by the existing three-dimensional electronic map dynamic loading method to change the view angle, and the map model vacancy cannot be guaranteed not to appear and the user side cannot obtain the position information required by the user side at the first time.

Description

Three-dimensional electronic map dynamic loading method based on game rendering engine
Technical Field
The invention relates to the technical field of dynamic loading of three-dimensional electronic maps, in particular to a dynamic loading technology of a three-dimensional electronic map based on a game rendering engine.
Background
A stereoscopic map is a map that directly or indirectly represents a stereoscopic shape and various geographic phenomena in a three-dimensional stereoscopic form. And directly displaying the stereoscopic map with the topographic model and the plastic film. The vertical scale of the three-dimensional map is generally several times larger than the horizontal scale, and the three-dimensional map has sense of reality and strong intuitiveness. It is used for military, teaching, propaganda and exhibition. The indirect display of stereo is made according to the stereo effect of two eyes, such as complementary colour map and optical shed stereo map, and the stereo pattern can be designed to make the drawing object on the plane map produce stereo effect, and the adopted stereo relief method, bright-dark contour line method, perspective view-writing method, aerial view method, block stereo image method and statistical stereo image method.
In the prior art, when the three-dimensional electronic map is loaded, only the map which is checked by the user side is generally loaded, when the user side changes the visual angle to check other surrounding environments, the map is required to be loaded after being called again, so that more resources are required to be called again each time the user side changes the visual angle, and the problem that the map model is empty is difficult to ensure when being loaded; in addition, the current three-dimensional electronic map cannot well process the position relation between the view angle of the user side and the observation model, so that the user side cannot judge the position information of the user side in the map at the first time, and the environment is required to be compared with the map by spending calibration time.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a three-dimensional electronic map dynamic loading method based on a game rendering engine, which is characterized in that a map model in a cloud storage space is divided into a plurality of grids with equal size, the grids where a user side view model is located are obtained, and the grid models in the vicinity of the located grid 8 are subjected to buffer treatment, so that the amount of resources required to be recalled by the user side for changing the visual angle can be reduced; through carrying out rasterization processing on the model, judging the position relation between the graphic element and the view cone after perspective projection is carried out at the view angle of the user side, rendering the graphic element which can be observed, and not carrying out rendering processing on the graphic element which cannot be observed, thereby enhancing the substitution sense of the user side and facilitating better recognition of the direction.
In order to achieve the above object, the present invention is realized by the following technical scheme: a three-dimensional electronic map dynamic loading method based on a game rendering engine comprises the following steps:
step S1, a map model is obtained from a cloud storage space, and the map model is divided into a plurality of grids;
step S2, grid position information with the area not reaching the unit grid area is obtained, re-calling information is sent to a cloud storage space, a map model of the grid and 8 neighborhood grids of the grid is obtained, and the map model is divided into a plurality of grids with the same size through processing the re-calling map model;
step S3, receiving and responding to a request of a user side for checking the model, acquiring a grid where the check model is located, calculating grid information to be buffered, and retrieving a map model of the grid from a cloud storage space;
step S4, rasterizing the model, and giving the projected primitive vertex information and related rendering information;
s5, obtaining view angle information of a user side, and judging the relation between the graphic primitive and the view angle by adopting perspective projection;
and step S6, rendering the processed graphic primitive.
Further, the step S1 includes the following sub-steps:
step S101, scaling the map model according to a first scaling ratio, and obtaining the area of the scaled map model, wherein the area is marked as a reference divided area;
step S102, substituting the reference dividing area into a unit grid calculation formula to calculate the unit grid area, and setting a square with the area equal to the unit grid area as the dividing grid; the unit grid calculation formula is configured as: mj=cz/a 1, where MJ is a unit grid area, CZ is a reference divided area, a1 is a constant and a1 is a positive integer.
Further, the step S2 includes the following sub-steps:
step S201, grid position information with the area smaller than the unit grid area in the map model is obtained, re-calling information is sent to the cloud storage space, the map model of the neighborhood of the grid 8 and the grid where the neighborhood is located is obtained, and the map model is marked as a supplementary model;
step S202, deleting the repeated grids in the supplementary model and the division grids, and combining the supplementary model and the division grids to obtain a map model which can be divided into a plurality of regular patterns;
further, the step S3 includes the following sub-steps:
step S301, a grid where a viewing model is located is obtained, two sides of the grid which are perpendicular to each other are respectively set as an X axis and a Y axis of a plane rectangular coordinate system, the position of a user terminal in the grid is set as (X1, Y1), and the position is marked as a request position;
step S302, substituting the request position into a nearby model preprocessing formula to calculate and obtain grid information to be buffered; the nearby model preprocessing formula is configured to:
when X2<1, Y2< 1: buffering three grids right below, right left and left below the grid;
when X2>1, Y2< 1: buffering three grids right below, right below and right below the grid;
when X2<1, Y2> 1: buffering three grids right above, right left and left above the grid;
when X2>1, Y2> 1: buffering three grids right above, right above and right above the grid;
further, the step S4 includes the following sub-steps:
step S401, marking pixel points of the map model by using an RGB model, and respectively marking colors of each pixel point by using RGB [ R (a 1), G (a 2) and B (a 3) ], wherein R (a 1) represents a component of the pixel point on red, G (a 2) represents a component of the pixel point on green, B represents a component of the pixel point on blue, and the value ranges of a1, a2 and a3 are all 0-255;
step S402, obtaining a pixel reference value Px of the pixel point by using a formula px=a1+a2+a3;
step S403, the color change reference value CK of the pixel and the neighboring pixel is obtained by using the formula ck=px/Pxn; wherein Px is a pixel reference value, pxn is a pixel reference value of an adjacent pixel point;
in step S404, pixel points with CK >1.2 or CK <0.8 are set as primitive vertexes, each primitive vertex is connected with the nearest primitive vertex with the difference value of other pixel reference values within 20, and the connection line cannot be located in any primitive, and the model is divided into a plurality of primitives by the step, and rendering information in the primitives is given.
Further, the step S5 includes the following sub-steps:
step S501, setting a viewing angle of a user side to be provided with four viewing angles of left front, right front, left back and right back, and obtaining a viewing angle direction selected by the user side, wherein the viewing angle direction is marked as a viewing cone;
step S502, perspective projection is carried out on the map model according to the view angle direction of the user side, and the position relation between the projected primitive and the view cone is judged; outputting rendering information when the primitive is located within the view cone; outputting the primitive neglect information when the primitive is positioned outside the view cone; when the graphic primitive intersects with the view cone, deleting the graphic primitive part outside the view cone to obtain an irregular graphic primitive inside the view cone, dividing the irregular graphic primitive into a plurality of graphic primitives, and outputting the same rendering information by the plurality of divided graphic primitives;
further, the step S6 includes:
receiving the information sent in step S502; when the rendering information is received, rendering all pixel points in each graphic element; when the primitive neglect information is received, rendering processing is not carried out on the primitive.
Further, the step S1 also comprises the following steps,
step S103, calculating the repetition rate value of each primitive through a first comparison algorithm, and screening a reference primitive group with the repetition rate value being greater than a preset macro repetition reference;
step S104, generating reference primitives according to the reference primitive groups and compensating data corresponding to the reference primitives;
step S105, storing the primitive compensation data to a cloud server and establishing an index for the primitive compensation data according to the serial number of the grid;
step S106, storing the reference graphic primitive to a user side;
step S3 also comprises
And when the data is buffered, the reference primitive and the compensation data are called according to the number of the determined grid so as to generate the primitive to be rendered.
Further, the first comparison algorithm comprises extracting primitive features in the primitives, dividing the primitives into a plurality of pre-divided classes according to the primitive features, comparing the similarity of each primitive with the reference graphics in the classes in the pre-divided classes, performing cluster analysis according to comparison results through the cluster analysis algorithm to divide the primitives into a plurality of reference primitive groups, and taking the primitive with the smallest deviation with other primitives in the reference primitive groups as the reference primitive.
Further, step S2 further includes:
step S211, determining the center of the field of view of each grid;
step S212, determining a rendered fixed view field graph of each grid of the 8 neighborhood grids by taking the view field center as a view angle;
step S213, pre-storing the fixed view field graph to the user side;
and when the step S3 further comprises data buffering, the fixed view field graph is pre-led to serve as the primitive data of the neighborhood grid.
The invention has the beneficial effects that: according to the invention, the map model is divided into a plurality of grids with the same size, then the grid where the view model of the user side is located is obtained, and the grid model possibly observed by the user side is buffered, so that the pressure born by the server in operation can be reduced, and the resources needed by reloading the user side after changing the view angle can be reduced;
according to the method, the position relation between the graphic element and the view cone after perspective projection is carried out on the model through rasterization processing, and the graphic element is rendered according to the position relation, so that the substitution sense of the user side when the user side observes a map can be increased, and the user side can observe the surrounding environment better conveniently.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of the steps of the method of the present invention.
Detailed Description
The invention is further described in connection with the following detailed description, in order to make the technical means, the creation characteristics, the achievement of the purpose and the effect of the invention easy to understand.
Referring to fig. 1, the invention provides a three-dimensional electronic map dynamic loading method based on a game rendering engine, which is characterized in that a map model is divided into a plurality of grids with the same size, the grids where a user side views the model are obtained, and the grids which are possibly observed are buffered, so that the pressure born by a cloud storage server during operation can be reduced; the method comprises the steps of carrying out rasterization processing on the model in the grid to obtain a plurality of primitives, projecting perspective view of a user side onto the model, judging the position relation between the primitives and the view cone, carrying out rendering processing on the primitives which can be observed, and not carrying out rendering processing on the primitives which cannot be observed, so that substitution feeling of the user side when the user side observes a map can be increased, and the user side can conveniently recognize required position information when viewing the model.
Specifically, the method comprises the following steps:
step S1, a map model is obtained from the cloud storage space, and the map model is divided into a plurality of grids. Step S1 further comprises the following sub-steps:
step S101, scaling the map model according to a first scaling ratio, and obtaining the area of the scaled map model, wherein the area is marked as a reference divided area;
step S102, substituting the reference dividing area into a unit grid calculation formula to calculate the unit grid area, and setting a square with the area equal to the unit grid area as the dividing grid; the unit grid calculation formula is configured as: mj=cz/a 1, where MJ is a unit grid area, CZ is a reference divided area, a1 is a constant and a1 is a positive integer. In the implementation, considering that the view ranges of the user end in different scenes are different, the first scaling setting range is 1:100000 to 1:50000; the obtained map model area is set to 10000000m 2 In the urban area, the scaled reference division area is 200m 2 In the area outside the city, the scaled reference dividing area is 100m 2 The method comprises the steps of carrying out a first treatment on the surface of the Setting a1 to 10000, namely dividing the scaled map model into 10000 grids.
Step S103, calculating the repetition rate value of each primitive through a first comparison algorithm, and screening a reference primitive group with the repetition rate value being greater than a preset macro repetition reference; the first comparison algorithm comprises the steps of extracting the primitive characteristics in the primitives, dividing the primitives into a plurality of pre-dividing categories according to the primitive characteristics, comparing the similarity of each primitive with the reference graphics in the category in the pre-dividing categories, performing cluster analysis according to comparison results through the cluster analysis algorithm to divide the primitives into a plurality of reference primitive groups, and taking the primitive with the smallest deviation with other primitives in the reference primitive groups as the reference primitive. The method comprises the steps of dividing the image into a plurality of groups, extracting the primitives in the grids, pre-classifying the primitives corresponding to each grid in a characteristic classifying mode, specifically, identifying which type the target object corresponds to by MEANs of an image recognition technology for a fixed visual angle, such as tree, bridge, flower and the like belongs to, establishing the type in the mode, carrying out clustering analysis on the primitives in the type, specifically, K-MEAN clustering analysis, firstly determining the primitives with most color value distribution and shape as the benchmark, comparing the primitives with other primitives, obtaining a similarity value, determining the corresponding clusters according to the similarity value until the number of the clusters meets a preset standard, dividing the clusters into clusters with relatively close similarity as benchmark primitive groups, then determining the primitives at the center of the clusters as benchmark primitives, and taking other primitives as primitives generated by the change on the benchmark primitives.
Step S104, generating reference primitives according to the reference primitive groups and compensating data corresponding to the reference primitives; the difference between the graphic elements is recorded in a data compensation mode, so that the operation amount can be greatly reduced. And meanwhile, the local memory occupation can be smaller.
Step S105, storing the primitive compensation data to a cloud server and establishing an index for the primitive compensation data according to the serial number of the grid;
step S106, storing the reference graphic primitive to a user side;
step S3 also comprises
And when the data is buffered, the reference primitive and the compensation data are called according to the number of the determined grid so as to generate the primitive to be rendered.
And S2, acquiring grid position information of which the area does not reach the unit grid area, sending re-calling information to a cloud storage space, acquiring the grids and a map model of an 8-neighborhood grid of the grids, and dividing the map model into a plurality of grids with the same size by processing the re-calling map model. Step S2 comprises the following sub-steps:
step S201, grid position information with the area smaller than the unit grid area in the map model is obtained, re-calling information is sent to the cloud storage space, the map model of the neighborhood of the grid 8 and the grid where the neighborhood is located is obtained, and the map model is marked as a supplementary model;
step S202, deleting the repeated grids in the supplementary model and the division grids, and combining the supplementary model and the division grids to obtain a map model which can be divided into a plurality of regular patterns; in practice, since it cannot be ensured that the acquired map model is divided into a plurality of grids of the same size, the acquisition map model is retrieved by locating a grid of an insufficient area and recalling the grid and the grid map model in the neighborhood of the grid 8. The step S2 further includes:
step S211, determining the center of the field of view of each grid;
step S212, determining a rendered fixed view field graph of each grid of the 8 neighborhood grids by taking the view field center as a view angle; the image (fixed view field pattern) of the 8 neighborhood model at one view angle can be rapidly loaded, the changed images at different positions can be replaced by the pattern at the center of the view field, rapid display can be realized when transmission and loading efficiency is low, particularly, the images at the center of the view field and at different angles are simulated by the cloud server, and the displayed images at other positions of the grid are replaced by the center of the view field, so that a user can be helped to rapidly determine the distant view image although the display accuracy has errors, and output is realized.
Step S213, pre-storing the fixed view field graph to the user side;
and when the step S3 further comprises data buffering, the fixed view field graph is pre-led to serve as the primitive data of the neighborhood grid.
And step S3, receiving and responding to a request of a user side for checking the model, acquiring a grid where the check model is located, calculating grid information needing buffering, and retrieving a map model of the grid from a cloud storage space. Step S3 comprises the following sub-steps:
step S301, a grid where a viewing model is located is obtained, two sides of the grid which are perpendicular to each other are respectively set as an X axis and a Y axis of a plane rectangular coordinate system, the position of a user terminal in the grid is set as (X1, Y1), and the position is marked as a request position;
step S302, substituting the request position into a nearby model preprocessing formula to calculate and obtain grid information to be buffered; the nearby model preprocessing formula is configured to:
when X2<1, Y2< 1: buffering three grids right below, right left and left below the grid;
when X2>1, Y2< 1: buffering three grids right below, right below and right below the grid;
when X2<1, Y2> 1: buffering three grids right above, right left and left above the grid;
when X2>1, Y2> 1: buffering three grids right above, right above and right above the grid; in the implementation, in order to meet the requirement of the user side for dynamically viewing the map, besides loading the grid where the viewing model is located, the map which is possibly seen after the viewing angle of the user side is replaced is buffered, and when the viewing angle of the user side is changed, the three-dimensional electronic map can be loaded at the first time.
And S4, rasterizing the model, and giving the projected primitive vertex information and related rendering information. Step S4 comprises the following sub-steps:
step S401, marking pixel points of the map model by using an RGB model, and respectively marking colors of each pixel point by using RGB [ R (a 1), G (a 2) and B (a 3) ], wherein R (a 1) represents a component of the pixel point on red, G (a 2) represents a component of the pixel point on green, B represents a component of the pixel point on blue, and the value ranges of a1, a2 and a3 are all 0-255;
step S402, obtaining a pixel reference value Px of the pixel point by using a formula px=a1+a2+a3;
step S403, the color change reference value CK of the pixel and the neighboring pixel is obtained by using the formula ck=px/Pxn; wherein Px is a pixel reference value, pxn is a pixel reference value of an adjacent pixel point;
in step S404, pixel points with CK >1.2 or CK <0.8 are set as primitive vertexes, each primitive vertex is connected with the nearest primitive vertex with the difference value of other pixel reference values within 20, and the connection line cannot be located in any primitive, and the model is divided into a plurality of primitives by the step, and rendering information in the primitives is given. In the implementation, in order to make the three-dimensional map picture more exquisite, the change of the pixel reference value improves the coping level, and when the ratio of the 4 neighborhood pixel reference value of any one pixel point to the pixel reference value of the pixel is more than 0.2, the point is set as the vertex of the primitive; connecting each primitive vertex with the nearest primitive vertex with the difference value of other pixel reference values within 20, wherein the connecting line cannot be positioned in any primitive, dividing the model into a plurality of primitives through the step, taking the average value of all pixel reference values in the primitives, and outputting the average value as rendering information of the primitives.
And S5, obtaining the view angle information of the user side, and judging the relation between the graphic primitive and the view angle by adopting perspective projection. Step S5 comprises the following sub-steps:
step S501, setting a viewing angle of a user side to be provided with four viewing angles of left front, right front, left back and right back, and obtaining a viewing angle direction selected by the user side, wherein the viewing angle direction is marked as a viewing cone;
step S502, perspective projection is carried out on the map model according to the view angle direction of the user side, and the position relation between the projected primitive and the view cone is judged; outputting rendering information when the primitive is located within the view cone; outputting the primitive neglect information when the primitive is positioned outside the view cone; when the graphic primitive intersects with the view cone, deleting the graphic primitive part outside the view cone to obtain an irregular graphic primitive inside the view cone, dividing the irregular graphic primitive into a plurality of graphic primitives, and outputting the same rendering information by the plurality of divided graphic primitives; in the specific implementation, in order to enable a user side to feel substitution when viewing a map, a perspective projection method is adopted to process the view angle of the user side; after perspective projection is carried out on the view angle of the user side, certain primitives are in the range of the view cone, and the primitives are the primitives which can be observed after the rasterization of the map model, and rendering information of the primitives is output; some primitives are beyond the range of the view cone, and the primitives are rasterized by the map model which cannot be observed by a user side, and the primitives output primitive neglect information; some primitives may appear to be partially within the view cone and partially outside the view cone under the influence of projection; deleting the graphic element part outside the view cone range to obtain an irregular graphic element, wherein the irregular graphic element is required to be further divided in order to be rendered out because the rendering engine of the game does not support rendering processing of the irregular graphic element, so that the irregular graphic element is finally divided into a plurality of regular triangle graphic elements; meanwhile, the regular triangle primitives originally belong to the same primitive, so that the triangle primitives are output with the same rendering information.
Step S6, rendering the processed primitive, including:
receiving the information sent in the step S502, and rendering all pixel points in each graphic primitive when the rendering information is received; when the primitive neglect information is received, rendering processing is not carried out on the primitive. In the implementation, in order to support the user side to view the map in different operation systems, and in order to make the rendered effect more realistic, the rendering engine adopts a UE4 game engine; when the rendering information is received, three primitive vertex positions of the primitive are obtained, and the same color is rendered for all pixel points in the primitive enclosed by the three primitive vertices according to the rendering information. When the primitive neglect information is received, three primitive vertex positions of the primitive are obtained, and rendering processing is not carried out on all pixel points in the primitive surrounded by the three primitive vertices.
Working principle: firstly, dividing a map model in a cloud storage space into a plurality of grids with the same size, acquiring grids where a user side views the model, carrying out buffer treatment on the grids which are possibly observed, then carrying out rasterization treatment on the model in the buffer grid to obtain a plurality of primitives, carrying out perspective projection on the view angle of the user side on the model, judging the position relation between the primitives and a view cone, carrying out rendering treatment on the primitives which can be observed, and carrying out no rendering treatment on the primitives which cannot be observed to realize the method for dynamically loading the three-dimensional electronic map based on the game rendering engine.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein. The storage medium may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
The above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A three-dimensional electronic map dynamic loading method based on a game rendering engine is characterized by comprising the following steps:
step S1, a map model is obtained from a cloud storage space, and the map model is divided into a plurality of grids;
step S2, grid position information with the area not reaching the unit grid area is obtained, re-calling information is sent to a cloud storage space, a map model of the grid and 8 neighborhood grids of the grid is obtained, and the map model is divided into a plurality of grids with the same size through processing the re-calling map model;
step S3, receiving and responding to a request of a user side for checking the model, acquiring a grid where the check model is located, calculating grid information to be buffered, and retrieving a map model of the grid from a cloud storage space;
step S4, rasterizing the model, and giving the projected primitive vertex information and related rendering information;
s5, obtaining view angle information of a user side, and judging the relation between the graphic primitive and the view angle by adopting perspective projection;
and step S6, rendering the processed graphic primitive.
2. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S1 comprises the following sub-steps:
step S101, scaling the map model according to a first scaling ratio, and obtaining the area of the scaled map model, wherein the area is marked as a reference divided area;
step S102, substituting the reference dividing area into a unit grid calculation formula to calculate the unit grid area, and setting a square with the area equal to the unit grid area as the dividing grid; the unit grid calculation formula is configured as: mj=cz/a 1, where MJ is a unit grid area, CZ is a reference divided area, a1 is a constant and a1 is a positive integer.
3. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S2 comprises the following sub-steps:
step S201, grid position information with the area smaller than the unit grid area in the map model is obtained, re-calling information is sent to the cloud storage space, the map model of the neighborhood of the grid 8 and the grid where the neighborhood is located is obtained, and the map model is marked as a supplementary model;
step S202, deleting the grids which are repeated in the supplementary model and the dividing grids, and combining the supplementary model and the dividing grids to obtain a map model which can be divided into a plurality of regular patterns.
4. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S3 comprises the following sub-steps:
step S301, a grid where a viewing model is located is obtained, two sides of the grid which are perpendicular to each other are respectively set as an X axis and a Y axis of a plane rectangular coordinate system, the position of a user terminal in the grid is set as (X1, Y1), and the position is marked as a request position;
step S302, substituting the request position into a nearby model preprocessing formula to calculate and obtain grid information to be buffered; the nearby model preprocessing formula is configured to:
when X2<1, Y2< 1: buffering three grids right below, right left and left below the grid;
when X2>1, Y2< 1: buffering three grids right below, right below and right below the grid;
when X2<1, Y2> 1: buffering three grids right above, right left and left above the grid;
when X2>1, Y2> 1: and carrying out buffer treatment on the three grids right above, right above and right above the grid.
5. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S4 comprises the following sub-steps:
step S401, marking pixel points of the map model by using an RGB model, and respectively marking colors of each pixel point by using RGB [ R (a 1), G (a 2) and B (a 3) ], wherein R (a 1) represents a component of the pixel point on red, G (a 2) represents a component of the pixel point on green, B represents a component of the pixel point on blue, and the value ranges of a1, a2 and a3 are all 0-255;
step S402, obtaining a pixel reference value Px of the pixel point by using a formula px=a1+a2+a3;
step S403, the color change reference value CK of the pixel and the neighboring pixel is obtained by using the formula ck=px/Pxn; wherein Px is a pixel reference value, pxn is a pixel reference value of an adjacent pixel point;
in step S404, pixel points with CK >1.2 or CK <0.8 are set as primitive vertexes, each primitive vertex is connected with the nearest primitive vertex with the difference value of other pixel reference values within 20, and the connection line cannot be located in any primitive, and the model is divided into a plurality of primitives by the step, and rendering information in the primitives is given.
6. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S5 comprises the following sub-steps:
step S501, setting a viewing angle of a user side to be provided with four viewing angles of left front, right front, left back and right back, and obtaining a viewing angle direction selected by the user side, wherein the viewing angle direction is marked as a viewing cone;
step S502, perspective projection is carried out on the map model according to the view angle direction of the user side, and the position relation between the projected primitive and the view cone is judged; outputting rendering information when the primitive is located within the view cone; outputting the primitive neglect information when the primitive is positioned outside the view cone; when the graphic element is intersected with the view cone, deleting the graphic element part outside the view cone to obtain an irregular graphic element inside the view cone, dividing the irregular graphic element into a plurality of graphic elements, and outputting the same rendering information by the plurality of divided graphic elements.
7. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein the step S6 comprises:
receiving the information sent in step S502; when the rendering information is received, rendering all pixel points in each graphic element; when the primitive neglect information is received, rendering processing is not carried out on the primitive.
8. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 2, wherein step S1 further comprises,
step S103, calculating the repetition rate value of each primitive through a first comparison algorithm, and screening a reference primitive group with the repetition rate value being greater than a preset macro repetition reference;
step S104, generating reference primitives according to the reference primitive groups and compensating data corresponding to the reference primitives;
step S105, storing the primitive compensation data to a cloud server and establishing an index for the primitive compensation data according to the serial number of the grid;
step S106, storing the reference graphic primitive to a user side;
step S3 also comprises
And when the data is buffered, the reference primitive and the compensation data are called according to the number of the determined grid so as to generate the primitive to be rendered.
9. The method for dynamically loading the three-dimensional electronic map based on the game rendering engine according to claim 8, wherein the first comparison algorithm comprises the steps of extracting primitive features in primitives, dividing the primitives into a plurality of pre-divided classes according to the primitive features, comparing the similarity of each primitive with a reference graph in the class in the pre-divided classes, performing cluster analysis according to comparison results through a cluster analysis algorithm to divide the primitives into a plurality of reference primitive groups, and taking the primitive with the smallest deviation from other primitives in the reference primitive groups as the reference primitive.
10. The method for dynamically loading a three-dimensional electronic map based on a game rendering engine according to claim 1, wherein,
the step S2 further includes:
step S211, determining the center of the field of view of each grid;
step S212, determining a rendered fixed view field graph of each grid of the 8 neighborhood grids by taking the view field center as a view angle;
step S213, pre-storing the fixed view field graph to the user side;
step S3 also comprises
And when the data is buffered, the fixed view field graph is pre-led in as the primitive data of the neighborhood grid.
CN202310799261.3A 2023-07-03 2023-07-03 Three-dimensional electronic map dynamic loading method based on game rendering engine Pending CN116704146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310799261.3A CN116704146A (en) 2023-07-03 2023-07-03 Three-dimensional electronic map dynamic loading method based on game rendering engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310799261.3A CN116704146A (en) 2023-07-03 2023-07-03 Three-dimensional electronic map dynamic loading method based on game rendering engine

Publications (1)

Publication Number Publication Date
CN116704146A true CN116704146A (en) 2023-09-05

Family

ID=87833939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310799261.3A Pending CN116704146A (en) 2023-07-03 2023-07-03 Three-dimensional electronic map dynamic loading method based on game rendering engine

Country Status (1)

Country Link
CN (1) CN116704146A (en)

Similar Documents

Publication Publication Date Title
US11551418B2 (en) Image rendering of laser scan data
KR100907154B1 (en) Image processing apparatus and constituent parts thereof, rendering method
US6191794B1 (en) Method and apparatus for scaling texture maps for graphical images
CN110728740A (en) Virtual photogrammetry
CN107170040A (en) A kind of three-dimensional bridge scenario building method and apparatus
CN115409957A (en) Map construction method based on illusion engine, electronic device and storage medium
CN114092575B (en) Digital earth real-time coloring method and device
US6664957B1 (en) Apparatus and method for three-dimensional graphics drawing through occlusion culling
CN115409962B (en) Method for constructing coordinate system in illusion engine, electronic device and storage medium
CN116704102A (en) Automatic light distribution method based on point cloud scene and electronic equipment
CN116704146A (en) Three-dimensional electronic map dynamic loading method based on game rendering engine
US11436797B2 (en) Image generation system and method
CN113126944B (en) Depth map display method, display device, electronic device, and storage medium
US11367262B2 (en) Multi-dimensional acceleration structure
CN113593028A (en) Three-dimensional digital earth construction method for avionic display control
US20110074777A1 (en) Method For Displaying Intersections And Expansions of Three Dimensional Volumes
CN116824082B (en) Virtual terrain rendering method, device, equipment, storage medium and program product
CN117557710B (en) Texture rendering method and device, terminal equipment and storage medium
CN111506680B (en) Terrain data generation and rendering method and device, medium, server and terminal
JP7368950B2 (en) Method and apparatus for efficient building footprint identification
CN116474363A (en) Scene model rendering method and device and electronic equipment
CN115187720A (en) Method for optimizing terrain rendering based on digital terrain analysis
CN115409959A (en) Three-dimensional construction method based on illusion engine, electronic device and storage medium
CN115409961A (en) Thermodynamic diagram construction method based on illusion engine, electronic equipment and storage medium
CN115439619A (en) Terrain construction method based on illusion engine, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination