Blender
Blender1 (Blender Foundation) is a free and open-source 3D application that aims to be a ‘Swiss-army knife’ for digital content creation. It includes a mesh-based 3D modeller, advanced materials and texture specification, animation system, a physically based renderer and a deeply integrated Python2 Application Programming Interface (API) amongst other features. Some of these features have made Blender an increasingly popular host application for a range of scientific visualisation and analysis tools [2–5] including GIS data processing3 and other GIS related visualisation applications [6–8]. These key features include:
Mesh based modelling As opposed to a surface (e.g. Rhino) or solid (e.g. Solidworks) based modeller, geometry in Blender is primarily stored as a mesh, i.e. geometry is composed of vertices, edges and faces. This allows data to be associated with, and visualised at, specific geometric points, and the distribution of those points is easily manipulated by the user. It also means Blender can natively import and export a number of common mesh based geometry formats such as OBJ and 3DS with no loss of geometric detail.
Python API Python is an open-source, high-level computing language used for Blender’s API. This Python API is deeply integrated allowing, for example, specification of data and control over mesh elements, manipulation of the Blender interface and the drawing of custom OpenGL graphical elements over the interface itself. With the Python API it is therefore possible to create custom user interfaces to control the creation and visualisation of mesh based data.
Animation System Blender’s frame based animation system can be used to visualise variant data sets and is also used by the VI-Suite to specify variant simulation contexts that enable parametric as well as static analyses.
In addition, the Blender interface is very flexible and customisable for different usage cases. This, coupled with the Python API, allows plugin (called addons in Blender) developers to create embedded custom user interface and display elements.
VI-Suite history
The features mentioned above made Blender an early choice as a host application to provide geometry and materiality creation and export for the Radiance lighting simulation suite [9]. Early examples include Brad4 and Radex.
Radiance is a set of free, multi-platform and open-source tools for the visualisation and calculation of artificial and natural lighting and radiation metrics. Radiance comes with no native user interface and consists mainly of a number of executable files, typically run from the command line. This has made the use of pure Radiance somewhat problematic for novice users and students [10]. Radiance can however accept mesh based geometry descriptions and can convert OBJ files to native Radiance geometry. The mesh based geometry format used by Blender, coupled with the ability to create custom user interfaces with the Python API, made Blender an appropriate choice to act as a Radiance frontend. In these early examples Blender acted primarily as a pre-processor i.e. a geometry/material creator and exporter that could initiate the Radiance simulation and visualise the results using Radiance’s native rendering tools.
The first component of the VI-Suite, the Lighting Visualiser (LiVi), was inspired by these early examples to embed Radiance functionality within Blender. LiVi began in 2009 as a standalone addon for Blender that would convert Blender geometry and materiality to a valid Radiance format and initiate the Radiance simulation via additions to the Blender user interface. A key difference to previous Blender/Radiance integrations was that LiVi could then post-process or import numerical results generated by Radiance back into Blender for visualisation. This was achieved by specifying Blender mesh geometry as sensing surfaces and then colouring the faces of that geometry with the Python API according to the results generated. Figure 1 shows an early LiVi simulation of instantaneous solar irradiation within a city scene. The legend is drawn over Blender’s 3D view by LiVi via the Python API.
The advantage of including post-processing within the scope of the addon was that results could be navigated and visualised in-situ very quickly to encourage fast, performance based architectural design iteration.
In 2013 development began on the Energy Visualiser (EnVi) a standalone Blender addon that would act a a pre/post-processor for EnergyPlus; a free and open source application for building lighting, energy and ventilation performance analysis [11]. EnergyPlus also comes with no native geometry creation or specification interface and uses text based descriptions of mesh geometry to define building form, again making Blender a viable frontend application.
Whilst EnVi was still at prototype stage Blender introduced Python scriptable nodes. Nodes in Blender were traditionally used to apply a sequence of filters to an image but version 2.67 introduced the ability to create custom nodes via the Python API.
A nodal interface can provide a more flexible and intuitive user experience by allowing the user to construct their own task specific interface, especially if the activity undertaken can be broken down into discrete stages. These scriptable nodes therefore presented the opportunity to combine LiVi with EnVi, along with a number of other contextual analysis tools, into one node based interface called the VI-Suite. A sabbatical award from the University of Brighton in 2014 enabled the release of version 0.1, and at the time of writing version 0.4.12 of the VI-Suite is publicly available. Figure 2 shows a typical current Blender and VI-Suite window configuration showing the 3D view, where geometry is edited; the node editor, where VI-Suite simulations are constructed; the VI-Suite display panel, where visualisations are controlled; the VI-Suite material panel, where material characteristics are defined; tabular and graph OpenGL overlay elements, where result data can be visualised. Figure 3 shows a typical node set-up within Blender’s node editor for a LiVi lighting simulation with location, geometry, context and simulation nodes representing location specification, geometry export, sky export and simulation stages.
Nodes provide the majority of the VI-Suite UI, encompass much of its functionality and are, in terms of Python code, objects i.e. instances of a class. These node objects have properties (integer, string, menus etc) associated with them which can be exposed within the node using Blender’s standard interface elements. The nodes also contain functions, or methods, to draw and update the node. The nodes can also display buttons which, when pressed, run operators or Blender specific functions. These operators in turn run general functions that, for example, initiate a Radiance simulation or embed simulation results within the Blender mesh for visualisation. A more detailed explanation of the input elements of specific nodes is given in the next section.
Using Python objects in the form of Blender nodes has led to a modular, object-orientated code base that can be relatively easily extended to, for example, import geospatial file formats. Users have already contributed nodes for window shading analysis in EnVi and further contributions are welcome.
As the close integration of the VI-Suite with Blender offers extensive possibilities for advanced results visualisation, recent releases of the VI-Suite have concentrated on this aspect. Using the Python API to draw OpenGL graphics over the main Blender window, the VI-Suite can now display per-point numerics, scalable legends, scatter graphs and tables etc. within Blender’s 3D view (Fig. 2). In addition, legend values, scaling and colouration can all be controlled by the user.
VI-Suite capabilities
As the VI-Suite takes the approach that Blender mesh geometry forms the basis for the specification of calculation and visualisation points, any geometry data imported into Blender can be quickly turned into a sensing surface by associating a sensing material to some or all of the faces of the mesh. Simple ground planes, 3D topographical data and even building geometry can therefore all form the basis of the calculation/visualisation points.
By using Blender mesh geometry as sensing surfaces the user also has complete control over the spatial density of the calculation points. Mesh density can be increased or decreased locally, using Blender’s advanced mesh editing tools, to achieve the desired results resolution whilst minimising calculation time. This level of calculation point control can also be valuable in geospatial applications where simulations over a wide area may be desired that would require many calculation points at high spatial resolution. Instead the user can begin with a coarse sensor mesh and refine locally where greater results resolution is required.
Although originally intended for the performance analysis of buildings and their immediate context, this ability to specify any mesh based geometric surface as a sensing surface does offer a number of possibilities for geospatial analysis and these possibilities have been augmented with the ability to directly import geospatial data. These features include:
-
Import of Esri grid ascii data and conversion to Blender mesh format
-
Import of other GIS geometry data in mesh format (e.g. STL, OBJ, 3DS).
-
Creation of static and parametric terrain and urban shadow/sky view factor maps. These analyses use Blender’s in-built BVH tree and ray casting algorithms to minimise simulation time.
-
Creation of static and parametric urban scale radiation/lighting maps using Radiance.
-
Production of bitmap images/animations of results.
-
Export of calculated metrics in CSV format.