takeaway

After reading this article, you will know: 1. How are map building models usually made? 2

There is often a need for custom buildings on the map, such as the water Cube below which is made to feel like a bubble.

Before adding custom models

After adding custom models

This requirement requires the modeler to customize the modeling of the building.

Model making

First we need to make a 3D model of the building. Different model accuracy levels have different modeling methods. This paper introduces the making method of medium precision model. This precision model requires less surface number and is friendly to Web platform.

Data collection

Collect the appearance pictures and structural styles of buildings to be made through the Internet, and collect 3d pictures of buildings by street view mode. Try to take pictures of buildings in sunny conditions.

Refer to figure

Model making

The collected building pictures are used for structure and volume analysis, and the characteristic structural features of the building are highlighted when making the model. Usually, the structure within one meter is ignored and modeling is not carried out.

The number of model faces is controlled within 1000 triangles, and cross faces are avoided as far as possible. Since there is no Angle of looking up to the building in the map scene, the model faces under the solid horizontal view can be omitted to ensure the quality of the whole model.

Model structure drawing

Edit material

Key structural materials were extracted from the collected architectural photos by PS. And then I’ll give it the material.

map

Note:

  1. The name of the material sphere should be consistent with the name of the corresponding building model.
  2. The diffuse color value is set to RGB (255,255,255) to avoid darkening the model within the map.

Diffuse material color

Material of baking

The model was baked by default in the model software to enhance the volume sense, and the original UV was stored in channel 2 for backup.

Bake ambient light setting

Render the building scene to PNG and use it as a building icon.

Icon file

The model output

Before exporting FBX, bake the model material into 2048 x 2048 and 512 x 512 tiles, using 2048 by default. The advantage of this is that each platform (Unity side and Web side) can choose which map to use based on performance.

Naming rules

The output file is named by the administrative division code of the region where the building is located and the combination of the building name, for example, 110105_htds, to facilitate engine loading and later query.

Resources import

Once the model is made, the next step is to import the map engine. The map engine is based on vector tile data. In order to achieve fast loading, we need to know the tile ID of the building and the replacement ID of the building. Buildings also need to be resized and oriented to match the architecture generated automatically by the engine. To do this, we use a map engine-based import tool to adjust and export parameters.

Building location

Locate the buildings that need to be replaced on the map. Drag the map to find the building you want to replace.

Locating the building

As mentioned above, we can quickly pick up the current mouse-hit buildings by using GPU pickup technology (color coding as ID coding for rendering). After locating the buildings, click on the buildings to be replaced and the buildings will be hidden and the building ID will be recorded for use as the configuration.

Removal of existing buildings

Resize, orientation

Drag the finished FBX file into the map engine. After selecting it, you can adjust the position, scale and rotate it. Adjust the parameters of the model file by referring to the surrounding buildings automatically generated by the map engine. The result of the adjustment is the final configuration display of the map engine.

Adjust the parameters

After adjustment, click export button and the configuration file will be generated automatically. The configuration file contains the following fields.

Configuration file field

Building positions, zoomings, and rotations are synchronized to FBX files instead of being saved in configuration files. The GPS information is calculated and written in the configuration to provide accurate GPS information for the building.

The final result

Finally, the map engine loads configurations and models to display custom architectural models.

Load the map of the custom model

Look forward to the next issue of Geographic Data Visualization.

Review past

Creating a Cool 3D Map Visualization Product for B-end Clients

Data Sources and Stored Computing

Map Interaction and Pose Control

Map Text Rendering

Map Architecture Rendering