HBIM to VR: Dynamo Scripting
The use of Building Information Modeling (BIM) is embedded in the core of each of CIMS’ five work streams. We digitize, then the captured data is turned into BIM, and with that we promote simulation, digital assisted fabrication, and digital assisted storytelling. For the last one, it is necessary to disseminate the collected data into different methods of visualization. One method that we use is Virtual Reality (VR). Autodesk Revit is our main software to host the BIM, however, for VR the game engine Unity 3D is preferred. The transition between platforms is not very straightforward, so we had developed a process to optimize the translation without losing much resolution. That process required a new method of organization that we called Geometry Levels (GL).
The process consists in that each Revit element is isolated or grouped with like elements and exported as a DWG file. First attempts at exporting the elements as the identified GLs was done manually and proved very time-consuming. The manual selection and exporting created a high possibility of error in the grouping, labeling as a GL type, and omission. To reduce time and minimize the risk of error, a custom Dynamo script was created to speed up the filtering process.
The initial approach to reduce manual assignation of GL, consisted in using a script to identify a ratio between the number of faces that an element has and its size. That way, smaller elements with complex geometries will automatically be categorized in a higher GL group; on the other hand, larger elements with simpler geometries will be given a lower GL value. Unfortunately, even though that methodology worked, and theoretically made sense for this particular task, it was discarded due to the incapability of the current version of Dynamo of processing such great models in an efficient way. Within the BIM model of Library of Parliament (LoP), the large amount of element faces to calculate for complex projects became excessive for Dynamo’s computational capacities and lead to longer waits and also frequently to software crashes, turning the whole process less efficient than expected.

Instead,we used a different approach, pre-filtering GLs by Family Categories turned out to be a more efficient workflow. Although, that solution had to be followed by a manual step of checking and re-categorizing the elements, it reduced to almost 20% the task time. The script created a semi-automated workflow to re-map the data hierarchy of model elements within Revit and export sets of elements according to their GLs.
The script was divided into inputs and outputs. The inputs collect all the required elements from Revit for Dynamo to process. Elements are automatically selected and grouped based on their Revit family category (Figure 1.1), as the output command. Once the script has run, Dynamo applies the node “Element.SetParameterByName” to the elements (1.2) and the GL value is given to a new “Geometry Level” shared parameter. The numeric value for the GL is added to every Revit element (1.3).
Figure 1. (1) Input nodes / (2) GL Classification nodes / Output (3) Custom Shared Parameter
To verify the success of the Dynamo script and ensure the GLs are assigned correctly, a Revit View Template was created allowing the GL system to be visualized in color. Each element is assigned one of four colors determined by their value identified in the GL shared parameter. (Figure 2.1). With this View Template, one can graphically verify that each element has been labeled correctly (2.2) and allowing for the flexibility of manually re-assigning GLs in Revit if required.
Figure 2: (1) Filters / (2) shaded surfaces of the elements on a 3D view
The elements are now easily isolated for exporting from Revit for further optimization required to translate to the VR environment. Through the use of the GLs to organize the model and the application of the Dynamo script to assist in filtering the Revit elements, the process of converting the BIM to VR remained organized and efficient.
The whole process ended up becoming a great human / algorithm collaboration, using the computer power for grouping elements by a particular parameter and the human common sense, criteria, and knowledge, saving the team thousands of hours of a monotonous task.
Check out our TAD article for the full story, Defining Geometry Levels for Optimizing BIM for VR: Insights from Traditional Architectural Media, https://doi.org/10.1080/24751448.2019.1640541
