Unity Development References
Unity Development References
As the developer of AX, I am excited to walk you through your first steps in what should
prove to be an exciting in-editor modeling adventure!
If you have never tried parametric modeling, don’t worry, it’s not hard to pick up. While
quite different from brush-based, or topological, modeling, where you directly manipulate
vertices and faces, parametric modeling enables you to manipulate relatively few handles or
gizmos that alter the entire mesh in smart ways. Archimatix features non-destructive mesh
creation, allowing you to produce many variations of a form quickly, either as an iterative
design process, or as a way to stamp out multiple versions of the model to create a rich and
varied environment.
These three versions of Robot Kyle’s reception deck are generated from the same parametric model.
The variations are created by adjusting the handles visible in the center image.
Archimatix
1. First Steps
Archimatix is available in the Unity Asset Store. If you have
not installed Archimatix yet, please follow Unity’s
instructions for Importing from the Asset Store.
Congratulations!
Robot Kyle
For the next step, let’s instantiate a parametric object from remembers his
the Archimatix 3D Library. Our first example will be an very first step
interactive staircase?, the basic dimensions of which can be with Archimatix…
changed in realtime in the editor. To launch a “smart” stair and it was a doozy! But
from the Library, choose one from the main Unity menu. that was back during pre-
Alpha. Archimatix is much less
perilous now than it was back then!
Instantiate a Parametric Object Robot Kyle’s Skyplatform, 5 nodes.
Step 1.1: From the Unity menu, choose: City (below), 7 nodes.
GameObject > 3D Object > Archimatix > Stairs >
BasicStair
As you drag the handle around you should be able to create the following variations:
This handle is modifying two parameters at once: the stair length, or run, and the stair
height. The logic of the parametric object dictates what other parameters should change in
response to your modifications. For example, altering the run of the stairs re-calculates the
tread size, making the steps deeper.
You may have noticed that this run-height handle modifies the stair as fast as you can drag.
In the development of Archimatix, a key goal was to ensure that the modification of
parameters is realtime within the editor.
Step 1.3: Click on the point handle at the top of the lowest step of the magenta stair Shape
and begin to drag it. Notice that this handle controls the riser height of the steps,
with the number of steps adjusting to maintain the overall height value for the
stair. Try to replicate the variations shown below.
When first encountering new Library items, you may not be sure what the
displayed handles are supposed to control, but don’t be afraid to experiment
with them to explore the parametric behavior of the object – you can’t really
break them, after all; and if you do,
there’s always undo!
Robot Kyle is eager to show you
other types of stairs, but let’s be
patient and cover the basics
before climbing up to more
complex parametric
models!
This is actually a flat stand-in for the real Robot Kyle – a free asset from Unity Technologies.
While you can download Robot Kyle, or any other character, to help give your design space
a sense of scale, we include this 2D billboard as a lightweight alternative, while paying
homage to the character that has served as an Archimatix mascot throughout the
development process. You can follow the trials and tribulations of Robot Kyle on the
Archimatix community thread on the Unity Forums.
fr It was at that very moment fr Robot Kyle speaks in defense of fr Every now and
Robot Kyle began to wonder if he the last human. then, Robot Kyle
was indeed waterproof... stands in stupefied
awe of his own
Roaring Tide Productions Archimatix User Start Guide creations! 5
fr With no welcoming party fr Robot Kyle hesitates before the fr Hold on, Kyle. This
at the gate to greet him, Kyle's time portal. He remembers last thing isn't even at cruising
robot senses were on high alert. time! speed yet!
The Robot Kyle billboard, which is included with Archimatix as a Prefab, is automatically
instantiated in the scene when you create a new model. Being a standard GameObject, the
Kyle billboard can be translated as such. The billboard rotates automatically with the editor
camera.
Creating parametric objects while maintaining a sense of scale is important when working
with parametric modeling, since it is generally better to size your objects using their
parameters rather than using the scale transforms.
If you would prefer to work without Kyle’s omnipresence, you can click on the toggle at the
bottom of the Scene View to hide him. Or you can simply delete him from the scene.
The Scene View footer menu appears whenever an Archimatix object is selected. The footer
menu also includes grid snapping controls and the Stamp button.
From the Inspector, we see the parameters for the BasicStair model are listed under certain
headings such as BasicStair, Material and StairShape. This is because a parametric object in
Archimatix is described by any number of nodes in a node graph.
Not all that scary, right? We will revisit the node graph in Chapter 6, but for now, let’s see
what else is happening in the scene.
Hierarchy Window
You may have already noticed that a GameObject has
appeared in the Hierarchy window named “BasicStair (AX).”
This is the root GameObject that instantiates an AXModel
Component, the manager of all Archimatix smart objects
within that model. While you may have multiple AXModel
GameObjects in a scene, it is quite common to have very
few or even only one. When instantiating a new Library
item, the default behavior is to add these to your scene as
node sets within the existing AXModel’s graph.
Hierarchy view of a typical AXModel
Two children of the AXModel GameObject, the
GameObject. Generally, you will not
thumbnailCamera and thumbnailLight, are inactive, being be using the Hierarchy view to select
only used internally by the AXModel component to render the children of this GameObject, but
thumbnail images. generatedGameObjects is a temporary instead you will be working in other
container to hold GameObjects that are generated as the views, such as the Scene View, the
model and its parametric objects are manipulated. Inspector and the Node Graph Editor.
That’s enough basic anatomy for now! Since you are probably itching to manipulate some
more parametric objects, let’s call up a more complex example and explore another way to
instantiate Library objects.
2. The Archimatix
Library Parametric modeling is made easier with
the help of the Archimatix Library.
With shelf space for a vast array of
While some Library items can be instantiated from
parametric props available for you to
the Unity menus, visiting the Archimatix Library via check out (and check in!), both 2D and
its own window is a great way to see the full holdings 3D parametric objects archived in the
of the Library at any given time. Archimatix ships with Library are searchable.
some example Library items to help get you started,
and your Library will grow over time as you add your
own parametric props and share props with friends, and as packs of parametric props
become available from the Asset Store.
To get a better sense of how this works, let’s open a Library window.
Step 2.1: Create a new scene and then open the Library window via the main Unity
menu: Window > Archimatix > Library
Unlike the BasicStair, which had only one Mesher node (the Extrude), this RicketyStaircase is
more complex, composed of several Shapes, Mesher and Repeater nodes. These parts are all
brought together in a Grouper node.
Step 2.4: Click and drag the red, green and blue
handles visible around the
RicketyStaircase to control its run, height
and width parameters.
Before leaving the Library, let’s check out one more feature of working with Library items:
creating stamped or “frozen” versions of models.
Step 2.13: Click on the “Stamp” button in the footer control panel at
the bottom of the Scene View.
At this point you have two chairs, one that is a “frozen” copy and the original parametric
object, which remains selected. The frozen copy no longer needs Archimatix.
Step 2.14: Move the parametric object away using the Transform handle. Click anywhere on
the object and manipulate the handles
that are displayed.
This time, instead of selecting an object from the Archimatix Library, let’s start with a demo
scene. Smart Objects' states are saved in the scenes themselves. Loading a scene containing
Smart Objects also loads their parametric relationships and values.
Step 3.3: Drag the magenta point handles to create variations of the SciFiPlatform like
these:
Don’t forget that you can grab the Circle’s centroid to displace it.
Archimatix Meshers use the logic of their geometry to automatically generate uv’s,
determining whether faces appear smooth or faceted.
You can control how the normals respond to the curvature of the input Shapes, as well as
define the break angles separately, in Plan and Section. The image above shows identical
columns with different break angle settings. The first column has high break angle values;
the middle two have high break angle values on only one axis; and the last column has low
break angle values on all axes. You can also scale and shift textures that you have applied to
the sides and/or caps for these meshes.
These controls are only accessible from the Node Graph Editor, which will be introduced
shortly!
But first, let’s play with these Meshers to see how they behave.
Step 4.2: Click on the Extrude Mesher and manipulate the point handle for the radius of the
Circle.
When the Circle is smaller, the Square is dominant. With a bigger radius, the Circle is dominant.
As you vary the radius of the Circle, the PlanSweep object changes as well. This is because
the same Plan Shape is being fed into both the Extrude and PlanSweep Meshers.
Step 4.3: Select the Lathe object and modify the point handle at the top of the Section.
Step 4.4: Drag the point handle at the midpoint of the Section curve of the Lathe.
The midpoint of the Section is drawn outward. The midpoint of the Section is drawn inward.
The heights of all three objects adjust together. This is because the Extrude Mesher’s Height
parameter is “related” to the height parameter of the Section Shape. The Relation between
them (expressed by the red connector line in the Node Graph Editor image on the
preceding page) has “equals” expressions. We’ll learn more about Relations and their
expressions in Chapter 8.
It’s fun to play with the Section curves of the Lathe and the PlanSweep objects, but what
about poor old Extrude – will it always be consigned to sheer walls? As it turns out, Extrude
has some extra handles up its sleeve for tapering and beveling.
Step 4.5: Create a new scene and instantiate the BevelBox from the Library.
Bevel Segments
X-dir: Offset
Y-dir: BevelRadiusBottom
Although it may look like a more complex object, the BevelBox Library item is really just an
Extrude Mesher with the Bevel Top radius and Taper adjusted. The depression in the Top Cap
is set from the Lip Top parameter in conjunction with the Lip Edge parameter found in the
Inspector.
Robot Kyle is a little disappointed that these models are not as bouncy as they look!
The Lathe is a common and powerful tool for generating standard Unity meshes from Shapes.
A more general and powerful Mesher is the PlanSweep Mesher.
5. Repeating Yourself
Repeaters in Archimatix allow you to distribute instances of
any AX-generated mesh or Unity Prefab in various
patterns, including grids, radial arrays and symmetrical
pairs. We have already seen an example of 2D Repeaters in
the sideboard of the RicketyStaircase. Now, let’s explore
repetition in 3D.
The early 20th-century architect Le Corbusier explored the possibilities of new building
materials such as concrete. Calling a house a “machine for living,” he proposed the Maison
Dom-ino, a structure that represented the essence of domestic space: floors, columns and
stairs. While the Domino House looks a bit drafty, this essential structure provides a great
example of repetition using a GridRepeater
and a FloorRepeater.
A powerful form of
repetition in Archimatix
uses a Plan Shape to
distribute objects along its
path. For example, a window
unit can be placed around the Shape
of a building.
Step 5.5: Adjust the handle at the side of the Cross Shape
and drag it toward the center until only one arch
is on the front face of the upper story.
Step 5.6: Adjust the handle at the end of the Cross Shape and drag it
outside of the perimeter of the I-Shape.
When you drag the end handle of the Cross Shape, you should notice that the first
story Plan is now the combination of the two Shapes.
Step 5.7: Continue to adjust various handles to make alternative forms such as the ones
depicted below.
Step 5.8: Open the scene BastionMerge from the Scenes folder located in the Archimatix
folder. In the scene, you will find three versions of the BastionMerge fortress.
Step 5.9: Click on the stone pathway atop the main wall of the first (simplest) fortress.
When the Shape handles appear, click and drag a node of the wall Shape to make
variations similar to the ones depicted below. Clicking on purple point handles
will move a vertex, while clicking and dragging a cyan handle will create a new
vertex.
Step 6.1: Create a new scene and open the Node Graph
Editor window with the Unity menu by choosing Window > Archimatix >
Graph Editor.
Before jumping in with node creation, let’s take a look at the main areas of the Node Graph
Editor window.
2D Library
Nodes
Function
Nodes
3D Library
Nodes
Detail Level
for LOD
Graph Tools
Canvas Model Statistics
The Node Graph Editor window is organized as a canvas area surrounded by tool menus. To
the left and right of the canvas are menus which are used to add nodes to the canvas. The
left sidebar features items from the Archimatix Library. Theses items are divided into 2D
and 3D items. The right sidebar displays functional nodes, nodes that take some input,
process that input and then make the results available to other nodes through an output
socket.
Along the top you will find model controls. The Group Address is a “bread crumb trail” that
expands as you open subnode groups. The three buttons on the upper right give you options
for model output. The “Build” of the model usually happens automatically when you
complete a parameter change. The “Stamp” button creates a “frozen” version of the model
that no longer needs Archimatix in the project. A stamped model can then be modified in
other modeling packages such as ProBuilder or Megafiers. Finally, the Prefab button saves the
model’s meshes to Unity’s AssetDatabase and creates a standard Unity Prefab. This Prefab is
also “frozen” and no longer parametric.
The bottom bar under the canvas features tools for cleaning up the graph in the canvas and
provides quantitative feedback about your model, such as vertices and triangle counts.
Step 6.2: Start a new scene and click on the Circle node icon in the left sidebar menu.
A Circle node will appear on the canvas and be framed in the Node Graph Editor window.
The 2D circle it produces will be framed in your scene.
You can pan and zoom the canvas to get a better view of the node palette for the Circle node
you instantiated.
Step 6.3: Use the scroll wheel on your mouse to zoom the canvas in and out. On a touch
trackpad, you can use two-finger scrolling to zoom. Try RMB-drag to pan the
canvas around.
Now that we can zoom into the Node Graph Editor, let’s take a closer look at the Node
Palette.
Active Node
Toggle Palette
Menu
Transforms Axis
Foldout Orientation
Geometry
Control Output
Parameters Socket
Foldout
Vertice Resize
Count Palette
Thumbnail
Step 6.4: Open the Geometry Control Parameters Foldout and modify
the radius to 2.5 and segs to 6 to make the Circle a hexagon.
You will notice that some parameter fields in the node palette
are redundant with the fields listed in the Inspector, with an
important difference. Each parameter in the Node Palette has a
socket on either side of it. These sockets, which are color-coded
based on the type of parameter data (red: float; blue: int; yellow:
bool) allow you to link parameters from this node to parameters
from other nodes.
The radius and segs parameters are the two basic values needed to
generate vertices for the Shape. These vertices constitute the final output
of the Shape.
The rectify parameter comes in handy when dealing with an odd number of segs. If the Shape
is rectified, the Circle is turned so that one facet is parallel to the
X-axis, rather than starting with a vertex falling on the X-axis.
This comes into play for Shapes with small segment counts, such
as a pentagon.
The Circle Shape has a Circle handle, which features two sub-handles: a point handle locked
to the X-axis, which controls the radius parameter, and a Tangent handle that is
perpendicular to the X-axis and controls the segs parameter. The rectify parameter does not
have a scene handle, and can only be checked in the Inspector or on the node palette.
Having a 2D Shape node in the scene is a great start, but nodes don’t do much in isolation.
Generally two or more nodes work together to generate meshes. As it is with any team
organization, communication is important. Nodes communicate with each other in two
ways: 1. Connections between inputs and outputs; and 2. Relations that are defined by
mathematical expressions. As nodes are connected to each other in non-mutually exclusive
ways, a network of logical relations forms, making a graph data structure. While a graph may
seem like a challenging thing to master, it is really not that difficult. To start, we can just
keep creating nodes and connecting their outputs and inputs.
Since we have the Circle in the scene already, let’s use it to generate a mesh by feeding its
output to the input of an Extrude node, a Mesher node that takes an input Shape, doubles the
Shape at some extrude distance or height, and creates a mesh between the two. As we shall
see, the product of this nodal teamwork will be a Cylinder.
Step 6.6: Click on the purple button, or socket, on the lower right side of the Circle node
that is labeled “Output Shape.” Release the mouse button, and move the mouse to
the right sidebar. Use your scroll wheel to scroll through the list of nodes in the
sidebar until you see the Extrude node, and click on it.
A new Extrude node will appear in your graph with a connection line automatically rigged up
between the Circle node’s output and the Extrude node’s “Plan” Shape input socket.
With the addition of the Extrude node and the input-output connection between them, you
have officially created a graph!
Now we see that the Cylinder Library Item is really just a two-node graph created in the
Node Graph Editor.
You may click and drag on the window title bar or thumbnail of either node to rearrange
them on the canvas. As you drag, the node moves freely. When you let go, it will snap to the
underlying canvas grid.
In the Scene View, you will notice that the Extrude is displaying its handles and the handles
of the upstream Circle node (as we saw in the SciFi Platform and the BevelBox examples
already). But now that we have the Node Graph Editor open, we have more controls
available in the node palette. For example, we can see the Material inputs and the mesh
output parameters.
Let’s zoom into the Extrude node to take a closer look at it.
Open/Close
Inputs Foldout Shape
Toggle
Input
Shape
New
MaterialTool
Material Node Button
Inputs
Output Mesh
Socket
Physics
Foldout
Combine Meshes
Toggle
Vertices &
Triangles Stats
With the Inputs foldout expanded, we can see various options for inputs. In the case of the
Extrude node, we have a Plan Shape and two Material inputs. The first Material input will be
the main material for all the surfaces of the Extrude. A MaterialTool node connected to the
Top Cap Material input will be the material for the Top Cap and Bottom Cap of the Extrude.
When clicked, the new MaterialTool node button will create a new MaterialTool node and
connect it to the Extrude node. Alternatively, you can connect a MaterialTool node already in
the graph to either of the MaterialTool node inputs.
The “Combine Meshes” toggle signals to the node that it should combine any meshes that it
creates into a single mesh per material. In the future, there will be an option to have one
mesh with submeshes for each material.
The Physics modifiers found in the Physics foldout allow you to specify the type of collider
you would like the output of the Mesher to have. There is also an option to add a RigidBody
and make it kinematic.
Unlike the Shape node, Mesher nodes like Extrude have multiple inputs. The node’s inputs
help to define its particular mesh-generating functionality. For example, the Extrude Mesher
needs a Plan Shape on which to operate, and it can optionally take a main MaterialTool and a
Top Cap Material as inputs.
We can quickly get a sense of the types of Meshers we have in Archimatix by comparing their
inputs.
With additional complexity, we need more Shape and material input options. Otherwise,
looking at the lower half of the four Meshers, we see that they all share an Output Mesh,
Combine Mesh toggles and a Physics controls foldout.
Backfaces
Meshers allow you to choose which surface you would like to be visible. For example, in an
Extrude Mesher, you can disable the Top Cap and Bottom Cap. You can also choose to turn on
the Backfaces if you want a thin-shelled form or a thin railing. Turning Backfaces on is also
convenient for inverting meshes to use as interior environments.
Step 6.8: Expand the Controls foldout on the Extrude node, and turn the
Sides off and the Backfaces on.
You now have the beginnings of an interior model. If you orbit the model
in the scene, you will be looking into the space, but without seeing any of
the exterior surfaces of the walls or floors.
Step 6.9: Instantiate a Circle Shape and connect its output to the Plan
input of the Extrude node with a RMB-double-click (Windows)
or command-click (OS X), automatically creating a ShapeMerger
node in between. Move the Circle and resize it to build out the
interior space.
You can continue to add Shapes, making the interior space larger and
larger.
In addition to exterior and interior models, a common case that uses both at the same time
is a thin railing. Archimatix is well-suited to making thick railings, but for buildings with a
low level of detail, a thin railing can save triangles.
Step 6.10: From the scene on the previous page, turn the Top Cap and Bottom Cap off and
turn the Sides on, leaving Backfaces on as well. Adjust the height of the Extrude to
be about waist-high on Robot Kyle.
You can continue to add Shapes to the ShapeMerger and move them around or modify their
parameters. But, at the moment, we see that there is no way for Robot Kyle to get inside of
this fenced area.
The simplest way to open the fenced area is to open the Plan Shape. This can be done in one
of two places, either in the Difference output of the ShapeMerger or in the Plan input of the
Extrude. It makes most sense to leave the ShapeMerger output alone, since that Shape could
be reused to generate a floor under the fenced area. This leaves the Plan input as the best
option. Altering a Shape at an input point is essentially a just-in-time alteration that has no
effect on the upstream source Shapes.
Step 6.11: Click on the Open/Close Shape toggle in the Extrude’s Plan input parameter.
We see that, by opening the Plan Shape, we now have a part of the rail missing, in this case,
right next to the quarter-circle. The problem with simply opening the Shape is that we
cannot easily control where the opening is or allow for multiple openings. To remedy this,
we can use the DifferenceRail of a new ShapeMerger to intentionally cut out parts of the rail.
The DifferenceRail is a Shape composed of the lines of the solid Shapes in the ShapeMerger
inputs without any lines contributed by the void Shapes.
Step 6.12: Click on the connector cable from the ShapeMerger output to the Extrude. While
it is selected, hit the Delete key to remove it (Cmd-Delete on OS X).
Step 6.17: Connect the DifferenceRail output of the new ShapeMerger to the Extrude node.
Now Robot Kyle will be able to enter the railed area, but we had better add a floor to
provide some footing. This is where the original ShapeMerger output can come into play and
demonstrate how powerful the non-mutually exclusive aspect of the node graph can be.
Step 6.18: Click on the Difference output of the first ShapeMerger, and then click on the
Extrude icon in the right-hand sidebar menu.
Step 6.19: Click and drag the lower green point handle on the Extrude to offset the Plan so
that it is larger than the railing.
Step 6.20: Adjust the height of the Extrude until it appears to be a thin floor slab.
Step 6.21: Select the original Rectangle in the Node Graph Editor and make the fenced-in
area larger, then select the new cutting Rectangle and make the opening larger.
1 2
We can see that, as the node graph becomes more developed, we can modify various handles
in the scene with a ripple effect. For example, at this point, modifying the first Rectangle’s
handles alters both the railing and the floor.
Let’s use the DifferenceRail Shape to create a thick handrail atop the current surface.
Step 6.22: Click on the DifferenceRail to start a connection and then scroll the
right sidebar down until you see the PlanSweep_Plan Mesher icon, and
click on it. A connection will automatically be created. A mesh will
not appear in the scene until we provide the PlanSweep node with a
Section Shape.
The DifferenceRail output is now used to generate two different meshes. The PlanSweep
Mesher is currently at the base of the railing and is too large to be a handrail. To make the
RoundedRectangle Shape smaller, it is far better to adjust its parameters than to scale it using
the Shape’s transform controls. This is because, in parametric modeling, the values of
parameters are important in building logical relationships. If we simply scale the Shape, then
the parameters, which retain their value, will not reflect the size.
Step 6.26: On the Extrude node palette for the rail sides, click on the icon button to the
right of the Material input parameter. This will automatically add a MaterialTool
node to the graph and connect it to the Material input.
Step 6.27: On the MaterialTool node palette for the rail sides, click on the button to open
the Unity material browser window. Choose AX_BrickWall. You can use the scale
and shift parameters in the MaterialTool node Controls foldout to adjust the look.
Step 6.28: In a similar way, add materials to the PlanSweep node for the handrail and to the
Extrude node for the floor slab, perhaps AX_Wood01 and AX_StriatedMarble,
respectively.
If we want to change this model to be more like a room with door openings, we can extrude
the rail walls up.
Step 6.30: Click on the Difference output of the first ShapeMerger and connect it to a new
Extrude node from the right sidebar menu. Move the new Extrude node over near
the rail walls’ Extrude. Connect the output of the brick material to the new
Extrude.
Step 6.31: Turn the Top Cap and Bottom Cap of the new Extrude off and the Backfaces on. In
the scene, lift the new Extrude up until it is atop the rail walls. Adjust the height
of the new Extrude.
Repeating Repeating
Step 6.33: Connect the output of the tower to a GridRepeater_Node in the right-
hand sidebar node menu.
Feel free to open the TowerWithOnionDome Grouper and see how it was assembled with its
own set of nodes, including FreeCurve, Lathe and molding profiles. However, part of the
beauty of Grouper and Library items is the ability to work with pre-formed parametric
objects to give you a head start on environment building.
Step 6.34: Hit the F key to frame the grid of towers in the scene.
Step 6.37: Connect its output to both the SpanU Mesh and the SpanV Mesh inputs
of the GridRepeater node.
Arch_02 does not come with a top piece, since it is intended to be an infill object. Using 2D
Shapes and the same RepeaterTool nodes, we can make a top piece with a molding profile, as
well as a base.
Step 6.44: Resize the Circle that is feeding into the GridRepeater2D so that it is slightly
bigger than the base of the tower.
Step 6.45: Instantiate a Rectangle from the 2D Library left-hand sidebar and size
it so that its corners are under the towers.
Step 6.46: Multi-select the GridRepeater2D and Rectangle nodes and then click on
the ShapeMerger node in the right-hand sidebar. Click on the Solid/Void
toggle button to make the circles solid.
We now have a composite Shape that is the outline of the castle in plan. This Plan Shape
will generate the base and top walkway for the castle.
Step 6.50: Open the Plan input foldout of the PlanSweep and adjust the Offset until the
PlanSweep object looks like the image below.
Step 6.51: Adjust the width of the BaseMolding_02 node to add to the parallel edge.
We now have a Shape to use for the upper walkway and parapet. For this we will use another
PlanSweep.
Step 6.55: From the left-hand sidebar, select the CymaReversaMolding profile Shape
and connect its output to the Section input of the new PlanSweep.
Step 6.56: Select the PlanSweep object in the scene and move it up above the arch
walls. Adjust the Lip Top, Lip Edge and Offset of the PlanSweep.
Step 6.57: Add a new MaterialTool to the Top Cap Material of the new PlanSweep. Set the
material to AX_MedievalWall.
The CymaReversaMolding is a little small for the massing of this castle. Let’s make it a bit
more muscular so that it can hold up some sizable battlements.
Step 6.58: Select the CymaReversaMolding node in the Node Graph Editor and hit the F key
to frame it in the scene. Pull the upper handle upwards and outwards.
Step 6.59: Connect the output of the upper deck ShapeMerger to a PlanRepeater_Plan node in
the right-hand sidebar menu.
Step 6.61: Select the new PlanRepeater and lift it up in the Y-axis until it is sitting atop the
upper deck. Open the Plan input foldout in the PlanRepeater node and adjust the
Offset to move the battlements back a little. Select the Cube node and turn off
Bevels Unified, then set the Top Bevel to about .15.
For the final shot above, Ambient Occlusion was added to the scene’s Main Camera from
Unity’s Cinematic Image Effects, a free download from the Asset Store.
As our graphs become richer and more complex, it is clear that we could benefit from a
node that groups and hides portions of the graph. Fortunately, Archimatix ships with a node
that does just this. In the next chapter, we will take a look at the Grouper node.
7. Group Dynamics
As your parametric models become richer and more complex,
you can use the powerful Grouper node to organize the
Archimatix graph into a series of nested subgraphs. Each Grouper
is a self-contained parametric object that has an interface defined by
the Grouper’s input parameters.
Many of the Library items you have worked with so far are Groupers. For
example, the RicketyStaircase and the ScifiPlatform are Groupers with subnodes
that have been saved to the Library.
A Grouper node may be thought of as a container that can hold other nodes, including other
Grouper nodes, inside of it. Once a node has been placed inside a Grouper, it cannot have a
direct connection with another node outside of the Grouper. Instead, a proxy parameter can
be added to the list of the Grouper’s parameters to relay the connection between nodes
inside and outside of the Grouper.
To initiate a Grouper, you can multi-select nodes and then click the Grouper icon in the right
sidebar of the Node Graph Editor window. The selected nodes will disappear as the new
Grouper node appears in the graph. To see the nodes inside, double-click on the Grouper
node, expanding it. Nodes can be popped back out of the Grouper by dragging them to the
left of the Grouper node. Nodes can be added to a Grouper by dragging and dropping them
over the Grouper node.
Perhaps the best way to understand node group dynamics is to create a group.
Let’s use the Node Graph Editor to create GrayShip, a model that is something like the
SciFiPlatform we instantiated from the Library in Chapter 2 of this guide. In this example,
we will be creating a parametric spaceship that can be used to stamp out dozens of
variations to form an entire fleet.
Step 7.1: In a new scene, instantiate the CathedralPlan from the 2D library by
either clicking on its icon in the left sidebar of the Node Graph
Editor window or by finding it in the Library window.
Step 7.2: Extrude the CathedralPlan by connecting it to the Extrude Mesher icon
in the right sidebar.
Step 7.2: Make the CathedralPlan the Plan input of a PlanRepeater by connecting
it to the PlanRepeater icon in the right sidebar.
Step 7.4: Instantiate a Cylinder from the 3D Library and connect it to the Node
Mesh input of the PlanRepeater.
At this point, your graph should look similar to the one in the image below.
Lets jump in and group some of these nodes. It will be useful to leave the CathedralPlan
outside of the group, allowing us to have a spaceship model that can take different Shapes as
Plan input.
Step 7.5: Multi-select the Cylinder, Extrude and PlanRepeater nodes (but not the
CathedralPlan Shape) and then click on the Grouper icon in the right
sidebar. Multi-selection can be done by either shift-clicking the
nodes or by dragging a rectangle that includes the nodes to select.
Step 7.6: Double-click the thumbnail at the bottom of the Grouper node to expand it.
Step 7.7: In the scene view, select the Extrude and find the green point handles along the
side. Adjust the top handle to give the Extrude a taper. Use the lower one to create
a bevel. The cyan handle coming out from the top green point adjusts the number
of segments in the bevel.
Step 7.8: Select any instance of the Cylinder in the scene.Rotate it until it is parallel to the
tapered side of the hull Extrude.
Step 7.9: Double-click the Grouper thumbnail to pop up a group (in this case, back to the
model).
Step 7.10: Click on the MaterialTool button on the Material input for the Grouper to generate
a MaterialTool node. Choose the Concrete material.
Step 7.11: Click on any Cylinder and hit the “f ” key to frame the Cylinder in the scene and in
the Node Graph Editor. Notice that this has automatically opened the Grouper.
Step 7.12: Add a MaterialTool node to the Cylinder Extrude and choose sci_fi_003.
Step 7.13: Connect the new MaterialTool to the Extrude’s Top Cap Material.
Step 7.14: Set the Lip Top of the Extrude to 1.2 and the LipEdge to 0.24.
Step 7.15: With the first Grouper for the hull open, but with nothing selected, click on the
Grouper icon in the right sidebar to create a new Grouper inside the first Grouper.
Rename the new Grouper “Saucer.”
Step 7.16: With the new Saucer Grouper selected, translate it to the front of the ship.
Step 7.18: Instantiate a DomeMolding Shape from the 2D Library sidebar. Connect it to a
Lathe Mesher in the right-hand node sidebar. Turn the Top Cap of the Lathe to off.
Robot Kyle can hardly wait to take the helm of his new GrayShip!
Archimatix lets you relate any parameter to any other parameter in a graph using a
mathematical expression. For example, if you wanted to set the vertical position of a
Cylinder to always equal the height of a Box, then you would essentially be saying that the
Cylinder should sit on top of the Box as you vary the Box height.
Relations in Archimatix are bi-directional. This means that, in the above example, you can
not only alter the height of the Box and automatically translate the Cylinder, but you could
also translate the Cylinder and automatically alter the height of the Box.
Step 8.1: Start a new scene and add a Cylinder node and a Box node.
Step 8.2: Open the Transform foldout on the Cylinder and the Controls foldout on the Box.
Step 8.3: Click on the Trans_Y parameter of the Cylinder to start a new connector. Move
the mouse to the Height parameter of the Box and click the input to complete the
Relation connection.
Step 8.4: Adjust the height of the Box either by sliding its Height parameter or by dragging
the Height handle in the scene.
Remember, relations are bi-directional, meaning that the connector socket on either side of
the parameter in the node palette can be chosen when connecting parameters. The bi-
directionally of relations also means that you can adjust either end of the connection and
the parameter on the other side of the connection will be modified according to the
expression in the Relation.
The default Relation expression is equivalency, or “=”. In the above example, the Relation
equation is Cylinder.Trans_Y=Box.Height.
Cranking Up Relations
Piston.Trans_Y = sin(Crankshaft.Rot_Z)
http://www.archimatix.com/tutorials/piston-and-
crankshaft
Step 8.10: Open the Edit Relation window by clicking on the green button at the midpoint
of the connection, or by clicking on the connection cable to select it and then
hitting the Spacebar. Change the expressions to those in the image below.
The expressions relating the two parameters are the inverse of each other. In the second
expression, the sine of the Crankshaft.RotZ is multiplied by 2 to give it more sensitivity, and 3
units are added to lift the sinusoidal motion of the Piston to be centered at 3 units above the
Crankshaft. Again, this is fudged geometry designed to produce quick, rudimentary results.
With it, you can now rotate the Crankshaft in the Z-axis indefinitely, and the Piston will cycle
up and down; if you move the Piston up and down, however, the Crankshaft will only respond
while the Piston is just above the Crankshaft (in its first cycle).
I hope you found this guide useful. For more documentation and tutorials, please visit the
Archimatix support site at http://www.archimatix.com.
Class Description
Do you find yourself frequently having to perform the same task several times over the course of a
project? Are there workflows that your firm relies on that are not easily achieved with native Revit tools
and techniques? Do you ever find yourself thinking that your current procedures are just not maximizing
the promise or potential of your BIM? It's times like these where a little Dynamo can be just the thing. In
this session, we will walk through some complete workflows to automate common repetitive tasks and
more importantly, give end users the confidence they need to know that the resulting data they see is
correct and accurate. This session will explore using Dynamo to design a workflow that solves a simple
repetitive task in Revit. We'll discuss the problem, walk through the design of the solution, and explore
the Dynamo graph piece by piece. Don't worry if you are new to Dynamo or programming, we'll keep it
simple, approachable, understandable and free from complex code.
Learning Objectives
• Learn how to identify a good task for Dynamo
• Learn how to frame the problem and break down the steps
• Understand how to approach building a graph even if you are not a programmer
• Learn to organize and document your graphs so they are easy to understand and
modify
Software Version
This session will use Dynamo for Revit and will use Dynamo version 2.0.2 running in Revit
2019.2 (see Figure 1). More information on Dynamo versions and installation in the appendix.
Additional Resources
In this session, I am going to assume that this is not your first time using Dynamo. Therefore, the
basics of launching Dynamo, creating a graph, adding nodes and connecting wires are all
assumed. If you are not familiar with these tasks or are brand new to Dynamo, there are many
online resources that can help you on journey to learn more about Dynamo. There is a list in the
appendix that you can consult before and after the session. But we would like to share a few
useful resources with you right away:
LinkedIn Learning (powered by lynda.com content) has a growing collection of courses that are
well worth your time; including some by yours truly! (Dynamo: Practical) Check them out!
Visit: www.linkedin.com/learning/ to learn more and then search for: Dynamo (see Figure 2).
Introduction
Got some mundane repetitive Revit task to do? Let Dynamo do it! This session explores the
identifying of repetitive Revit tasks that are good candidates for Dynamo and explores a couple
sample solutions in detail. Learn to create repeatable results with no complex coding required. In
this session and handout, we will walk through two quick and practical graphs that you can build to
solve real-world problems back at the office. These include:
• Calculating Room Occupancy Values based on building code guidelines
• Automatically determine and place Wall Type Details in use in a project
SF SM SF SM
required required required required
per per per per
Room Name occupant occupant Room Name occupant occupant
Administration 100 9.2900 Lounge 15 1.3935
Advisors 100 9.2900 Media Review 50 4.6450
Cafeteria 15 1.3935 Men 100 9.2900
Computer Lab 50 4.6450 Office 100 9.2900
Conference 100 9.2900 Open Office 100 9.2900
Copy/Print 100 9.2900 Prep/Dish 200 18.5800
Corridor 100 9.2900 Sprinkler 300 27.8700
Drafting 100 9.2900 Stair 100 9.2900
Dry Storage 300 27.8700 Storage 300 27.8700
Electrical 50 4.6450 Toilet 100 9.2900
Instruction 20 1.8580 Vest. 100 9.2900
Library 50 4.6450 Women 100 9.2900
Lobby 5 0.4645
The out-of-the-box Revit Architectural Advanced Sample Project will be used in the demonstration.
The Room names in the table come from this project and have been compared to the National
Building Code to come up with the values listed. Once again, please check the values against your
own resources to ensure accuracy and compliance.
Why Use Dynamo for this task?
Calculating Occupancy Values is not difficult to do. You simply take the area of the room or space,
divide it by the number of required square feet [or square meters] per occupant and round down to
the nearest whole value. This is your maximum occupant load for that space.
So why not just do this calculation directly in Revit? You theoretically could do this, but it would
require a good deal of manual input. At minimum, you would be required to input the values from
Table 1 above somewhere in the model. The most likely place would be in a custom parameter
assigned to the Room Category. However, there would be no easy way to input this data based on
room function. So, you would be forced to manually input it for each room. And since room
elements do not have types, you would be required to input the value for every room individually.
Now clever use of schedule grouping and sorting could speed this process up if you group and
sort by like functions. But consider just the simple example presented here, Table 1 includes 7
unique occupancy values used by 25 unique room names.
This means you would first need to create a custom project parameter to receive the occupancy
value input, then create a schedule sorted by the 25 room names and finally make 25 separate
edits to input those 7 occupancy values into the custom field. While making 25 edits is arguably
not a tremendous amount of effort, it is certainly more than most of us wish to do manually; not to
mention the potential for error when performing such repetitive input tasks. Furthermore, many
projects (if not most) will have far more room types than the 25 used here.
Dynamo to the rescue! Dynamo is great for repetitive tasks like this one.
Framing the problem
So, what is involved in getting Dynamo to do this task for you? Well you must frame the problem in
a way that Dynamo will understand and be able to process regardless of the input you feed in.
This means thinking about how data flows through a Dynamo graph and ensuring that you
anticipate any issues or errors that are likely to occur along the way. The best thing you can do is
keep it simple and stay focused on the main task. Here’s what we want to do:
Have Dynamo gather all rooms in our project file, organize them by room type/usage and then
assign the correct occupancy value to each one based on the table and calculation outlined
above.
This group makes the selection of Revit elements. The first node chooses the category of
elements we want; Rooms in this case. And then the second node gathers all elements in
the model that belong to this category. In other words, it selects all the room elements in
the entire model. The Watch node is optional. But it can be nice to give feedback on the
graph as you work through it. In this case, it is listing the selection and shows us that
Dynamo has selected a total of 91 rooms. If you wanted to verify this, you could make a
room schedule in Revit and is would yield the same quantity of rooms.
Group 2
Group 2 also contains three nodes, but really there is one main one:
Element.GetParameterValueByName (See Figure 4).
The list of room names from group 1 feeds into the element port of the
Element.GetParameterValueByName node here in group 2. This is a very useful Revit
node. It allows you to grab the value of any parameter on a selection of Revit elements. In
this case, we are using a String node to feed in the name of the parameter we want into
the parameterName input. A String node is a text node. The computer science word for
text values are “strings.” The results here show up in another Watch node.
Group 3
Group 3 contains five nodes (See Figure 5). There are two “ByKey” nodes. Keys are used to sort
and group lists. In the first case, List.SortByKey, the node takes a list of values (91 total Revit
Room elements from group 1) and sorts them based on the list of room names from group 2. This
generates two outputs: a sorted list and a list of sorted keys.
These outputs are next fed into the List.GroupByKey. This node organizes the list into a
“structured” list. A structured list is a list of lists. In other words, there is a main list that contains
sub lists as its items. Here we end up with a sub list for each unique room name (the keys used for
sorting and grouping) and then the values on these sub lists are the unique rooms corresponding
to those name values. So, for example, the first list (0 List) contains three items. These are the
three rooms named: Administration. You can see this structured list in the first Watch node.
Figure 5 – Sort and group the list as a structured list using room name as the organizing key
The second Watch node gives us the output of the unique keys from the GroupByKey
node. This shows the 25 unique room names used in the project (and noted above).
The final node in this group gives us a count of each sub list. To achieve this, you must
use “list at levels.” This is the small chevron icon next to the input. You click this, check
the Use Levels checkbox and then set which level you want the node to apply at. Using
@L2 in this case gives us a list that counts each sub list instead of the main list and
therefore gives us 25 counts (corresponding to the quantity of sub lists). If you applied the
list at levels to either @L1 or @L3, you would get very different results (see Figure 6).
Figure 6 – Use List at Levels to control at which list in the nested structure the node function should apply
To summarize where we are at in the first three groups, we started by selecting all the
rooms in the model, querying their room names and then sorting and grouping the original
collection of rooms by those room name values and then counting the total number of
instances of reach room name. Next, we want to match up our list of occupancy values
with the rooms of each room type (based on names); onto group 4.
Group 4
Group 4 shows 7 nodes (See Figure 7). Part of being successful in Dynamo (and any
programming endeavor) is knowing what to do in Dynamo and what to do elsewhere. It is certainly
possible to build the building code table directly in Dynamo. Doing so would require more nodes
and make a more complex graph. Later editing of the values should the code change would
require reworking the Dynamo graph. Instead, this group does something much simpler. It uses
Excel. Excel is well known by most users and a great way to build a list of values. We can then
simply have Dynamo read the data directly from the Excel file and use the data in Dynamo and
Revit. Furthermore, since the data lives in Excel, it is easy to update when required.
Let’s dig into the logic a bit. We start with a List.GetItemAtIndex node. This node simply
uses the index value you feed it (from a Number node) to extract the corresponding value
from a list. In this case, we are feeding in the transposed list of Excel data, but since we
are only asking for index 2, we are getting just the metric occupancy multipliers. You can
see this in the first Watch node. But this is only 25 values since the Excel file only
contains one value for each unique room name. In order to make this work correctly with
our model, we must ensure that we match the original list and its data structure.
Remember our example above, the first list contained three instances of rooms called
Administration. We need each of these rooms to use the 9.29 occupancy multiplier.
This gets us back to why we wanted the count of each sub list in Group 3 above. Using
that list of counts we feed it into the List.OfRepeatedItem node. This node will repeat one
or more values fed into it using the quantity fed into the amount input. So here, we feed
out list of unique room occupancy multiplies from Excel (25 total) and repeat each one the
number of times coming from the List.Count node above. We will end up with the
structured list show in the final Watch node and if you compare its structure to the
previous structured lists, it is a perfect match and we are back to 91 items!
Group 6
Group 6 contains four nodes (See Figure 9).
Here we are going back to the original list of Rooms and getting another parameter; the
Area this time. With this information, we can use the occupancy multipliers and calculate
our final required occupancy values. A simple division node (/) is used here for this
purpose. Math.Floor is similar to rounding, but eliminates any fractional value and rounds
down to the nearest whole number.
Group 7
Group 7, our final group has just three nodes (See Figure 10).
Figure 12 – Select all the walls in the project with two simple nodes
From this list of individual wall elements, we next want to get the Revit Type name of each wall.
The FamilyType.Name node is used for this purpose and can be found on the Revit > Elements >
FamilyType branch of the library or by searching. Wire the output of All Elements of Category to
this node. Next, from the Revit > Elements > WallType branch (or by searching), place the
WallType.ByName node. Wire this to the output of the last node (see Figure 13).
Figure 13 – Select the wall types from the list of walls
It might not be clear why all these nodes are required. But the outputs of each node give some
clues. The All Elements of Category outputs individual model elements. The next node:
FamilyType.Name gives the names (as text, or “strings”) of the types used by each of those
elements. The final node selects the actual Revit Wall Types based on the names in the middle
list.
From the Revit > Elements > Element branch we next need an
Element.GetParameterValueByName node. As we have seen before, this allows us to grab the
value of the named parameter. A String node will allow us to indicate the parameter name we
need. In this case, that parameter is: “Type Mark.” It is case sensitive, so be sure to type is
correctly. Type Mark values are what show in our wall tags and how we indicate each wall type in
the model and their corresponding details (see Figure 14).
Figure 14 – Grab the Type Mark values of each wall type
After you run the graph and expand the preview bubble, you will note that some walls do not have
a Type Mark value. We’ll filter those out next. A FilterByBoolMask node is already in the graph
for this purpose. The String that we will use for filtering is empty. The != node checks if the values
fed into the x port are not equal to the one fed into the y port. This gives a list of true and false
values. This can be used to branch our output into two lists with the boolmask (see Figure 15).
Figure 15 – Filter the list into two lists, those with Type Marks and those without
The List.FilterByBoolMask node has two outputs. I will frequently use Watch nodes to report the
values when there are multiple outputs. This just keeps it cleaner. You can see those in the
orange group called “Outputs.” These are just for information only and are optional.
The remainder of the graph is already built in the starter file. Let’s walk through the rest of it now.
Group 2
Group 2 has three nodes. The first takes the list of “In” elements from the BoolMask and finds only
the unique items. Next this list is sorted, and then using a + node, we add a prefix to the front of
the names to make them match the names used for the drafting details back in our Revit project
file (see Figure 16).
Figure 16 – Find the unique Type Marks and edit the names to match the details names in Project Browser
Group 3
On to group 3. Here we will match up the detail views in the project with the names we just
constructed. First, using Categories and All Elements of Category again, we select all the Views
this time. From the list, we grab their names (Element.Name) and then use the List.IndexOf node
to figure out where each view name occurs on the list. This is asking for the specific index (or
address) of the named item on the list of view names (see Figure 17).
Figure 17 – Locate the required detail views from the list of all project views
Group 4
The final group uses the Sheet.ByNameNumberTitleBlockAndViews node. This node creates a
sheet and adds a list of views. Satisfying the first two inputs is accomplished with simple String
nodes. The titleBlockFamilyType input is satisfied with a Family Types node. To satisfy the
list of views, we simply feed in our list from group 3. The final node is frozen, so be sure to right-
click it and un-freeze before running.
Figure 18 – Create a sheet and populate with the list of required details
When you run the graph, you should see a sheet appear in Revit. If you open that sheet, each of
the views from group 3 will have been placed on the sheet. They end up in the lower left corner of
the sheet. Simply move them where you wish them to go on the sheet (see Figure 19).
Figure 19 – The resulting sheet with its placed details
This graph achieves the basic requirements. If you wish, you can enhance it to move the viewports
to a better location for you instead of doing that manually. You can also create a second graph to
update this sheet should the required details change. I will leave those tasks to you as a challenge
exercise if you are interested. But keep in mind that you can also just delete the sheet and run the
graph again in the future. It is up to you.
Conclusion
These were two fairly simple examples. But hopefully they help illustrate some of the tasks you
should consider using Dynamo for. Anytime you have a well-defined task that is repetitive or
laborious, you should consider Dynamo as an alternative to manual processing. Not every
repetitive task will be improved with Dynamo. The best candidates are those that you can clearly
and quickly define the logic and steps for. This will help you reap the benefits of automation. If you
spend hours building a graph that only saves a few minutes, that is probably not the best use of
your time. However, if the initial investment in building the graph can be recouped on the current or
future projects, then it is likely a good candidate for Dynamo automation.
UNITYREV - BRIDGING THE GAP BETWEEN BIM AUTHORING
PLATFORMS AND GAME ENGINES BY CREATING A REAL-TIME BI-
DIRECTIONAL EXCHANGE OF BIM DATA
POST-CARBON, Proceedings of the 27th International Conference of the Association for Computer-Aided
Architectural Design Research in Asia (CAADRIA) 2022, Volume 2, 527-536. © 2022 and published by the
Association for Computer-Aided Architectural Design Research in Asia (CAADRIA), Hong Kong.
528 K.W. MAY ET AL.
1. Introduction
This paper presents UnityRev, an open-source and freely available software package
that enables a workflow designed to facilitate a real-time bi-directional and
synchronous exchange of Building Information Modelling (BIM) data between a BIM
authoring platform (i.e. Autodesk Revit) and a game engine (i.e. Unity 3D). Game
engines play a pivotal role in recent research, as they act as a stepping-stone for
researchers to virtually prototype and build software applications by providing them
with a set of software development tools. Previous works comparing game engines and
BIM authoring platforms have highlighted three primary motivations for using game
engines for architectural representation. Specifically, the interaction, visualisation, and
real-time capabilities associated with game engines provide a layer of functionality that
BIM authoring platforms are unable to provide (Pelosi, 2010, Boeykens, 2011). Over
the last decade, the usage of game engines within Computer Aided Architectural
Design (CAAD) research has risen significantly with a large focus on incorporating
BIM models with advanced visualisation tools such as Virtual Reality (VR) and
Augmented Reality (AR) displays. However, despite the importance of game engines
in current VR/AR BIM research, the ability to communicate BIM data between BIM
authoring platforms has remained a consistent issue for researchers working within this
particular field.
To bridge the gap between BIM authoring platforms and game engines, various
tools have been released to support the integration of BIM within game engines;
however, these tools lack the capability to support a natural real-time, and synchronous
exchange without loss of BIM data. Due to the uni-directional flow of data from these
tools, manipulations that occur to the BIM model within game engines are not
synchronised back to the BIM authoring platform that contains the original BIM
model. Due to the limited tools available, and lack of BIM support provided by game
engines, many researchers utilising game engines to prototype BIM-based applications
export BIM models from BIM authoring platforms into a file format that is natively
supported by the game engine. This process generally involves exporting a BIM model
from Revit as a Filmbox (FBX), Object (OBJ) file or other similar data formats
supported by game engines that only provide geometric or partial metadata (Bille et al.,
2014). As a result, a large portion of the metadata (e.g. cost, schedule, manufacturer,
etc.) associated with the geometric model is lost, subsequently transforming the
information-rich BIM model into a generic three-dimensional Computer-Aided Design
(CAD) model. We believe this limitation to be one of the major gaps in the adoption
of immersive BIM-based research within the Architectural, Engineering, and
Construction (AEC) industrial sectors. Recent works from the authors have a validated
this claim where a workshop was held by the researchers with four AEC industry
representatives. The AEC industry representatives stated that the loss of BIM data
caused by cross-platform BIM communication was one of the major barriers associated
with BIMs, and the integration of VR, and AR applications with BIM models (May et
al., 2022).
To address the aforementioned issues, an open-source workflow capable of
facilitating a real-time bi-directional and synchronous exchange of BIM data between
BIM authoring platforms and game engines could be particularly useful to addressing
one of the major research gaps associated with the process of integrating BIM with
UNITYREV - BRIDGING THE GAP BETWEEN BIM 529
AUTHORING PLATFORMS AND GAME ENGINES
2. Related Works
To identify common tools and previous research exploring the process of linking BIM
authoring platforms and game engines, we conducted a literature review focusing
specifically on asynchronous and synchronous workflows designed for CAD/BIM
authoring platforms to game engine integration.
model within VR (i.e. Unity). The XML file could then be parsed back to the original
IFC file using an open-source IFC management software: xBIM toolkit (Lockley et al.,
2017). Similar investigations have also been conducted by (Khalili, 2021); however,
using the FBX data model which is natively supported by game engines as opposed to
IFC. Our review shows that, the primary advantage of an IFC-based approach is the
interoperability and adaptability of the workflow, as it can be integrated with any BIM
authoring platform which provides support for IFC. This is a considerable step towards
achieving an intuitive integration of BIM data across all BIM authoring platforms and
game engines.
readily within the design phase. This could potentially allow an architect to identify
design issues and discrepancies much earlier in the design and mitigate the need for
major re(iterations) later, resulting in time and cost saving.
5. Limitations
The initial development of UnityRev could be potentially improved in various aspects.
Firstly, the initial implementation of the network is not well optimised and is designed
to focus primarily on the functionality goals we set out to achieve as opposed to
performance. Additionally, limited user-testing has been carried out on the initial
software, and comprehensive user-testing to identify issues could significantly improve
the usability of the software. We also encountered limitations associated with using the
Revit API; for example, creating new elements is only capable of flowing from a Revit
to Unity direction. Lastly, the dependency of the Revit API to achieve this real-time
two-way communication between a BIM authoring platform and game engine prevents
us from providing future support for UnityRev on alternative BIM authoring platforms.
These limitations are being addressed in the current enhancement of the research.
6. Conclusion
This paper presented UnityRev: An open-sourced software package that enables a
network-based workflow designed to bridge the gap between a BIM authoring
platform (Revit) and game engine (Unity) by creating a real-time bi-directional
exchange of BIM data. In summary, we conducted a literature review in the field and
an analysis of previous CAD/BIM authoring platforms to game engine workflows and
their implementations. We then presented a system overview of UnityRev which
describes the system capabilities and how UnityRev addresses specific gaps identified
in the review and analysis. Next, we presented two example applications as concept
demonstrators that aimed to showcase two practical collaborative use-case scenarios
between a BIM authoring platform and game engine that were not previously
achievable without the use of the synchronous bi-directional workflow being proposed.
The general future directions of this work can be improving upon the software by
addressing the limitations described in Section 5. We are also motivated by the recent
announcements from Facebook and Microsoft that are working towards creating a
metaverse - a network of 3D virtual worlds. We envisage the tools presented in this
paper can provide a bridge between BIM allowing bi-directional communications to
extend the future capabilities of the metaverse. This work was specifically designed to
pilot for a larger project by the authors, which focuses on integrating immersive
displays with building performance simulators for real-time visualisation and
simulation of architectural design. Our broader motivation of this research is to advance
BIM research by encouraging new possibilities and use-cases that can be achieved
through VR/AR-based approaches adopting UnityRev. As described above, we
demonstrated in Section 4.2 that a game-engine based VR building performance
simulator could be efficiently integrated with BIM models to support the architectural
design process. This highlights a scenario where UnityRev could be used in green
building research, potentially leading to deigning more energy-efficient and sustainable
buildings and cities.
536 K.W. MAY ET AL.
References
Bille, R., Smith, S. P., Maund, K., & Brewer, G. (2014, December). Extending building
information models into game engines. Proceedings of the 2014 conference on interactive
entertainment (pp. 1-8).
Boeykens, S. (2011). Using 3D Design software, BIM and game engines for architectural
historical reconstruction. Designing Together-CAADfutures (pp. 493-509).
Chotrov, D., & Maleshkov, S. (2013, July). Simultaneous bidirectional geometric model
synchronization between CAD and VR applications. In International Symposium on
Visual Computing (pp. 288-297).
Du, J., Zou, Z., Shi, Y., & Zhao, D. (2018). Zero latency: Real-time synchronization of BIM
data in virtual reality for collaborative decision-making. Automation in Construction, 85,
((pp. 51-64).
Edwards, G., Li, H., & Wang, B. (2015). BIM based collaborative and interactive design
process using computer game engine for general end-users. Visualization in Engineering,
3(1), 1-17.
Harlan, J., Schleich, B., & Wartzack, S. (2020). Linking a game-engine with CAD-software to
create a flexible platform for researching extended reality interfaces for the industrial
design process. Proceedings of the 31st Symposium Design for X (DFX2020) (pp. 169-
178).
Khalili, A. (2021). An XML-based approach for geo-semantic data exchange from BIM to
VR applications. Automation in Construction, 121, 103425.
Liang, J., & Green, M. (1994). JDCAD: A highly interactive 3D modeling system. Computers
& graphics, 18(4), 499-506.
Lockley, S., Benghi, C., & Cerny, M. (2017). Xbim. Essentials: a library for interoperable
building information applications. The Journal of Open Source Software, 2(20), 473.
May, K. W., KC, C., Ochoa, J. J., Gu, N., Walsh, J., Smith, R. T., & Thomas, B. H. (2022).
The Identification, Development, and Evaluation of BIM-ARDM: A BIM-Based AR
Defect Management System for Construction Inspections. Buildings, 12(2), 140.
May, K. W., Walsh, J., Smith, R. T., Gu, N., & Thomas, B. H. (2020). VRGlare: A Virtual
Reality Lighting Performance Simulator for real-time Three-Dimensional Glare
Simulation and Analysis. In ISARC. Proceedings of the International Symposium on
Automation and Robotics in Construction (Vol. 37, pp. 32-39). IAARC Publications.
May, K., Hanan, I., Cunningham, A., & Thomas, B. (2019, October). 3duitk: An opensource
toolkit for thirty years of three-dimensional interaction research. In 2019 IEEE
International Symposium on Mixed and Augmented Reality Adjunct (ISMAR-Adjunct) (pp.
175-180).
Motamedi, A., Wang, Z., Yabuki, N., Fukuda, T., & Michikawa, T. (2017). Signage visibility
analysis and optimization system using BIM-enabled virtual reality (VR) environments.
Advanced Engineering Informatics, 32, 248-262.
Nandavar, A., Petzold, F., Nassif, J., & Schubert, G. (2018). Interactive Virtual Reality Tool
for BIM Based on IFC-Development of OpenBIM and Game Engine Based Layout
Planning Tool-A Novel Concept to Integrate BIM and VR with Bi-Directional Data
Exchange. Proceedings of the 13th International Conference on Computer Aided
Architectural Design Research in Asia (CAADRIA).
Pelosi, A. W. (2010). Obstacles of utilising real-time 3D visualisation in architectural
representations and documentation. Proceedings of the 15th International Conference on
Computer Aided Architectural Design Research in Asia / Hong Kong (pp. 391-400).
Vanacken, L., Grossman, T., & Coninx, K. (2007, March). Exploring the effects of
environment density and target visibility on object selection in 3D virtual environments.
In 2007 IEEE symposium on 3D user interfaces. IEEE.
¡f ame objects that synchronize across the nerwork need identifiers (IDs) ro dis-
lI..i-irr",. .".h oth.r. O.r increasingly common multiselver sysrems that have
massive user access [Svarovsky02], millions of game objects are potentially generated
and destroyed every minute, and some of them need to be stored in, or synchronized
with, a database. If each game object is not identiûed uniquel¡ the objects may con-
flict, and dupiication of data is possible. This results in difficult synchronizarion of
game objects between the game seryers.
Because of this problem, generation of Globally Unique Identifiers (GUIDs) is a
required feature for game object systems of online games. Additionall¡ if these
GUIDs can contain useful information, such as the type of object and the time of
object creation, the GUIDs can be effectively utilized for tracing and managing
objects. This article suggests a method for generating64-bit GUIDs safely and effì-
cientiy using an ID server and object factones.
lower 16 bits to store the ID of actual object instance. But for online games, especially
MMORPGs where persistent worlds need to be maintained, a GUID space of 4 bil-
lion isnt suffìciently large. In extreme cases, 10,000 game objects requiring GUIDs
can be created every second, filling the 4 billion ID maximum within five days.
Since Nexon, Incorporated released Nexus TK in 1996 (the first MMORPG),
they have released numerous games that require large numbers of unique object iden-
tifiers. Some cf them used 32-bit IDs; and in time periods that ranged from a few
months to three years, these games exhausted their entire 32-bit spáce. Some that
used 64-bit IDs also exhausted their potential space when bits were improperly uti-
lized. \JØhen ID systems filled up during service, ir was necessary to change ID-issuing
methods and replace every ID issued in the past, which was really painful. It was real-
ized that when issuing IDs, a secure space was needed that could be used for at least
10 years.
Efficiency
Creating a l29-bit GUID with compounded time or a MAC address is already widely
known IITU-T X.667). Howeve! using 16 bytes for an ID is expensive in processing,
persistent storage space, and network bandwidth. In addition, existing 128-bit GUID
creation methods are too complicated to use in object factories expected to produce
10,000 objects per second. For game object IDs, there needs to be a more affordable
data type and simple creation methods.
only write IDs, and not additional information about the game object itself.
Seman-
It can also be helpful for data-mining trends, such as item populariry and other user-
that
influenced .-.rg..r, properries of thè persistent world. F.xamples of information
be .orrt"i.r-.d within an ID are creation time, the factory from which it was cre-
could
ated, and the ryPe of game object'
4
Issue
ID Server Time tag
Object Factory
----------.->
Attach
Serial nunrber
GUID
generãtesatime tto
A seriøl number b
whicb is combined witb the time tag, and tbe f'nal
64-bit GUID is issued.
\X/hile the dme tagt uniqueness is guaranteed globall¡ the local uniqueness ofthe
^final
serial numbe, .o-pl.i., the gloU"l CUIO. Also, the ID server takes responsibil-
iry for the time ,"gi g....",ion, object factories bear responsibiliry for generetion
"nd
oiserial .rrrmb..s. A, a result, the structure becomes simple, roles are clear, and man-
aging ID generation is efficient.
0x O O RRI I I I o:Objecttype
86its' s6iß Giñ= R :Reserved
I : Instance number
FIGUBE 7.3.3Serial ruumber generøtion. In
hexadecimal notation, C is the object type, R is
reserued, and I is tbe instance number
The instance number, like the time tag's chunk number, is a value increased every
time a serial number has been issued. \X/hen an object factory acquires a new rime tag
from the ID server, the instance number resets to zero. If there is a separete instance
number counrer for each rype of game object, object factories can generare n x 65536
serial numbers with one time tag, where n is the number of object rypes.
v.g Generating Globally Unique ldentifiers for Game Obiects 627
Handling Exceptions
A variery of problems can arise with a global GUID system if needs are not properly
anticipated and handled, including overflow and securiry issues. Here we briefly dis-
cuss how such problems can be addressed.
Gonclusion
Naive generation of IDs isnt much of a problem, but designing an ID-issuing
system
that doesn't have to be modified during se¡vice is a littlã triJ.y. \x¿. hop. ihát
ou.
experience, learned through mistakes, comes in handy for you.
References