konmast3r / Up3date

A Blender plugin to import/export 3D city models encoded in CityJSON format
MIT License
9 stars 17 forks source link

*Important Notice:* As of November 2019, Up3date* will be no longer maintained. It is forked into the official and dedicated CityJSON github repository, where it will be maintained and updated by the TU Delft's 3D geoinformation group and me.

Up3date

A Blender plugin to import/export 3D city models encoded in the CityJSON format. All building attributes and faces semantics are stored and can be accesed via Blender's graphic user interface.

Requirements

Testing Datasets

You can find sample datasets at the official CityJSON website. In case you have 3D City Model datasets encoded in CityGML you can use the free Conversion Tool to convert to and from CityGML and CityJSON.

Trying to import really big datasets such as New York will take several minutes because of the amount of information contained. With the rest sample CityJSON files everything should work noticeably faster. Depending on your machine, it could take some seconds up to few minutes minute to import the 3D City Model.

How to install and use the plugin

  1. Download the CityJSON_Blender_parser.py add-on and install it locally to Blender.Run Blender and go to Edit > Preferences >Add-ons, and Install. Navigate to the directory where the CityJSON_Blender_parser.py is located select it and click Install Add-on from File...

  2. Make sure the add-on is enabled (by default it is disabled). Tick the empty box next to the add-on's name.

  3. Go to File > Import > CityJSON (.json) and navigate to the directory where the CityJSON file is stored and open it. *Important: Make sure Blender's viewport is in Object Mode before importing a new cityjson file.

  4. In case you run Blender through the console, useful feedback is given in it, informing about the progress of the import procedure.

  5. After a successful import, you should be able to see the model somewhere close to the axis origin. Rotation of the scene and zooming in and out might prove useful at this point, to locate the model. In case you can't see the model, select an object from the Outliner (always in Object Mode) and click View > Frame Selected.
    *Important: Make sure the object you are selecting is a mesh object. You can check that from the small pointing down triangle icon next to the object's name.

  6. For different Collections are created for LoD 0 to 3 respectively. In case more than 1 geometries exist for the objects -representing different LODs (level of detail)-, every geometry is stored under the appropriate Collection, under the parent object (if there is any). You can display different Collections by clicking on the eye icon in the Outliner at the top right of the interface (see screenshot below). By default all the LOD_x collections should be visible right after importing the 3D City Model. In case you see any artefacts that is the reason! Choosing only one visible collection should remove all artefacts.

  7. In case you want to visualize a certain area, click Shift + B and draw a rectangle with your mouse to zoom into that specific area of the 3D City Model. This also moves the rotation center at that poin, which will come handy when you want to rotate the model for further inspection.

  8. To see the attributes of each object, simply select the object on the screen and click on the Context.Object tab on the bottom right (Blender 2.80 interface). Then click Custom Properties drop down menu (see screenshot below).

  9. To see the semantics of each surface, select an object in Object Mode, hit TAB to toggle Edit Mode and click Face Select (top left of the viewport between the Edit Mode and the View button). Select a face of the object and click on the Context.Material tab at the bottom right. Scroll down and click on Custom Properties(see screenshot below).

Development

Clone this repository and have fun!

If you are using Visual Studio Code, you may: