Skip to main content

Architectural model production process

1. Preparation​

  1、software tools​

  (1) QGIS:This document is based on3.18 write
  (2) Blender:This document is based on3.1.0 write
  (3) BlenderGIS:forBlender plugin,Download address (Install BlenderGIS Methods are available on Baidu)

  2、Data requirements​

  (1) Data format:ESRI Shapefile
  (2) Coordinate system:WGS84 WebMercator(EPSG: 3857)
  (3) Data type: area data
  (4) Data attribute: must contain the attribute of building height, and the attribute name must be in English

  3、Data preprocessing【Optional】​

  (1) If there is a lot of building data, you can choose to split it into multiple files through attribute filtering;
  (2) Try to delete none in advancegeometry data, inQGIS Select tools【Remove null geometries】,Select the corresponding layer and check【Also remove empty geometries】

show

  (3)The holes existing in the building data can be processed inQGIS selected in【Delete holes】,Select the corresponding layer and set the maximum area of ​​holes to be deleted, the default value"0"That is, delete all holes.

show

  4、Blender Environmental preparation​

  (1)Delete scene default content:Click on the blank space-【A】-【Delete】

show

  (2)Set up scene camera:【N】-【View】-expand"End"Value, in case not all objects in the scene can be displayed.

show

  (3)Switch rendering mode:The default is the second"Entity mode display",After adding the texture, you can switch to"Material preview mode display"。

show

2. Model building process​

  1、Automatically generate models​

  (1)import shp document

    【GIS】-【Import】-【Shapefile】,Choose localshp file and confirm the import.

show

  (2)Set build parameters

    exist"Import SHP"In the dialog box, check【Extrusion from field】,"Field"Select the attribute corresponding to the building height;"CRS"choose【Web Mercator】,Click【OK】,The building model will be built automatically.

show

  2、Dealing with model holes​

  (1)Select the top surface of the hole

   i. Select edit mode and select face picking

show

   ii. Click on the top surface of the hole on the model, as shown below:

show

  (2)Select all top faces of holes

    【Select】-【Select Similar】-【Normal】

show

  (3)Select hole model

   i. 【Select】-【Select Linked】-【Linked】

show

   ii. 【Mesh】-【Normals】-【Flip】

show

   iii. 【Mesh】-【Separate】-【Selection】,The hole model separation will be completed and the name is"XXXX.001"

showshow

  (4)Remove hole model

   i. Keep"XXXX.001"Select the state and then switch to【Object Mode】,Right-click in the model display area,【Set Origin】-【Origin to 3D Cursor】

showshow

   ii. Switch to zoom mode and followz Stretch the axis upward (blue axis)

show

   iii. In the outline view, select the automatically generated model and click【Modifier Properties】-【Add Modifier】-【Boolean】

show

   iv. "Object"Select hole model"XXXX.001",【Apply】,The hole processing is now complete.

show

   v. In the outline view, right-click"XXXX.001",choose【Delete】,delete"XXXX.001",Keep only the building models you need.

showshow

  3、Process the top material​

  (1)Create top material

   i. Keep the building model selected and click【Material Properties】-【+】-【New】

show

   ii. Set the material name of the top of the building to【Material_TOP】

show

  (2)Apply top material

   i. Switch to edit mode, enter face selection mode, click to select a building top face, and then【Select】-【Select Similar】-【Normal】Select all building top faces.

show

   ii. Click【Assign】,Apply material to building top surface

show

  4、Processing wall materials​

  (1)Create wall material

   i. Click【Material Properties 】in【+ 】-【New】,Set wall material name【Material_WALL】(The material name must containWALL)

show

   ii. Adjust to shader editing mode and select【Shader Editor】

show

   iii.Change the local image (wall1.png)Drag it into the window to form a node, and output this node【Color】Connect to【Base Color】

show

  (2)Apply wall material

   i. switch back3D view, select【3D Viewport】

show

   ii. Continue steps3, in the state of selecting the top surface,【Select】-【Invert】,Select all building walls by inverting the selection.

show

   iii. Click【Assign】,Apply materials to building walls

show

   iv. Make wallUV set up,【UV】-【Reset】

show

  5、Adjust model origin​

   i. Exit edit mode and return to【Object Mode】

   ii. Right-click in the model display area,【Set Origin】-【Origin to 3D Cursor】

show

  6、Export model​

   i. 【File】-【Export】-【glTF 2.0 (.glb/.gltf)】

show

   ii. Check if only selected layers will be exported【Selected Objects】

show

  7、Multiple data processing​

   If there is more than one data, add process repeat steps1-6,When creating a material, reuse the previously created material. The operation is as follows:

show

  8、View at origin​

   When providing it to the front end, you need to know the center point of the model, click【Scene Properties】 -【Custom Properties】,Check"longitude"and"latitude"value.

show