WO2025214029A1 - 地图展示方法、装置、电子设备和存储介质 - Google Patents

地图展示方法、装置、电子设备和存储介质

Info

Publication number
WO2025214029A1
WO2025214029A1 PCT/CN2025/081590 CN2025081590W WO2025214029A1 WO 2025214029 A1 WO2025214029 A1 WO 2025214029A1 CN 2025081590 W CN2025081590 W CN 2025081590W WO 2025214029 A1 WO2025214029 A1 WO 2025214029A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
distance
opacity
landscape
dimensional 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
PCT/CN2025/081590
Other languages
English (en)
French (fr)
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.)
Tencent Technology (Shenzhen) Co Ltd
Original Assignee
Tencent Technology (Shenzhen) 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 Tencent Technology (Shenzhen) Co Ltd filed Critical Tencent Technology (Shenzhen) Co Ltd
Publication of WO2025214029A1 publication Critical patent/WO2025214029A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00—Three-dimensional [3D] modelling for computer graphics
    • G06T17/05—Geographic models
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815—Interaction with a metaphor-based environment or interaction object displayed as three-dimensional [3D], e.g. changing the user viewpoint with respect to the environment or object
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/10—Geometric effects
    • G06T15/20—Perspective computation

Definitions

  • the present application relates to the field of computers, and in particular to a map display method, device, electronic device, and storage medium.
  • 3D mapping technology utilizes geographic information systems (GIS), computer graphics, and map-making techniques to present terrestrial geographical features in a three-dimensional form. It typically uses satellite remote sensing data to overlay various landscape models, such as buildings, trees, and vehicles, onto the terrain. This technology, combined with computer graphics techniques like rendering and texturing, produces realistic 3D maps. 3D mapping technology can be used in a variety of applications, including transportation navigation, urban planning, and resource management.
  • GIS geographic information systems
  • map-making techniques to present terrestrial geographical features in a three-dimensional form. It typically uses satellite remote sensing data to overlay various landscape models, such as buildings, trees, and vehicles, onto the terrain.
  • This technology combined with computer graphics techniques like rendering and texturing, produces realistic 3D maps.
  • 3D mapping technology can be used in a variety of applications, including transportation navigation, urban planning, and resource management.
  • 3D map display methods are relatively simple. Users observe the landscape by dragging and zooming the 3D map. As the virtual viewpoint moves, the excessive number of tall buildings often leads to poor display quality. For example, nearby tall buildings obscure the user's virtual viewpoint, while densely packed tall buildings in the distance create a poor viewing experience.
  • the present application provides a map display method, device, electronic device and storage medium.
  • the present application provides a map display method, performed by an electronic device, comprising:
  • the three-dimensional map includes a three-dimensional landscape model
  • the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model;
  • the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the present application further provides a map display device, comprising:
  • a display unit configured to display a three-dimensional map screen of a three-dimensional map viewed from a virtual observation point, wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; and
  • a redrawing unit is used to redraw the three-dimensional map screen in response to the position change operation of the virtual observation point by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the present application also provides an electronic device, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute the steps in any one of the map display methods provided in the embodiments of the present application.
  • the present application also provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the steps in any map display method provided in the embodiments of the present application.
  • the present application also provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of any map display method provided in the embodiments of the present application.
  • FIG1 is a schematic diagram showing the effect of a map display method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram showing the effect of the map display method provided in an embodiment of the present application.
  • FIG3 is a flow chart of a map display method according to an embodiment of the present application.
  • FIG4 is a schematic diagram of an interval of a map display method provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a drawing process of a map display method according to an embodiment of the present application.
  • FIG6 is a schematic diagram of the thread interaction steps of rendering applied by the map display method provided in an embodiment of the present application.
  • FIG7 is a schematic structural diagram of a map display device provided in an embodiment of the present application.
  • FIG8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • Embodiments of the present application provide a map display method, device, electronic device, and storage medium.
  • the map display device can be integrated into an electronic device, such as a terminal or a server.
  • the terminal can be a mobile phone, an in-vehicle terminal, a smart home appliance, an intelligent voice interaction device, a tablet computer, a smart Bluetooth device, a laptop computer, or a personal computer (PC).
  • the server can be a single server or a server cluster consisting of multiple servers.
  • the map display device can also be integrated into multiple electronic devices.
  • 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.
  • the server may also be implemented in the form of a terminal.
  • the electronic device may be a terminal, which may display a three-dimensional map screen of a three-dimensional map observed at a virtual observation point, wherein the three-dimensional map includes a stereoscopic landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; in response to a position change operation of the virtual observation point, the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the three-dimensional map includes
  • the electronic device can be a mobile phone, which can be equipped with a map client.
  • the map client can display a three-dimensional map screen, which includes a screen of observing the three-dimensional map from a virtual observation point, and the three-dimensional map includes buildings presented in a three-dimensional form; in response to the virtual observation point zoom-in operation of the virtual observation point, the first model in the building will change from real to virtual and finally to transparent; referring to Figure 2, in response to the virtual observation point zoom-in operation of the virtual observation point, the second model in the building will gradually change from transparent to virtual and finally to real.
  • Intelligent Traffic System also known as Intelligent Transportation System
  • Intelligent Transportation System effectively 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, strengthens the connection between vehicles, roads and users, and thus forms a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy.
  • Electronic maps are a crucial component of intelligent transportation systems. These digital maps store and process geographic information as electronic data, allowing them to be displayed and used on devices such as computers, smartphones, and tablets. Their digital, interactive, and real-time nature allows them to conveniently display and utilize geographic information, and they are widely used in various fields, including navigation, tourism, and geographic information analysis.
  • map display method involving an electronic map is provided, as shown in FIG3 .
  • the specific process of the map display method may be as follows:
  • a three-dimensional map screen of a three-dimensional map observed from a virtual observation point wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model.
  • a virtual perspective is a computer-simulated viewpoint that allows users to observe and interact in a virtual environment.
  • users can freely control the virtual perspective by moving, zooming in, zooming out, rotating, and other operations to observe a 3D map.
  • the virtual perspective point is the location of the virtual perspective, which can be represented as a point on the 3D map.
  • the first interval refers to a distance range interval.
  • the landscape model corresponding to the distance value within this interval is defined as the first model, and its maximum value is less than the minimum value of the second interval.
  • the specific value of this interval can be determined by the actual application scenario.
  • the first interval can be 0-A meters, or 0-15 meters, etc.
  • the second interval refers to a distance range interval.
  • the landscape model corresponding to the distance value within this interval is defined as the second model, and its minimum value is greater than the maximum value of the first interval.
  • the specific value of this interval can be determined by the actual application scenario.
  • the second interval can be B-infinity, or 200-400 meters, etc.
  • the landscape model may include models of the landscape located on the ground, such as building models, vegetation models, vehicle models, traffic sign models, etc.
  • the three-dimensional map may also include a ground model.
  • the ground model may include models of objects located on the ground surface, such as road network models, water body models, terrain feature models, and other area models, such as parks and squares.
  • step 310 includes the following steps: obtaining candidate models and determining the positions of the candidate models in the three-dimensional map; determining the candidate models whose positions are within the loading range of the virtual observation point as landscape models; loading the landscape model in the three-dimensional map; drawing the three-dimensional map, and obtaining and displaying the three-dimensional map screen.
  • the candidate models and their locations can be obtained from a database or memory.
  • candidate models can be determined through frustum culling, dynamic loading, level of detail (LOD), preloading, occlusion culling, and the like.
  • LOD level of detail
  • Frustum Culling is an optimization technique that calculates the viewing frustum of a virtual viewpoint and removes models outside of it, loading only those within it. This ensures that only models near the area the user is viewing are loaded, improving rendering efficiency.
  • Dynamic Loading Technology is a technology that dynamically loads models near a virtual observation point when the virtual observation point is moved or changed. By detecting movement and virtual observation point changes, 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 avoid loading unnecessary models. By detecting movement and virtual observation point changes, 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 avoid loading unnecessary models.
  • the level of detail technology reduces the rendering load by using different levels of models at different distances. For example, high-resolution models can be loaded in areas near the virtual observation point, while low-resolution models can be loaded in areas far away from the virtual observation point to maintain a balance between performance and quality.
  • Pre-loading technology preloads models near a user's virtual observation point before they move. This reduces user wait time and improves the user experience. Pre-loading can pre-load models that may be needed based on the user's current location and direction of movement.
  • the occlusion culling technology determines which objects are invisible during rendering based on the occlusion relationship between objects, and directly culls the invisible models.
  • the performance and user experience of the 3D map can be effectively improved, allowing users to browse and interact smoothly in the virtual environment.
  • the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • Position Change Operations are used to change the position of a virtual viewpoint on a 3D map, primarily including zooming in and zooming out.
  • the 3D map needs to be redrawn by modifying the opacity of the first and second models.
  • all the first models and second models in the screen can be controlled to play the preset transparent change animation at the same time.
  • all the first models in the screen can load and play the preset first transparent change animation at the same time
  • all the second models in the screen can load and play the second transparent change animation at the same time.
  • the specific animation parameters can be set according to requirements.
  • Transparency Change Animation refers to an animation used to control the opacity change of a landscape model. By loading and playing the animation, the opacity of the landscape model can be changed according to preset rules.
  • the first transparency change animation (First Transparency Change Animation) is a preset animation used to control the opacity change of the first model. For example, the opacity can be linearly changed from 1 to 0 within a preset time.
  • the second transparency change animation (Second Transparency Change Animation) is a preset animation used to control the opacity change of the second model. For example, the opacity can be linearly changed from 0 to 1 within a preset time.
  • An opacity of 1 means completely opaque, and an opacity of 0 means completely transparent.
  • each second model in the control screen may be fine-tuned according to the distance between the model and the virtual observation point.
  • step 320 may cause the opacity of the first model to be positively correlated with the first distance d1, and the opacity of the second model to be negatively correlated with the second distance d2. That is, for the first model, the smaller the first distance d1, the more transparent the first model; and for the second model, the larger the second distance d2, the more transparent the second model.
  • the distance may refer to a straight-line distance, which refers to the shortest distance between two points; in some embodiments, the distance may refer to a horizontal distance, which refers to the component of the straight-line distance along the horizontal plane.
  • the distance may refer to a horizontal distance
  • the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, the first distance d1 is the distance between the first model and the virtual observation point, and the second distance d2 is the distance between the second model and the virtual observation point.
  • the complement between the first interval and the second interval can be recorded as the middle interval, and the landscape model located in the middle interval can be recorded as the middle model.
  • the opacity of the middle model can be 1.
  • the values of the first interval and the second interval can be determined by the actual application scenario.
  • the minimum value of the first interval can be 0, and the maximum value of the second interval can be infinity; for example, in some embodiments, the first interval is 0 to A meters, the middle interval is A to B meters, and the second interval is B to infinity.
  • a third interval may also exist.
  • the third interval is a distance range interval whose minimum value is greater than the maximum value of the second interval.
  • the first interval is 0 to A meters
  • the middle interval is A to B meters
  • the second interval is B to C meters
  • the third interval is C to infinity.
  • the landscape model located in the third interval can be recorded as the third model.
  • the opacity of the third model can be 0.
  • no landscape model can be loaded in the third interval of the three-dimensional map.
  • a transparency channel may be added to the texture of the landscape model so that the transparency of the landscape model can be controlled by adjusting the texture parameters of the model.
  • a landscape model can use a texture in RGBA format, where the A channel represents transparency.
  • the value of the transparency channel is controlled according to the horizontal distance between the landscape model and the virtual observation point.
  • the three-dimensional map screen is redrawn based on the texture adjusted by the landscape model.
  • the texture in RGBA format is a color encoding method used to represent the texture of an image or model, where R represents red, G represents green, and B represents blue. These three channels together determine the basic hue of the color;
  • A represents the transparency (Alpha) channel, which is used to control the degree of transparency of the texture part.
  • the landscape model can use a texture in RGBA format and control the transparency of the landscape model by adjusting the value of the A channel.
  • the method may further include: determining the distance between the landscape model and the virtual observation point; determining the landscape model whose distance is within a first interval as the first model; and determining the landscape model whose distance is within a second interval as the second model.
  • the position change operation may include a zoom-in operation.
  • the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the steps may include: in response to the zoom-in operation of the virtual observation point, increasing the opacity of the second model and reducing the opacity of the first model; and redrawing the three-dimensional map screen based on the opacity of the first model and the second model.
  • the opacity of the second model is increased and the opacity of the first model is decreased by playing a preset transparency animation.
  • the opacity of the first model is reduced by a reduction amount calculated by a first distance
  • the opacity of the second model is increased by a reduction amount calculated by a second distance
  • the position change operation may include a moving away operation.
  • the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the steps may include: in response to the moving away operation of the virtual observation point, reducing the opacity of the second model and increasing the opacity of the first model; and redrawing the three-dimensional map screen based on the opacities of the first model and the second model.
  • the opacity of the second model is reduced and the opacity of the first model is increased by playing a preset transparency animation.
  • the opacity of the first model is increased by an amount calculated based on a first distance
  • the opacity of the second model is decreased by an amount calculated based on a second distance
  • the opacity of the first model 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.
  • the opacity is already 0, the opacity is no longer reduced, and when the opacity is already 1, the opacity is no longer increased.
  • the three-dimensional map may also include a ground model.
  • the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the following steps may be included: drawing the ground model; after the ground model is drawn, determining the drawing order of the landscape model based on the depth information of the landscape model; and drawing the landscape model according to the drawing order.
  • the depth information determines which elements in the image are in the foreground and which are in the background, thereby generating an image with a sense of depth.
  • a depth buffer (Depth Buffer) or a Z-buffer (Z-buffer) can be used to store the depth information of each pixel of the landscape model. Before the pixels are shaded, a depth test can be performed based on the depth information to determine which pixels should be drawn in the foreground and which should be occluded.
  • Depth testing is a test operation that determines which pixels should be drawn in the foreground and which should be occluded based on the depth information of each pixel of the landscape model stored in the depth buffer (Depth Buffer) or the Z-buffer before the pixels are shaded.
  • drawing the landscape models in the drawing order may include the following steps: drawing the second model in the drawing order of the second model; after the second model is drawn, drawing the other models in the drawing order of 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, drawing the first model in the drawing order of the first model.
  • determining the drawing order of the landscape model based on the depth information of the landscape model may include the following steps: determining the models to be drawn within the landscape model based on preset filtering rules; determining the drawing order of the models to be drawn based on the depth information of the models to be drawn; and drawing the landscape model according to the drawing order may include the following steps: drawing the models to be drawn according to the drawing order.
  • Models to be drawn are models that are identified from the landscape model based on pre-defined screening rules and need to be drawn. These include landscape models within the field of view of a virtual viewpoint or unobstructed landscape models selected based on occlusion relationships.
  • determining the model to be drawn in the landscape model may include the following steps: determining the model to be drawn in the landscape model, where the model to be drawn is the landscape model within the field of view of the virtual observation point; and determining the drawing order of the model to be drawn based on depth information of the model to be drawn.
  • determining the models to be drawn in the landscape model may include the following steps: determining the occlusion relationship between the models to be drawn based on depth information of the landscape model; and screening the models to be drawn from the landscape model based on the occlusion relationship.
  • the embodiment of the present application can display a three-dimensional map screen for observing a three-dimensional map from a virtual observation point, wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; in response to the position change operation of the virtual observation point, the three-dimensional map screen is redrawn by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance, so that the opac
  • a disappearance animation is pre-set, which can gradually reduce the opacity from 1 to 0 within 1 second; and an appearance animation is pre-set, which can gradually increase the opacity from 0 to 1 within 1 second.
  • Appearance Animation is a pre-set animation that gradually increases the opacity from 0 to 1 over a specified time period, creating a visual effect where the landscape model transitions from virtual to solid, and then fully appears.
  • Disappearance Animation is a pre-set animation that gradually decreases the opacity from 1 to 0 over a specified time period, creating a visual effect where the landscape model transitions from solid to virtual, and then disappears.
  • the opacity value of the animation setting can be set arbitrarily according to actual needs.
  • the animation area can include a first area and a second area.
  • the first area is the area within a first distance from the virtual observation point
  • the second area is the area within a second distance from the virtual observation point.
  • the animation area is the area within a specific distance from the virtual observation point.
  • the landscape model within this area will be animated and play animations.
  • the first area is part of the animation area, within the first interval from the virtual observation point.
  • the landscape model within this area is determined as the first model, and the corresponding appearance and disappearance animation of the first model is loaded.
  • the second area is part of the animation area, within the second interval from the virtual observation point.
  • the landscape model within this area is determined as the second model, and the corresponding appearance and disappearance animation of the second model is loaded.
  • the first interval may be 0 to 15 meters, and the second interval may be 200 to 400 meters.
  • the rendering thread clips the building tiles that need to be displayed.
  • Tile refers to the small block elements used to build models.
  • 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, invisible building tiles can also be clipped to reduce unnecessary rendering operations.
  • Building Tiles are a type of tile, small elements used to construct building models. They are loaded when a building is loaded. Building Objects are model objects that represent buildings. They are loaded when a building is loaded. The resource thread uses Level of Detail (LOD) technology to determine which building models can be drawn. Map Models are the models of 3D maps.
  • LOD Level of Detail
  • the landscape model with a distance within the first interval is determined as the first model
  • the landscape model with a distance within the second interval is determined as the second model
  • the appearance and disappearance animation corresponding to the first model can be loaded
  • the appearance and disappearance animation corresponding to the second model can be loaded.
  • the first model plays a disappearing animation
  • the second model plays an appearing animation
  • the second model plays a disappearing animation
  • the first model plays an appearing animation
  • FIG. 6 illustrates the interactive steps involved in rendering.
  • the Building Manager manages and configures building model parameters, and the Building Object represents the building model.
  • the Building Manager manages and configures building model parameters, playing a role in the interactive rendering process.
  • the resource thread is used to determine the building models that can be drawn in the Building Object based on the LOD technology, load them into the three-dimensional map, and then determine the animation area based on the LOD technology to animate the buildings in the animation area; in response to the position change of the virtual observation point, the screen is updated to play the animation.
  • the rendering thread is used to render buildings, including rendering the textures of the buildings, such as transparency.
  • This embodiment addresses the issue of high-rise buildings blocking the view, as well as the high performance consumption caused by a large number of distant buildings. Furthermore, a fade-in/fade-out animation effect standardizes the appearance and disappearance of buildings, effectively reducing the area covered by distant buildings, thereby reducing performance consumption and mitigating the problem of nearby tall buildings obstructing the view.
  • the embodiment of the present application can improve the image effect of the displayed three-dimensional map screen.
  • the present application also provides a map display device.
  • the map display device can be integrated into an electronic device, such as a terminal or a server.
  • the terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.
  • the server can be a single server or a server cluster consisting of multiple servers.
  • the map display device may include a display unit 701 and a redrawing unit 702 as follows:
  • Display unit 701 used to display a three-dimensional map image.
  • the three-dimensional map includes a three-dimensional landscape model, which includes a first model at a first distance from the virtual observation point and a second model at a second distance from the virtual observation point.
  • the first distance is within a first interval
  • the second distance is within a second interval
  • the maximum value of the first interval is less than the minimum value of the second interval
  • the three-dimensional map screen includes a first model image of the first model and a second model image of the second model.
  • the display unit 701 is specifically used to: obtain candidate models and determine the positions of the candidate models in the three-dimensional map; determine the candidate models whose positions are within the loading range of the virtual observation point as landscape models; load the landscape models in the three-dimensional map; draw the three-dimensional map, and obtain and display the three-dimensional map image.
  • a redrawing unit 702 which is used to redraw the three-dimensional map image in response to the position change operation of the virtual observation point by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map image is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • the redrawing unit 702 before redrawing the three-dimensional map image by modifying the opacity of the first model and the second model, is further configured to: determine the distance between the landscape model and the virtual observation point; determine the landscape model whose distance is within a first interval as the first model; and determine the landscape model whose distance is within a second interval as the second model.
  • the position change operation includes a zoom-in operation
  • the redrawing unit 702 is specifically used to: increase the opacity of the second model and reduce the opacity of the first model in response to the zoom-in operation of the virtual observation point; and redraw the three-dimensional map screen based on the opacity of the first model and the second model.
  • the position change operation includes a moving away operation
  • the redrawing unit 702 is specifically used to: reduce the opacity of the second model and increase the opacity of the first model in response to the moving away operation of the virtual observation point; and redraw the three-dimensional map screen based on the opacity of the first model and the second model.
  • the opacity of the first model 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.
  • the opacity of the second model 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.
  • the three-dimensional map also includes a ground model
  • the redrawing unit 702 is specifically used to: draw the ground model; after drawing the ground model, determine the drawing order of the landscape model based on the depth information of the landscape model; and draw the landscape model according to the drawing order.
  • drawing the landscape models in a drawing order includes: drawing the second model in a drawing order of the second model; after the second model is drawn, drawing the other models in a drawing order of 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, drawing the first model in a drawing order of the first model.
  • determining a drawing order of the landscape model based on depth information of the landscape model includes: determining models to be drawn in the landscape model based on preset screening rules; determining a drawing order of the models to be drawn based on the depth information of the models to be drawn; and drawing the landscape model according to the drawing order includes: drawing the models to be drawn according to the drawing order.
  • determining the models to be drawn in the landscape model includes: determining the models to be drawn in the landscape model, where the models to be drawn are the landscape models within the field of view of the virtual observation point; and determining the drawing order of the models to be drawn based on depth information of the models to be drawn.
  • determining the models to be drawn in the landscape model based on preset screening rules includes: determining occlusion relationships between the models to be drawn based on depth information of the landscape model; and screening the models to be drawn from the landscape model based on the occlusion relationships.
  • the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities.
  • the specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
  • module refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof.
  • a processor or multiple processors or memories
  • each module or unit can be part of an overall module or unit that includes the function of the module or unit.
  • the map display device of this embodiment displays a three-dimensional map screen of the three-dimensional map observed at a virtual observation point by a display unit, wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; the redrawing unit responds to the position change operation of the virtual observation point and redraws the three-dimensional map screen by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn three-dimensional map screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second
  • the embodiment of the present application can improve the map display effect.
  • 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.
  • the map display device can also be integrated into multiple electronic devices.
  • 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.
  • the electronic device of this embodiment is a terminal as an example for detailed description.
  • FIG8 it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application. Specifically:
  • the electronic device may include components such as one or more processing core processors 801, one or more computer-readable storage media memories 802, a power supply 803, an input module 804, and a communication module 805.
  • processing core processors 801 one or more computer-readable storage media memories 802
  • power supply 803 an input module 804
  • FIG8 the electronic device structure shown in FIG8 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
  • the processor 801 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 the memory 802 and accessing data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby performing overall testing of the electronic device.
  • the processor 801 may include one or more processing cores.
  • the processor 801 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 the processor 801.
  • the memory 802 can be used to store software programs and modules.
  • the processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802.
  • the memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc.
  • the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
  • the electronic device also includes a power supply 803 for supplying power to various components.
  • the power supply 803 can be logically connected to the processor 801 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption.
  • the power supply 803 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
  • the electronic device may further include an input module 804, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input module 804 may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the electronic device may also include a communication module 805.
  • the communication module 805 may include a wireless module.
  • the electronic device may perform short-range wireless transmission via the wireless module of the communication module 805, thereby providing the user with wireless broadband Internet access.
  • the communication module 805 may be used to help the user send and receive emails, browse web pages, and access streaming media.
  • the electronic device may further include a display unit, etc., which will not be described in detail here.
  • the processor 801 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802 to implement various functions, as follows: displaying a three-dimensional map screen of a three-dimensional map observed at a virtual observation point, wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; in response to the position change operation of the virtual observation point, redrawing the three-dimensional
  • an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the map display methods provided in the embodiments of the present application.
  • the instructions can execute the following steps: displaying a three-dimensional map screen of a three-dimensional map observed from a virtual observation point, wherein the three-dimensional map includes a three-dimensional landscape model, the landscape model includes a first model at a first distance from the virtual observation point, and a second model at a second distance from the virtual observation point, the first distance is within a first interval, the second distance is within a second interval, the maximum value of the first interval is less than the minimum value of the second interval, and the three-dimensional map screen includes a first model image of the first model and a second model image of the second model; in response to the position change operation of the virtual observation point, redrawing the three-dimensional map screen by modifying the opacity of the first model and the second model, so
  • the storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.
  • a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium.
  • a processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the map display aspects provided in the above-described embodiments.
  • the map display method, device, electronic device, storage medium and computer program product provided by the present application first display a picture of a three-dimensional map observed at a virtual observation point.
  • the three-dimensional map has a three-dimensional landscape model, which includes a first model and a second model at different distances from the virtual observation point, and the maximum value of the first interval is less than the minimum value of the second interval, and the images corresponding to the two models are on the screen.
  • the electronic device redraws the three-dimensional map screen by modifying the opacity of the first model and the second model, so that the opacity of the first model image in the redrawn screen is positively correlated with the first distance, and the opacity of the second model image is negatively correlated with the second distance.
  • This can improve the problem of poor display effect of the three-dimensional map due to too many high-rise buildings.
  • the transparency of nearby high-rise buildings increases as they get closer to the virtual observation point, and will not block the user's observation of other buildings.
  • the opacity of distant high-rise buildings decreases as they get farther away from the virtual observation point, weakening the perception of overly dense high-rise buildings in the distance and improving the display effect of the three-dimensional map screen.
  • the distance between the landscape model and the virtual observation point is first determined.
  • Landscape models within the first distance interval are then designated as the first model, while those within the second distance interval are designated as the second model.
  • This step clarifies the method for determining the first and second models, facilitating subsequent precise adjustment of opacity based on the distance between the model and the virtual observation point, further improving the accuracy of the 3D map display.
  • the electronic device When the position change operation is a zoom-in operation, the electronic device responds to this operation by increasing the opacity of the second model and decreasing the opacity of the first model. The 3D map is then redrawn based on the adjusted opacity.
  • This processing of the zoom-in operation follows the logic that the closer the first model is to the virtual observation point, the more transparent it is, and the closer the second model is to the virtual observation point, the more obvious it is. This optimizes the visual effect when the user zooms in, avoids obstruction by nearby high-rise buildings, and enhances the display effect of distant high-rise buildings.
  • the electronic device When the position change operation is a distance operation, the electronic device responds by reducing the opacity of the second model and increasing the opacity of the first model. It then redraws the 3D map based on the adjusted opacity. This aligns with the logic that the further away the first model is from the virtual observation point, the more visible it becomes, while the further away the second model is from the virtual observation point, the more transparent it becomes. This optimizes the visual effect when the user is looking away, making the display more in line with the user's observation needs.
  • the first model's opacity When the first distance is equal to the minimum value of the first interval, the first model's opacity is set to 0; when the first distance is equal to the maximum value of the first interval, the first model's opacity is set to 1. This clarifies the opacity setting of the first model at specific distances, making the positive correlation between the first model's opacity and distance more specific, further precisely optimizing the display effect of the first model at different distances and improving the accuracy of the screen display.
  • the second model's opacity When the second distance is equal to the minimum value of the second interval, the second model's opacity is set to 1; when the second distance is equal to the maximum value of the second interval, the second model's opacity is set to 0.
  • This setting clarifies the opacity of the second model at specific distances, making the negative correlation between the second model's opacity and distance more clear, further optimizing the display of the second model at different distances and improving the accuracy of the screen display.
  • the 3D map also includes a ground model
  • the ground model is drawn first.
  • the landscape model drawing order is determined based on the depth information of the landscape model, and the landscape models are drawn in that order. This ensures the correct order of drawing the ground model and the landscape model, as well as the order of drawing each other within the landscape model. Combined with depth information, it accurately presents the occlusion relationships between the landscape models, improving drawing efficiency and the realism of the displayed image.
  • the second model is drawn first, following the order in which the second model is drawn.
  • the remaining landscape models except for the first and second models, are drawn in the order in which the other models are drawn.
  • the first model is drawn in the order in which the first model is drawn.
  • the model to be drawn is first determined within the landscape model according to preset filtering rules.
  • the model's drawing order is then determined based on its depth information, and the models are finally drawn in this order. This process further optimizes the rendering process, reduces computing resource consumption, and improves both drawing efficiency and visual quality by filtering the models to be drawn and eliminating those that do not affect the display.
  • the landscape models within the virtual viewpoint's field of view are identified as models to be drawn.
  • the drawing order is then determined based on the depth information of these models to be drawn. This ensures that only models within the user's field of view are drawn, improving rendering efficiency, avoiding unnecessary waste of computing resources, and enhancing the visual presentation.
  • the occlusion relationships between models to be drawn are first determined based on the depth information of the landscape model. These occlusion relationships are then used to filter models from the landscape model. This method of filtering models based on occlusion relationships can further optimize rendering, avoid drawing occluded models, reduce computing resource consumption, and improve visual quality.
  • candidate models When displaying a 3D map, candidate models are first obtained and their positions within the 3D map are determined. Candidate models within the loading range of the virtual observation point are identified as landscape models. These landscape models are then loaded into the 3D map and the 3D map is drawn, resulting in the display of the 3D map. This process reduces system computation and network transmission burdens by loading only models near the virtual observation point, ensuring smooth display and improving the user experience.
  • preset transparency animations can be simultaneously played for all primary and secondary models on the screen, further reducing computing resource consumption and improving smoothness.
  • Transparency can be controlled by adding a transparency channel to the landscape model texture.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种地图展示方法,由电子设备执行,包括:展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像(310);及响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中所述第一模型图像的不透明度与所述第一距离正相关、且所述第二模型图像的不透明度与所述第二距离负相关(320)。

Description

地图展示方法、装置、电子设备和存储介质
相关申请
本申请要求2024年04月09日申请的,申请号为202410424332.6,名称为“地图展示方法、装置、电子设备和存储介质”的中国专利申请的优先权,在此将其全文引入作为参考。
技术领域
本申请涉及计算机领域,具体涉及一种地图展示方法、装置、电子设备和存储介质。
背景技术
三维地图技术是一种利用地理信息系统(GIS)、计算机图形学和地图制作技术,将地面的地理特征以立体的形式呈现出来的技术。它通常利用卫星遥感数据将建筑物、树木、车辆等多种景观模型加载在地形中,结合计算机图形学中的渲染、纹理等技术,生成逼真的三维地图。三维地图技术可以用于交通导航、城市规划、资源管理等多种应用领域中。
然而,目前的三维地图展示方法较为单一,用户通过拖动、缩放三维地图来观察地图中的景观。随着虚拟观察点移动,往往会出现因高楼过多导致展示效果不佳的问题,例如近处高楼遮挡用户虚拟观察点、远处密集高楼观感不佳等问题。
发明内容
本申请提供一种地图展示方法、装置、电子设备和存储介质。
第一方面,本申请提供一种地图展示方法,由电子设备执行,包括:
展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像;及
响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中所述第一模型图像的不透明度与所述第一距离正相关、且所述第二模型图像的不透明度与所述第二距离负相关。
第二方面,本申请还提供一种地图展示装置,包括:
展示单元,用于展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像;及
重绘制单元,用于响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中所述第一模型图像的不透明度与所述第一距离正相关、且所述第二模型图像的不透明度与所述第二距离负相关。
第三方面,本申请还提供一种电子设备,包括存储器存储有多条指令;所述处理器从所述存储器中加载指令,以执行本申请实施例所提供的任一种地图展示方法中的步骤。
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有多条指令,所述指令适于处理器进行加载,以执行本申请实施例所提供的任一种地图展示方法中的步骤。
第五方面,本申请还提供一种计算机程序产品,包括计算机指令,所述计算机指令被处理器执行时实现本申请实施例所提供的任一种地图展示方法中的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。
图1是本申请实施例提供的地图展示方法的效果示意图;
图2是本申请实施例提供的地图展示方法的效果示意图;
图3是本申请实施例提供的地图展示方法的流程示意图;
图4是本申请实施例提供的地图展示方法的区间示意图;
图5是本申请实施例提供的地图展示方法应用的绘制流程示意图;
图6是本申请实施例提供的地图展示方法应用的渲染的线程交互步骤示意图;
图7是本申请实施例提供的地图展示装置的结构示意图;
图8是本申请实施例提供的电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供一种地图展示方法、装置、电子设备和存储介质。
其中,该地图展示装置具体可以集成在电子设备中,该电子设备可以为终端、服务器等设备。其中,终端可以为手机、车载终端、智能家电、智能语音交互设备、平板电脑、智能蓝牙设备、笔记本电脑、或者个人电脑(Personal Computer,PC)等设备;服务器可以是单一服务器,也可以是由多个服务器组成的服务器集群。
在一些实施例中,该地图展示装置还可以集成在多个电子设备中,比如,地图展示装置可以集成在多个服务器中,由多个服务器来实现本申请的地图展示方法。
在一些实施例中,服务器也可以以终端的形式来实现。
例如,该电子设备可以是终端,该终端可以展示在虚拟观察点观察三维地图的三维地图画面,其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像;响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
例如,该电子设备可以是手机,该手机中可以搭载地图客户端,参考图1,该地图客户端可以展示三维地图画面,三维地图画面包括在虚拟观察点观察三维地图的画面,三维地图包括以立体形式呈现的建筑物;响应于虚拟观察点的虚拟观察点拉近操作,建筑物中的第一模型会由实变虚直至透明;参考图2,响应于虚拟观察点的虚拟观察点拉近操作,建筑物中的第二模型会从透明逐渐由虚变实。
以下分别进行详细说明。需说明的是,以下实施例的序号不作为对实施例优选顺序的限定。
智能交通系统(Intelligent Traffic System,ITS)又称智能运输系统(Intelligent Transportation System),是将先进的科学技术(信息技术、计算机技术、数据通信技术、传感器技术、电子控制技术、自动控制理论、运筹学、人工智能等)有效地综合运用于交通运输、服务控制和车辆制造,加强车辆、道路、使用者三者之间的联系,从而形成一种保障安全、提高效率、改善环境、节约能源的综合运输系统。
其中,电子地图是智能交通系统中重要的一部分,是以数字形式存在的地图,它将地理信息以电子数据的形式存储和处理,可以在计算机、智能手机、平板电脑等设备上显示和使用。电子地图通过数字化、互动性和实时性等特点,为用户提供了方便快捷的地理信息展示和应用服务,广泛应用于导航、旅游、地理信息分析等各个领域。
在本实施例中,提供了一种涉及电子地图的地图展示方法,如图3所示,该地图展示方法的具体流程可以如下:
310、展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像。
虚拟视角指通过计算机技术模拟出的一种虚拟视角,使用户可以在虚拟环境中观察和交互。在一些实施例中,用户可以通过移动、缩小、放大、旋转等操作来控制虚拟视角自由地观察三维地图。其中,虚拟观察点为虚拟视角所处的位置,该位置可以在三维地图中表现为一个点。
第一区间(First Interval)是指一个距离范围区间,该区间内的距离值对应的景观模型被定义为第一模型,其最大值小于第二区间的最小值,该区间的具体数值可由实际应用场景确定,例如在某些实施例中第一区间可以为0-A米,也可以为0-15米等。
第二区间(Second Interval)是指一个距离范围区间,该区间内的距离值对应的景观模型被定义为第二模型,其最小值大于第一区间的最大值,该区间的具体数值可由实际应用场景确定,例如在某些实施例中第二区间可以为B-无穷远,也可以为200-400米等。
其中,景观模型可以包括位于地面上的景观的模型,如建筑物模型、植被模型、车辆模型、交通标识模型等等。在一些实施例中,三维地图中除了上述景观模型,还可以包括地面模型,该地面模型可以包括道路网络模型、水体模型、地形特征模型等位于地面表面的物体模型,如公园、广场等区域模型。
在一些实施例中,为了降低计算资源的消耗,保证展示的流畅性,可以仅加载虚拟观察点附近的模型,减少系统的计算和网络传输负担,同时确保用户始终看到附近的景物,因此步骤310包括如下步骤:获取候选模型,以及确定候选模型在三维地图中所处的位置;将位置处于虚拟观察点的加载范围内的候选模型确定为景观模型;在三维地图中加载景观模型;绘制三维地图,得到并展示三维地图画面。
其中,可以从数据库或者内存中获取候选模型及其所处的位置。
其中,加载范围可以根据需求设定。在一些实施例中,可以通过视锥体裁剪(Frustum Culling)技术、动态加载技术、细节层次(Level of Detail,LOD)技术、预加载技术、遮挡剔除(Occlusion Culling)等来确定候选模型。
其中,锥体裁剪(Frustum Culling)是一种优化技术,通过计算虚拟观察点的视锥体,将位于视锥体之外的模型剔除掉,只加载视锥体内部的模型。这样可以确保只加载用户正在观察的区域附近的模型,从而提高了渲染效率。
动态加载技术(Dynamic Loading Technology)是一种在移动或者改变虚拟观察点时,动态加载虚拟观察点附近的模型的技术。通过检测移动和虚拟观察点变化,系统可以实时地加载或者卸载虚拟观察点附近的模型,以保持用户始终看到最新的景物,并避免加载不必要的模型。通过检测移动和虚拟观察点变化,系统可以实时地加载或者卸载虚拟观察点附近的模型,以保持用户始终看到最新的景物,并避免加载不必要的模型。
其中,细节层次技术通过在不同距离下使用不同级别的模型来减少渲染负载。比如,在虚拟观察点附近的区域可以加载高分辨率的模型,而在远离虚拟观察点的区域则加载低分辨率的模型,以保持性能和质量的平衡。
预加载技术(Pre-loading Technology)是指在用户移动之前,预先加载虚拟观察点附近的模型的技术。通过预加载,可以减少用户等待时间,提高用户体验。预加载可以根据用户当前的位置和移动方向,提前加载可能需要的模型。
其中,遮挡剔除技术根据物体之间的遮挡关系来确定哪些物体在渲染时是不可见的,对于不可见的模型直接剔除。
通过以上优化策略,可以有效地提高三维地图的性能和用户体验,使用户在虚拟环境中可以流畅地浏览和交互。
320、响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
位置变化操作(Position Change Operation)是指用于改变虚拟观察点在三维地图中位置的操作,主要包括拉近操作和远离操作。当发生位置变化操作时,需要通过修改第一模型与第二模型的不透明度重新绘制三维地图画面。
在一些实施例中,为了进一步降低计算资源的消耗,提高流畅度,可以控制画面中所有的第一模型与第二模型同时播放预设的透明变化动画,例如,画面中所有的第一模型可以加载并同时播放预设的第一透明变化动画,画面中所有的第二模型可以加载并同时播放第二透明变化动画,其具体的动画参数可以根据需求设置。
透明变化动画(Transparency Change Animation)是指用于控制景观模型不透明度变化的动画,通过加载和播放该动画可以实现景观模型不透明度按照预设规则进行改变。
第一透明变化动画(First Transparency Change Animation)是指用于控制第一模型不透明度变化的预设动画,例如可以为预设时间内不透明度线性地由1变为0。第二透明变化动画(Second Transparency Change Animation)是指用于控制第二模型不透明度变化的预设动画,例如可以为预设时间内不透明度线性地由0变为1。
其中,不透明度为1则表示完全不透明,不透明度为0则表示完全透明。
在一些实施例中,为了使得视觉效果更加精准、细节,也可以根据控制画面中每个的第一模型、每个第二模型与虚拟观察点之间的距离,微调其不透明度。
例如,参考图4,步骤320可以使得第一模型的不透明度与第一距离d1正相关、第二模型的不透明度与第二距离d2负相关。即对于第一模型,第一距离d1越小该第一模型越透明;对于第二模型,第二距离d2越大该第二模型越透明。
在一些实施例中,距离可以指直线距离,直线距离是指两点之间的最短距离;在一些实施例中,距离可以指水平距离,水平距离指直线距离沿水平面的分量。
例如,距离可以指水平距离,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,第一距离d1为第一模型与虚拟观察点的距离,第二距离d2为第二模型与虚拟观察点的距离。
其中,第一区间与第二区间之间的补集可以记作中间区间,位于中间区间内的景观模型可以记作中间模型。在一些实施例中,中间模型的不透明度可以为1。
在一些实施例中,第一区间与第二区间的数值可由实际应用场景确定。例如,在一些实施例中,第一区间的最小值可以为0,第二区间的最大值可以为无穷远;例如,在一些实施例中,第一区间为0~A米,中间区间为A~B米,第二区间为B~无穷远。
在一些实施例中,还可以存在第三区间,第三区间(Third Interval)是指最小值大于第二区间最大值的一个距离范围区间。例如,在一些实施例中,第一区间为0~A米,中间区间为A~B米,第二区间为B~C米,第三区间为C~无穷远。
在一些实施例中,位于第三区间内的景观模型可以记作第三模型,在一些实施例中,第三模型的不透明度可以为0;在一些实施例中,为了进一步降低计算资源的消耗,三维地图的第三区间内可以不加载任何景观模型。
在一些实施例中,可以通过在景观模型的纹理中添加透明度通道,使得通过调整模型的纹理参数来控制景观模型的透明度。
例如,景观模型可以使用RGBA格式的纹理,其中A通道表示透明度,根据景观模型与虚拟观察点之间的水平距离,控制透明度通道的数值大小,在调整完成后,基于景观模型调整后的纹理重新绘制三维地图画面。RGBA格式的纹理是一种用于表示图像或模型纹理的颜色编码方式,其中R代表红色(Red)、G代表绿色(Green)、B代表蓝色(Blue),这三个通道共同决定了颜色的基本色调;A代表透明度(Alpha)通道,用于控制该纹理部分的透明程度。在本申请中,景观模型可使用RGBA格式的纹理,通过调整A通道的数值来控制景观模型的透明度。
因此,在一些实施例中,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面之前,还可以包括:确定景观模型与虚拟观察点之间的距离;将距离处于第一区间内的景观模型确定为第一模型;将距离处于第二区间内的景观模型确定为第二模型。
在一些实施例中,位置变化操作可以包括拉近操作,响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关可以包括如下步骤:响应于虚拟观察点的拉近操作,提高第二模型的不透明度,以及降低第一模型的不透明度;基于第一模型与第二模型的不透明度,重新绘制三维地图画面。
比如,响应于虚拟观察点的拉近操作,通过播放预设的透明度动画的方式提高第二模型的不透明度,以及降低第一模型的不透明度。
比如,响应于虚拟观察点的拉近操作,通过第一距离来计算降低量的方式降低第一模型的不透明度,以及通过第二距离来计算提高量的方式来提高第二模型的不透明度。
类似地,在一些实施例中,位置变化操作可以包括远离操作,响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关可以包括如下步骤:响应于虚拟观察点的远离操作,降低第二模型的不透明度,以及提高第一模型的不透明度;基于第一模型与第二模型的不透明度,重新绘制三维地图画面。
比如,响应于虚拟观察点的远离操作,通过播放预设的透明度动画的方式降低第二模型的不透明度,以及提高第一模型的不透明度。
比如,响应于虚拟观察点的远离操作,通过第一距离来计算提高量的方式提高第一模型的不透明度,以及通过第二距离来计算降低量的方式来降低第二模型的不透明度。
当通过第一距离、第二距离来微调模型的不透明度时,在一些实施例中,当第一距离等于第一区间的最小值时,设置第一模型的不透明度为0;当第一距离等于第一区间的最大值时,设置第一模型的不透明度为1;在一些实施例中,当第二距离等于第二区间的最小值时,设置第二模型的不透明度为1;当第二距离等于第二区间的最大值时,设置第二模型的不透明度为0。当不透明度已经为0时,则不再降低不透明度,当不透明度已经为1时,则不再提高不透明度。
在一些实施例中,三维地图还可以包括地面模型,为了提高绘制效率,同时保证景观模型之间的遮挡关系正确,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关可以包括如下步骤:绘制地面模型;在绘制地面模型完毕后,基于景观模型的深度信息,确定景观模型的绘制顺序;按照绘制顺序对景观模型进行绘制。
其中,深度信息决定了在图像中哪些元素位于前景,哪些位于背景,从而生成具有深度感的图像。在一些实施例中,可以采用深度缓冲(Depth Buffer)或者Z缓冲(Z-buffer)来存储景观模型每个像素的深度信息,在像素着色之前,可以根据深度信息进行深度测试,以确定哪些像素应该被绘制在前景,哪些应该被遮挡。深度测试(Depth Testing)是在像素着色之前,根据深度缓冲(Depth Buffer)或Z缓冲(Z-buffer)中存储的景观模型每个像素的深度信息,确定哪些像素应该被绘制在前景,哪些应该被遮挡的测试操作。
在一些实施例中,为了进一步提高绘制效率、降低计算资源的消耗,可以分批次地对第一模型、第二模型以及其他的景观模型进行绘制,因此,按照绘制顺序对景观模型进行绘制可以包括如下步骤:按照第二模型的绘制顺序对第二模型进行绘制;在第二模型绘制完毕后,按照其他模型的绘制顺序对其他模型进行绘制,其他模型为除第一模型与第二模型以外其他的景观模型;在其他模型绘制完毕后,按照第一模型的绘制顺序对第一模型进行绘制。
在一些实施例中,为了进一步优化渲染过程,降低计算资源消耗,可以通过视锥体裁剪技术、动态加载技术、细节层次技术、预加载技术来在景观模型中确定待绘制模型,剔除不影响展示效果的景观模型。因此,基于景观模型的深度信息,确定景观模型的绘制顺序可以包括如下步骤:基于预设的筛选规则,在景观模型中确定待绘制模型;基于待绘制模型的深度信息,确定待绘制模型的绘制顺序;按照绘制顺序对景观模型进行绘制可以包括如下步骤:按照绘制顺序对待绘制模型进行绘制。
筛选规则(Screening Rule)是用于在景观模型中确定待绘制模型的规则,可采用视锥体裁剪技术、遮挡剔除技术等确定。待绘制模型(Models to be Drawn)是指根据预设的筛选规则从景观模型中确定出来的、需要进行绘制的模型,例如虚拟观察点视野内的景观模型,或者根据遮挡关系筛选出的未被遮挡的景观模型。
例如,在一些实施例中,采用锥体裁剪技术,基于预设的筛选规则,在景观模型中确定待绘制模型可以包括如下步骤:在景观模型中确定待绘制模型,待绘制模型为虚拟观察点视野内的景观模型;基于待绘制模型的深度信息,确定待绘制模型的绘制顺序。
例如,在一些实施例中,采用遮挡剔除技术,基于预设的筛选规则,在景观模型中确定待绘制模型可以包括如下步骤:基于景观模型的深度信息,确定待绘制模型之间的遮挡关系;基于遮挡关系,从景观模型中筛选出待绘制模型。
由上可知,本申请实施例可以展示在虚拟观察点观察三维地图的三维地图画面,其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像;响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关,使得第一模型的不透明度与第一距离正相关、第二模型的不透明度与第二距离负相关。在本申请实施例中提出的地图画面中,对于位于近处的景观,即第一模型,其越接近虚拟观察点越透明,越远离虚拟观察点越明显;对于位于远处的景观,即第二模型,其越接近虚拟观察点越明显,越远离虚拟观察点越透明。因此,越近的高楼不透明度越低,因此不会遮挡用户观察其他建筑;远处的高楼不透明度较高,可以弱化远处高楼过于密集的观感。由此,本方案可以提升所展示三维地图画面的图像效果。
根据上述实施例所描述的方法,以下将作进一步详细说明。
首先,预先设置消失动画,该消失动画可以在1秒内逐渐将不透明度从1降为0;预先设置出现动画,该出现动画可以在1秒内逐渐将不透明度从0提高为1。
出现动画(Appearance Animation)是预先设置的动画,可在一定时间内逐渐将不透明度从0提高为1,用于实现景观模型由虚到实直至完全显现的视觉效果。消失动画(Disappearance Animation)是预先设置的动画,可在一定时间内逐渐将不透明度从1降为0,用于实现景观模型由实到虚直至消失的视觉效果。
参考图1,当观察点拉近时,近处的建筑物加载并播放消失动画,从而实现由实到虚直至消失的视觉效果,远处的建筑物加载并播放出现动画,从而实现由虚到实直至完全显现的视觉效果;当观察点远离时,近处的建筑物加载并播放出现动画,从而实现由虚到实直至完全显现的视觉效果,远处的建筑物加载并播放消失动画,从而实现由实到虚直至消失的视觉效果。
需要注意的是,动画设定的不透明度的数值可根据实际需求任意设定。
在本实施例中,将以建筑物的模型播放透明动画的方案为例,对本申请实施例的方法进行详细说明。
如图5所示,一种地图展示方法具体流程如下:
201、配置动画。
1.解析动画区域。其中,动画区域可以包括第一区域与第二区域,第一区域为距离虚拟观察点第一区间内的区域,第二区域为距离虚拟观察点第二区间内的区域。动画区域(Animation Area)是指距离虚拟观察点在特定区间内的区域,该区域内的景观模型会进行动画配置和播放动画。
第一区域(First Area)是动画区域的一部分,为距离虚拟观察点第一区间内的区域,该区域内的景观模型被确定为第一模型,并加载第一模型对应的出现与消失动画。第二区域(Second Area)是动画区域的一部分,为距离虚拟观察点第二区间内的区域,该区域内的景观模型被确定为第二模型,并加载第二模型对应的出现与消失动画。
在一些实施例中,第一区间可以为0~15米,第二区间可以为200~400米。
2.校验第一区域与第二区域。
202、渲染图像。
1.渲染线程剪裁需要显示的建筑物瓦片。
瓦片(Tile)指的用于构建模型的小块元素。
在一些实施例中,渲染线程可以根据虚拟观察点的位置、方向和参数确定虚拟观察点的视野;确定位于虚拟观察点的视野内的建筑物瓦片;在一些实施例中,还可以剪裁不可见的建筑物瓦片,以减少不必要的渲染操作。
在加载建筑物时,可以加载Building Tile(建筑物瓦片)、Building Object(建筑物对象),此外,还可以加载三维地图Map Model(地图模型)。
建筑物瓦片(Building Tile)是瓦片的一种,是用于构建建筑物模型的小块元素,在加载建筑物时会进行加载。建筑物对象(Building Object)是指代表建筑物的模型对象,在加载建筑物时会进行加载,资源线程会根据LOD技术在其中确定可以被绘制的建筑物模型。地图模型(Map Model)是指三维地图的模型。
2.判断建筑物是否做动画,若是,则该建筑物加载动画。
其中,将距离处于第一区间内的景观模型确定为第一模型,将距离处于第二区间内的景观模型确定为第二模型;对于第一模型,可以加载第一模型对应的出现与消失动画,对于第二模型,可以加载第二模型对应的出现与消失动画。
3.响应于虚拟观察点的位置变化操作,播放动画。
比如,响应于拉近操作,第一模型播放消失动画,第二模型播放出现动画。
比如,响应于远离操作,第二模型播放消失动画,第一模型播放出现动画。
参考图6,图6为渲染的线程交互步骤,其中,建筑物管理器(Building Manager)可以管理与配置建筑物的模型参数,Building Object为建筑物模型。建筑物管理器(Building Manager)可以管理与配置建筑物的模型参数,在渲染的线程交互过程中发挥作用。
资源线程用于根据LOD技术,在Building Object中确定可以被绘制的建筑物模型,将其加载到三维地图中,再基于LOD技术确定动画区域,对动画区域内的建筑物进行动画配置;响应于虚拟观察点的位置变化操作,更新画面,从而播放动画。
渲染线程用于渲染建筑物,其中,包括渲染建筑物的纹理,如透明度等。
本实施例能解决高楼视野遮挡问题,以及远处楼块数量多性能消耗大的问题。此外,使用渐隐渐显的动画效果规范化了楼块出现和消失的方式,合理减少了远处楼块覆盖区域,从而减小性能消耗,减弱了近处高楼对于视野的遮挡问题。
由上可知,本申请实施例可提升所展示三维地图画面的图像效果。
其中,可以理解的是,在本申请的具体实施方式中,涉及到地形数据、导航数据等相关数据,当本申请以下实施例运用到具体产品或技术中时,需要获得许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
为了更好地实施以上方法,本申请实施例还提供一种地图展示装置,该地图展示装置具体可以集成在电子设备中,该电子设备可以为终端、服务器等设备。其中,终端可以为手机、平板电脑、智能蓝牙设备、笔记本电脑、个人电脑等设备;服务器可以是单一服务器,也可以是由多个服务器组成的服务器集群。
比如,在本实施例中,将以地图展示装置具体集成在终端中为例,对本申请实施例的方法进行详细说明。
例如,如图7所示,该地图展示装置可以包括展示单元701和重绘制单元702,如下:
(一)展示单元701,用于展示三维地图画面。
其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像。
在一些实施例中,展示单元701具体用于:获取候选模型,以及确定候选模型在三维地图中所处的位置;将位置处于虚拟观察点的加载范围内的候选模型确定为景观模型;在三维地图中加载景观模型;绘制三维地图,得到并展示三维地图画面。
(二)重绘制单元702,重绘制单元702用于响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
在一些实施例中,重绘制单元702在通过修改第一模型与第二模型的不透明度重新绘制三维地图画面之前,还用于:确定景观模型与虚拟观察点之间的距离;将距离处于第一区间内的景观模型确定为第一模型;将距离处于第二区间内的景观模型确定为第二模型。
在一些实施例中,位置变化操作包括拉近操作,重绘制单元702具体用于:响应于虚拟观察点的拉近操作,提高第二模型的不透明度,以及降低第一模型的不透明度;基于第一模型与第二模型的不透明度,重新绘制三维地图画面。
在一些实施例中,位置变化操作包括远离操作,重绘制单元702具体用于:响应于虚拟观察点的远离操作,降低第二模型的不透明度,以及提高第一模型的不透明度;基于第一模型与第二模型的不透明度,重新绘制三维地图画面。
在一些实施例中,当第一距离等于第一区间的最小值时,设置第一模型的不透明度为0;当第一距离等于第一区间的最大值时,设置第一模型的不透明度为1。
在一些实施例中,当第二距离等于第二区间的最小值时,设置第二模型的不透明度为1;当第二距离等于第二区间的最大值时,设置第二模型的不透明度为0。
在一些实施例中,三维地图还包括地面模型,重绘制单元702具体用于:绘制地面模型;在绘制地面模型完毕后,基于景观模型的深度信息,确定景观模型的绘制顺序;按照绘制顺序对景观模型进行绘制。
在一些实施例中,按照绘制顺序对景观模型进行绘制,包括:按照第二模型的绘制顺序对第二模型进行绘制;在第二模型绘制完毕后,按照其他模型的绘制顺序对其他模型进行绘制,其他模型为除第一模型与第二模型以外其他的景观模型;在其他模型绘制完毕后,按照第一模型的绘制顺序对第一模型进行绘制。
在一些实施例中,基于景观模型的深度信息,确定景观模型的绘制顺序,包括:基于预设的筛选规则,在景观模型中确定待绘制模型;基于待绘制模型的深度信息,确定待绘制模型的绘制顺序;按照绘制顺序对景观模型进行绘制,包括:按照绘制顺序对待绘制模型进行绘制。
在一些实施例中,基于预设的筛选规则,在景观模型中确定待绘制模型,包括:在景观模型中确定待绘制模型,待绘制模型为虚拟观察点视野内的景观模型;基于待绘制模型的深度信息,确定待绘制模型的绘制顺序。
在一些实施例中,基于预设的筛选规则,在景观模型中确定待绘制模型,包括:基于景观模型的深度信息,确定待绘制模型之间的遮挡关系;基于遮挡关系,从景观模型中筛选出待绘制模型。
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。
本申请实施例中,术语“模块”或“单元”是指有预定功能的计算机程序或计算机程序的一部分,并与其他相关部分一起工作以实现预定目标,并且可以通过使用软件、硬件(如处理电路或存储器)或其组合来全部或部分实现。同样的,一个处理器(或多个处理器或存储器)可以用来实现一个或多个模块或单元。此外,每个模块或单元都可以是包含该模块或单元功能的整体模块或单元的一部分。
由上可知,本实施例的地图展示装置由展示单元展示在虚拟观察点观察三维地图的三维地图画面,其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像;由重绘制单元响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
由此,本申请实施例可以提升地图展示效果。
本申请实施例还提供一种电子设备,该电子设备可以为终端、服务器等设备。其中,终端可以为手机、平板电脑、智能蓝牙设备、笔记本电脑、个人电脑,等等;服务器可以是单一服务器,也可以是由多个服务器组成的服务器集群,等等。
在一些实施例中,该地图展示装置还可以集成在多个电子设备中,比如,地图展示装置可以集成在多个服务器中,由多个服务器来实现本申请的地图展示方法。
在本实施例中,将以本实施例的电子设备是终端为例进行详细描述,比如,如图8所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:
该电子设备可以包括一个或者一个以上处理核心的处理器801、一个或一个以上计算机可读存储介质的存储器802、电源803、输入模块804以及通信模块805等部件。本领域技术人员可以理解,图8中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
处理器801是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器802内的软件程序和/或模块,以及调用存储在存储器802内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体检测。在一些实施例中,处理器801可包括一个或多个处理核心;在一些实施例中,处理器801可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器801中。
存储器802可用于存储软件程序以及模块,处理器801通过运行存储在存储器802的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器802可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器802可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器802还可以包括存储器控制器,以提供处理器801对存储器802的访问。
电子设备还包括给各个部件供电的电源803,在一些实施例中,电源803可以通过电源管理系统与处理器801逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源803还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
该电子设备还可包括输入模块804,该输入模块804可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
该电子设备还可包括通信模块805,在一些实施例中通信模块805可以包括无线模块,电子设备可以通过该通信模块805的无线模块进行短距离无线传输,从而为用户提供了无线的宽带互联网访问。比如,该通信模块805可以用于帮助用户收发电子邮件、浏览网页和访问流式媒体等。
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器801会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器802中,并由处理器801来运行存储在存储器802中的应用程序,从而实现各种功能,如下:展示在虚拟观察点观察三维地图的三维地图画面,其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像;响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
由上可知,本申请实施例可以提升地图展示效果。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。
为此,本申请实施例提供一种计算机可读存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本申请实施例所提供的任一种地图展示方法中的步骤。例如,该指令可以执行如下步骤:展示在虚拟观察点观察三维地图的三维地图画面,其中,三维地图包含立体的景观模型,景观模型包括距虚拟观察点第一距离的第一模型、以及距虚拟观察点第二距离的第二模型,第一距离在第一区间内,第二距离在第二区间内,第一区间的最大值小于第二区间的最小值,三维地图画面包含第一模型的第一模型图像和第二模型的第二模型图像;响应于虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关。
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。电子设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该电子设备执行上述实施例中提供的地图展示方面的各种可选实现方式中提供的方法。
由于该存储介质中所存储的指令,可以执行本申请实施例所提供的任一种地图展示方法中的步骤,因此,可以实现本申请实施例所提供的任一种地图展示方法所能实现的有益效果,详见前面的实施例,在此不再赘述。
本申请提供的地图展示方法、装置、电子设备、存储介质及计算机程序产品,先展示在虚拟观察点观察三维地图的画面,该三维地图有立体景观模型,其中包含距虚拟观察点处于不同区间距离的第一模型和第二模型,且第一区间最大值小于第二区间最小值,画面中有这两个模型对应的图像。之后,当虚拟观察点发生位置变化操作时,电子设备通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使重新绘制画面中第一模型图像不透明度与第一距离正相关,第二模型图像不透明度与第二距离负相关。这样能改善三维地图因高楼过多导致展示效果不佳的问题,近处高楼透明度随靠近虚拟观察点而增加,不会遮挡用户观察其他建筑,远处高楼不透明度随远离虚拟观察点而降低,弱化了远处高楼过于密集的观感,提升了三维地图画面展示效果。
进一步地,在展示三维地图画面之前,先确定景观模型与虚拟观察点之间的距离,再将处于第一区间距离内的景观模型确定为第一模型,处于第二区间距离内的景观模型确定为第二模型。此步骤明确了第一、二模型的确定方式,有助于后续根据模型与虚拟观察点距离精准调整不透明度,进一步提升三维地图画面展示效果的精准度。
当位置变化操作为拉近操作时,电子设备响应此操作,提高第二模型的不透明度,同时降低第一模型的不透明度,然后基于调整后的不透明度重新绘制三维地图画面。这种针对拉近操作的处理,符合第一模型越靠近虚拟观察点越透明、第二模型越靠近虚拟观察点越明显的逻辑,优化了用户拉近观察时的视觉效果,避免近处高楼遮挡,增强远处高楼显示效果。
当位置变化操作为远离操作,电子设备响应操作,降低第二模型的不透明度,提高第一模型的不透明度,接着基于调整后的不透明度重新绘制三维地图画面。这与第一模型越远离虚拟观察点越明显、第二模型越远离虚拟观察点越透明的逻辑相符,优化了用户远离观察时的视觉效果,使画面展示更符合用户观察需求。
当第一距离等于第一区间最小值时,将第一模型不透明度设为0;当第一距离等于第一区间最大值时,将第一模型不透明度设为1。这明确了第一模型在特定距离下的不透明度设置,使得第一模型不透明度与距离的正相关关系更具体,进一步精准优化了第一模型在不同距离下的显示效果,提升画面展示的准确性。
当第二距离等于第二区间最小值时,把第二模型不透明度设为1;当第二距离等于第二区间最大值时,将第二模型不透明度设为0。此设置明确了第二模型在特定距离下的不透明度,使第二模型不透明度与距离的负相关关系更清晰,进一步精准优化了第二模型在不同距离下的显示效果,提升画面展示的准确性。
若三维地图还包含地面模型,在通过修改第一、二模型不透明度重新绘制三维地图画面时,先绘制地面模型,绘制完后基于景观模型深度信息确定景观模型绘制顺序,最后按照该顺序对景观模型进行绘制。这保证了地面模型与景观模型绘制的先后顺序以及景观模型之间绘制顺序的合理性,结合深度信息能正确呈现景观模型之间的遮挡关系,提高绘制效率和画面展示的真实感。
按照绘制顺序对景观模型进行绘制时,先按第二模型绘制顺序绘制第二模型,第二模型绘制完毕后,按其他模型绘制顺序绘制除第一、二模型外的其他景观模型,最后按第一模型绘制顺序绘制第一模型。这种分批次绘制方式进一步提高了绘制效率,优化了景观模型绘制流程,有助于提升整体画面展示效果。
基于景观模型深度信息确定景观模型绘制顺序时,先依据预设筛选规则在景观模型中确定待绘制模型,再基于待绘制模型深度信息确定其绘制顺序,最后按此顺序对待绘制模型进行绘制。此过程通过筛选待绘制模型,剔除不影响展示效果的景观模型,进一步优化渲染过程,降低计算资源消耗,提升绘制效率和画面展示效果。
基于预设筛选规则确定待绘制模型时,将虚拟观察点视野内的景观模型确定为待绘制模型,然后基于这些待绘制模型深度信息确定绘制顺序。通过这种方式,确保只绘制用户视野内的模型,提高渲染效率,避免不必要的计算资源浪费,提升画面展示效果。
基于预设筛选规则确定待绘制模型时,先根据景观模型深度信息确定待绘制模型之间的遮挡关系,再依据此遮挡关系从景观模型中筛选出待绘制模型。这种基于遮挡关系筛选待绘制模型的方式,能进一步优化渲染,避免绘制被遮挡的模型,降低计算资源消耗,提高画面展示效果。
展示三维地图画面时,先获取候选模型并确定其在三维地图中的位置,将处于虚拟观察点加载范围内的候选模型确定为景观模型,在三维地图中加载这些景观模型后绘制三维地图,从而得到并展示三维地图画面。此过程通过仅加载虚拟观察点附近模型,减少系统计算和网络传输负担,保证展示流畅性,提升用户体验。
此外,可以控制画面中所有第一、二模型同时播放预设透明变化动画,进一步降低计算资源消耗并提高流畅度;通过在景观模型纹理中添加透明度通道控制透明度。存在中间区间和第三区间,对处于不同区间的模型设置不同不透明度或加载策略等方案,从不同方面对地图展示方法进行优化,共同提升了三维地图展示效果,解决高楼视野遮挡和远处楼块性能消耗大等问题。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (16)

  1. 一种地图展示方法,由电子设备执行,包括:
    展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像;及
    响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中所述第一模型图像的不透明度与所述第一距离正相关、且所述第二模型图像的不透明度与所述第二距离负相关。
  2. 如权利要求1所述的地图展示方法,所述方法还包括:
    确定所述景观模型与所述虚拟观察点之间的距离;
    将所述距离处于第一区间内的景观模型确定为第一模型;
    将所述距离处于第二区间内的景观模型确定为第二模型。
  3. 如权利要求1或2所述的地图展示方法,所述位置变化操作包括拉近操作,所述响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关,包括:
    响应于所述虚拟观察点的拉近操作,提高所述第二模型的不透明度,以及降低所述第一模型的不透明度;
    基于所述第一模型与所述第二模型的不透明度,重新绘制三维地图画面。
  4. 如权利要求1或2所述的地图展示方法,所述位置变化操作包括远离操作,所述响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关,包括:
    响应于所述虚拟观察点的远离操作,降低所述第二模型的不透明度,以及提高所述第一模型的不透明度;
    基于所述第一模型与所述第二模型的不透明度,重新绘制三维地图画面。
  5. 如权利要求3或4任一项所述的地图展示方法,当所述第一距离等于所述第一区间的最小值时,设置所述第一模型的不透明度为0;当所述第一距离等于所述第一区间的最大值时,设置所述第一模型的不透明度为1。
  6. 如权利要求3或4任一项所述的地图展示方法,当所述第二距离等于所述第二区间的最小值时,设置所述第二模型的不透明度为1;当所述第二距离等于所述第二区间的最大值时,设置所述第二模型的不透明度为0。
  7. 如权利要求1至6任一项所述的地图展示方法,所述三维地图还包括地面模型,所述通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中第一模型图像的不透明度与第一距离正相关、且第二模型图像的不透明度与第二距离负相关,包括:
    绘制所述地面模型;
    在绘制所述地面模型完毕后,基于所述景观模型的深度信息,确定所述景观模型的绘制顺序;
    按照所述绘制顺序对所述景观模型进行绘制。
  8. 如权利要求7所述的地图展示方法,所述按照所述绘制顺序对所述景观模型进行绘制,包括:
    按照所述第二模型的绘制顺序对所述第二模型进行绘制;
    在所述第二模型绘制完毕后,按照其他模型的绘制顺序对所述其他模型进行绘制,所述其他模型为除所述第一模型与第二模型以外其他的景观模型;
    在所述其他模型绘制完毕后,按照所述第一模型的绘制顺序对所述第一模型进行绘制。
  9. 如权利要求7或8所述的地图展示方法,所述基于所述景观模型的深度信息,确定所述景观模型的绘制顺序,包括:
    基于预设的筛选规则,在所述景观模型中确定待绘制模型;
    基于所述待绘制模型的深度信息,确定所述待绘制模型的绘制顺序;
    所述按照所述绘制顺序对所述景观模型进行绘制,包括:
    按照所述绘制顺序对所述待绘制模型进行绘制。
  10. 如权利要求9所述的地图展示方法,所述基于预设的筛选规则,在所述景观模型中确定待绘制模型,包括:
    在所述景观模型中确定待绘制模型,所述待绘制模型为所述虚拟观察点视野内的景观模型;
    基于所述待绘制模型的深度信息,确定所述待绘制模型的绘制顺序。
  11. 如权利要求9所述的地图展示方法,所述基于预设的筛选规则,在所述景观模型中确定待绘制模型,包括:
    基于所述景观模型的深度信息,确定所述待绘制模型之间的遮挡关系;
    基于所述遮挡关系,从所述景观模型中筛选出待绘制模型。
  12. 如权利要求1至11任一项所述的地图展示方法,所述展示三维地图画面,包括:
    获取候选模型,以及确定所述候选模型在所述三维地图中所处的位置;
    将所述位置处于所述虚拟观察点的加载范围内的候选模型确定为景观模型;
    在所述三维地图中加载所述景观模型;
    绘制所述三维地图,得到并展示三维地图画面。
  13. 一种地图展示装置,包括:
    展示单元,用于展示在虚拟观察点观察三维地图的三维地图画面,其中,所述三维地图包含立体的景观模型,所述景观模型包括距所述虚拟观察点第一距离的第一模型、以及距所述虚拟观察点第二距离的第二模型,所述第一距离在第一区间内,所述第二距离在第二区间内,所述第一区间的最大值小于所述第二区间的最小值,所述三维地图画面包含所述第一模型的第一模型图像和所述第二模型的第二模型图像;及
    重绘制单元,用于响应于所述虚拟观察点的位置变化操作,通过修改第一模型与第二模型的不透明度重新绘制三维地图画面,使得重新绘制的三维地图画面中所述第一模型图像的不透明度与所述第一距离正相关、且所述第二模型图像的不透明度与所述第二距离负相关。
  14. 一种电子设备,包括处理器和存储器,所述存储器存储有多条指令;所述处理器从所述存储器中加载指令,以执行如权利要求1至12任一项所述的地图展示方法。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有多条指令,所述指令适于处理器进行加载,以执行权利要求1至12任一项所述的地图展示方法。
  16. 一种计算机程序产品,包括计算机指令,所述计算机指令被处理器执行时,实现如权利要求1至12任一项所述的地图展示方法。
PCT/CN2025/081590 2024-04-09 2025-03-10 地图展示方法、装置、电子设备和存储介质 Pending WO2025214029A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410424332.6 2024-04-09
CN202410424332.6A CN120807811A (zh) 2024-04-09 2024-04-09 地图展示方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2025214029A1 true WO2025214029A1 (zh) 2025-10-16

Family

ID=97314682

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/081590 Pending WO2025214029A1 (zh) 2024-04-09 2025-03-10 地图展示方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN120807811A (zh)
WO (1) WO2025214029A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170309056A1 (en) * 2015-01-20 2017-10-26 Geo Technical Laboratory Co., Ltd. Three-dimensional map display system
CN111659117A (zh) * 2020-07-08 2020-09-15 腾讯科技(深圳)有限公司 虚拟对象展示方法、装置、计算机设备及存储介质
CN113058266A (zh) * 2021-04-30 2021-07-02 腾讯科技(深圳)有限公司 虚拟环境中场景字体的显示方法、装置、设备及介质
CN115965730A (zh) * 2022-11-25 2023-04-14 阿波罗智联(北京)科技有限公司 针对三维地图中的高架桥的处理方法、装置和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170309056A1 (en) * 2015-01-20 2017-10-26 Geo Technical Laboratory Co., Ltd. Three-dimensional map display system
CN111659117A (zh) * 2020-07-08 2020-09-15 腾讯科技(深圳)有限公司 虚拟对象展示方法、装置、计算机设备及存储介质
CN113058266A (zh) * 2021-04-30 2021-07-02 腾讯科技(深圳)有限公司 虚拟环境中场景字体的显示方法、装置、设备及介质
CN115965730A (zh) * 2022-11-25 2023-04-14 阿波罗智联(北京)科技有限公司 针对三维地图中的高架桥的处理方法、装置和设备

Also Published As

Publication number Publication date
CN120807811A (zh) 2025-10-17

Similar Documents

Publication Publication Date Title
CN114677467B (zh) 地形图像渲染方法、装置、设备及计算机可读存储介质
CN110335333B (zh) 用于在三维地图中高效渲染云天气效果图形的方法和系统
US8970583B1 (en) Image space stylization of level of detail artifacts in a real-time rendering engine
CN105261066B (zh) 一种三维地理信息系统实时绘制多线程分配与控制方法
US20170287205A1 (en) Three-dimensional modelling with improved virtual reality experience
CN112233214B (zh) 一种大场景的雪景渲染方法、装置、设备及存储介质
US20260024260A1 (en) Movement trajectory playback method and apparatus, electronic device, and storage medium
CN101414383B (zh) 图像处理设备和图像处理方法
JP2023550074A (ja) マルチビュー画像収束面傾斜を用いたマルチビューディスプレイシステム及び方法
CN106296779A (zh) 一种三维模型渲染显示方法及系统
CN109657172A (zh) 图片预览方法、装置、设备和存储介质
CN111445563A (zh) 一种图像生成的方法以及相关装置
US20210035356A1 (en) Methods and Devices for Bifurcating Graphics Rendering Between a Media Player Device and a Multi-Access Edge Compute Server
US20200242742A1 (en) Device and method for dynamic range expansion in a virtual reality scene
CN110047123A (zh) 一种地图渲染方法、装置、存储介质及计算机程序产品
CN120635271A (zh) 一种基于3dgs的大型场景多细节层次云渲染处理方法及装置
WO2024124370A1 (zh) 一种模型构建方法及装置、存储介质、电子设备
CN111429561A (zh) 一种虚拟仿真渲染引擎
CN117788689A (zh) 一种基于三维建模的可交互式虚拟云展厅构建方法及系统
WO2025020657A1 (zh) 用于虚拟场景的图像显示方法、设备、介质及程序产品
CN118807200A (zh) 体积云的绘制方法、装置、电子设备及程序产品
KR20140000170A (ko) 관여 매질에 의해 수광된 광의 양을 추정하기 위한 방법 및 대응하는 장치
CN115018967B (zh) 一种图像生成方法、装置、设备和存储介质
CN108170498A (zh) 页面内容展示方法及装置
CN111815736B (zh) 飞线构建及显示方法和装置,计算机存储介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25785509

Country of ref document: EP

Kind code of ref document: A1