*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.
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.
- Blender Version >=2.80
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.
-
Download the
CityJSON_Blender_parser.py
add-on and install it locally to Blender.RunBlender
and go toEdit > Preferences >Add-ons
, andInstall
. Navigate to the directory where theCityJSON_Blender_parser.py
is located select it and clickInstall Add-on from File...
-
Make sure the add-on is enabled (by default it is disabled). Tick the empty box next to the add-on's name.
-
Go to
File > Import > CityJSON (.json)
and navigate to the directory where the CityJSON file is stored and open it. *Important: Make sureBlender's
viewport is inObject Mode
before importing a new cityjson file. -
In case you run
Blender
through the console, useful feedback is given in it, informing about the progress of the import procedure. -
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 inObject Mode
) and clickView > Frame Selected
.
*Important: Make sure the object you are selecting is amesh object
. You can check that from the small pointing down triangle icon next to the object's name. -
For different
Collections
are created forLoD 0 to 3
respectively. In case more than 1 geometries exist for the objects -representing differentLODs
(level of detail)-, every geometry is stored under the appropriateCollection
, under the parent object (if there is any). You can display differentCollections
by clicking on theeye icon
in theOutliner
at the top right of the interface (see screenshot below). By default all theLOD_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. -
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. -
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 clickCustom Properties
drop down menu (see screenshot below). -
To see the semantics of each surface, select an object in
Object Mode
, hitTAB
to toggleEdit Mode
and clickFace Select
(top left of the viewport between theEdit Mode
and theView
button). Select a face of the object and click on theContext.Material
tab at the bottom right. Scroll down and click onCustom Properties
(see screenshot below).
Clone this repository and have fun!
If you are using Visual Studio Code, you may:
- Install Blender Development: a plugin that allows starting and debugging Python scripts from VSC.
- Install the fake-bpy-module to enable auto-completion:
pip install fake-bpy-module-2.80
.