Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
A good visualization allows the users to understand a data better by seeing the data points in the right context. Check out some of the examples below to see what the visualization provides that you would have hard time to understand just by seeing the information data points.
Small arms and ammunition import and export interactive visualization: https://armsglobe.chromeexperiments.com/
Compare Covid-19 Data tab and map tab to see the difference it makes in your perception: https://ncov2019.live/
Wind and weather visualizations: https://www.windy.com/
Chrome experiments with Globe: https://experiments.withgoogle.com/chrome/globe
Spatial Visualization using Bing Map using HoloLens 2 and Windows Mixed Reality Headsets.
Shortlink:
This project is for HoloLens 2 and Windows Mixed Reality Headsets.
In this project, we will create a 3D Map visualization using :.
We will build the app in below video for HoloLens 2. You can render it for Windows Mixed Reality Headset and use hand controllers instead of hand gestures.
Outings, a sample app created by Bings Map SDK can be found on Microsoft Store for PC and HoloLens 1:
A Bing Maps developer key is required to enable the mapping functionality of the SDK.
Sign-in to the Bing Maps Dev Center.
For new accounts, follow the instructions at Creating a Bing Maps Account.
Select My keys under My Account, and select the option to create a new key.
Provide the following required information to create a key:
Application name: The name of the application.
Key type: Basic or Enterprise. Key types are explained here.
Application type: Select Other Public Mobile App.
Click the Create button. The new key displays in the list of available keys. This key will be used later when setting up the Unity project.
See the Understanding transactions page for more details about transaction accounting.
Maps SDK, a Microsoft Garage project provides a control to visualize a 3D map in Unity. The map control handles streaming and rendering of 3D terrain data with world-wide coverage. Select cities are rendered at a very high level of detail. Data is provided by Bing Maps.
The map control has been optimized for mixed reality applications and devices including the HoloLens, HoloLens 2, Windows Immersive headsets, HTC Vive, and Oculus Rift. Soon the SDK will also be provided as an extension to the Mixed Reality Toolkit (MRTK).
With spatial data you can discover growth insights, manage facilities and networks, and provide location information to customers. Without considering spatial components and how they relate to your business, your risks and possibility of poor results will increase.
Spatial analysis allows you to solve complex location-oriented problems and better understand where and what is occurring in your world. It goes beyond mere mapping to let you study the characteristics of places and the relationships between them. Spatial analysis lends new perspectives to your decision-making.
After importing the SDK, to add a map to the scene...
Create a new GameObject.
Add a MapRenderer component to the GameObject: Add component
-> Scripts
-> Microsoft.Maps.Unity
-> MapRenderer
In the MapRenderer component, provide the Bing Maps developer key.
For the sample scenes, a Bing Maps developer key will also need to be provided in the MapRenderer.
Once the a valid key is provided, the map will render at runtime and in the editor as well.
Once a valid key has been provided, the map will render in the editor as well, unless the Show Map Data in Editor
option has been disabled.
The view of the map can be configured in the Location foldout.
The Center
is the geolocation where the map is currently focused, represented as a latitude and longitude in degrees.
The ZoomLevel
is the area of the map that is visible. Lower zoom levels correspond to zooming out, higher zoom levels correspond to zooming in.
The map uses a web Mercator projection.
The type of terrain rendered by the map can be modified with the MapTerrainType
.
Default: The map terrain consists of either elevation data or high resolution 3D models.
Elevated: The map terrain consists only of elevation data. No high resolution 3D models are used.
Flat: Both elevation and high resolution 3D models are disabled. The map terrain surface will be flat.
If the scenario does not require the higher resolution data, disabling the terrain can improve performance. Likewise, the Flat
type requires the least amount of performance overhead.
HoloLens 2 and Windows Mixed Reality Headset project using Bing Maps SDK
In this project we will create a 3D map visualization as shown in the video below:
Follow along the next steps or answer the questions below to see if you can skip some of the steps.
There are 2 ways to add Pins to your map. First, you can directly attach a MapPin component to your Map GameObjects which you want to attach to the MapRenderer at a specific lat-lon. When attached, the MapRenderer will take over positioning of the MapPin's Transform component.
Second way is to add a MapPinLayer, covered on the next section.
The shape and dimension of the map can be configured in the layout section.
The shape of the map can be a block or a cylinder. The default is block.
Dimensions are specified in local space. For convenience, the sizes scaled to Unity's world space are displayed in the editor as well.
Larger map dimensions will require more data to be downloaded and rendered. This will affect the overall performance of the app. It is recommended to stay with the default settings or smaller, or only increase the map dimensions on devices that are capable. Regardless, the map dimensions are clamped to a maximum size.
This approach is better suited for large data sets where clustering may be required:
Add a MapPinLayer
component to the MapRenderer's GameObject. If clustering is enabled, check this setting on the layer and attach a prefab that has a ClusterMapPin component.
In a script, get a reference to the MapPinLayer
and add MapPin
instances to the the layer's MapPins
collection.
An advantage to using the MapPinLayer is that it supports clustering. If a ClusterMapPin prefab is specified on the layer, MapPins will be clustered automatically. When MapPins are clustered, the ClusterMapPin is shown in the place of the many MapPins that associate to it.
Clustering is highly recommended for large data sets as this will reduce the number of MapPin instances that need to be rendered for zoomed out views.
Besides this rendering performance benefit, it is often preferable to cluster MapPins from a usability perspective since dense, cluttered views will make it more difficult for the user to interact with individual MapPins because the map pins might overlap with each other.
Clusters are created at every zoom level, so as the zoom level of the MapRenderer changes, the visible clusters and MapPins may change as well.
It is possible to replace the material used for either the terrain or the clipping volume wall.
When doing this, it is recommended to make a copy of the base shaders, which are imported as part of the NuGet package under lib\unity\map\Resources. Use the copies made of these shaders as the starting point for new materials.
Importantly, the ENABLE_ELEVATION_TEXTURE
keyword used by the shaders will need to be maintained. Certain draw calls for the terrain require an elevation texture while others do not.
The Flat
map terrain type requires the least amount of performance overhead. Both elevation and high resolution 3D models are disabled. The map terrain surface will be flat.
Larger map dimensions will require more data to be downloaded and rendered. This will affect the overall performance of the app. It is recommended to stay with the default settings or smaller, or only increase the map dimensions on devices that are capable. Regardless, the map dimensions are clamped to a maximum size.
It is important to note that the level of detail offset can have a large impact on performance. The trade-off being higher quality will come with a higher performance impact where the cache size will grow more quickly. Lowering the quality may be beneficial on devices that are performance constrained.
Creating and adding many MapPins at once, either to a MapPinLayer or as children of the MapRenderer, could be time consuming and thus cause a frame hitch. If the MapPins can be initialized and added all at startup, this may be an acceptable one time hit. However, if data is being streamed and converted to MapPins throughout the app's lifetime, consider spreading out the MapPin creation and addition over multiple frames, i.e. time slice the additions. This will help to maintain render performance.
Code Samples: https://aka.ms/MixedRealityUnitySamples
Bing Maps Account: https://aka.ms/NewBingMapsAccount
BingMaps-SDK Repository: https://aka.ms/BingMapsUnitySDK
BingMaps SDK releases: https://aka.ms/BingMapsSDKReleases
How to create Bing Maps Account: https://aka.ms/BingMapsAccount