Importing Google Mesh data Using Blender with Blosm Plugin
Available with the Following Subscriptions: Standard, Premium, Enterprise
In this user guide article, you will learn how to bring Google Maps (or similar mesh data) data into cmBuilder (using FBX or GLB formats).
Use cases:
- Increase the accuracy and quality of existing buildings
- Import new terrain
- Import an existing building for demolition planning
đź’ˇ Note: Refer to the end of the article if you prefer to watch a video covering this topic
Initial Setup
We will need to install two free software and create a Google API account.
1. Download and install Blender from their official website: Blender.org
- It is strongly recommended to use the latest stable version of Blender
2. Download the Blosm add-on from their website: Here
- A donation value is required but can be set to Zero and the final download is a ZIP file.
3. Optional (to be able to use the Recommended workflow in the Saving the Imported Map step): Download the latest Material Combiner add-on from the GitHub website: Here
Â
Â
4. Open Blender and install the Blosm add-on by clicking on Edit > Preferences > Add-ons > Install and then select the downloaded zip file. Repeat this step for the Material Combiner add-on.Â
Â
Â
5. Once the Blosm add-on is installed, enable it by checking this box (1), setup a folder to save additional files (2), and click on “Get it!” on the Google 3D Tiles access token (3).
Â
6. Use the Add-on Developer instructions at section "Google 3D Tiles Key" to set create your API Key: Import of Google 3D Cities
7. IMPORTANT!!! Once you have created your API key, paste it in the dedicated field but remember to enable the Map Tiles API in the Google Platform: Cloud Setup-Enabling API
Importing a Map in Blender
Blender is a powerful modelling software that might need some familiarization to be used efficiently. There is a lot of material online but you can start with the official navigation instructions: Here
Here is the step-by-step instruction on how to use the Blosm add-on to import Google Maps into Blender:
1. Create a project in Blender and:
- Delete the initial Camera, Cube and Light objects
- Use the shortcut “N” to open the side panel and Click on the Blosm tab
- Select the Google 3D Tiles option
- Click on “Select” to open a browser tab with the area selection
Â
2. Follow the instructions on the side panel (shown below) to copy your coordinates. Try to get the smallest possible area as the final 3D model will be bigger than the rectangle selection.
Â
Â
3. Paste the coordinates in the add-on (1), set the level of details to “buildings with more details” (2), turn on the additional settings (3) and click “Import” (4). Please note that a higher level of details will take longer to import.
Â
4. It might take some time, but your area import will show up in the view and we need to apply some settings to view it correctly:
- Zoom out to see the whole imported model
- Click on the View tab (top right) and increase the “End” value to increase the field of view (10,000 m to 100,000 m should be enough).
Â
- Set the Viewport Shading to Material Preview to be able to see the textures in the model
Â
5. The area generated is never going to be exactly as it was selected in the web browser window, but we can trim it to focus on a specific boundary. If there are missing elements in the generated model, delete it and recreate it with a larger area selection in the web browser step.
Â
Saving the Imported Map (2 Methods)
**Before moving forward with any editing step, let's save the file and manage the textures path.**
This will lock the images to the geometry in a more stable way preventing export errors
Â
Option 1 (Recommended): Using Material Combiner Add-on
1. Select MatCombiner from the side tab.Â
2. Select Update Material List list to to auto populate all the Google mesh images into the material list
3. Select Strict Custom Atlas type
4. Check 'Crop outside images'
5. Select Save Atlas to save the combined image file to any location on your computer.Â
Â
Â
Option 2: Without using Material Combiner Add-on
1. Select File > Save As or just press CTRL+SHIFT+S to save the original import in a local folder
2. Select the 3D model and click on “Replace Materials” in the Blosm tools:
Â
Â
3. After saving, Select File > External Data > Unpack Resources > Use files in current directory. This will create a folder with all the texture files in your local folder.
Â
Â
4. Once the folder is created, Select File > External Data > Pack Resources. This step will reconnect all textures with a local mapping that can be exported.
Â
Â
Cleaning the imported map
The suggested initial edit is to remove the parts you don’t need from the 3D model and create an opening for the area of your project. There is a lot more edits that can be done to the model in Blender, which is not covered in here.
In this tutorial, we will use the Edit Mode function to manually delete parts from the imported model but if you are interested in learning more, please search online for instructions on how to use the following features in Blender:
- Boolean Modifier
- Knife Tool
- Separate by Selection
To start, select the imported model and:
1. Select “Edit Mode” or press TAB to visualize all vertices of the 3D Model (1)
2. Toggle X-ray on to select all vertices inside your lasso select tool, whether or not they are behind other geometries (2)
3. Click on Z or press 7 on your numpad to activate a top-down orthographic view (3)
Â
Â
4. Hold Shift + Left-click to create a lasso selection, select the areas to be removed from the 3D model, Right-click and select “Delete Vertices”. You can also press “W” to use different selection tools.
Â
5. Repeat this action to clean up your model, keeping just the relevant areas and creating an opening for the location of your project
đź’ˇ Note:Â Separating the streetscape from the buildings mesh helps enable easier and more effective editing and sequencing later in the process. Watch this section of our workshop video. Â to see how.Â
Â
Â
6. IMPORTANT!!! If you did not use the Material Combiner add-on, you have to split the mesh into individual materials to export correctly
Select Mesh > Separate > By Material to split the model into smaller parts based on the textures.Â
Â
Â
Exporting and uploading to cmBuilder
Save a copy of the Blender file to keep the original Blosm Import as a backup and follow these steps:
1. Click on File > Export > FBX
2. Set the Path Mode to “Copy”
3. Toggle "Embedded Textures" on
4. Set export limits to include only "Visible Objects"
5. Set Forward to “Y Forward”
6. Click Export FBX
Â
Â
5. Save the model in a local folder and import it to cmBuilder following the standard steps on this user guide page: 1.1 Import 3D Models
Â
We have also covered the workflow in this article in the following User Workshop video:
FAQ:
Q1: I am getting an error when I try to import the maps data into Blender.
- A1.1: Make sure you are using BLOSM 2.7 or higher as older versions are no longer supported.Â
- A1.2: Make sure you enable your Google maps API key and you have entered credit card information (you will not be charged unless you exceed a high threshold)Â
Q2: When I import mesh into cmBuilder all the elements are grey.Â
- A2.1: Grey mesh means the image/texture did not export. Save and close Blender, reopen and repeat the steps in 'Save the imported map' listed above.Â
- A2.2: Also, when you reach the step of saving the Blender file (before unpacking/packing), try saving the file in an entirely new folder in a different directory.
Q3: When I import mesh into cmBuilder all the elements are colored randomly.Â
- A3.1: Splotchy image textures means that the images have lost their location references. This will happen if you do not 'Split by Material' as the last step before exporting. This can also happen when importing into cmBuilder. If you have already split by material, then re-importing the mesh into cmBuilder may fix the image referencing.Â
- A3.2: Also, when you reach the step of saving the Blender file (before unpacking/packing), try saving the file in an entirely new folder in a different directory.
Q4: After I imported the mesh into cmBuilder, parts of my mesh disappear when I rotate the camera.Â
- A4: Turn up Visible objects when camera moves to 100% or select the Best Quality graphics settings package under Settings > Graphics (tab)
Comments
Please sign in to leave a comment.