• Stars
    star
    2,344
  • Rank 19,423 (Top 0.4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Blender add-on to import models from google maps

If this helps you save time or money for your job, please consider supporting the work involved in here ;) Donate

News As of January 2023, Only versions older or equal to 0.5.0 no longer work because the associated version of RenderDoc are no longer able to inject into Chrome. Use version 0.6.0 (for RenderDoc 1.25 and Blender 3.4) or newer!

News As of Aug 23, 2020, Google Earth web is now supported on top of Google Maps!

News And since Aug 29, 2020, Mapy CZ as well!

Maps Models Importer

Maps Models Importer is a set of tools for importing 3D models from wide maps in 3D content softwares. This is a proof of concept containing only a Blender add-on for importing 3D models from Google Maps.

The blender directory contains the source code of the Blender add-on importing captures recorded with RenderDoc:

Screenshot of blender addon in action

Installation

Download a release or make a zip of blender/MapsModelsImporter/. In Blender 2.83, go to Edit > Preferences, Add-on, Install, then browse to the zip file.

/!\ Do not use the "Download as zip" button of GitHub, make sure you use a release zip instead.

Install RenderDoc, last version

Usage

You can follow instruction from the walkthrough video: https://youtu.be/X6Q7dbtXVZQ Alternatively, check out the following steps:

  1. Start RenderDoc, and File > Inject into process;

  2. Start terminal (Win+R, "cmd") and run (adapt the second line to the location of your Chrome installation):

set RENDERDOC_HOOK_EGL=0
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-gpu-sandbox --gpu-startup-dialog
  1. Do NOT press Ok on the dialog box yet;

  2. In RenderDoc, search for chrome's GPU process and inject into it (you may use the search field);

Inject into the process called something like "chrome GPU"

  1. Press OK in the chrome dialog;

  2. Go to Google Maps (not Google Earth!) in satellite view, and take a capture using Print Screen while moving in the viewport;

  3. In RenderDoc, save the capture as an rdc file

  4. In Blender, go to File > Import > Google Maps Capture an choose your capture file.

For step 2. you can create a link to Chrome rather than usig the cmd, and put as target (again, adapt the path to chrome.exe to your installation):

C:\Windows\System32\cmd.exe /c "SET RENDERDOC_HOOK_EGL=0 && START "" ^"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe^" --disable-gpu-sandbox --gpu-startup-dialog"

Troubleshooting

Useful information can be found in the comment of the video, as well as on the support thread on blenderartists.

Check software versions

Most importantly, use the last version of this add-on. In the release notes of each version the recommended/required versions of RenderDoc and Blender are specified. As of now, use RenderDoc v1.13 (not something else) and the last version of Blender.

Example of capture files

To check your installation, you can try importing sample captures from MapsModelsImporter-samples.

Linux

Unfortunately, the inject into process functionality of RenderDoc is not supported on linux. You can still import existing captures on linux, though.

Missing blocks

Importer settings

The add-on can limit the number of imported blocks to prevent Blender from freezing too long. If not set to -1 or 0 (meaning no limit), there will be missing blocks in the imported scene, but it'll be quicker (good for testing pipelines, mostly).

Blender does not want to install the add-on

Do NOT use the green "Clone or download" button of GitHub. I know it's tempting, but I cannot hide it, it's a GitHub feature. To get the proper zip, go to the release page.

There is no option for 3D in Google Maps

Try appending ?force=webgl at the end of the google maps URL. Also, check that you enabled the Globe mode (an extra button on the right-hand side once you are in satellite mode).

If it is not enough, you can try to change your region to United States because when you are localized in some other area, Google might chose to turn 3D off for some (political?) reason. See this post.

API: OpenGL (Not Presenting)

This was a common issue with versions of this add-on prior to v0.2.0. Update to the latest version of this add-on, then make sure you remove the --use-angle=gl option from the chrome shortcut. You should get API: D3D11.

API: None

  • Make sure chrome was completely stopped before starting the custom shortcut
  • Make sure you have hardware acceleration enabled in the advanced section of the chrome settings.

Chrome is showing a warning about an unsupported feature

If chrome says something like "Unsupported command line, security will suffer", don't mind. This is due to the --disable-gpu-sandbox flag, but it is just a warning, it should not be a problem for what we are doing.

Chrome window is all plain black

Try to set and unset the fullscreen mode using F11.

There is no GPU pop-up

Make sure you use the right custom shortcut to start chrome and that you closed any process chrome process before starting.

PrintScr does not actually take a capture

It happens sometimes, in this case you can use the "Capture after delay" button in RenderDoc to trigger a capture. Don't forget to make sure to move in the 3D viewport at the very time the capture occurs.

How to increase the level of detail?

If you want better quality captures, you should know that Google Maps loads LoDs (Levels of Details) in relation with the window size of your web browser. There is several way to increase it:

  • You can increase your screen resolution. Also note that nvidia allows now to increase the rendering resolution of your screen to 4k even with a simple full HD screen.
  • You can also use the rendering size percentage in Google Chrome. Most browsers do offer the option to zoom in or out the web pages (typically using Ctrl+Mouse Wheel) to adapt them to your screen resolution. By setting the zoom at e.g. 25% in Google Chrome, you increase the level of detail loaded by Google Maps.
  • Take several captures and merge them together (see next question)

But while doing so you also increase dramatically the number of block. Be aware of the fact that by default the MapsModelsImporter add-on limits to 200 blocks to prevent from freezing for too long. You can change this number on import.

How to stitch several captures together?

You can use the LilyCaptureMerger add-on for this, here is a quick demo: https://www.youtube.com/watch?v=BcGM76dwF_s

There are so many textures, it's impractical for export!

You can check out the LilyTexturePacker add-on I've made especially for this. Beware to use it only after using LilyCaptureMerger, because the latter rely on individual block textures to perform matching.

How to clean up imported geometry

Even though it won't make miracles, the following can help:

  • To join all chunks into a single mesh: A (to select all), Ctrl+J
  • To weld vertices: Switch to Edit mode (Tab), M > By Distance.
  • To set the scale to 1 without changing the size of the geometry: Ctrl+A > Scale

It's taking too long, how to automate this process?

Although I don't know how to automate the capture itself, you can easily automate the importing part, see this issue for an example of automation script, or this one to import all rdc files from a directory.

Importing fails with some "UnicodeEncodeError"

Remove any special character from your filename and from the directories that contain it.

Notable use cases

I think the most common use case is to sketch out blockings in early stages of architecture perspectives. Another interesting usage is to get a "ground truth" reference when doing match moving or motion tracking on raw footage.

Artistic uses have been reported as well, for instance Benjamin Bardou has been using it to create stunning images of Paris.

Feel free to notify me of your use case on twitter @exppad!

Disclaimer

This is a proof of concept showcasing how the 3D render process of Google Maps can be inspected. This is intended for educational purpose only. For a more in-depth analysis, see Importing Actual 3D Models From Google Maps.

Do not use this for any commercial nor redistribution purpose. Actually, the use of such tool might be allowed for private read-only use, as this is what happens when browsing Google Maps, but not beyond. I do not take responsibility for any use of this tool.

Changelog

For more details, see individual releases.

Aug 23, 2020 v0.3.0 Captures from Google Earth are now supported. When capturing from Google Earth, there is no need to move around in the viewport when taking the capture. Support for Google Maps is still ensured. Additional add-ons LilyTexturePacker and LilyCaptureMerger are compatible with Google Earth Captures.

Feb 17, 2020 v0.2.0 A new version is available that should make the whole process easier and work on more hardware. It now uses the last version of RenderDoc (1.6), the last version of Chrome (80) and the last version of Blender (2.82). This is quite a change and if you notice any regression (like it used to work and now it does not) please report!

Mar 30, 2019 v0.1.0 Initial release.

Help Wanted

This repository does not provide the required RenderDoc binaries for linux nor for OSX. If you have such a system, build RenderDoc against Python 3.9 (the minor version matters) to be compatible with the version of Blender's Python distribution. See doc/Building RenderDoc module.md.

Other links

To import map data in Blender, this open source addon is very handy: domlysz/BlenderGIS

Here is another attempt at reverse-engineering Google data: retroplasma/earth-reverse-engineering

More Repositories

1

LilySurfaceScraper

Import shaders end environments in Blender from a single URL
Cython
596
star
2

LearnWebGPU

Learn to use WebGPU for native graphic applications in C++
C++
383
star
3

BMeshUnity

A Unity package to make runtime procedural mesh generation more flexible.
C#
340
star
4

WebGPU-Cpp

A single-file zero-overhead C++ idiomatic wrapper for WebGPU native
C++
245
star
5

HoudiniEngineForBlender

Branch of Blender featuring a Houdini Engine based modifier
180
star
6

OpenMfxForBlender

A branch of Blender featuring an OpenMfx modifier
C
176
star
7

DagAmendment

The official implementation of the research paper "DAG Amendment for Inverse Control of Parametric Shapes"
C++
167
star
8

OpenMfx

A low-overhead mesh-processing plug-in API for cross-software procedural effects
C
161
star
9

WebGPU-distribution

Distributions of WebGPU for native and web development, easy to integrate and interchangeable.
CMake
115
star
10

BlenderImgui

Custom GUI for your Blender add-ons using Dear ImGui
Python
92
star
11

LearnWebGPU-Code

The accompanying code of the Learn WebGPU C++ programming guide
88
star
12

LilyRender360

Lily Render 360 is a tool for rendering a Unity scene into stitch-free equirectangular images
C#
58
star
13

glfw3webgpu

An extension for the GLFW library for using WebGPU native.
C
57
star
14

MfxHoudini

A Houdini-Engine based Open Mesh Effect
C
55
star
15

AdvancedBlenderAddon

A starter kit and reference for writing advanced Blender add-ons
Python
38
star
16

Python3dViewer

A simple starter Python code for experimenting 3D graphics
Python
29
star
17

sdl2webgpu

An extension for the SDL2 library for using WebGPU native.
C
25
star
18

MesoGen

The official implementation of MesoGen: Designing Procedural On-Surface Stranded Mesostructures (Siggraph 2023)
C++
23
star
19

RayStep

A real-time 3D distance field modeling software
C++
22
star
20

MapsModelsImporter-samples

Sample file to check MapsModelsImporter installation
20
star
21

LilyImageFromURL

A very very simple Blender add-on to very very quickly import images from URLs.
Python
17
star
22

GrainViewer

The official implementation of the research paper "Real-time multiscale rendering of dense dynamic stackings"
C++
13
star
23

MonumentValley

A little toy reproducing Monument Alley basic mechanism in Unity
C#
12
star
24

MfxVCG

An OpenMfx plug-in providing effects from VCGlib
C++
12
star
25

WebGPU-utils

A bunch of utility functions for WebGPU
C++
10
star
26

TownBuilder

This is an experiment around the reproduction of Stalberg's Townscaper
C#
10
star
27

IRL

Inverse Reinforcement Learning
Jupyter Notebook
9
star
28

CodenameGogh

A node-based front-end to ffmpeg
C++
8
star
29

WebGPU-AutoLayout

An online utility tool to generate C++ boilerplate binding code by parsing WGSL.
Rust
8
star
30

MfxExamples

An example of OpenMfx plug-in using the C++ SDK
C++
7
star
31

ModernGlad

Depreciation warnings to help writing more modern OpenGL using glad
Python
7
star
32

AugenLight

A cross-plateform OpenGL 4.5 starter kit
C++
6
star
33

firefox-webmention-addon

Firefox add-on to send webmentions though context menu
JavaScript
6
star
34

WebGPU-binaries

A CMake-ready binary release of a WebGPU native implementation (wgpu-native)
C
6
star
35

GreaseJs

A little demo of Grease Pencil using ThreeJS
JavaScript
6
star
36

sphinx_literate

An advanced literate programming tool for writing incremental programming courses.
Python
6
star
37

IvyGenerator

Update of Thomas Luft's original
C++
5
star
38

PythonMfx

A Python-based host for running OpenMfx mesh processing plugins
Python
5
star
39

WebGPU-Cpp-WebBackend

This is the backend of the Web service of https://github.com/eliemichel/WebGPU-Cpp
C++
5
star
40

AlignTools

Alignment tools add-on for Blender
Python
4
star
41

BiharmonicCoords

Webpage for the SIGGRAPH 24 paper "Biharmonic Coordinates and their Derivatives for Triangular 3D Cages"
HTML
4
star
42

fxos-AlphaRemote

A Firefox OS remote controller for Sony Alpha series cameras
JavaScript
4
star
43

WebGPU-raii

An RAII wrapper around the objects of the WebGPU native API.
C++
4
star
44

reshade

Fork ReShade adding Remote Control feature
C++
3
star
45

Cooldown

Feed rythm into live-coding tools
Rust
3
star
46

ReACORN

An attempt to reimplement ACORN
Python
3
star
47

WebMfx

A web-based host for OpenMfx using WASM plugins
C
3
star
48

PolyGreenCoords

Public page of "Polynomial 2D Green Coordinates for Polygonal Cages"(Siggraph 2023)
HTML
3
star
49

StatDeps

A lightweight C++ dependency graph library for compile-time dependent resource management.
C++
3
star
50

cartes-electorales

Python
2
star
51

MfxPlugins

Simple Open Mesh Effect plugins
C++
2
star
52

highspeedracer

Online racing game using Blender Game Engine
Python
2
star
53

LilyFuture

A header-only utiliy library to make std:futures fun to use!
C++
2
star
54

todo

A dead simple command line TODO-list manager
Python
2
star
55

Spillr

Mixed GLSL/C++ static C++ processor aiming at reducing boilerplate in shader writing
OCaml
2
star
56

UnitySsPattern

A screen space shader for Unity with object tracking
ShaderLab
2
star
57

webgpu-doc-jam

Set up for an incoming documentation jam of webgpu-headers, stay tuned!
2
star
58

JeuDePresse

Dessins d'actualité interactifs, produits en quelques heures avec MS Paint
JavaScript
2
star
59

irssi-notify

Notifications for Irssi via a simple http server
Python
1
star
60

WorLd

Simple 2D strategy game whom levels are autogenerated based on mathematical assertions
C++
1
star
61

texdown

Extension of markdown to support mathematics. Based on marked and MathJax.
JavaScript
1
star
62

join.js

The smallest JS library to love promises
JavaScript
1
star
63

fake-position

Firefox addon to spoof geolocation using openstreetmap
JavaScript
1
star
64

ColorSpaceViewer

A browser-based tool for visualizing images in color space
JavaScript
1
star
65

fHMM

Project for the lecture of Probabilistic Graphical Models
TeX
1
star
66

MemoryIDF

Code source du jeu Memory pour l'Ile de France, inspiré de la version pour Paris
HTML
1
star
67

OscToSpout

Forward OSC messages to KodeLife using a texture-sharing via Spout
C++
1
star
68

Dawn

Custom branches of Dawn for the Learn WebGPU for C++ guide
C++
1
star
69

PolyworldJs

Low-poly styled dynamic forest in ThreeJS
JavaScript
1
star
70

ZigDawn

Starter C++ project for using WebGPU native
C
1
star