Simulate the Blosm output from scratch without Blender's Python API by using native Python and its libraries.
Pipeline is found under the unix/ folder. Utilizes Python requests to the Overpass API to obtain data about buildings, roads, and other features for a city in a given geographic region. Once we fetch the request, we are able to extrude out the regions according to the building heights fetched from Overpass.
An example output of Lower Manhattan rendered out in Blender is shown below:
To run the script, remember to download all of the libraries required in the requirements.txt. An example usage to run the mesh generation would be:
./bin/createmesh 42.29025 -83.71978 42.29422 -83.71205The output of running the above command is shown below:
The last 4 commands represent the minimum latitude, mininmum longitude, maximum latitude, maximum longitude to specify a bounding box to generate out the extruded regions. The output of the script will be a .glb file saved into combined.glb. Additionally, each building's .glb file will be stored in the output_meshes directory with each building mesh labeled with its OSM building way ID. To clear the directories, run
python3 reset.pyAnd this will clear out the output_meshes directory.