Map display method and device, electronic equipment and storage medium
By adjusting the opacity of the landscape model in the 3D map and applying techniques such as view frustum clipping, the problems of tall buildings obstructing the view and poor visual perception of distant dense tall buildings were solved, thus improving the display effect and user experience of the 3D map.
Patent Information
- Application Number
- CN202410424332.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-10-17
AI Technical Summary
Existing 3D map display methods suffer from problems such as tall buildings obstructing the view and poor visibility of distant dense tall buildings, resulting in suboptimal display effects.
By adjusting the opacity of the landscape model, different opacities are set according to the distance from the virtual observation point. The model closer to the observation point has high opacity, while the model farther away from the observation point has low opacity. Techniques such as view frustum clipping, dynamic loading, level management, and occlusion culling are used to optimize the consumption of computing resources.
It improves the display effect of 3D maps, reduces the problem of nearby tall buildings obstructing the view, optimizes the view of densely packed tall buildings in the distance, and enhances user experience and performance.
Smart Images

Figure CN120807811A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer field, and in particular to a map display method and device, electronic equipment and storage medium. BACKGROUND
[0002] Three-dimensional map technology is a technology that uses geographic information systems (GIS), computer graphics, and map-making techniques to present geographical features on the ground in a three-dimensional form. It usually uses satellite remote sensing data to load various landscape models such as buildings, trees, and vehicles into the terrain, and combines rendering, texture, and other techniques in computer graphics to generate realistic three-dimensional maps. Three-dimensional map technology can be used in traffic navigation, urban planning, resource management, and other application fields.
[0003] However, the current three-dimensional map display method is relatively single, and users observe the landscape in the map by dragging and zooming the three-dimensional map. As the virtual observation point moves, problems such as poor display effect caused by too many high-rise buildings, such as high-rise buildings blocking the user's virtual observation point, and poor observation of dense high-rise buildings in the distance, often occur. SUMMARY
[0004] The embodiments of the present application provide a map display method, device, electronic equipment and storage medium, which can improve the display effect of the three-dimensional map.
[0005] The embodiments of the present application provide a map display method, comprising:
[0006] displaying a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map including a landscape model presented in a three-dimensional form;
[0007] in response to a position change operation of the virtual observation point, redrawing the three-dimensional map picture based on modifying the opacity of the first model and the second model, so that the opacity of the first model is positively correlated with the first distance, and the opacity of the second model is negatively correlated with the second distance;
[0008] wherein the landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval being less than the minimum value of the second interval, the first distance being the distance between the first model and the virtual observation point, and the second distance being the distance between the second model and the virtual observation point.
[0009] The embodiments of the present application also provide a map display device, comprising:
[0010] a display unit configured to display a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map including a landscape model presented in a three-dimensional form;
[0011] redraw the three-dimensional map picture based on modifying the opacities of the first model and the second model, such that the opacity of the first model is positively correlated with the first distance, and the opacity of the second model is negatively correlated with the second distance, in response to the position change operation of the virtual observation point.
[0012] The landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, a maximum value of the first interval is less than a minimum value of the second interval, the first distance is a distance between the first model and the virtual observation point, and the second distance is a distance between the second model and the virtual observation point.
[0013] In some embodiments, before the picture is redrawn based on modifying the opacities of the first model and the second model, the method further includes:
[0014] determining a distance between the landscape model and the virtual observation point;
[0015] determining the landscape model with the distance within the first interval as the first model;
[0016] determining the landscape model with the distance within the second interval as the second model.
[0017] In some embodiments, the position change operation includes a zoom-in operation, and the three-dimensional map picture is redrawn based on modifying the opacities of the first model and the second model, in response to the position change operation of the virtual observation point, including:
[0018] in response to the zoom-in operation of the virtual observation point, increasing the opacity of the first model, and decreasing the opacity of the second model;
[0019] redrawing the three-dimensional map picture based on the opacities of the first model and the second model.
[0020] In some embodiments, the position change operation includes a zoom-out operation, and the three-dimensional map picture is redrawn based on modifying the opacities of the first model and the second model, in response to the position change operation of the virtual observation point, including:
[0021] in response to the zoom-out operation of the virtual observation point, decreasing the opacity of the second model, and increasing the opacity of the second model;
[0022] redrawing the three-dimensional map picture based on the opacities of the first model and the second model.
[0023] In some embodiments, when the first distance is equal to a minimum value of the first interval, the opacity of the first model is set to 0; and when the first distance is equal to a maximum value of the first interval, the opacity of the first model is set to 1.
[0024] In some embodiments, when the second distance is equal to the minimum value of the second interval, the opacity of the second model is set to 1; when the second distance is equal to the maximum value of the second interval, the opacity of the second model is set to 0.
[0025] In some embodiments, the three-dimensional map further comprises a ground model, and the three-dimensional map picture is redrawn based on the modification of the opacities of the first model and the second model, comprising:
[0026] redrawing the ground model;
[0027] After the ground model is redrawn, a drawing order of the landscape models is determined based on the depth information of the landscape models;
[0028] The landscape models are drawn according to the drawing order.
[0029] In some embodiments, the landscape models are drawn according to the drawing order, comprising:
[0030] The second model is drawn according to the drawing order of the second model;
[0031] After the second model is drawn, other models are drawn according to the drawing order of the other models, the other models being landscape models other than the first model and the second model;
[0032] After the other models are drawn, the first model is drawn according to the drawing order of the first model.
[0033] In some embodiments, the drawing order of the landscape models is determined based on the depth information of the landscape models, comprising:
[0034] A to-be-drawn model is determined in the landscape models based on a preset screening rule;
[0035] A drawing order of the to-be-drawn model is determined based on the depth information of the to-be-drawn model;
[0036] The landscape models are drawn according to the drawing order, comprising:
[0037] The to-be-drawn model is drawn according to the drawing order.
[0038] In some embodiments, the to-be-drawn model is determined in the landscape models based on the preset screening rule, comprising:
[0039] The to-be-drawn model is determined in the landscape models, the to-be-drawn model being a landscape model within a field of view of a virtual observation point;
[0040] The drawing order of the to-be-drawn model is determined based on the depth information of the to-be-drawn model.
[0041] In some embodiments, based on a preset screening rule, the to-be-drawn models are determined in the landscape model, including:
[0042] Based on the depth information of the landscape model, the occlusion relationship between the to-be-drawn models is determined.
[0043] Based on the occlusion relationship, the to-be-drawn models are screened out from the landscape model.
[0044] In some embodiments, the three-dimensional map picture is displayed, including:
[0045] The candidate models are obtained, and the positions of the candidate models in the three-dimensional map are determined;
[0046] The candidate models whose positions are in the loading range of the virtual observation point are determined as the landscape models;
[0047] The landscape models are loaded in the three-dimensional map;
[0048] The three-dimensional map is drawn, and the three-dimensional map picture is obtained and displayed.
[0049] Embodiments of the present application also provide an electronic device, including a memory storing a plurality of instructions; the processor loads the instructions from the memory to execute the steps in any one of the map display methods provided by the embodiments of the present application.
[0050] Embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores a plurality of instructions, the instructions are suitable for being loaded by a processor to execute the steps in any one of the map display methods provided by the embodiments of the present application.
[0051] Embodiments of the present application can display a three-dimensional map picture, the three-dimensional map picture includes a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map includes a landscape model presented in a three-dimensional form; in response to a position change operation of the virtual observation point, the three-dimensional map picture is redrawn based on modifying the opacity of a first model and a second model, so that the opacity of the first model is positively correlated with a first distance, and the opacity of the second model is negatively correlated with a second distance; wherein the landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval is less than the minimum value of the second interval, the first distance is the distance between the first model and the virtual observation point, and the second distance is the distance between the second model and the virtual observation point.
[0052] In the map picture provided in the embodiments of the present application, for the landscape located in the near place, i.e. the first model, the closer to the virtual observation point, the more transparent, and the farther away from the virtual observation point, the more obvious; for the landscape located in the far place, i.e. the second model, the closer to the virtual observation point, the more obvious, and the farther away from the virtual observation point, the more transparent. Therefore, the closer high-rise building has higher opacity, and thus does not shield the user from observing other buildings; the far high-rise building has higher opacity, and thus can weaken the perception of too dense high-rise buildings in the far place. Thus, the present scheme can improve the image effect of the displayed three-dimensional map picture. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0054] Figure 1a is an effect diagram of the map display method provided by the embodiments of the present application;
[0055] Figure 1b is an effect diagram of the map display method provided by the embodiments of the present application;
[0056] Figure 1c is a flow diagram of the map display method provided by the embodiments of the present application;
[0057] Figure 1d is an interval diagram of the map display method provided by the embodiments of the present application;
[0058] Figure 2a is a drawing flow diagram of the map display method provided by the embodiments of the present application;
[0059] Figure 2b is a thread interaction step diagram of the rendering of the map display method provided by the embodiments of the present application;
[0060] Figure 3 is a structure diagram of the map display device provided by the embodiments of the present application;
[0061] Figure 4 is a structure diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0062] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0063] The present application provides a map display method and device, an electronic device and a storage medium.
[0064] The map display device can be integrated in an electronic device, which can be a terminal, a server or the like. The terminal can be a mobile phone, a vehicle-mounted terminal, a smart home appliance, a smart voice interaction device, a tablet computer, a smart Bluetooth device, a notebook computer or a personal computer (PC) or the like. The server can be a single server or a server cluster composed of multiple servers.
[0065] In some embodiments, the map display device can be integrated in multiple electronic devices, for example, the map display device can be integrated in multiple servers to implement the map display method of the present application.
[0066] In some embodiments, the server can also be implemented in the form of a terminal.
[0067] For example, the electronic device can be a terminal, which can display a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, the three-dimensional map including a landscape model presented in a stereoscopic form. In response to a position change operation of the virtual observation point, the three-dimensional map picture is redrawn based on modifying the opacity of a first model and a second model, so that the opacity of the first model is positively correlated with a first distance and the opacity of the second model is negatively correlated with a second distance. The landscape model includes the first model at a first interval distance from the virtual observation point and the second model at a second interval distance from the virtual observation point, the maximum value of the first interval being less than the minimum value of the second interval, the first distance being the distance between the first model and the virtual observation point, and the second distance being the distance between the second model and the virtual observation point.
[0068] For example, referring to Figure 1a The electronic device can be a mobile phone, which can carry a map client, the map client can display a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, the three-dimensional map including a building presented in a stereoscopic form. In response to a virtual observation point zoom-in operation of the virtual observation point, a first model in the building will change from solid to transparent until transparent. Referring to Figure 1bIn response to a virtual observation point zoom-in operation of the virtual observation point, the second model in the building gradually changes from transparent to virtual to real.
[0069] The following will be described in detail respectively. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0070] Intelligent Traffic System (ITS) is also known as Intelligent Transportation System, which is a comprehensive transportation system that integrates advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control and vehicle manufacturing, and strengthens the connection between vehicles, roads and users, thereby ensuring safety, improving efficiency, improving the environment and saving energy.
[0071] Among them, the electronic map is an important part of the intelligent transportation system, which is a map that exists in digital form. It stores and processes geographic information in the form of electronic data, and can be displayed and used on computers, smartphones, tablets and other devices. Electronic maps provide convenient and efficient geographic information display and application services for users through digitalization, interactivity and real-time features, and are widely used in navigation, tourism, geographic information analysis and other fields.
[0072] In this embodiment, a map display method related to an electronic map is provided, as shown in the figure, the specific process of the map display method can be as follows: Figure 1c The specific process of the map display method can be as follows:
[0073] 110, display a three-dimensional map picture.
[0074] Among them, the three-dimensional map picture includes a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map includes a landscape model presented in a three-dimensional form.
[0075] Virtual perspective refers to a virtual perspective simulated by computer technology, which allows users to observe and interact in a virtual environment. In some embodiments, users can control the virtual perspective to freely observe the three-dimensional map through operations such as moving, zooming out, zooming in, rotating, etc. The virtual observation point is the position of the virtual perspective, which can be represented as a point in the three-dimensional map.
[0076] The landscape model can include models of landscapes on the ground, such as a building model, a vegetation model, a vehicle model, a traffic sign model, and the like. In some embodiments, in addition to the landscape model, the three-dimensional map can also include a ground model, which can include a road network model, a water body model, a terrain feature model, and the like.
[0077] In some embodiments, in order to reduce the consumption of computing resources and ensure the smoothness of display, only models near the virtual observation point can be loaded, reducing the computing and network transmission burden of the system, while ensuring that the user always sees the nearby scenery, so step 110 includes the following steps:
[0078] Obtaining candidate models and determining the positions of the candidate models in the three-dimensional map;
[0079] Determining the candidate models whose positions are within the loading range of the virtual observation point as the landscape models;
[0080] Loading the landscape models in the three-dimensional map;
[0081] Drawing the three-dimensional map to obtain and display a three-dimensional map picture.
[0082] The candidate models and their positions can be obtained from a database or memory.
[0083] The loading range can be set according to requirements. In some embodiments, the candidate models can be determined by Frustum Culling technology, dynamic loading technology, Level of Detail (LOD) technology, preloading technology, Occlusion Culling, and the like.
[0084] The Frustum Culling technology calculates the frustum of the virtual observation point, removes models outside the frustum, and loads only the models inside the frustum. In this way, only models near the area being observed by the user are loaded, thereby improving rendering efficiency.
[0085] The dynamic loading technology dynamically loads models near the virtual observation point when the virtual observation point is moved or changed. By detecting movement and changes in the virtual observation point, the system can load or unload models near the virtual observation point in real time to ensure that the user always sees the latest scenery and avoids loading unnecessary models.
[0086] The Level of Detail technology reduces rendering load by using different levels of models at different distances. For example, high-resolution models can be loaded in the area near the virtual observation point, while low-resolution models can be loaded in the area far from the virtual observation point, to maintain a balance between performance and quality.
[0087] Preloading technique refers to preloading models near the virtual observation point before user movement. Through preloading, user waiting time can be reduced and user experience can be improved. Preloading can load models that may be needed in advance according to the current position and movement direction of the user.
[0088] The occlusion culling technique determines which objects are not visible during rendering according to the occlusion relationship between objects, and directly culls the models that are not visible.
[0089] Through the above optimization strategies, the performance and user experience of the three-dimensional map can be effectively improved, so that the user can smoothly browse and interact in the virtual environment.
[0090] 120. In response to the position change operation of the virtual observation point, the three-dimensional map picture is redrawn based on modifying the opacity of the first model and the second model.
[0091] In some embodiments, in order to further reduce the consumption of computing resources and improve smoothness, all first models and second models in the picture can be controlled to simultaneously play a preset transparency change animation. For example, all first models in the picture can be loaded and simultaneously play a preset first transparency change animation, and all second models in the picture can be loaded and simultaneously play a transparency change animation. The specific animation parameters can be set according to requirements.
[0092] For example, the first transparency change animation can be that the opacity linearly changes from 1 to 0 within a preset time, and the second transparency change animation can be that the opacity linearly changes from 0 to 1 within a preset time.
[0093] Wherein, the opacity of 1 represents complete opacity, and the opacity of 0 represents complete transparency.
[0094] In some embodiments, in order to make the visual effect more accurate and detailed, the opacity of each first model and each second model in the picture can also be fine-tuned according to the distance between the virtual observation point and the first model and the second model.
[0095] For example, referring to Figure 1d , step 120 can make the opacity of the first model positively related to the first distance d1 and the opacity of the second model negatively related to the second distance d2. That is, for the first model, the smaller the first distance d1, the more transparent the first model; for the second model, the larger the first distance d1, the more transparent the second model.
[0096] In some embodiments, the distance can refer to the straight-line distance, which refers to the shortest distance between two points; in some embodiments, the distance can refer to the horizontal distance, which refers to the component of the straight-line distance along the horizontal plane.
[0097] For example, the distance can refer to a horizontal distance, the landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, a maximum value of the first interval is less than a minimum value of the second interval, the first distance d1 is a distance between the first model and the virtual observation point, and the second distance d2 is a distance between the second model and the virtual observation point.
[0098] Wherein, a complement set between the first interval and the second interval can be denoted as an intermediate interval, a landscape model located in the intermediate interval can be denoted as an intermediate model, and in some embodiments, an opacity of the intermediate model can be 1.
[0099] In some embodiments, numerical values of the first interval and the second interval can be determined by actual application scenarios. For example, in some embodiments, a minimum value of the first interval can be 0, and a maximum value of the second interval can be infinite; for example, in some embodiments, the first interval is 0- A meters, the intermediate interval is A-B meters, and the second interval is B-infinite.
[0100] In some embodiments, there can also be a third interval, a minimum value of the third interval is greater than a maximum value of the second interval; for example, in some embodiments, the first interval is 0-A meters, the intermediate interval is A-B meters, the second interval is B-C meters, and the third interval is C-infinite.
[0101] In some embodiments, a landscape model located in the third interval can be denoted as a third model, and in some embodiments, an opacity of the third model can be 0; in some embodiments, in order to further reduce consumption of computing resources, no landscape model can be loaded in the third interval of the three-dimensional map.
[0102] In some embodiments, a transparency channel can be added in a texture of the landscape model, so that the transparency of the landscape model is controlled by adjusting the texture parameters of the model.
[0103] For example, the landscape model can use a texture in RGBA format, where the A channel represents the transparency, the value of the transparency channel is controlled according to the horizontal distance between the landscape model and the virtual observation point, and after the adjustment is completed, the three-dimensional map picture is redrawn based on the adjusted texture of the landscape model.
[0104] Therefore, in some embodiments, before the picture is redrawn based on the modified opacity of the first model and the second model, the method can further include:
[0105] Determining a distance between the landscape model and the virtual observation point;
[0106] Determining the landscape model whose distance is in the first interval as the first model;
[0107] determining the landscape model at the distance within the second interval as a second model.
[0108] In some embodiments, the position change operation can include a zoom-in operation, and the redrawing the three-dimensional map picture based on modifying the opacities of the first model and the second model in response to the position change operation of the virtual observation point can include the steps of:
[0109] increasing the opacity of the first model and decreasing the opacity of the second model in response to the zoom-in operation of the virtual observation point;
[0110] redrawing the three-dimensional map picture based on the opacities of the first model and the second model.
[0111] For example, the opacity of the first model is increased and the opacity of the second model is decreased by playing a preset opacity animation in response to the zoom-in operation of the virtual observation point.
[0112] For example, the opacity of the first model is increased by calculating the increase amount by the first distance and the opacity of the second model is decreased by calculating the decrease amount by the second distance in response to the zoom-in operation of the virtual observation point.
[0113] Similarly, in some embodiments, the position change operation can include a zoom-out operation, and the redrawing the three-dimensional map picture based on modifying the opacities of the first model and the second model in response to the position change operation of the virtual observation point can include the steps of:
[0114] decreasing the opacity of the second model and increasing the opacity of the second model in response to the zoom-out operation of the virtual observation point;
[0115] redrawing the three-dimensional map picture based on the opacities of the first model and the second model.
[0116] For example, the opacity of the first model is decreased and the opacity of the second model is increased by playing a preset opacity animation in response to the zoom-out operation of the virtual observation point.
[0117] For example, the opacity of the first model is decreased by calculating the decrease amount by the first distance and the opacity of the second model is increased by calculating the increase amount by the second distance in response to the zoom-out operation of the virtual observation point.
[0118] When the opacity of the model is fine-tuned by the first distance and the second distance, in some embodiments, when the first distance is equal to the minimum value of the first interval, the opacity of the first model is set to 0; when the first distance is equal to the maximum value of the first interval, the opacity of the first model is set to 1; in some embodiments, when the second distance is equal to the minimum value of the second interval, the opacity of the second model is set to 1; when the second distance is equal to the maximum value of the second interval, the opacity of the second model is set to 0. When the opacity has been 0, the opacity will not be reduced any more; when the opacity has been 1, the opacity will not be increased any more.
[0119] In some embodiments, the three-dimensional map can further include a ground model, in order to improve the drawing efficiency while ensuring that the occlusion relationship between the landscape models is correct, redrawing the three-dimensional map picture based on modifying the opacity of the first model and the second model can include the following steps:
[0120] Drawing the ground model;
[0121] After the ground model is drawn, determining the drawing order of the landscape models based on the depth information of the landscape models;
[0122] Drawing the landscape models according to the drawing order.
[0123] The depth information determines which elements in the image are in the foreground and which are in the background, thereby generating an image with depth. In some embodiments, a depth buffer (Depth Buffer) or Z-buffer (Z-buffer) can be used to store the depth information of each pixel of the landscape model. Before pixel shading, depth testing can be performed based on the depth information to determine which pixels should be drawn in the foreground and which should be occluded.
[0124] In some embodiments, in order to further improve the drawing efficiency and reduce the consumption of computing resources, the first model, the second model and other landscape models can be drawn in batches. Therefore, drawing the landscape models according to the drawing order can include the following steps:
[0125] Drawing the second model according to the drawing order of the second model;
[0126] After the second model is drawn, drawing other models according to the drawing order of the other models, the other models being other landscape models except the first model and the second model;
[0127] After the other models are drawn, drawing the first model according to the drawing order of the first model.
[0128] In some embodiments, in order to further optimize the rendering process and reduce the consumption of computing resources, the to-be-drawn models can be determined in the landscape model by a view frustum culling technique, a dynamic loading technique, a level management technique, and a preloading technique, and landscape models that do not affect the display effect are removed. Therefore, determining the drawing order of the landscape models based on the depth information of the landscape models can include the following steps:
[0129] Determining the to-be-drawn models in the landscape model based on the preset screening rules;
[0130] Determining the drawing order of the to-be-drawn models based on the depth information of the to-be-drawn models;
[0131] Drawing the landscape models in the drawing order can include the following steps:
[0132] Drawing the to-be-drawn models in the drawing order.
[0133] For example, in some embodiments, determining the to-be-drawn models in the landscape model based on the preset screening rules by using the view frustum culling technique can include the following steps:
[0134] Determining the to-be-drawn models in the landscape model, the to-be-drawn models being the landscape models within the field of view of the virtual observation point;
[0135] Determining the drawing order of the to-be-drawn models based on the depth information of the to-be-drawn models.
[0136] For example, in some embodiments, determining the to-be-drawn models in the landscape model based on the preset screening rules by using the occlusion removal technique can include the following steps:
[0137] Determining the occlusion relationship between the to-be-drawn models based on the depth information of the landscape models;
[0138] Screening the to-be-drawn models from the landscape models based on the occlusion relationship.
[0139] It can be seen from the above that the embodiment of the application can display a three-dimensional map picture, the three-dimensional map picture includes a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map includes a landscape model presented in a stereoscopic form; in response to a position change operation of the virtual observation point, the three-dimensional map picture is redrawn based on modifying the opacity of the first model and the second model, so that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance; wherein the landscape model includes a first model at a first interval distance from the virtual observation point and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval is less than the minimum value of the second interval, the first distance is the distance between the first model and the virtual observation point, and the second distance is the distance between the second model and the virtual observation point. In the map picture proposed in the embodiment of the application, for the landscape located in the near place, that is, the first model, the closer to the virtual observation point, the more transparent, and the farther away from the virtual observation point, the more obvious; for the landscape located in the far place, that is, the second model, the closer to the virtual observation point, the more obvious, and the farther away from the virtual observation point, the more transparent. Therefore, the closer high-rise building has a higher opacity, so that the high-rise building does not block the user from observing other buildings; the far high-rise building has a higher opacity, so that the visual effect of the over-dense far high-rise building is weakened. Therefore, the scheme can improve the image effect of the displayed three-dimensional map picture.
[0140] The method described in the above embodiment will be further described in detail below.
[0141] First, a disappearance animation is set in advance, which can gradually reduce the opacity from 1 to 0 in 1 second; an appearance animation is set in advance, which can gradually increase the opacity from 0 to 1 in 1 second.
[0142] Reference Figure 1a When the observation point is zoomed in, the buildings in the near place are loaded and play the disappearance animation, so as to realize the visual effect from real to virtual until disappearance; the buildings in the far place are loaded and play the appearance animation, so as to realize the visual effect from virtual to real until complete appearance; when the observation point is zoomed out, the buildings in the near place are loaded and play the appearance animation, so as to realize the visual effect from virtual to real until complete appearance; the buildings in the far place are loaded and play the disappearance animation, so as to realize the visual effect from real to virtual until disappearance.
[0143] It should be noted that the value of the opacity set in the animation can be set arbitrarily according to actual needs.
[0144] In this embodiment, the method of the embodiment of the application will be described in detail by taking the scheme of playing a transparent animation by a model of a building as an example.
[0145] As Figure 2a shown, a map display method specifically includes the following steps:
[0146] 201, configure an animation.
[0147] 1. Analyze the animation area, wherein the animation area may include a first area and a second area, the first area being an area within a first interval from the virtual observation point, and the second area being an area within a second interval from the virtual observation point;
[0148] In some embodiments, the first interval may be 0 to 15 meters, and the second interval may be 200 to 400 meters.
[0149] 2. Verify the first area and the second area.
[0150] 202. Render the image.
[0151] 1. The rendering thread clips the building tiles that need to be displayed;
[0152] Tile refers to the small block elements used to build models.
[0153] In some embodiments, the rendering thread can determine the field of view of the virtual observation point based on the position, direction and parameters of the virtual observation point; determine the building tiles within the field of view of the virtual observation point; in some embodiments, it can also clip invisible building tiles to reduce unnecessary rendering operations.
[0154] When loading a building, you can load Building Tile (building tile), Building Object (building object), in addition, you can also load a three-dimensional map Map Model (map model).
[0155] 2. Determine whether the building is animated. If so, load the animation for the building;
[0156] Among them, the landscape model with a distance within the first interval is determined as the first model, and the landscape model with a distance within the second interval is determined as the second model; for the first model, the appearance and disappearance animation corresponding to the first model can be loaded, and for the second model, the appearance and disappearance animation corresponding to the second model can be loaded.
[0157] 3. Play the animation in response to the position change operation of the virtual observation point.
[0158] For example, in response to a zoom-in operation, the first model plays a disappearing animation, and the second model plays an appearing animation;
[0159] For example, in response to a distance operation, the second model plays an appearance animation, and the second model plays a disappearance animation.
[0160] refer to Figure 2b , Figure 2bThe rendering thread is used for rendering the building, which includes rendering the texture of the building, such as transparency and the like.
[0161] The resource thread is used for determining the building model that can be drawn in the Building Objerct according to the LOD technology, loading the building model into the three-dimensional map, determining the animation area based on the LOD technology, and configuring the animation of the building in the animation area; in response to the position change operation of the virtual observation point, the picture is updated, so that the animation is played.
[0162] The rendering thread is used for rendering the building, which includes rendering the texture of the building, such as transparency and the like.
[0163] The embodiment can solve the problem of high building visual obstruction and the problem of large performance consumption of a large number of distant buildings. In addition, the animation effect of gradual appearance and disappearance standardizes the appearance and disappearance of the building, reasonably reduces the coverage area of the distant building, thereby reducing the performance consumption and weakening the problem of visual obstruction of the nearby high building.
[0164] As can be seen from the above, the embodiment of the present application can improve the image effect of the displayed three-dimensional map picture.
[0165] It can be understood that in the specific embodiments of the present application, related data such as terrain data and navigation data are involved, and when the following embodiments of the present application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0166] In order to better implement the above method, the embodiment of the present application also provides a map display device, which can be integrated in an electronic device, which can be a terminal, a server and the like. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a notebook computer, a personal computer and the like. The server can be a single server or a server cluster composed of multiple servers.
[0167] For example, in the embodiment, the map display device is integrated in the terminal, and the method of the embodiment of the present application is described in detail.
[0168] For example, as shown in Figure 3 The map display device can include a display unit 301 and a redrawing unit 302, as follows:
[0169] (1) The display unit 301 is used to display a three-dimensional map picture.
[0170] The three-dimensional map picture comprises a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map comprises a landscape model presented in a stereoscopic form.
[0171] In some embodiments, the display unit 301 is specifically configured to:
[0172] obtain a candidate model, and determine a position of the candidate model in the three-dimensional map;
[0173] determine the candidate model at the position as the landscape model if the position is within a loading range of the virtual observation point;
[0174] load the landscape model in the three-dimensional map;
[0175] draw the three-dimensional map to obtain and display a three-dimensional map picture.
[0176] (ii) a redrawing unit 302, configured to redraw the three-dimensional map picture based on modifying the opacities of the first model and the second model in response to a position change operation of the virtual observation point.
[0177] The redrawing unit 302 can make the opacity of the first model positively related to the first distance and the opacity of the second model negatively related to the second distance.
[0178] The landscape model comprises a first model at a first interval distance from the virtual observation point and a second model at a second interval distance from the virtual observation point, a maximum value of the first interval is less than a minimum value of the second interval, the first distance is a distance between the first model and the virtual observation point, and the second distance is a distance between the second model and the virtual observation point.
[0179] In some embodiments, the redrawing unit 302 is further configured to, before redrawing the picture based on modifying the opacities of the first model and the second model:
[0180] determine a distance between the landscape model and the virtual observation point;
[0181] determine the landscape model at the distance as the first model if the distance is within the first interval;
[0182] determine the landscape model at the distance as the second model if the distance is within the second interval.
[0183] In some embodiments, the position change operation comprises a zoom-in operation, and the redrawing unit 302 is specifically configured to:
[0184] increase the opacity of the first model and decrease the opacity of the second model in response to the zoom-in operation of the virtual observation point;
[0185] redraw the three-dimensional map picture based on the opacities of the first model and the second model.
[0186] In some embodiments, the position change operation comprises a moving away operation, and the redrawing unit 302 is specifically configured to:
[0187] in response to the moving away operation of the virtual observation point, lower the opacity of the second model, and raise the opacity of the second model;
[0188] redraw the three-dimensional map picture based on the opacities of the first model and the second model.
[0189] In some embodiments, when the first distance is equal to the minimum value of the first interval, the opacity of the first model is set to 0; when the first distance is equal to the maximum value of the first interval, the opacity of the first model is set to 1.
[0190] In some embodiments, when the second distance is equal to the minimum value of the second interval, the opacity of the second model is set to 1; when the second distance is equal to the maximum value of the second interval, the opacity of the second model is set to 0.
[0191] In some embodiments, the three-dimensional map further comprises a ground model, and the redrawing unit 302 is specifically configured to:
[0192] draw the ground model;
[0193] after the ground model is drawn, determine a drawing order of the landscape models based on depth information of the landscape models;
[0194] draw the landscape models according to the drawing order.
[0195] In some embodiments, drawing the landscape models according to the drawing order comprises:
[0196] drawing the second model according to the drawing order of the second model;
[0197] after the second model is drawn, drawing other models according to a drawing order of the other models, the other models being landscape models other than the first model and the second model;
[0198] after the other models are drawn, drawing the first model according to the drawing order of the first model.
[0199] In some embodiments, determining the drawing order of the landscape models based on the depth information of the landscape models comprises:
[0200] determining a to-be-drawn model in the landscape models based on a preset screening rule;
[0201] determining a drawing order of the to-be-drawn model based on depth information of the to-be-drawn model;
[0202] drawing the landscape models according to the drawing order comprises:
[0203] Drawing the to-be-drawn model according to the drawing order.
[0204] In some embodiments, the to-be-drawn model is determined in the landscape model based on a preset screening rule, including:
[0205] The to-be-drawn model is determined in the landscape model, and the to-be-drawn model is a landscape model within a field of view of a virtual observation point.
[0206] The drawing order of the to-be-drawn model is determined based on depth information of the to-be-drawn model.
[0207] In some embodiments, the to-be-drawn model is determined in the landscape model based on a preset screening rule, including:
[0208] The occlusion relationship between the to-be-drawn models is determined based on depth information of the landscape model.
[0209] The to-be-drawn model is screened from the landscape model based on the occlusion relationship.
[0210] In implementation, each of the above units can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each of the above units can refer to the method embodiments in the foregoing, which will not be described here.
[0211] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.
[0212] As can be seen from the above, the map display device of the present embodiment displays a three-dimensional map picture by the display unit, the three-dimensional map picture includes a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map includes a landscape model presented in a three-dimensional form; the redrawing unit redraws the three-dimensional map picture based on modifying the opacity of the first model and the second model in response to a position change operation of the virtual observation point, so that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance; wherein the landscape model includes a first model at a first interval distance from the virtual observation point and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval is less than the minimum value of the second interval, the first distance is the distance between the first model and the virtual observation point, and the second distance is the distance between the second model and the virtual observation point.
[0213] Therefore, the embodiment of the present application can improve the map display effect.
[0214] The present application also provides an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer, or the like; the server may be a single server or a server cluster consisting of multiple servers, or the like.
[0215] In some embodiments, the map display device can also be integrated into multiple electronic devices. For example, the map display device can be integrated into multiple servers, and the map display method of the present application can be implemented by multiple servers.
[0216] In this embodiment, the electronic device of this embodiment is a terminal as an example for detailed description, for example, Figure 4 , which shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0217] The electronic device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0218] Processor 401 is the control center of the electronic device, connecting all parts of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 402 and accessing data stored in memory 402, it performs various functions of the electronic device and processes data, thereby performing overall testing of the electronic device. In some embodiments, processor 401 may include one or more processing cores. In some embodiments, processor 401 may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401.
[0219] The memory 402 can be used to store software programs and modules, and the processor 401 can execute various function applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 402 can also include a memory controller to provide the processor 401 with access to the memory 402.
[0220] The electronic device also includes a power supply 403 for powering the various components, and in some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so that the power management system can be used to manage charging, discharging, and power consumption management, etc. The power supply 403 can also include one or more direct current or alternating current power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
[0221] The electronic device can also include an input module 404, which can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0222] The electronic device can also include a communication module 405, which in some embodiments can include a wireless module, and the electronic device can use the wireless module of the communication module 405 for short-range wireless transmission, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 can be used to help the user send and receive emails, browse web pages, and access streaming media, etc.
[0223] Although not shown, the electronic device can also include a display unit, etc., which will not be described here. In particular, in the present embodiment, the processor 401 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby implementing various functions, as follows:
[0224] Displaying a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map including a landscape model presented in a stereoscopic form;
[0225] redraw the three-dimensional map picture based on modifying the opacities of the first model and the second model in response to the position change operation of the virtual observation point, so that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance;
[0226] The landscape model includes a first model at a first interval distance from the virtual observation point and a second model at a second interval distance from the virtual observation point, a maximum value of the first interval is less than a minimum value of the second interval, the first distance is a distance between the first model and the virtual observation point, and the second distance is a distance between the second model and the virtual observation point.
[0227] The specific implementation of each operation can refer to the foregoing embodiments, which will not be described here.
[0228] As can be seen from the above, the embodiments of the present application can improve the map display effect.
[0229] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0230] To this end, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of instructions capable of being loaded by a processor to execute the steps in any one of the map display methods provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0231] display a three-dimensional map picture, the three-dimensional map picture including a picture of observing a three-dimensional map at a virtual observation point, and the three-dimensional map including a landscape model presented in a three-dimensional form;
[0232] redraw the three-dimensional map picture based on modifying the opacities of the first model and the second model in response to the position change operation of the virtual observation point, so that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance;
[0233] The landscape model includes a first model at a first interval distance from the virtual observation point and a second model at a second interval distance from the virtual observation point, a maximum value of the first interval is less than a minimum value of the second interval, the first distance is a distance between the first model and the virtual observation point, and the second distance is a distance between the second model and the virtual observation point.
[0234] The storage medium can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0235] According to an aspect of the present application, a computer program product or computer program is provided, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in any of the optional implementations of the map display aspect or the map navigation aspect provided in the above embodiments.
[0236] Due to the instructions stored in the storage medium, the steps in any of the map display methods provided in the embodiments of the present application can be executed, thus the beneficial effects of any of the map display methods provided in the embodiments of the present application can be achieved, which are described in detail in the above embodiments and will not be repeated here.
[0237] The above describes in detail a map display method, device, electronic device and computer readable storage medium provided in the embodiments of the present application, and the principles and implementation manners of the present application are described by applying specific examples; the above embodiment descriptions are only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as limiting the present application.
Claims
1. A map display method, characterized in that: include: Displaying a three-dimensional map screen, the three-dimensional map screen including a screen of observing a three-dimensional map from a virtual observation point, the three-dimensional map including a landscape model presented in a three-dimensional form; In response to the position change operation of the virtual observation point, redrawing the three-dimensional map image based on modifying the opacities of the first model and the second model so that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance; The landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval is less than the minimum value of the second interval, the first distance is the distance between the first model and the virtual observation point, and the second distance is the distance between the second model and the virtual observation point.
2. The map display method according to claim 1, wherein: Before redrawing the screen based on modifying the opacity of the first model and the second model, the method further includes: determining a distance between the landscape model and the virtual observation point; Determine the landscape model whose distance is within the first interval as the first model; The landscape model whose distance is within the second interval is determined as the second model.
3. The map display method according to claim 1, wherein: The position change operation includes a zoom-in operation, and the redrawing of the three-dimensional map image based on modifying the opacity of the first model and the second model in response to the position change operation of the virtual viewpoint includes: In response to a zoom-in operation of the virtual viewpoint, increasing the opacity of the first model and decreasing the opacity of the second model; The three-dimensional map image is redrawn based on the opacity of the first model and the second model.
4. The map display method according to claim 1, wherein: The position change operation includes a distance operation, and the redrawing of the three-dimensional map image based on modifying the opacity of the first model and the second model in response to the position change operation of the virtual viewpoint includes: In response to the virtual viewpoint moving away from the virtual viewpoint, reducing the opacity of the second model and increasing the opacity of the second model; The three-dimensional map image is redrawn based on the opacity of the first model and the second model.
5. The map display method according to any one of claims 3 or 4, characterized in that: When the first distance is equal to the minimum value of the first interval, the opacity of the first model is set to 0; when the first distance is equal to the maximum value of the first interval, the opacity of the first model is set to 1.
6. The map display method according to any one of claims 3 or 4, characterized in that: When the second distance is equal to the minimum value of the second interval, the opacity of the second model is set to 1; when the second distance is equal to the maximum value of the second interval, the opacity of the second model is set to 0.
7. The map display method according to claim 1, wherein: The three-dimensional map further includes a ground model, and redrawing the three-dimensional map image based on modifying the opacity of the first model and the second model includes: drawing the ground model; After the ground model is drawn, determining a drawing order of the landscape model based on the depth information of the landscape model; The landscape model is drawn according to the drawing order.
8. The map display method according to claim 7, wherein: Drawing the landscape model according to the drawing order includes: Drawing the second model according to the drawing order of the second model; After the second model is drawn, the other models are drawn in the order of drawing the other models, where the other models are landscape models other than the first model and the second model; After the other models are drawn, the first model is drawn according to the drawing order of the first model.
9. The map display method according to claim 7, wherein: The determining the drawing order of the landscape model based on the depth information of the landscape model includes: Based on preset screening rules, determining a model to be drawn in the landscape model; Determining a drawing order of the models to be drawn based on the depth information of the models to be drawn; Drawing the landscape model according to the drawing order includes: The model to be drawn is drawn according to the drawing order.
10. The map display method according to claim 9, wherein: The determining of the model to be drawn in the landscape model based on a preset screening rule includes: Determining a model to be drawn in the landscape model, wherein the model to be drawn is a landscape model within the field of view of the virtual observation point; A drawing order of the to-be-drawn model is determined based on the depth information of the to-be-drawn model.
11. The map display method according to claim 9, wherein: The determining of the model to be drawn in the landscape model based on a preset screening rule includes: Determining the occlusion relationship between the models to be drawn based on the depth information of the landscape model; Based on the occlusion relationship, a model to be drawn is screened from the landscape model.
12. The map display method according to claim 1, wherein: The display of the three-dimensional map screen includes: Acquire a candidate model, and determine a position of the candidate model in the three-dimensional map; determining the candidate model whose position is within the loading range of the virtual observation point as a landscape model; Loading the landscape model into the three-dimensional map; Draw the three-dimensional map, obtain and display the three-dimensional map picture.
13. A map display device, characterized in that: include: A display unit, configured to display a three-dimensional map image, wherein the three-dimensional map image includes an image of a three-dimensional map viewed from a virtual observation point, wherein the three-dimensional map includes a landscape model presented in a three-dimensional form; a redrawing unit, configured to redraw the three-dimensional map image in response to a position change operation of the virtual observation point by modifying the opacities of the first model and the second model, such that the opacity of the first model is positively correlated with the first distance and the opacity of the second model is negatively correlated with the second distance; The landscape model includes a first model at a first interval distance from the virtual observation point, and a second model at a second interval distance from the virtual observation point, the maximum value of the first interval is less than the minimum value of the second interval, the first distance is the distance between the first model and the virtual observation point, and the second distance is the distance between the second model and the virtual observation point.
14. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the map display method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the map display method according to any one of claims 1 to 12.