Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
1
LINKING BIM TO GAMING ENGINE TECHNOLOGY
By
RYAN D. FINTEL
A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN BUILDING CONSTRUCTION
UNIVERSITY OF FLORIDA
2012
2
© 2012 Ryan D. Fintel
3
To my parents
4
ACKNOWLEDGMENTS
I would like to thank Dr. R. Raymond Issa, for your help to guide me along my
research path. For advising me in creating a research topic of great interest and
prospect, for ensuring I had all of the technology available, and helping me put together
a team to assist with the analysis.
I would like to thank the team that helped me go through the countless options and
develop the guide for which we set out, for spending the time to learn completely
unknown applications, and for enthusiastically participating in all of our weekly progress
meetings. Thank you Andrew Fischer, Alejandro Torres, Jintaek Ock, and Arman Landi!
Thank you Brittany Giel for taking away time you should be spending on your own
research to help me and the rest of the team progress along our research path, and for
your final detailed review of the guide we created. Finally I would like to thank Richard
Kelley for the time you spent installing and reinstalling all of the applications and
restoring the PCs until we could get everything working in 3D.
5
TABLE OF CONTENTS page
ACKNOWLEDGMENTS .................................................................................................. 4
LIST OF TABLES ............................................................................................................ 8
LIST OF FIGURES .......................................................................................................... 9
LIST OF ABBREVIATIONS ........................................................................................... 11
ABSTRACT ................................................................................................................... 12
CHAPTER
1 INTRODUCTION .................................................................................................... 14
Building Information Modeling ................................................................................. 14
Advantages and Limitation of Current BIM-Specific Visualization Tools ................. 15 Advantages and Limitations of using Game Engines for AEC Visualization ........... 16 Statement of Purpose and Deliverables.................................................................. 17
2 LITERATURE REVIEW .......................................................................................... 18
Overview of Immersive Visualization ...................................................................... 18
Early Attempts at Using Gaming Engines for AEC Visualizations ........................... 18 Virtual Reality Notre Dame Project ................................................................... 19
Virtual Reality on a Low-End PC ...................................................................... 21 Virtual Office Walkthrough ................................................................................ 22
Advanced Use of Gaming Technology in the AEC Industry .................................... 24
BIM-Game Tool Study ...................................................................................... 25 Gaming Engines for Construction Safety Education ......................................... 28
Task-Based Virtual Reality Simulation ............................................................. 30 The Virtual City ................................................................................................. 32
Simulated Construction Operations .................................................................. 34 Introductory Analysis of Gaming Engines for BIM Visualization .............................. 36
Selection Criteria .............................................................................................. 36 Unity3D............................................................................................................. 37 Quest3D ........................................................................................................... 38
ShiVa ................................................................................................................ 38 Virtools ............................................................................................................. 39 Creator ............................................................................................................. 39 Best Choice of the Five .................................................................................... 40
3 RESEARCH METHODOLOGY ............................................................................... 41
Managing the Analysis ............................................................................................ 41
6
Phase I: Initial Analysis of Various Import Methods ................................................ 41 Autodesk 3DS Max 2012 .................................................................................. 43 Autodesk Maya 2012 ........................................................................................ 44
Autodesk Softimage 2012 ................................................................................ 45 Maxon Cinema 4D R13 .................................................................................... 46 Luxology Modo V601 ........................................................................................ 46 Best Transfer Application ................................................................................. 47
Phase II: Using 3DS Max to Create a Walkthrough ................................................ 47
The Model ........................................................................................................ 48 Materials and textures ...................................................................................... 49 Site work and vegetation .................................................................................. 50
Sunlight and Artificial Light ............................................................................... 51 Animating the Model ......................................................................................... 51
Phase III: Test Trial of the Guide ............................................................................ 55
4 RESULTS OF THE TRIAL ...................................................................................... 57
Initial Difficulties ...................................................................................................... 57
The Completed Trials.............................................................................................. 58
5 GUIDE .................................................................................................................... 60
Setting up the Working Folders ............................................................................... 61
Importing Revit Material Library ........................................................................ 62 Importing Scripts and Shaders ......................................................................... 62
Required Alterations to Revit Model ....................................................................... 64 Exporting the Model from Revit ............................................................................... 65
Using 3DS Max Model to Import into Unity3D ......................................................... 67 Setting Up the Unity Workspace ............................................................................. 68 Applying Textures to the Model .............................................................................. 71
Lighting the Model .................................................................................................. 73 Creating Environment and Site ............................................................................... 77
Door Operations ..................................................................................................... 78 Elevator Operations ................................................................................................ 80
Exporting Walkthrough............................................................................................ 85
6 CONCLUSION ........................................................................................................ 88
Review of the Study ................................................................................................ 88 Barriers to Research ............................................................................................... 88
7 RECOMMENDATIONS FOR FUTURE STUDY ..................................................... 90
Animation Library .................................................................................................... 90 Uses for Interactive 3D Animations ......................................................................... 91
7
APPENDIX
A SCRIPTS ................................................................................................................ 92
LightSwitch ............................................................................................................. 92
DoorOperation ........................................................................................................ 93 ElevatorController ................................................................................................... 94 PanelController ....................................................................................................... 95 Sliding Door X-Axis Negative .................................................................................. 97 Sliding Door X-Axis Positive ................................................................................... 98
Sliding Door Z-Axis Negative .................................................................................. 99
Sliding Door Z-Axis Positive .................................................................................. 100
B SHADERS ............................................................................................................ 102
GlassMap Shader ................................................................................................. 102
LIST OF REFERENCES ............................................................................................. 103
BIOGRAPHICAL SKETCH .......................................................................................... 106
8
LIST OF TABLES
Table page 2-1 Low-end personal computer specifications ......................................................... 21
3-1 Students’ levels of experience prior to completing trials ..................................... 56
3-2 Students’ computer used for trials ...................................................................... 56
3-3 Students’ time to complete trial ........................................................................... 59
9
LIST OF FIGURES
Figure page 2-1 Images of the model of Notre Dame Cathedral .................................................. 20
2-2 The process to create a virtual walkthrough from a set of 2D drawings ............. 23
2-3 The process to create a virtual walkthrough from a set of 2D drawings. ............ 24
2-4 The three sections of the BIM-Game Modules ................................................... 26
2-5 Images of the model of BIM-Game Office Study ................................................ 27
2-6 Images of the model of the construction safety game ........................................ 29
2-7 Proof of concept images of Experienced based Virtual Prototyping Simulator ... 32
2-8 Model of GIS linked with 3D CAD shown in stereoscopic vision......................... 33
2-9 Example of a building model with sustainability measures shown ...................... 34
2-10 Model of forklift groups for construction simulation ............................................. 36
5-1 Layout of Unity3D set-up. ................................................................................... 60
5-2 Create New Project dialog box ........................................................................... 62
5-3 Creating scripts in Unity3D ................................................................................. 63
5-4 Turning off an object or model in the Inspector pane .......................................... 67
5-5 Importing and opening models in Unity3D .......................................................... 69
5-6 Importing a third person character controller ...................................................... 70
5-7 Play button used to enter the Game mode ......................................................... 71
5-8 Manipulating textures in Unity3D ........................................................................ 72
5-9 Adding materials to empty objects ...................................................................... 73
5-10 Setting up artificial lighting. ................................................................................. 75
5-11 Setting up a light switch box collider ................................................................... 77
5-12 Setting up a door to swing around a hinge object ............................................... 80
10
5-13 Selecting the doors can help determine which direction SlidingDoorScript should be applied ............................................................................................... 82
5-14 The elevator panel controller properly located, with the box collider properly sized in green. .................................................................................................... 85
11
LIST OF ABBREVIATIONS
AEC Architecture, Engineering and Construction
AI Artificial Intelligence
API Application Programming Interface
BIM Building Information Modeling
C# C Sharp (Programming Language)
CAD Computer Aided Design
CAVE Cave Automatic Virtual Environment
CPU Central Processing Unit
DDR Double Data Rate
GIS Geographical Information Service
GPU Graphics Processing Unit
HVAC Heating, Ventilation and Air Conditioning
MEP Mechanical, Electrical and Plumbing
MI Miscellaneous File
OOP Object Oriented Programming
PC Personal Computer
RAM Random Access Memory
RPC Rich Photoreal Content
SDK Software Development Kit
VR Virtual Reality
VRND Virtual Reality Notre Dame
XML Extensible Markup Language
12
Abstract of Thesis Presented to the Graduate School of the University of Florida in Partial Fulfillment of the
Requirements for the Degree of Master of Science in Building Construction
LINKING BIM TO GAMING ENGINE TECHNOLOGY
By
Ryan D. Fintel
December 2012
Chair: R. Raymond Issa Major: Building Construction
The AEC industry is continuously looking for new methods for the visualization of
construction projects. In the last decade it has become more common to use gaming
engines for this task, due to advanced real-time rendering technology. This is typically
an arduous and time consuming process, often requiring professional rendering
services. Using an existing BIM model, rather than building an entire new 3DCAD
model, can streamline this process and open up this technology to in-house
visualization. The lack of a defined method for the process of animating a BIM model
inside of a gaming engine is preventing its common adoption in the AEC industry.
This study proposes a method for animating a building information model created
in Autodesk Revit 2012 in the Unity3D gaming engine. Since a direct import of the
model into the Unity3D gaming engine is not possible, several applications were
analyzed for use in assisting the transfer process. Autodesk 3DS Max was selected for
this task. A method for reapplying textures, creating the environment and lighting the
model was developed. Common animations to a building operation were scripted,
including a door opening, an elevator operation, and a light switch. A step-by-step
guide for this process was written describing the process in great detail. The guide was
13
tested by four students with varying experience in Unity3D, 3DS Max and Revit.
Adjustments were made to the guide based upon the feedback. The guide can be used
to create real-time interactive visualizations of a building information model, and will be
helpful in aiding even the smallest AEC firms adopt the latest in visualization
technology.
14
CHAPTER 1 INTRODUCTION
Building Information Modeling
Building Information Modeling (BIM) has emerged as the latest visualization tool in
the construction industry, with new developments continuously being explored by the
Architecture/ Engineering/ Construction (AEC) community through practice, teaching
and research. (Yan et al. 2011) After almost 30 years of BIM evolution Bentley
Systems, Graphisoft and Autodesk Revit have emerged as the industry leaders. (Howell
and Batcheler 2008) Autodesk Revit is currently being used heavily to model the
complex details of what will be the third tallest building in the world, One World Trade
Center in New York City. To model the intricate existing conditions of The Sydney
Opera House, the architects are using Bentley Systems’ BIM suite. At 92 stories and
975 feet tall, the Eureka Tower in Australia utilized Graphisoft’s BIM software for its
construction, completed in 2006. Landmark projects like these using BIM technology is
one of the first steps in its widespread use.
A BIM model created in either the design or the construction phase of a project
can serve multiple purposes. A model created by a team of architects and engineers
can be used for design and visualization, producing construction documents and
helping in clash detection. A model created by the construction management team can
be used for construction sequencing, estimating, fabrication, and facilities management,
in addition to clash detection and visualization, though the largest use of BIM has been
for visualization. (Becerik-Gerber and Rice 2010)
15
Advantages and Limitation of Current BIM-Specific Visualization Tools
With visualization being the primary use of BIM, it is surprising how limited the
visualization options have been. This author has often noted when working in Autodesk
Revit that the use of the built-in rendering engine often resulted in lower quality images
than a simple screenshot of the model would produce. The use of one of many more
developed rendering engines such as Autodesk 3DS Max, Maya, Blender or Kerkythea,
could produce photorealistic renderings. Both the number of rendering engines
available and the quality of the resultant 2-D images have been improving rapidly over
the last several decades. Despite these advances, few strides have been made by
software developers in 3-D visualization of BIM models. As one of the leaders in the
BIM world, Autodesk has recently developed two programs for 3-D visualization:
Navisworks and Showcase. Both of these programs offer a smooth workflow for a BIM
model created in Revit. Showcase was developed strictly for visualization, and was the
first Autodesk program with the ability to produce a first person interactive walkthrough.
Though the graphics are limited, Showcase was a huge step forward for Autodesk’s
BIM suite. Navisworks was designed to be much more than a visualization tool, and as
such is lacking in that category. Navisworks put more focus on capabilities such as
clash detection, construction simulation and scheduling, and the only animations
available are fixed-path, requiring a user to set a series of camera positions and then
render a walkthrough video. Though these are very useful tools for 3-Dimensional
visualization, the quality does not come close to that which can be achieved with the
more traditional 2-Dimensional rendering applications.
16
Advantages and Limitations of using Game Engines for AEC Visualization
If the BIM software developers are not going to provide the AEC industry with
visualization software that meet current graphics and technological standards then one
must look to other industries for a solution. The gaming industry is currently setting the
standard for 3-D visualization; therefore there are many benefits to using gaming
technology over traditional AEC rendering engines. The most significant benefit is real-
time rendering of lighting, shadow and textures. Gaming engines are designed to
render at 30+ frames per second on a consumer grade PC, whereas typical AEC
rendering engines can take hours to render a single frame with similar effects on a high-
end workstation. This is partly due to CAD software using OpenGL® programming
interfaces for rendering, whereas gaming engines use the more common Microsoft®
DirectX™ programming interface (Isaacs et al. 2011). Many gaming engines also have
built-in functions such as gravity scripting, collision detection and character controllers,
which when combined with a fast rendering speed allow for real-time walkthroughs of a
BIM model (Shiratuddin and Thabet 2011). One of the latest technologies in television
and computing, stereoscopic 3D vision, has also been utilized by many gaming engines,
something not yet adopted by the even the largest BIM software developers. With this
technology, any viewer can freely walk around as if inside of a building prior to its
construction without investing in costly virtual reality equipment.
As early as 1998, many researchers and designers, wanting to take advantage of
these benefits, have experimented with using gaming engines for AEC visualization,
and achieved successful graphic results (Shiratuddin and Thabet 2002). BIM’s object-
oriented approach to parametric modeling very similarly matches that of many gaming
engines, which facilitates what could be a smooth transfer of data from the BIM model
17
into a 3D game engine (Yan et al. 2011). Yet implementing a 3D CAD or BIM model
into a gaming engine is still an arduous time consuming process with no simple
workflow yet defined (Uddin and Yoon 2002; Sallcachat and Choutgrajank 2003; Kumar
et al. 2011).
Statement of Purpose and Deliverables
The goal of this research was to develop an easy-to-use workflow for representing
a BIM model inside a gaming engine. A complete federated BIM model contains
multiple pieces of information, including:
Object data, such as floors, walls, doors, casing, etc.
Lighting information, including fixtures, photometric data, and sunlight
Material textures
Site information, including terrain, vegetation, and context
The first objective was to determine a method for importing a complete federated BIM
model into a gaming engine which retained the most information. The second objective
was to determine the best method for recreating the information which failed to be
directly transferred from the BIM model. As the primary deliverable, guidelines were
produced for the best method of viewing a federated BIM model created in Autodesk
Revit in the Unity3D gaming engine. Unity3D was selected as a final visualization tool
due to its simple interface, advanced functionality via scripting, its compatibility with
various platforms, and previous success with BIM visualization (Kumar et al. 2011).
Additionally, the basic version Unity3D is available at no cost, with a Pro version
available at a low cost.
18
CHAPTER 2 LITERATURE REVIEW
Overview of Immersive Visualization
Researchers and designers have been using technology to explore immersive
visualization techniques for design and construction for as long as the technology has
existed. Their research has thus far culminated with the creation of Virtual Reality (VR)
environments. Using a Virtual Reality Markup Language (VRML) with a software such
as Mechdyne® CAVE™, which uses six polarized screens, VR glasses and a handheld
controller, a 3D model of a space can be experienced in a manner similar to walking
around inside the space. Case studies have shown systems such as this to be
extremely effective for pre-construction visualization (Majumdar et al. 2006; Dunston et
al. 2007), though the same case studies have shown VR to be a complicated process
which can only be achieved with a large time commitment and a significant initial
investment in hardware and software. Though VR studies use similar technologies as
gaming engines and for a similar purpose, the desired result is far beyond the scope of
this research, and therefore commercial VR systems were not included in this literature
review. This literature review focused on previous research and case studies which
involved use of gaming engine technologies for AEC visualization only as they pertain to
the goals of this research as described in the introduction. Emphasis in the analyses
will be placed on the goal of the study, the techniques used to achieve those goals and
the results and difficulties.
Early Attempts at Using Gaming Engines for AEC Visualizations
Although it was not common to use gaming engines for visualizations, several
research projects have been conducted since 1998 (Shiratuddin and Thabet 2002).
19
These projects have shown the progress that has been made to this point both in the
ease of modeling that the resultant graphics. It should be noted that none of these
studies used BIM technology to create the models, but rather models were created
specifically for the study in a 3D CAD using non-parametric modeling techniques. The
following is a review of some notable projects.
Virtual Reality Notre Dame Project
One of the first virtual environments of note created in a gaming engine for
architectural visualization was of the Notre Dame Cathedral in 1998. An international
effort was made by researchers, artist, technical specialists, programmers, architects
and historians from France, Japan and across the United States to create a globally
accessible, multiuser virtual environment which could be used to ‘visit’ the cathedral in
the home or the classroom (DeLeon and Berry 2000). To achieve this result, the
application had to have the ability to run on various computers with various operating
systems, and allow for interactive worldwide networking. The Unreal™ engine was
selected as the platform due to the team’s familiarity with the software from previous
use, its ability to render at high frame rates on mid-level consumer desktops, and its
networking capabilities. When Unreal Tournament was released in 1998, it adopted the
‘open architecture’ approach, meaning that the Graphical User Interface (GUI) could be
used to manipulate the coding to create custom levels, environments and interfaces.
This editing platform was known as the Games Development Kit (GDK) or UnrealEd™,
which was free for educational use (Shiratuddin and Thabet 2002).
Due to the mysteries surrounding some of the construction, the team decided that
only unbiased mathematical and visual measurements would be used in the
construction of the model. A team of architects and historians first had to analyze the
20
structure through photographs and measurements, at which point a digital model was
created using 3D Studio Max®. Due to hardware limitations, the modelers often had to
sacrifice quality by substituting textures for modeling components in order to reduce the
overall polygon count and improve rendering performance. Once the model was
completed, it was imported into a custom interface created with UnrealEd™, where
lighting effects were added. As one of the aims of the project was to create an
environment for the virtual tourist and the classroom, the team decided to create a
virtual tour guide. This tour guide was constructed in Wavefront Maya® using over
1200 polygon meshes and texture maps overlaid on a jointed skeleton. Several
animation sequences and tour-guide explanations for areas of interest were pre-
programmed and incorporated with an artificial intelligence (AI) behavior engine using
triggers and proximity sensors to make him come to life. The result was a highly
interactive 3D model, which was made available to the public via a website. Users
could walk or fly around inside of the cathedral and interact with the tour guide or other
visitors to the website via text box. The screen shots of the model shown in Figure 2-1
display the capabilities of visualization in gaming technology as early as 1998.
A B
Figure 2-1. Images of the model of Notre Dame Cathedral. A) View into the apse. B) The tour guide waiting in the naïve. (Source: DeLeon and Berry 2000)
21
Virtual Reality on a Low-End PC
A research team at the University of Utara Malaysia was one of the first to use
gaming engine technology for interactive 3D visualization of a design study. The goal of
the study was to develop a prototype model for visualization which could be used on
low-end personal computers (Shiratuddin and Zulkifli 2001). It is important to note what
a low-end personal computer was in 2001. The computer specifications with which the
prototype was designed to are described in Table 2-1 below. Over a decade later a
computer with these specifications would not even be able to run a modern operating
system in itself (Microsoft Corporation 2012).
Table 2-1. Low-end personal computer specifications
System Type Specifications
Operating System Windows 98 PC System Pentium-200 MMX (200 MHz) RAM 32 MB CD-ROM Speed 4x Video Memory 2 MB Hard Drive 450 MB 3D Accelerator Yes
The visualization process was broken up into six stages:
The 3D model
Textures and lighting
Artificial intelligence characters
Audio and sound effects
Behavioral scripts, e.g. opening doors, light switches, etc.
Special effects, e.g. water effects, lens flares, multiple sky layers, etc.
First the model was created in AutoCAD™ Release 14 using solid modeling techniques;
which was to take 2D profiles and extract them into 3D with tools such as extrude,
subtract and union. The model objects were then imported into an unnamed gaming
engine. A major problem experienced was that the gaming engine was not capable of
22
importing an entire model without crashing; it could only import up to 500 polygons at
one time. Therefore the model was built in sections. With the model imported, the
other five stages were built inside of the gaming engine using built-in tools.
Though details were not given for how the environment was created, the report
documented that the virtual experience ‘enhanced’ the realistic representation of the
model with ‘good’ visual quality. This study was deemed a success and displayed the
ability to integrate a 3D CAD model into a gaming engine without improvements to
computer hardware (Shiratuddin and Zulkifli 2001).
Virtual Office Walkthrough
One year later, a research team at Virginia Tech went into further detail to create
an application for design and construction visualization using the Unreal™ gaming
engine, UnrealEd™(Shiratuddin and Thabet 2002). The reasons for selecting
UnrealEd™ were: zero cost for educational use, entry level hardware requirements,
networking support, realistic graphics, support for high frame rates per second, and a
built in collision detector to keep from walking through walls and floors. The goal was to
create a virtual walkthrough application of an office from a set of 2D plans. Figure 2-2
shows the process followed.
The first step to creating the virtual environment was to model the building. This
was done in Autodesk® 3D Studio VIZ® by importing the *.dwg floor plans and
performing solid modeling techniques similar to those used in the study done a year
earlier at the University of Utara Malaysia. Once the model objects were created, the
model was exported to UnrealEd™ to add the visual features. First the textures needed
to be applied, which was done by mapping images of textures onto the objects. Some
textures were built into the gaming engine, while some needed to be located from
23
elsewhere and imported. UnrealEd™ had several built in effects, e.g. skies with moving
clouds, shimmering water, fire, etc. which were implemented into the model. Multiple
different types of real-time lighting and shadow effects came built into the game engine,
along with music and common sound effects, such as footsteps, to complete the
environment.
Figure 2-2. The process to create a virtual walkthrough from a set of 2D drawings.
(Adapted from: Shiratuddin and Thabet 2002)
The virtual office created had many advantages over conventional methods of
visualization. First, the team was able to create a real-time walkthrough with real-time
lighting and shadow effects. The game engine was able to render these effects and
texture mapping at 40 frames per second with the completed model on a consumer
grade PC. To make an even larger model render at these rates it would have required
the model to be built in ‘levels’ where an action such as opening a door would load a
24
new ‘level’ in which only the portion of the model needed for that floor would be
rendered. This is very similar to the method that game developers used to create an
entire world without slowing down the rendering capabilities. This technology would
have come at a steep cost for anything other than educational use. A commercial
license for the gaming engine started at roughly $350,000 (Shiratuddin and Thabet
2002). In addition there was no real guide for the software, once it was downloaded.
Though there was an online community of gamers providing “tips and tricks”, the
Virginia Tech team found that they had to learn the software on their own. Through
these difficulties the study was able to create a semi-realistic virtual environment. A
screenshot of the model is shown below in Figure 2-3. Notice that although the image
was grainy and pixelated, this was the standard of gaming technology at the time.
Figure 2-3. The process to create a virtual walkthrough from a set of 2D drawings.
(Source: Shiratuddin and Thabet 2002)
Advanced Use of Gaming Technology in the AEC Industry
The previous studies have shown the possibilities of creating an interactive virtual
environment of an architectural design using gaming technologies, however many have
looked at this technology for more than simple visualization. Several researchers in
25
recent years have been studying more advanced uses of gaming technology integrated
with parametric BIM modeling. The following sections summarize the attempts and
results of these studies.
BIM-Game Tool Study
Research performed at Texas A&M University attempted a goal of analyzing
possible applications of using gaming engines for design studies (Yan et al. 2011).
These studies included:
A facilities management game, which would be used as training for a building maintenance team to improve building operating efficiency.
Conducting fire egress tests using artificial intelligence engines and smoke simulations.
Conducing handicap accessibility tests using a wheelchair avatar.
Mechanical system airflow simulations.
The first step in the study was to create a prototype application which could import a
BIM model into a gaming engine to perform these studies, referred to as the BIM-Game
Tool. Through previous research (Uddin and Yoon 2002; Sallcachat and Choutgrajank
2003) and performing test trials the team found that there was no easy or simple way to
import a BIM or 3D CAD model into a gaming engine. It was determined that to create
the BIM-Game Tool it would need to be broken down into three distinct sections. Figure
2-4 shows the linkages between the three sections.
26
Figure 2-4. The three sections of the BIM-Game Modules. (Adapted from: Yan et al.
2011)
The first section is referred to as the BIM Module. This could be any number of
BIM applications, such as those produced by Bentley®, Graphisoft® of Autodesk®. The
purpose of this module is to create a BIM model of parametric data. This typically
included object information such as material, location, size, shape, etc. The third
section is referred to as the Game Module. This is where the final product is viewed
and where the simulations can be run. The software used for this section was not an
existing game engine, as existing game engines would not have been able to run the
required simulations. Instead an engine was developed by the design team, using the
Microsoft® XNA™ Framework and C# scripting, technology which is also used in
modern gaming engines. To ensure that the Game Module could be used with any BIM
software, a second intermediate program was created. This program, referred to as the
Crossover Module, restructured the parametric information from any of several BIM
Modules for proper representation in the Game Module. This module was also
developed by the design team using the Microsoft® .NET™ Framework as well as C#
and OOP programming languages.
The Texas A&M researchers were able to create both the Crossover Module and
Game Module, and implement a home constructed in Autodesk® Revit™ Architecture
2009. Images of the model can be seen in Figure 2-5 below. Users could walk or fly
27
around in the space with a first person viewer, or in third person with an avatar. The
team was able to create an avatar of a character in a wheelchair to perform an
accessibility study, shown in Figure 2-5. Information such as fire ratings of doors and
walls were included to perform a fire egress study, though the study was not yet
performed. Additional studies including mechanical systems and building operations
had not yet been successfully performed.
A B
Figure 2-5. Images of the model of BIM-Game Office Study. A) View of the kitchen from the first person controller. B) Performing accessibility study with third person view of a wheelchair avatar. (Source: Yan et al. 2011)
Though all of the game studies had not yet been worked out, the Texas A&M BIM-
Game study began to show the possibilities of a BIM model when linked with gaming
technology. During the course of the study additional software was in development for
using this model to perform building operations, mechanical, and egress simulations,
though no results have been published to date (Yan et al. 2011). It should be noted that
this study did not use an existing gaming platform, as previous studies had. Previous
studies also had not attempted to link a BIM model, rather they had used 3D CAD
software to build a non-parametric model. This showed that linking this type of model
for complex studies into a gaming engine is far more complex than previous studies.
28
Gaming Engines for Construction Safety Education
Digital games have been described as one of the most influential teaching
mediums for college students in this era. (Games-to-Teach Team 2003) To take
advantage of this idea, researchers at the University of Washington and the University
of Nebraska-Lincoln set out to create a game which could be used to deliver
construction safety education. (Lin et al. 2011) The goal of the study was to create a
game where a model of an entire jobsite would be constructed where a student would
act as a safety inspector. It would be the student’s job to walk around the jobsite and
find all of the unsafe items or activities; these would include static items such as
unprotected rebar or improperly constructed scaffolding, to active items such as
laborers reaching too far from a ladder or carrying a power tool by the cord. Students
then receive a number of points for identifying the hazard, based on its difficulty to
notice, as shown in Figure 2-6. Once a hazard has been identified additional
information including images and text would then show up on the screen further
explaining the hazard.
The final platform was based in the Torque 3D™ SDK V1.0. This platform was
selected due to a low cost, availability of online discussion threads and compatibility
with 3D CAD and CAD rendering software. The environment was created in three
stages: earthmoving, structural work, and building finishes. The terrain was best
created in Torque 3D™ using the built in Terrain Editor. The remainder of the game
objects were created in Autodesk® 3DS Max® 2009 and imported into the Torque 3D™
gaming engine. These items include building objects, characters, materials,
background buildings, equipment, tools, etc.; every object needed to be modeled
individually. As gaming engines’ render time was based on number of polygons rather
29
than the size of polygons, many items were modeled through textures rather than
shapes, e.g. walls of reinforcing were simply a single polygon face with an image of
reinforcing attached to it, as shown in Figure 2-6, rather than each stick of reinforcing
modeled separately. In order to import the model objects into Torque 3D™, modelers
had to use an external exporter, such as Max2dts or Torque Constructor.
A B
Figure 2-6. Images of the model of the construction safety game. A) A player earns a point after determining the crane is too close to power lines. B) Rebar modeled as a texture map on a plane. (Source: Lin et al. 2011)
Once completed, a small group of students in the Construction Management
program at the University of Washington participated in a test of the software. All of the
students had previously taken the required construction safety course, and yet more
than half were unsure about some of the hazards. The trial found that most of the
students enjoyed the game, having positive remarks about the realism compared to
everyday construction operations. The researchers acknowledged that the model
needs to be expanded before it could be used for training, but shows how gaming
engines can be used in the construction industry. Studies such as these open the door
to using a game engine to perform safety analysis on construction sites using BIM
technology.
30
Task-Based Virtual Reality Simulation
After experiencing deficiencies in CAD and BIM based virtual design, a research
team at The Pennsylvania State University set out to create a framework for an
Experience based Virtual Prototyping Simulator for reviewing healthcare facilities in
stereoscopic vision (Kumar et al. 2011). Using the Unity3D gaming engine as a
platform, they tested workflows from various BIM applications to the gaming engine and
created a virtual health care facility for task-based simulation. The concept being that if
a client can perform tasks in a virtual space, rather than simply walking around, design
flaws would be exposed which otherwise wouldn’t have been noticed. The reasons for
selecting Unity3D as the gaming engine were: low cost, easy to learn interface, and fast
rendering rates. It also had direct workflows with various BIM and CAD applications.
To create the virtual environment, the team first determined which scenarios would
be common to a hospital. These included a nurse responding to a patient’s call from
the nurses’ station, or facilities management personnel performing an inspection of the
HVAC equipment. With a series of tasks defined, the team determined what objects
needed modeled and broke them up into three categories: the building space, objects
with behavioral scripts, and avatars. Tests were done with various BIM applications to
determine which workflow retained the most model content from the application. It was
determined that building the models in Autodesk® Revit® Architecture 2009 and
importing the model directly into Unity3D™ using the FBX file format would retain the
most information. Once the model was imported into Unity3D™, the team had to fix
some errors which occurred in the transfer. All of the material textures needed to be
reapplied to the objects. Photometric information from the lights also would not transfer,
therefore the team had to place a luminaire at each of the light fixtures once inside
31
Unity3D. With the model objects imported, scripted was applied to each of the objects
as required to perform the prescriptive scenarios. This included items such as doors
opening when the handle is approached, or a bed moving when selected. They
described this as time consuming, as each script needed to be written and then applied
to each object individually. There was no way to apply a door script to all of the doors at
one time. Once the scripts were completed, avatars needed to be created for each
character in the scenarios. These included patients, visitors, nurses, and maintenance
personnel, which were each created in Unity3D and imported into the scenes.
The research team was able to complete the environment and add a few scripts
for a single scenario, but was not able to complete the prototype simulator to date. A
walkthrough of a scenario of a nurse required to maneuver a crash cart from the nurses’
station a patient’s room was conducted inside of the Unity3D engine. Shown in Figure
2-7 are screen shots of the model in Unity3D, which have been modified to show the
conceptual layout of the simulator. The graphics did not appear a realistic as previous
studies, but this Penn State study began to show the possibilities of simulations when
using BIM software in conjunction with gaming technology. As one of the primary
challenges the team encountered was interoperability between Revit and Unity3D, they
advocated the need to investigate better workflows between the applications.
32
A B
Figure 2-7. Proof of concept images of Experienced based Virtual Prototyping Simulator. A) Start menu prompting for selection of role. B) List of tasks for nurse’s role. (Source: Kumar et al. 2011)
The Virtual City
In the University of Abertay Dundee, UK, a research team used gaming engines in
conjunction with CAD modeling and GIS data to create a prototype model of an
immersive three dimensional virtual city for use in city planning and sustainability
studies. City planning has traditionally been conducted with the use of two dimensional
technical design documents, including GIS maps, site surveys and plans, and still
visualizations. Documents such as these were typically only of use to the “expert”
decision makers of the field, e.g. planners, architects, and engineers (Isaacs et al.
2011). This limited the abilities of other stakeholders, e.g. city officials or the general
public, to understanding city planning. The construction of a 3D or 4D city could open
up the lines of communication to these other stakeholders.
To construct a virtual city the team determined that off the shelf software would
not be adequate. Similar to the BIM-Game Tool Study described previously, the
research team used the Microsoft® XNA™ Framework with the C# programming
language and Microsoft® DirectX™ development libraries to create the required
33
interface. This Designer Interface allowed for the integration of realistic representation
of 3D models created in a unspecified CAD software, sustainability data, and context
from the GIS to be combined in a single model. Figure 2-8 below shows the resultant
model linking GIS imaging with buildings modeled in the 3D CAD software.
Figure 2-8. Model of GIS linked with 3D CAD shown in stereoscopic vision. (Source:
Isaacs et al. 2011)
Sustainability data was then linked into the model database. Six sets of
information were added to each building by floor or area. The sustainability measures
used were:
Economic Output
Energy Efficiency
Social Acceptability
Air Emissions
Tourism
Housing Provisions
Figure 2-9 shows the model of the city with the sustainability data integrated onto the
surface of the buildings. In the model each sustainability measure is shown in its own
34
color, with all of the colors stippled
together. Each measure is then shown
on a scale, so the higher the
sustainability of a building, the less
saturated it appears.
The information in the custom
gaming engine was then available for
interactive control from any viewpoint,
including the first person. With the use
of a stereoscopic projector users could
be fully immersed, and simulate walking
around inside of the city. The
developers and city planners could
make changes to the model and show
them immediately to the stakeholders in
an environment they can walk around
in, rather than through 2D visualizations
which only show a portion of the
design and plans which they may not
even understand.
Simulated Construction Operations
Overcome by the current limitations of architectural visualization tools, a research
team at The National Taiwan University set out to develop a tool for interactive
construction simulation (Juang et al. 2011). Architectural visualization tools were only
Figure 2-9. Example of a building model with sustainability measures shown. (Source: 2 Isaacs, John P. 2011)
35
able to produce simulations of actual construction operations by manipulating a model
object to set a frame-by-frame animation sequence and then rendering the results. This
arduous process was described in detail by Kamat and Martinez (2005) using principles
from kinematics, robotics, engineering and animation. Using gaming technology a user
would able to create an interactive animation of a construction operation with less time
investment. Gaming technology could do this with less time investment due to pre-
scripted features such as gravity, collision detection, and user controllers all done in
real-time rendering with low computer hardware requirements. The team created a
simulation of a forklift as an example of the concept.
Blender was used as the platform as it had both a built in gaming engine and
modeling tool, and its visual drag-and-drop interface required no programming
knowledge. The first step was to create the model of the forklift, using a series of
meshes. To simplify the operation, the meshes were grouped into a series of objects
which would operate together, e.g. the forks were grouped with the carriage as they
would operate as a unit, and the front (drive) wheels were grouped separately from the
rear (steering) wheels to simulate a realistic operation. Figure 2-10 shows the resultant
model with the five groups: carriage/forks, mast, body, front wheels, and rear wheels.
To simulate the movements, the team used the generic collision detection engine in
combination with built-in joint scripts such as the ‘slide joint’ and ‘ball joint’. The team
then applied preset controllers to the joints and objects so that the forklift could be
controlled with the keyboard and mouse.
Through this ‘drag-and-drop’ process, the team was able to accurately simulate
the motions of a forklift in real-time. In the final simulation, the forklift was able to drive
36
and steer up to a pallet, lift it with the forks, and tilt the mast. A sharpness modifier was
added to the forks so that if they drove into a soft box, they would penetrate the box.
Weight modifiers could also be added to the objects being carried, so that if it was too
heavy, the joint attaching the forks to the carriage would break. Using this technology, a
contractor could build a library of equipment and insert them into a BIM model in a
gaming engine to simulate the construction process.
Figure 2-10. Model of forklift groups for construction simulation. (Source: Juang et al.
2011)
Introductory Analysis of Gaming Engines for BIM Visualization
Selection Criteria
As part of a broader study, a research team at Ghent University in Belgium
conducted a review and comparison of a few of the most popular game engines for the
37
use of architectural visualization. A test case was performed to illustrate how the 3D
models could be used to aid in design and construction. The game engines analyzed
were: Unity3D, Quest3D, Shiva, Virtools, and Creator. These engines were selected
over more popular and versatile gaming engines due to their native interoperability with
CAD and BIM software (Pauwels et al. 2010). Additionally, the costs of these engines
were significantly less than the cost for more robust gaming platforms. The Unreal
engine could be licensed for roughly $350,000. (Shiratuddin and Thabet 2002) The
gaming engines were analyzed based upon five major points believed to be the primary
reasons someone from the AEC community would select a gaming engine for
visualization:
1. High-level out-of-the-box functionality
2. Low purchase price
3. Mature and developed tools for advanced functionality such as access to the Application Programming Interface (API), networking capabilities and artificial intelligence utilities
4. Interactivity and 3D graphics
5. Performance on a range of operating systems with varying hardware configurations
The following is a summary of the analysis of each gaming engine.
Unity3D
Unity3D was created by Unity Technologies, a game development company
founded in 2004 (Arrington 2011). The review team considered the Unity3D game
engine to be one of the best in terms of usability, intuitiveness, and out of the box
functionality. The primary import file format was FBX, which was also the export format
used by the Autodesk software suit. Though there was a paid version of Unity3D, the
38
analysis was conducted using a free version of the software making the software the
most easily available of those tested. Advanced tools such as a VR library, physics
engine, and an API editable through scripting in C# or JavaScript were available though
some required purchasing the Unity3DPro. The graphics and interactivity displayed by
Unity3D were among the best. It was designed to work with varying hardware
configurations and on multiple platforms including Windows, Mac, iPad and iPhone.
Quest3D
Quest3D was created by Act-3D. The review team described Quest3D as being
not as intuitive and functional as other programs. This was because Quest3D was
developed with its own in-house file format, requiring all imports and exports to go
through third-party conversion software. This would often result in unwanted data loss.
The excellent graphic results were not enough to sway the researchers’ opinion of the
poor operability and data management, particularly when considering the hefty price
tag. This game engine was found to be “inappropriate for the targeted fast and intuitive
visualization of 3D building models and their information (Pauwels et al. 2010).”
ShiVa
The ShiVa game engine was created by StoneTrip, a game developer founded in
2005 (ShiVa 3D 2012). ShiVa natively accepted the Autodesk file formats FBX and
DWG, as well as many others for seamless integration with modeling and rendering
programs. Using only the basic out-of-the-box functions the research team was able to
produce quality graphics, though API accessibility was available through scripting in
Lua. Similar to Unity3D, ShiVa was developed for use on both Windows and Mac, and
could be published to a multitude of environments such as the iPhone and game
39
consoles. Priced competitively, ShiVa was determined to be a solid gamine engine for
use by the AEC industry (Pauwels et al. 2010).
Virtools
3DVIA Virtools is a visualization engine produced by Dassault Systems. As a
veteran company of the gaming industry, Dassault Systems has produced one of the
most powerful and functional gaming engines in this review set. Advanced tools such
as a Physics Library and VR Library made possible the creation of a high level and
compelling 3D world. Built primarily for seamless integration with rendering applications
such as Autodesk 3DS Max, there was no direct transfer available for any BIM software
such as Autodesk Revit. This resulted in very little out-of-the-box functionality in terms
of visualizing a BIM model. Pairing the complexity of the system with the high purchase
price, the researchers concluded thatVirtools was not appropriate for BIM visualization
(Pauwels et al. 2010).
Creator
The final product reviewed in the study was Esperient’s Creator, which was the
only one designed explicitly for the purpose of architectural design. The software
claimed seamless integration with programs such as Google Sketchup, Autodesk Revit,
Graphisoft’s ArchiCAD, and Bentley v8i, but when the researchers began their analysis,
they noted that to move from Revit to Creator required the use of Autodesk 3DS Max.
Once the BIM model had been transferred into Creator it proved to be fairly intuitive and
many components were included out-of-the-box. Advanced functions were available
through C++ scripting, though the graphics left something to be desired. With its
reasonable price, the researchers determined that Creator would be a solid base for
BIM visualization (Pauwels et al. 2010).
40
Best Choice of the Five
The study found that any of these gaming engines could be used to some extent
for BIM visualization, though none of them should be considered a perfect fit. Due to
the varying requirements of the AEC industry a case could be made for each of these
applications. Based on the cost, or lack thereof, ease of use, functionality and quality of
graphics the study concluded that the best single gaming engine for use in BIM
visualization as determined by the Ghent study was Unity3D.
41
CHAPTER 3 RESEARCH METHODOLOGY
Managing the Analysis
In order to determine the best possible method for integrating a BIM model created
in Autodesk Revit into Unity3D this study was divided into three phases. The first phase
was to conduct quick analysis on several methods to determine which was the most
feasible for quick/ seamless integration. The second phase of this study was to further
analyze the process deemed most feasible and develop the guidelines for the process.
The third phase of this study was to perform a trial with a few students of various
technical backgrounds to validate the merit of the method developed.
Phase I: Initial Analysis of Various Import Methods
The first thing to test in the import process was the direct import of a Revit model
into Unity3D. This was possible because one of the file formats accepted by Unity3D
was FBX, even though Unity3D did not accept Revit files directly. The FBX file format
was developed by Autodesk to be the primary method of transferring 3D information
(Autodesk Inc. 2012). As such Autodesk Revit 2012 was equipped with an FBX
exporter. When attempting to import an FBX file from Autodesk Revit 2012 into
Unity3D, the result was a blank model without textures which could not be modified.
Further testing as well as reading through online forums confirmed that FBX files from
Revit were not operable inside Unity3D; therefore a separate application would be
required to convert the file.
The first step in selecting potential transfer applications for importing a Revit model
into Unity3D was to determine which applications were compatible with both programs.
42
Unity3D claimed compatibility with various model authoring and rendering programs
(Unity Technologies 2012 ). These include:
Autodesk 3D Studio Max
Autodesk Maya
Autodesk Softimage
Cheetah 3D
Maxon Cinema 4D
Blender
Modo
Carrara
Lightwave
SketchUp Pro
Wings 3D
3D Studio Any of these applications which were also compatible with Revit would be considered a
candidate for the initial analysis. Each of the applications listed above were reviewed
for compatibility with Revit FBX to produce a list of applications to be reviewed. Only
applications which could directly import a Revit file or import the FBX file format were
included, as FBX was designed to retain more 3D information than other formats, such
as DWG or DWF (Autodesk Inc. 2012 ). The applications considered were:
Autodesk 3D Studio Max
Autodesk Maya
Autodesk Softimage
Maxon Cinema 4D
Modo Each of the applications from this final list went through a series of test trials for
importing a Revit FBX file and exporting it to Unity3D. The aim was to test every import
and export setting in the application to determine which settings gave the best results.
These initial test trials were done without any modifications to the models in the
applications, just a simple import and export process. The reason for this was that
43
given enough time and knowledge of each transfer application, the Revit model could
be completely recreated prior to importing into Unity3D. The aim instead was to
determine which application gave the best final result in Unity3D without any
modifications, reducing the number of items which would need to be recreated during
the more detailed study in Phase II of this analysis. The applications were analyzed
according to a series of points in order of importance:
Items which transferred/ failed to transfer including: o 3D solids o Materials and textures o Lighting/ photometric information o RPC objects
Hardware requirements and CPU/RAM usage
Ease of the transfer
Time required to transfer, from opening the application to completed import into Unity3D
Cost of the application
Likelihood of an AEC company having previously purchased the application, as defined by the software’s targeted consumer market
The trials were conducted on a Lenovo G570 Notebook with an Intel Core i5-2430
quad-core processor operating at 2.40 GHz, and 8GB DDR3 RAM operating at
1333 MHz. The trials were conducted with a federated BIM model created in Revit and
exported to a 12 MB FBX file. The federated model was of a three story office building
with a footprint area of about 7400 square feet, and included a completed architectural,
mechanical, electrical, plumbing and structural model. The results of the trials are
summarized in the sections below.
Autodesk 3DS Max 2012
Over 30 different import and export combinations were tested using Autodesk 3DS
Max 2012 due to the extensive list of options and settings available when importing and
exporting a Revit or FBX file. The most successful settings resulted in a model in
44
Unity3D which retained all of the 3-D solids. None of the materials and textures
survived the transfer, but all of the elements could be modified individually or by
texture/type. Materials could be reapplied easily once inside of Unity3D, e.g. finding the
material labeled ‘brick’ and applying a brick texture to it would apply that texture to all of
the brick in the model. Photometric information survived the transfer into 3DS Max, but
failed to completely transfer into Unity3D. The origination point of the photometric
information did survive the transfer, but produced no visible light. The image of the
RPC objects failed to transfer, but the origination point of the objects did survive
providing their location information.
During the 17 minute transfer the CPU usage peaked using 100% of a single core
of the processor, while RAM usage peaked at 2.42 GB. 3DS Max tied as the most
expensive programs at a cost of $3,495. It is fairly unlikely that 3DS Max will have
already been purchased by an AEC company, as it was designed for graphic designers
and game developers. As an alternative, designed for architects and engineers,
Autodesk 3DS Max Design provided identical results in the test trials, and is significantly
more likely to have been licensed by an AEC company (Autodesk Inc.). 3DS Max stood
out as a product which could be used to import a Revit model into Unity3D. The
requirement to recreate the materials, lighting and RPC elements is a disadvantage to
its use.
Autodesk Maya 2012
Similar to 3DS Max, Autodesk Maya had an many options available when
importing and exporting an FBX file, allowing for dozens of combinations. The most
successful settings resulted in a model in Unity3D which retained all of the 3-
Dimensional solids, where each solid could be modified individually. Also similar to 3DS
45
Max, none of the materials and textures survived the transfer, but unlike 3DS Max the
material names were lost entirely. Materials could not easily be reapplied, as the model
materials were broken up by object, rather than material. Additionally, the models
objects all adopted the name ‘phong’, making working with the model difficult.
Photometric information was lost during the transfer, as well was RPC objects.
During the 11 minute transfer the CPU usage peaked using 100% of a single core
of the processor, while RAM usage peaked at 0.62 GB. Maya tied for the most
expensive programs at a cost of $3,495. It is very unlikely that Maya will have already
been purchased by an AEC company, as it was designed for creating 3D animations
(Autodesk Inc.). This trial concluded that using Maya to transfer a Revit model into
Unity3D would not be practical.
Autodesk Softimage 2012
The FBX Importer and Exporter in Autodesk Softimage were not as detailed as
those used by other Autodesk applications, with less than 10 different trial options
conducted. The most successful settings resulted in a model in Unity3D which retained
all of the 3-Dimensional solids. None of the materials and textures survived the
transfer, and they could not be reapplied easily, as the materials were exported based
upon object rather than material, very similar to the Maya trials. Photometric
information and RPC objects were lost entirely. Additionally, the process was plagued
with crashes and freezes.
During the 24 minute successful transfer the CPU usage peaked using 100% of a
single core of the processor, while RAM usage peaked at 1.12 GB. From a cost
standpoint, Softimage was in the middle at $2,995. It is very unlikely that Softimage will
have already been purchased by an AEC company, as it was designed for character
46
development in film, television and game animation (Autodesk Inc.). This could explain
why process encountered so many crashes and freezes, as the application was not
designed for such large or complex models. These problems would not make
Softimage a candidate for helping to import a Revit model into Unity3D.
Maxon Cinema 4D R13
The FBX Importer and Exporter in Maxon Cinema4D provided dozens of
opportunities for importing into Unity3D. The most successful settings resulted in a
model in Unity3D which retained all of the 3-Dimensional solids. None of the materials
or textures were imported, nor could they be reapplied in Unity3D. The result was
similar to that imported directly from Revit. Photometric information and RPC objects
both failed to transfer.
During the 6 minute transfer the CPU usage peaked using 32% across several
cores of the processor, while RAM usage peaked at 0.58 GB. From a cost standpoint,
Cinema4D was below average at $2,295. It is somewhat likely that Cinema4D will have
already been purchased by an AEC company, as it has four platforms; one of which
was designed for architects, designers and photographers (Maxon Computer GmbH ).
This trial concluded that due to the inoperability of the final model, using Cinema4D to
easily transfer a Revit model into Unity3D would not be practical.
Luxology Modo V601
Only a few different import and export combinations were tested using Luxology
Modo, due to the simplicity of the engines. The most successful settings resulted in a
model in Unity3D which retained all of the 3-Dimensional solids. None of the materials
and textures were transferred, producing a result nearly identical to that achieved by
47
using Cinema4D. Photometric information and RPC objects were entirely lost in the
transfer.
During the 19 minute transfer the CPU usage peaked using 100% of a single core
of the processor, while RAM usage peaked at 2.16 GB. Modo could be purchased for
the lowest price of $1,195. The likelihood that Modo will have already been purchased
by an AEC company is unknown as a single version is targeted at many disciplines,
including graphic designers, photographers, artists, film, engineers and architects.
(Luxology ) This trial concluded that due to the inability to edit of the final model once
imported into Unity3D, Modo would not be a practical application for further study.
Best Transfer Application
Though none of the applications were a perfect fit for this process, only one stood
out as having any potential. Autodesk 3DS Max provided a model in Unity3D with the
capability to be easily modified; something that all of the other applications failed to do.
Though the model from 3DS Max contained only the 3-Dimensional solids, materials
could easily be applied while the base point for RPCs and lights were available for
reference. Though the applications were the most expensive, the ability to use both
3DS Max and 3DS Max Design interchangeably to the same result increases the
likelihood of an AEC company having already purchased the rights. Further study was
done to determine how the remaining effects can be applied in either Unity3D or 3DS
Max.
Phase II: Using 3DS Max to Create a Walkthrough
In order to create a guide for using 3DS Max to bring a Revit model into Unity3D,
each of the applications needed to be studied to determine their capabilities. As the
only information completely transferred from Revit was the object mass, the remaining
48
effects would need to be recreated. Both Unity3D and 3DS Max had many built in
capabilities to complete a Revit model, but the aim was to determine which effects
should be recreated in each application. Should the model be fully rendered in 3DS
Max and then imported, or should a blank slate be imported into Unity3D for rendering?
To decide this, the effects which needed to be recreated were broken up into four
categories:
Materials and textures
Site work and vegetation
Sunlight
Artificial light
An attempt was made to recreate each of these effects in both Unity3D and 3DS Max to
see which provided the best results, and which were the easiest and quickest to
complete without advanced knowledge. With a fully rendered model in Unity3D, further
study was conducted to determine how to animate effects common to a building’s
operation.
The Model
The successful early stage of building a BIM model was paramount to the success
or failure of this research. The model must be accurate and contain all of the required
information for analysis. It should be noted that the model was not created specifically
for this study, but was a previously created BIM model. The model was modified slightly
to improve the quality of the visualization. These modifications have been noted as they
occurred in the sections below. The model used for this study was a federated model
containing an all of the elements required for proper visualization and animation:
Completed architectural model, including all finishes, casework, circulation equipment, and site work with vegetation
Completed mechanical model with ducts and diffusers
49
Completed electrical model with fixtures and switches
Completed plumbing model and fire protection model.
Completed structural model
Materials and textures
When the BIM model was opened in 3DS Max many of the material textures
automatically uploaded in the application. The materials were lost during the export into
Unity3D. This problem could be solved in two ways. First an attempt was made to
force the materials to export into Unity3D. Then an attempt was made to recreate the
materials or reapply the materials inside of Unity3D.
Reading through tutorials and the 3DS Max Help guide, two methods for forcing
the materials to export were discovered. The first method would permanently apply the
textures to the surface of the objects, commonly referred to as baking the materials.
This could be done by using the Render to Texture option. This process created a new
image map for each object in the scene by rendering the model and calculating the
lighting effects. This required several days to render the federated model used, and the
resulting model once imported to Unity3D displayed no difference from the previous
trials. Several studies were conducted using smaller test models to discover the error.
Baking the textures did not permanently apply the materials to the surface of the object,
but simply created a new image file for the material. The new image file failed to import
into Unity3D just as had the original image file.
Since this did not work, the next step was to discover why the image files failed to
import. Autodesk documentation described that many of their applications used the
same material library when rendering an object (Autodesk Inc. ). So when a model was
exported between Revit and 3DS Max via FBX there was no need to send the image
50
files. Each application simply referenced the same material library folder. For when the
file would be opened on a different computer or in a third party application a plug-in was
developed to bypass this, exporting the material images used in a model. This could be
done in the FBX Exporter by selecting the Embed Media option. This option should
create an *.fbm folder with all of the images in the location where the FBX file would be
saved. With the option selected the folder was created, but the materials were not in a
common image file format. Rather they were encoded in a series of MI Files and XML
Documents, which were not read by Unity3D.
The inability to transfer materials from 3DS Max into Unity3D leaves the option of
texturing the model inside of Unity3D. Unity3D has a built-in material library, which
could be used for small projects, but would not accurately represent the model as
designed through Revit. To get the correct materials the Autodesk material library was
imported. Copying the Autodesk material library from the hard drive to the Unity3D
project folder provided the user with all of the correct options existing in the model.
Reapplying the materials, broken up by texture by 3DS Max, inside of Unity3D was a
simple process and provided the desired result.
Site work and vegetation
Recreating the site elements, such as grass and sidewalks could be done in the
same manner as all of the other materials. In addition to this, Unity3D had a built-in
terrain editor, which could create a more detailed environment. This included items
such as hills and life-like grass, rather than a simple grass texture. Trees and other
vegetation could be created in either 3DS Max or Unity3D. 3DS Max provided no way
to create a tree specifically, but libraries could be purchased and inserted into the
model. Unity3D provided a Tree Creator package, which allowed the user to build a
51
custom tree by sizing the trunk, leaf spread, height, etc. Similar to 3DS Max, Unity3D
also has an asset store where users can purchase pre-built trees. Unity3D provided a
free set of dozens of pre-built trees and shrubs on their website, which was adequate
for this study.
Sunlight and Artificial Light
Light sources from the Revit model were transferred into 3DS Max. Several
attempts were made to transfer the lighting information into Unity3D, but they were
unsuccessful. Creating lights in Unity3D was determined to be a simple process.
Modifiers such as intensity, color and distance were available to create the proper
effects. Sunlight was easily created in this way using a directional light placed above
the model. Using this technique for a large model proved time consuming, as it required
each light to be placed individually and properly located in the model. Further study
described a second method for creating lights. All of the light fixtures in the model as
imported from 3DS Max could be selected at once and a light could be applied to them.
The light would generate at the origin point of the fixture and could be modified in the
same manner as new lights. Selecting the base point of the photometric information
rather than the fixture would place the light correctly at the source; the base point of the
photometric information exported from Revit when selecting the proper render settings.
Animating the Model
With all of the effects which did not survive the transfer recreated, the next step
was to animate the model. First a decision had to be made for animations would be
important to a typical building. Those were determined to be:
Walking inside of the model
Operating a door
A light switch
52
Operating an elevator
The first item, walking inside of the model, was easily performed with Unity3D. Adding
a first person character controller and adjusting the speed allowed the user to move
around inside of the space using the keyboard and mouse or other controller. The
remaining animations were not included natively with Unity3D, but the built in scripting
tool allowed for their creation.
Operating a door was of highest importance, because when imported with the rest
of the model the first person controller, known as the player, could not walk through the
doors and into the building. The first option was to delete the collider off of the doors,
allowing a player to pass through the door. This was easy to accomplish, but provided
limited realism, therefore animating a door’s operation was made a priority. In order to
operate a door, first a script was written to rotate the door 90 degrees. Once this was
done and applied to the door, a trigger had to be added to the door to set off the
rotation. This was an empty box, which when the player entered would cause the script
to start, and the door to open. The initial problem with this script was that the door was
rotating around its center point, not the hinge point. There is no way in Unity3D to move
the point of rotation of an object. To get around this, another invisible object had to be
created and placed at the door hinge point. Then the script would be added to that
invisible object, making its center point the point of rotation. Any other object made a
child, or subsection, of this object would then follow the same rotation path. The door
was made the child of the invisible object, causing the door to rotate at the correct point.
With the door rotating correctly the next problem was that the door would rotate with the
door frame, as Revit natively grouped the two objects together. In order to separate the
53
two objects, the original model was modified in Revit. Separate families were created
for the door frame and the door panel to replace the existing Revit family. The final
result was a realistic animation of a door, but required placing an empty object at each
door in Unity3D, requiring a significant time investment.
Operating a light switch was a more complex script. First a script was written to
change the intensity of a light when a key was pushed on the keyboard. Adding this
script to all of the lights would turn all of the lights in the model on and off by pressing ‘L’
on the keyboard. This could be completed easily, by selecting all of the lights in the
model at once and then adding the script to them. To make the lighting sequence more
realistic, the script was modified to add a trigger for each light to operate them
individually. An invisible trigger needed to be added to each light, which could be
placed in the location of the light switch. With this script, the light switches in a room
would be turned on and off by pressing ‘L’ on the keyboard when in the vicinity of the
switch. This required a significant time investment, as a trigger needed to be created
and located to the switch for each light. To make this simpler, the script was modified
so that it could be applied to the light switch itself. A single trigger was applied to a
switch, and then each light was selected as a target of the script. This was much less
time consuming, as the script and trigger only needed to be applied to each light switch,
rather than to each light fixture.
Operating an elevator was a much more complex task requiring a multitude of
scripts. First the elevator had to be modified inside of Revit. The elevator cabin had to
be grouped as a single object or family. The elevator doors each had to be their own
object, as well as the frames. Two scripts were used for the operation of the elevator;
54
one for the elevator, and one for the elevator panel controller. The elevator controller
script was applied to the elevator to determine the floor heights. A second script for the
panel controller was used to move the elevator to each floor. Attempts were made to
combine these two scripts, but as several different triggers were required, it could not be
done. Each panel controller (one at each floor, and one on the elevator) had a script set
to it with the elevator as a target. While standing in front of one of the panels and
pressing a number would send the elevator to that floor. When walking through the
model, the player would be able to summon the elevator to the floor using the panel
controller at each level. Then once on the elevator, a panel controller inside would
allow the player to select which floor he would like to move to.
Then to control the doors, a script was added to the door to slide it in the correct
direction when the player entered a trigger. One script was made for each of the four
primary directions. Then an identical script was added for the door inside of the
elevator. The elevator cab doors were made a child of the elevator so that they would
move with it. To add more realism, the script then had to be modified so that the doors
would open only when the elevator was at the floor. This change allowed for an input to
specify which floor the door was on, and set the elevator as the target. Then only when
the elevator was at that floor, the doors would open. A bypass had to be written into the
script for the doors that traveled with the elevator. This was written so that if the floor
was set to ‘-1’, then the doors would open no matter which floor the elevator was on.
Combined with the elevator controller and panel controller scripts, this created a lifelike
simulation of an elevator for a single user. It was time consuming to apply all of these
scripts to the elevator, but as a building typically only has a few elevators, it was
55
deemed acceptable. To make it more realistic for multiple users, the elevator would
need a memory to know which floor to go to if multiple people were to summon the
elevator at different floors. This would have required more experienced scripting
knowledge to perform.
Phase III: Test Trial of the Guide
The guide created from the Phase II trials, was given to a small group of four
students with varying degrees of experience in Revit and 3DS Max. None had more
than a basic knowledge of Unity3D, as was the target audience of the guide. Each was
a graduate student at the University of Florida, M.E. Rinker Sr. School of Building
Construction. Using the 22,000 square feet federated model used earlier in this study,
they completed a trial with the application. The primary goal of the trial was to review
the quality of the guide and make improvements. The group members noted areas
which were difficult to comprehend, as well as difficulties with the software. Their
comments were included into the completed guide, shown in Chapter 5 of this paper.
The secondary goal of the trial was to verify that an animation could be completed
using only the guide provided. The students completed each of the items as described
in Phase II above. A short survey was given to each of the students to complete while
working on the animation. The survey included information about the hardware
configuration of the computer used, and the students’ level of experience with each of
the applications. Their experience is described in Table 3-1 below, while Table 3-2
describes the computer used by each of the students. Note that all of the computers
used were equipped with the latest in processing power available at the time. The
students then provided the time required for each step of the process. The students
56
were allowed no assistance other than what the guide provided. The results of their
trials are discussed next in Chapter 4.
Table 3-1. Students’ levels of experience prior to completing trials (On a Scale of 1 to 7)
Student Revit 3DS Max Design Unity3D
Student A 4 4 2 Student B 2 3 2 Student C 3 2 2 Student D 7 1 1
Table 3-2. Students’ computer used for trials
Student Computer Model CPU Graphics Card RAM
Student A MacBook Pro5.4 Intel Core2Duo-P8800
Nvidia GeForce 9600M GT
8 GB DDR3 1333 MHz
Student B Toshiba Satellite P755
Intel Core i7-2670QM
Intel HD 3000 6 GB DDR3 1333 MHz
Student C Dell Inspiron 660 Intel Core i5-2320 Intel HD 2000 8 GB DDR3 1600 MHz
Student D Custom PC Intel Core i7-950 Nvidia Quadro 600
12 GB DDR3 1600 MHz
57
CHAPTER 4 RESULTS OF THE TRIAL
Initial Difficulties
During the trial the students had varying difficulty with following the guide. Several
portions of the guide were producing errors with the software and confusion with the
students. The primary areas of difficulty were with the scripting, the lighting, and
hardware requirements of the software. Many of the scripts, as shown in Appendix A,
were producing errors when copied into Unity3D. The errors were a result of
referencing errors in the scripts. Some of the scripts were written to reference other
scripts, e.g. the panel controller script referenced the elevator controller script; when
the name of the elevator controller script was changed from ‘elevatorcontroller’ to
‘ElevatorController’, an error would be produced within the panel controller script. Upon
discovering the error, all of the students were notified. Ensuring the correct naming
conventions fixed the problem for all of the students.
Another difficulty the students encountered was the size of the model. Whenever
the entire building was turned on in Unity3D the character controller would encounter
significant lag time, froze and crashed the computer. The original guide given to the
students suggested that the model be imported by AEC discipline, but the students still
encountered significant lag when setting up animations. To combat this, it was
recommended that the model be imported into Unity3D in many more parts. The test
found that items being animated as a group should be imported as a group. This meant
that lights and light switches should be imported together, doors should be imported
together, and the elevator parts should be imported as a group, etc. The floors and
terrain should be imported as a group, and always turned on so that the controller would
58
have a surface to walk on. All of the items which would not receive animations, such as
HVAC, plumbing, structural elements and furniture should be imported in a group
together. These objects not receiving animations should be turned off while the other
animations are being created, and then turned on prior to exporting the model. Once
the model was exported to a viewer, computer freezes and lags were significantly
decreased. As this error occurred early on in the animation process, the students could
easily separate and import more separated models as required.
The final major difficulty discovered by the student trial was that lighting an entire
model in the free version of Unity3D could not be accomplished. One of the primary
differences between the free version of Unity3D and Unity3D Pro was the way lighting
was calculated. In the free version, light passed through all of the objects, including
walls and floors. While in the pro version of the software, photometric information
terminated at objects which didn’t have a transparent material shader. When the lights
in the building were all turned on in the free version of Unity3D, the photometric data
multiplied until a white out was produced. In the pro version, this did not happen.
Therefore advanced lighting should only be completed when purchasing Unity3D Pro.
A sun alone served as adequate ambient light in the free version. As three of the
students were using the free version, all students were instructed to only light ten rooms
to minimize the white-out effect.
The Completed Trials
Once the major difficulties were realized and adjustments were made, the students
were able to complete the trial with varying degrees of success. Each of the students’
models was reviewed for completeness and quality of the final animation. The results
were summarized in Table 3-3 below. The student with the most overall experience in
59
Revit, 3DS Max and Unity3D, Student A, was able to complete the model with no
additional instruction. The final animation was of the highest quality, exceeding the
quality of the model produced in Chapter 3, Phase II of this paper. Student D, who had
the most experience in Revit, but zero experience with Unity3D or 3DS Max was able to
nearly complete the model, and with a few clarifications further explaining complex
items such as scripting and triggers was able to entirely complete the model. Students
B and C, who had minimal experience using BIM and 3D applications had the most
difficulty with following some of the instructions on this trial. They noted difficulty with
almost every step of the process once the model was imported into Unity3D. By
spending more time troubleshooting his errors and rereading through the guide, Student
C was able to further complete the model. Both of the students were able to complete
the model and more importantly understand the complex tasks with 1-2 hours of 1-on-1
instruction.
Table 3-3. Students’ time to complete trial
Student Time Required to Complete Model Percentage of Model Completed without Instruction or Assistance
Student A 7 hr, 50 min 100% Student B 10 hr, 20 min 75% Student C 5 hr, 10 min 60% Student D 7 hr, 20 min 95%
Each of the students’ comments and individual difficulties with the process were
recorded, and all of the new information was included in the guide. The students also
recommended use of screenshots to better explain complex concepts such as triggers,
creating objects and adding modifiers and scripts. The guide was revised and included
in the following chapter, Chapter 5.
60
CHAPTER 5 GUIDE
The following is a guide for the process of bringing a model created in Autodesk
Revit 2012 into the free version of Unity3D for visualization purposes. This process can
be used for an existing federated model or a project still in the design stage. This guide
assumes that the user has a working knowledge of Revit software, but little knowledge
of Unity3D.
The Unity3D platform has a number of panes, which can be added in the Window
menu. Those that must be included are the Project pane, the Hierarchy pane and the
Inspector pane along the right side of the screen. The Project pane displays all of the
data which is in the Assets folder of the project. The Hierarchy pane displays all of the
data which is in the current scene. The Inspector pane is used to modify all data. Also
the Scene pane and Game pane should be showing on the left side of the screen.
Objects can be selected, moved and modified in the Scene pane, while the Game pane
is where the game will be played. Figure 5-1 shows an acceptable set-up.
Figure 5-1. Layout of Unity3D set-up.
61
Setting up the Working Folders
To create the 3D walkthrough, the filing system with the correct information must
first be set up. The file must include a number of items, including the materials from the
Revit material library, the built in Unity3D controllers, additional models, and pre-built
scripts. This folder will contain all of the information for the model in one area. This
guide will assume that the folder is called RevitWalkthroughGuide and will be located
directly on the C drive.
To create the required subfolders, the Unity3D application must be opened.
Within the application, under the File menu, click on New Project. Navigate to
C:/RevitWalkthroughGuide as the Project Location, and select the following Packages
to include, as shown in Figure 5-2 below:
Character Controllers
Light Flares
Physics Materials
Scripts
Skyboxes
The remaining packages can later be installed through Unity3D, if required, by right-
clicking in the Project pane. Selecting additional packages will cause the folder to
become unnecessarily large. Clicking on Create will cause the Unity3D application to
restart with the new project opened.
62
Figure 5-2. Create New Project dialog box.
Importing Revit Material Library
Unity3D has a small built in material library, but to recreate the materials used in
Revit, that library must be imported. Within an explorer window, navigate to C:\Program
Files (x86)\Common Files\Autodesk Shared\Materials\Textures\1. There will be located
a folder called mats, which is the small material library shared by multiple Autodesk
products. This folder needs to be copied into the projects asset folder,
C:/RevitWalkthroughGuide/Assets/. Once it is copied, rename the mats folder to Revit
Material Library. Note that the mats folder must not be moved out of the original folder,
only copied. As items are placed into the Assets folder, they will load into the Unity3D
Project pane. When this is done properly, an Importing Assets dialog box will appear.
Importing Scripts and Shaders
In order to properly animate many of the procedures additional scripts must be
added. Some were created as a part of this study, while some were from other sources
with open licensing for use and distribution. To create these scripts the Unity3D
application must be running with the previously created project open. To create a new
63
script, under the Assets menu, and the Create submenu, select C# Script, as shown in
Figure 5-3-A. Other scripting can be used, but all of those provided in this guide are
Java. This will create a new script in the project pane. Rename this script
DoorOperationScript by clicking on it twice. Select the DoorOperationScript script and
click Open in the Inspector pane, as shown in Figure 5-3-B. This will open a new
application called Unity MonoDevelop, the built in scripting application. Copy and paste
the text exactly as it appears under the Door Operation section of Appendix A,
overwriting anything existing in the default script lines. Clicking Save will complete the
script. This process will need to be repeated with all of the scripts in Appendix A. Note
that the scripts need to be titled exactly as shown in Appendix A.
A B Figure 5-3. Creating scripts in Unity3D. A) Creating a new C# script. B) Opening a new
script for editing.
A similar process is required to input custom shaders. Only one shader is
included in this tutorial, which is for the glass. To create a shader, right-click in the
Project pane, and in the Create menu click on Shader. This will create a new shader,
which should be named GlassMap. With GlassMap selected, click on Open (not Open
64
Compiled Shader) in the Inspector pane. This will again open the MonoDevelop
application. Paste in the text as it appears in the GlassMap Shader section of
Appendix B. Click Save to complete the shader. This shader can now be applied to
any material to produce a clear object with a reflection of an image.
Required Alterations to Revit Model
In order to correctly animate certain elements inside the BIM model the elements
must be set up correctly. This can be done during the building of the model, or after it
has been constructed in Revit. First, the model materials must be properly set up.
Materials must be applied to each material visible in the walkthrough. Items in this
study found to not have a material assigned were furniture, electrical items and
mechanical items. Items which have no material assigned to them will default to “no
name” in the Unity3D, and will require additional modification, therefore that should be
avoided. This study found that terrain built in Revit does not properly import into
Unity3D. Therefore, site items such as sidewalks, roads, grass islands, etc. should be
created as floors or masses rather than in the site builder. Additionally, any item
requiring animation in the final visualization will need to be evaluated on its own. The
items in this model study included the doors and elevator, for which scripts are included
in the Appendix A.
Each single door in the model must be broken down into two separate families;
one family for the door panel and hardware, and one family for the door frame and
opening. If this is not done, then the door frame will follow the same motion as the door
panel during animation. Double doors must be broken down into three families, with
each door panel as a separate object. The elevator must also be built with each moving
object as a separate family. The elevator door must be broken down similar to all of the
65
other doors. The elevator box, including floors, ceiling and walls, must be its own
family. Each panel of the interior doors must be their own family.
Exporting the Model from Revit
Once the BIM model has been properly set up it must be exported to 3DS Max
using the *.fbx file format. The model should be imported in several sections based
upon the animations required and the amount of model detail. Slower hardware
configurations may also require more sections. This study found the model best
imported in at least six sections, as shown below:
Only the doors
Only the lights and switches
All of the windows and storefronts
All of the floors and ground
Only the elevator, including walls, floor, ceiling and doors that move with the cab
Any remaining information not being used for animation The reason for using so many models is so that when modifications are made in
Unity3D, such as adding the elevator animation, the unnecessary models can be easily
turned off. This is done in Unity3D by unchecking the box at the top of the Inspector
pane with the model selected, as shown in Figure5-4. Walking around inside of the
space in Unity3D with an entire building loaded can be draining on even high end
systems. Importing a large model by area or level may make modifications easier. The
rest of this section will assume that the six sections listed above will be used.
The first model exported should be the model without any doors, glazing, floors,
elevators or lights. It is important to note that only the information visible in the active
view is exported, and therefore must be done in a 3D view. None of the other views
need be modified. The doors, lights, switches, etc. can be removed in the default 3D
view using the Visibility Graphics menu. Within the Model Categories tab of the
66
Visibility Graphics dialog box, ensure that Show categories from all disciplines is
checked. Then uncheck Curtain Panels, Curtain Systems, Curtain Wall Mullions,
Doors, Floors, Lighting Devices, Lighting Fixtures and Windows. Then you must
individually hide the elevator information from the 3D view. To do this, each element of
the elevator must be selected in the model, and then right-click and select Hide in View-
Elements. Before exporting all models, ensure that the section box tool is turned off in
the View Properties menu, and that the detail level of the 3D view is set to Fine. Finally,
under the Application Menu, export the model to *.fbx and save it as RevitBaseModel to
the directory C:/RevitWalkthroughGuide. This file should not be confused with the 3DS
Max file which will be created later in this tutorial.
A model of the glazing elements can be exported next by unchecking all of the
categories except for Curtain Panels, Curtain Systems, Curtain Wall Mullions and
Windows from within the Visibility Graphics dialog box. The same techniques for
exporting the file can be used. Name this file RevitGlazingModel within the directory
C:/RevitWalkthroughGuide. A model of the doors can then be exported using the same
technique, turning everything off except the Doors in Visibility Graphics. This model
should be called RevitDoorsModel. To export the lighting fixtures, everything except the
Lighting Fixtures and Lighting Devices categories should be unchecked in the Visibility
Graphics dialog. Then open the Rendering dialog box, and change the Lighting
Scheme to Interior: Artificial Only. This will ensure that the photometric information is
retained. Close the Rendering dialog box and export to *.fbx using the name
RevitLightingModel. The same techniques can be used to export the remaining models.
Name the two exported .fbx files RevitFloorsModel and RevitElevatorModel.
67
Figure 5-4. Turning off an object or model in the Inspector pane.
Using 3DS Max Model to Import into Unity3D
An *.fbx file opened directly into Unity3D will not be operable; therefore, the model
must be saved through in an application such as Autodesk 3DS Max or Autodesk 3DS
Max Design. With 3DS Max open, click Import in the main menu, and navigate to the
RevitBaseModel.fbx previously saved and click Open. In the FBX Import dialog box,
ensure that the Autodesk Media & Entertainment preset is selected, and click OK. With
the model imported, the sun should be removed by clicking on it and selecting delete.
Note that the sun does not show up in every model. For a more realistic result, the
materials can be modified through the Material Editor and baked onto the surface using
the Render to Texture feature. This guide will not go into that process. To bring the
model into Unity3D, click on Export in the main menu, and navigate to
C:/RevitWalkthroughGuide/Assets. The project should be saved as
ProjectName_BaseModel.fbx. In the FBX Export dialog box, select Autodesk Media &
Entertainment preset. To reduce the number of errors in the transfer, under the
Animation dropdown, check the boxes for Bake Animation and Resample All. Under the
Embed Media dropdown, ensure the box is checked. Click on OK, and the export
process will begin. Opening the Unity3D application will import the information into the
68
Project pane and create a Materials folder. This process should be repeated for each of
the *.fbx files created from Revit. Ensure that when importing the models into 3DS Max
that a new file is used for each model. This can be done by selecting New in the main
menu. The other model should be named: ProjectName_DoorModel.fbx,
ProjectName_GlazingModel.fbx, ProjectName_Floors.fbx, ProjectName_Elevator.fbx
and ProjectName_LightingModel.fbx. Various errors may appear when importing or
exporting the models, these are a result of conflicts between Revit and 3DS Max, and
will be resolved once imported into Unity3D.
Setting Up the Unity Workspace
Once the models have been imported into Unity3D, they must be properly
uploaded to the workspace. First, delete the Main Camera from the Hierarchy pane.
Select ProjectName_BaseModel in Project pane, which will open the model information
in the Inspector pane. In the Inspector pane, ensure that the box for Generate Colliders
is checked, and change the Scale Factor to 0.3 as shown in Figure 5-5 A. Click back
into the Project pane, and a dialog box will ask if you want to apply the settings. Click
Apply. Then bring the model into the current scene by dragging it from the Project pane
to the Hierarchy pane. Use the same settings for ProjectName_GlazingModel,
ProjectName_LightingModel, ProjectName_FloorsModel and
ProjectName_ElevatorModel. When this is complete, individually drag each model from
the Project pane into the Hierarchy pane. Finally Select ProjectName_DoorModel in the
Project pane, and change the Scale Factor to 0.3, and ensure the box for Generate
Colliders is not selected. This will allow the user to walk through the doors if there is
not sufficient time to add a door animation to each door. When done correctly, all of the
models should all lined up to the same zero point and be properly integrated. The
69
scene can be saved by clicking Save Scene in the File menu. Notice that a file is saved
into the Project pane, as shown in Figure 5-5 B. The scene can be opened by double
clicking the scene file in the Project pane.
A B Figure 5-5. Importing and opening models in Unity3D. A) Model import settings. B) New
scene created in Project pane.
The second part of setting up the project is to add a player controller. Unity3D has
a built in first person controller and third person controller. They can be found in the
Project pane under Standard Assets in the sub folder labeled Character Controllers.
Simply take the folder titled First Person Controller, and drag it into the Hierarchy pane.
This will insert a character into the scene, which the user will control in the Game panel
by pressing the Play button. The player may not import to the proper scale, and may
not be visible in the Scene pane. To find the player, select the First Person Controller
folder in the Hierarchy pane, and using the move controller along with top and side
views to position the controller in front of a door for scale, as shown in Figure 5-6 A.
With the First Person Controller folder still selected in the Hierarchy pane, change the
scale in the Inspector pane to fit the model. For the trial project, the best scale was X:
6, Y: 9, Z: 6. Also in the Inspector pane, change the Tag to Player from the drop down
list, as shown in Figure 5-6 B. This is to ensure the scripts, which will be added later,
properly recognize the controller.
70
A B Figure 5-6. Importing a third person character controller. A) Scaling the character
controller. B) Character controller settings.
The controller will appear as a small grey cylindrical shape in the Scene pane,
visible in Figure 5-6 above. Using the move tool, make sure the controller is placed
slightly above the ground or floor in the Scene pane, and not touching any other object,
as it will get stuck inside the object when playing the animation. If the player is not
placed somewhere above a walkable surface, he will continuously fall into space during
the animation, with no object to ground him. Clicking the Play toggle, shown in Figure
5-7, at the top of the screen will begin the walkthrough. It may take several minutes,
based upon the size of the active models and computer speeds, for this action to take
effect. It is recommended that unnecessary models with high object counts be turned
off prior to starting the walkthrough. This can be done by selecting the model in the
Hierarchy pane and unchecking the box next to its name at the top of the Inspector
pane, as shown in Figure 5-4 above. Selecting Deactivate Children will complete the
command. With the Play mode running, the controller can be moved by using the
mouse to look around, the ‘W’ ‘A’ ‘S’ ‘D’ keys to walk, and the Space key to jump. The
speed of the player and jumping height can be adjusted inside of the Inspector pane
71
once the game mode has been exited, by clicking the Play button a second time. The
Slope Limit and Step Offset can be adjusted up if there is difficulty walking up stairs.
Note that any changes made in the Play mode will not remain after turning off the Play
mode.
Figure 5-7. Play button used to enter the Game mode.
Applying Textures to the Model
Notice that when the model has been imported into the scene that not all of the
textures have a color. The textures need to be reapplied inside of Unity3D. This is a
simple process, and can be completed one of two ways. The simplest method is to
select an object in the Scene pane by clicking on it twice. In the Inspector pane, where
the material shader is listed, click on Select where the texture is, as shown in
Figure 5-8 A. Locate the proper material from the new window to change the selection.
If there are multiple materials listed, that is because an element, such as a wall has
multiple materials attached to it. These steps can be repeated with all of the objects.
With this method it is easy to miss elements on a larger model. To make sure all of the
materials get assigned a second method can be used. In the Project pane, under the
Materials folder, select each of the materials by name, and then assign their textures
individually in the Inspector pane.
The base map for all of the materials is a standard diffuse map. In order to make
the item glossy, a specular map should be used, which can be changed in the Inspector
72
pane with the material selected. For glass, there are two options. The GlassMap
shader in Appendix B can be applied as the shader. A sky image can be set as the
reflection in the same manner as textures are added to materials, by clicking Select in
the Inspector pane. The built in transparent specular shader can be used in lieu of the
GlassMap shader. The GlassMap shader provides a more realistic reflection, but the
transparent specular shader allows the user to adjust the transparency of the glass by
moving the A Slider in the Main Color selection box, as shown in Figure 5-8 B. Using
the Pro version of Unity3D allows for use of more realistic glass shaders, which provide
real time specular reflections.
A B Figure 5-8. Manipulating textures in Unity3D. A) Selecting a new texture for a material.
B) The ‘A’ Slider can be used to adjust the transparency of glazing.
Some of the textures will show up as No Name, and cannot be modified properly.
This is due to either materials not being named properly in Revit, common for MEP and
structural models, or incompatibility between Unity3D and Autodesk software. To
modify the materials of items with a No Name material, the material has to be changed.
That can be done by replacing the material of the item with an existing material or
creating a new one. To replace an object’s material with an existing one, find the object
73
in the Hierarchy pane, and using the Shift and Ctrl keys select all of the similar objects.
Then, with the objects selected, in the Inspector pane, under the Mesh Renderer
dropdown, change the material by clicking the circle to the right of the No Name
material, as shown in Figure 5-9 A. Then selecting a new material will replace the
existing No Name material. To create a new material, right click in the Materials folder
of the Project pane and under Create select Material, as shown in Figure 5-9 B. Using
these techniques all of the materials in a project can be assigned.
A B Figure 5-9. Adding materials to empty objects. A) Changing the material assigned to an
object. B) Creating a new material in the materials folder.
Lighting the Model
Lighting is one place where there are significant differences between the free
version of Unity3D, and the Pro version. With the free version, light rendered in real
time passes through objects, therefore a single light can illuminate the entire model.
This does not occur in the Pro version, which allows for real time shadows and more
realistic lighting. This section of the guide describes how to create a sun, which will light
an entire model in the free version of Unity3D, and how turn lights on and off in
74
individual rooms, which is required for lighting in the Pro version. It is not recommended
to use more than a few artificial lights without UnityPro, as the effects multiply and
create a white-out effect.
To create a sun, from the GameObject menu, select Create Other and then
Directional Light. The directional light produces rays which run parallel to each other
and are infinite in length, similar to the actual sun’s light. Using the rotate and move
functions turn the light as desired and locate it in the sky above the model. The
directional light will appear in the Hierarchy pane, where it should be renamed to Sun.
To illuminate all of the artificial lights with UnityPro, it is best to group the lights.
Grouping the lights by room makes it easier to make them interactive them later. To
group the lights for a room, first find the light switch for that room in the Hierarchy pane,
and rename it to Light Switch Room 101, 102, 103, etc. Drag all of the light fixtures in
that room to make them a child (or subsection) of the switch, as shown in Figure 5-10 A.
Click Yes if an error message pops up asking to lose the prefab connection. The lights
can be easier to find by turning off unnecessary models to the activity. This can be
done as described in the sections above; refer to Figure 5-4. Then add a light to each
of the light bulbs (not the fixtures), by opening up each of the light fixtures and selecting
the child of each fixture, as shown in Figure 5-10 B. Under the Component menu, and
the Rendering submenu, select Light. This will create a Point Light at the origin point of
the photometric information. In the Inspector pane the light can be changed to a Spot
Light with a larger Intensity. The Range and Spot Angle should be adjusted to extend
just beyond the floor of the room, best shown in a side view, as displayed in
Figure 5-10 C. The lights rarely point down by default; therefore the rotation will need to
75
be changed. This can be done in Inspector pane, with the photometric information
selected. Additional effects such as the color and cookies can be changed to add more
realism or special effects to the scene. Clicking the selection dot to the right of the Flare
parameter, and selecting Small Flare will add realism to the scene.
A B
C Figure 5-10. Setting up artificial lighting. A) Lights made a child of a light switch. B) The
center point of photometric information is, by default, a child of the light fixture. C) The spotlight with the correct settings to point downward, extending just beyond the floor.
To make the lights operable, first an input key needs to be added to the scene.
Under the Edit menu, and Project Settings, select Input. In the Inspector pane,
maximize the Axes menu and change the Size parameter to 18. A copy of the Jump
76
key parameter will be added to the bottom of the list. Open up the new Jump key and
change its Name parameter to togglelight, and the Positive Button parameter to a lower
case L. Clicking in the Project pane will close and save the added input. Then add the
LightSwitchScript to the light switch by first selecting the switch in the Hierarchy pane.
Then drag the script from the Project pane into the Inspector pane. A box collider
needs to then be added to the switch. With the switch selected in the Hierarchy pane,
select the Component Menu, and under Physics, select Box Collider. The box collider
is what will trigger the script. When in Play mode, if the player walks into the box
collider, and the keyboard key ‘L’ is pressed, the lights will toggle on and off. As such,
the box collider size will need to be adjusted. Change the Size and Center of the Box
Collider in the Inspector pane so that it encompasses the area around the switch, but
not on the other side of the wall, as shown in Figure 5-11 A and B. Then make sure that
the Is Trigger box is checked. Under the Target Light of the LightSwitchScript select
one of the lights which the switch is to control. Each script will control only a single light,
therefore, add the script to the switch multiple times to select all of the lights which the
switch should control. This should be repeated for each switch until all of the lights are
operable.
77
A B Figure 5-11. Setting up a light switch box collider. A) With the light switch selected, the
box collider is visible in green. B) The size and center of the light switch box collider.
Creating Environment and Site
Building context for an urban environment should be created inside of Revit using
massing tools. RPC trees and additional environmental effects that did not transfer
from Revit can be created inside of Unity3D. The environment settings are located in
the Edit menu under Render Settings. In the Inspector pane, the Ambient Light can be
adjusted to compliment the sun and artificial lights. A background sky can be set by
opening the Skybox Material selection and searching for skybox. If additional terrain is
required beyond that imported from Revit it can be created using the Terrain menu.
Unity3D has a built in tool for creating trees from scratch, but this is a time
consuming process and is not recommended for a novice to the software. On their
support website, Unity provides a free for commercial and non-commercial use package
of terrain assets at http://unity3d.com/support/resources/assets/terrain-assets.
Download the TerrainAssets file into the C:/RevitWalkthroughGuide/Assets/ folder. This
will load the file into the Project pane. Selecting Terrain Assets in the Project pane and
78
selecting Open in the Inspector pane will allow the user to select which assets to import.
This will create a Terrain Assets folder in the Project pane. To apply the new trees to
the existing location of the RPC trees from Revit, select the desired tree from the
Terrain Assets folder in the Project pane, and drag it on to the associated RPC tree in
the ProjectName_BaseModel folder of the Hierarchy tab. The tree will likely need to be
scaled, rotated and moved to an exact placement. Placing multiple trees at once, and
modifying them at the same time using Position, Rotation, and Scale functions in the
Inspector pane can speed up the placement of trees.
Door Operations
Animating the operation of doors can become a tedious process as it must be
done at every door. For large projects it may be ideal to ensure that the door model
does not have colliders, and for the player to simply walk through the doors rather than
animate their operation. This should have been completed in the Setting Up the Unity
Workspace section above. If the goal is a realistic walkthrough, the door operation
should be animated. To animate a door, first an object must be created and placed at
the hinge point on the door. This new object will be the point which the door will rotate
around. To do this, select Create Empty from the GameObject menu, and rename it
DoorHinge101, 102, 103, etc. in the Hierarchy pane. Move the door hinge, so that it is
at the hinge point of the door to be operated, as shown in Figure 5-12 A. This is best
done using a combination of plan and elevation views, and using the Find tool, pressing
‘F’ on your keyboard with the object selected in the Scene pane. If it is difficult to locate
the Revit door or the DoorHinge, other models can be turned off by using the technique
described in the sections above; refer to Figure 5-4. The door should then be selected
in the Hierarchy pane, and drag it onto the DoorHinge101 object in the Hierarchy pane,
79
making it a child of the hinge, as shown in Figure 5-12 B. An error may show up about
losing the prefab connection, and should be accepted. This is so that when the script is
applied to the hinge object in the next step, the door will turn with the hinge. Note that
the door hinge cannot be moved relative to the door after the hinge is parented to the
door, so it must be properly located at the hinge point prior to this step. Apply the
DoorOperationScript to DoorHinge101 by dragging it from the Project pane onto
DoorHinge101 in the Hierarchy pane. Then add a collider to the hinge by selecting
Sphere Collider from the Component menu, under Physics. With the Sphere Collider
selected it must be modified in the Inspector pane. Ensure that the Is Trigger box is
checked, and adjust the Radius and Center as required to properly activate the door.
The collider is visible in Green in Figure 5-12 A. Note that it encompasses the area
around the door, as the door will only open when the player enters the trigger, and
closes when the player leaves the trigger in play mode. If the door is opening in the
wrong direction, changing the Open Angle and Close Angle parameters to 90, 0 or -90
will make the door swing in the opposite direction. These parameters can be found by
selecting DoorHinge101 in the Hierarchy pane, and expanding the Door Operation
Script dropdown in the Inspector pane. In most situations, the Open Angle parameter
should be set to 0, and the Close Angle parameter should be set to 90 or -90. Adjusting
the Smooth parameter will change the speed at which the door opens and closes. This
process should be repeated for each of the doors.
80
A B Figure 5-12. Setting up a door to swing around a hinge object. A) DoorHinge101 object
placed correctly at the hinge point of the door, with the sphere collider visible in green. B) The Revit door is made a child of DoorHinge101.
Elevator Operations
In order to set up an elevator, several scripts need to be used. One script will be
attached to the elevator itself, to define the floors, one script will be applied to each of
the elevator controllers, to move the elevator, and one will be applied to each of the
elevator doors. First the objects need to be properly organized. All of the pieces of the
elevator need to be included in a single object. In the trial model, the elevator floor,
walls, ceiling, doors and door frames were all separate items. All of these items need to
be put into one group; in this model, all of the items traveling with the elevator were
made children of the elevator floor, and the elevator floor had the ElevatorController
script attached to it. In future models, having the elevator made as its own family woiuld
streamline this process. With the elevator floor selected, in the Inspector pane, under
the ElevatorController (Script), the Floors Size parameter must be set to the number of
floors. Element 0 must be equal to the elevation of the first floor; Element 1 must be
81
equal to the elevation of the second floor, etc. Finding the elevations of the floors can
be done through the following steps. First ensure that only the
ProjectName_ElevatorModel and ProjectName_FloorsModel are the only models on.
Then move to an elevation view and zoom to the elevator. Select the elevator (or
elevator floor in this instance) and move it so that the elevator floor is at the same height
as the first floor. Then in the Inspector pane, copy the Position Y parameter out of the
Transform dropdown and paste the number into the Y parameter of the Element 0
dropdown under ElevatorController (Script) dropdown. Then move the elevator so that
its floor matches the top of the second floor, and copy the Position Y parameter from the
Transform dropdown to the Y parameter of the Element 1 dropdown of the Inspector
pane. The Z and X parameters should be set to zero at all floors, unless the goal is to
make the elevator move sideways or diagonally. Continue these steps with all floors.
This is what determines how far the elevator moves, and can be fine-tuned through trial
and error.
Each of the sliding elevator doors will use only one of the four SlidingDoor scripts
shown in Appendix A. Each axis script will move the door in the respective axis, while
the positive and negative scripts will move the door in the positive and negative
direction respectively. The positive and negative directions can be determined by
selecting the door and selecting the move option, as shown in Figure 5-13. In this
figure, the red arrow signifies the positive x direction, the blue arrow signifies the
positive z direction. In this example, if the door is to open in the right, the Sliding Door X
Axis Positive script would be used. If the door is to open to the left, the Sliding Door X
Axis Negative script would be used. These scripts should be used in conjunction to
82
accommodate differing door configurations, i.e. if an elevator has two doors which
operate in different directions in the z-axis, both the positive and negative z-axis scripts
will be used, and each will target a different door.
Figure 5-13. Selecting the doors can help determine which direction SlidingDoorScript
should be applied.
To create the sliding doors which are inside the elevator, the following steps
should be taken. Using the GameObject menu, create a Cube. Rename this cube
ElevatorDoorTrigger, and make it a child of the elevator floor by dragging
ElevatorDoorTrigger into the elevator floor in the Hierarchy pane. This will ensure that
the door will travel with the floor. The ElevatorDoorTrigger cube will act as a trigger for
the door, so it should be located and sized accordingly around the door. With the
ElevatorDoorTrigger selected, in the Inspector pane, uncheck the Mesh Renderer box,
and ensure the Box Collider and Is Trigger boxes are checked. Move the Center and
Size of the Box Collider to encompass the area which the player will have to enter to
open the door. The ElevatorDoorTrigger will be the trigger for the door opening, in the
same manner as the sphere collider is the trigger for the swinging doors created in the
Door Operations section above. Add the appropriate SlidingDoor script(s) to the
83
ElevatorDoorTrigger for the door’s movements. If the elevator door only has a single
panel, then only one script must be applied. If the elevator door has two or more
panels, then one scripts must be applied for each panel. In the Inspector pane, set My
Floor to -1 and set the elevator floor as My Elevator. Under Targeti, select the sliding
door which the script is to control. The Up Max Distance and Down Min Distance
modifiers adjust the distance which the door will slide, and should be adjusted as
required through trial and error. The Speed should be adjusted as desired. Note that
the correct script must be applied. If the door is to move in the negative-x direction and
the positive-x script is applied, the door will not slide into location, but rather move
instantly to the new location. Therefore, if there is trouble fine tuning the sliding door
operation, it may be due to the incorrect script being used. Finally, add a Box Collider
to the elevator doors so that it is not possible to walk through them. This can be done
by selecting the door (not the trigger) in the Hierarchy pane, and from the Component
menu, under Physics, select Box Collider. If a Replace Existing Component dialog box
appears, select the Add option.
With the elevator door working, the process can be repeated to make the exterior
doors (the doors that do not travel with the elevator). As a shortcut, if the doors have
the same texture and size, then the ElevatorDoorTrigger and the door(s) can be
duplicated, and moved into the correct position. The copy should be called
ElevatorFirstFloorDoor. It should be moved so that it is not a child of the elevator floor;
this is so that the new door does not move with the elevator. This group can then be
copied up to each floor. Inside the Inspector pane, make sure that the My Floor is set to
whichever floor the door is placed, with 0 for the first floor, 1 for the second floor, 2 for
84
the third floor, etc. This will ensure the door will not open when the elevator is not at the
correct floor.
With the doors working, the last step in setting up the elevator is to create the
panel controllers. A panel controller then needs to be set at each floor, so that the
elevator can be called and a floor can be selected for its movement. A panel controller
constructed in Revit would be ideal, but for this trial that was not completed, therefore
they need to be created in Unity3D. To create the panel controller, a Cube should be
created and set adjacent to the exterior elevator door at the first floor, as shown in
Figure 5-14. The cube should be named ElevatorPanel1, and the PanelController script
should be applied to it. With ElevatorPanel1 selected, in the Inspector pane set the My
Elevator to the elevator floor object. Then number the floors accordingly, My Floor 0
should be 0, My Floor 1 should be 1, My Floor 2 should be 2 if there is third floor,
otherwise it should be set to 0, My Floor 4 should be set to 4 if there is a fifth floor,
otherwise it should be set to 0. This script allows for an elevator up to five floors. For
additional levels the script will need to be edited by repeating the action. With the script
attached, the trigger needs to be set for the panel. The Box Collider in the Inspector
pane should be checked on as well as the Is Trigger box. This Size and Center of the
Box Collider should be modified to include the area in front of the panel, as shown as
the green outline in Figure 5-14. With this accomplished, the PanelController can be
duplicated and set in the same spot on each floor, as well as one inside of the elevator.
Note that the PanelController inside of the elevator should be made to be a child of the
elevator so that it will move with the elevator, and the box collider should point inward
towards the elevator. In the example pictured below, the controller is simply a gray box.
85
To add realism other shapes can be added to create the buttons that look like an actual
panel controller, or an image of a panel controller can be added as a material. When in
Play mode, if the player enters the trigger for any of the panel controllers, pushing the
number of the floor will send the elevator to that floor. When the elevator is on a
different floor, the player will have to go to the PanelController and call the elevator to
the current floor. The elevator doors will only open when the elevator is at the correct
floor.
Figure 5-14. The elevator panel controller properly located, with the box collider properly
sized in green.
Exporting Walkthrough
Walkthroughs can be done directly in Unity3D by pressing the play button, but
entering a walkthrough inside of Unity3D can be stressful on even high level
processors. Therefore, the model should be exported to another format for use
whenever modifications are not being made. Unity3D has a number of options for
exporting. In the File menu, open the Build Settings dialog box. Only the first two
options, Web Player and PC and Mac Standalone, are available in the free version of
86
the software. Both produce similar outputs. The PC and Mac Standalone option
requires that the build be on a computer hard drive to play. The Web Player can be
hosted on a website, requiring only a download of the Unity Web Player for outside
users to experience the walkthrough. Google Chrome allows the application to natively
run in stereoscopic 3D on a compatible computer.
The Web Player version provides only a few build options. To access the options,
select the Web Player as the Platform and select the Player Settings Button. There the
resolution and background can be set. The web player version will only operate at a
single resolution. The PC and Mac Standalone option allows for varying resolutions and
settings on a single build. To access the more advanced options, exit the Build Settings
dialog box and under the Edit menu, and the Project Settings dropdown, select Quality.
In the Inspector pane, note that there are six qualities. Each of these will export with the
PC and Mac Standalone Option. These options can all be left to the defaults if using
the free version of Unity3D. If using the UnityPro with advanced lighting, the Shadow
Distance setting will need to be adjusted. The Shadow Distance is the distance from
the player which the shadows are calculated. Depending on the size and scale of the
project, the shadow distance will need to be increased. The sample project found that
the shadow distance set to 100 to 150 was adequate, but 200 provided the best results.
Therefore, selecting the Simple option, the Shadow Distance should be set to 100;
selecting the Good option, the Shadow Distance should be set to 150; selecting the
Beautiful and Fantastic options, the Shadow Distance should be set to 200. Other
settings could be modified if desired. After exporting, if the PC and Mac Standalone
87
application is launched, each of the quality options, as well as various resolutions will be
available.
To build the walkthrough, first open the Build Settings dialog box. Click on Add
Current, to add the current scene to the build. Then selecting either Web Player or PC
and Mac Standalone and selecting the correct Target Platform, then clicking on Build
will quickly create a fully interactive 3D walkthrough of the space. Changes made to the
Revit model and imported into Unity3D via 3DS Max should replace and update the
existing model.
88
CHAPTER 6 CONCLUSION
Review of the Study
This study found a method to import a BIM model created in Revit into Unity3D for
visualization. Methods were determined for recreating all of the effects which were lost
during the transfers through applications. Additionally several scripts were written for
activities typical to experiencing a building were created. These included operating a
door, a light switch and an elevator. Implementing the scripts for these tasks was more
arduous than desired. Specifically, a simpler method for operating a door was desired,
as a large project could contain hundreds of doors.
The small trial conducted indicated that students, and likely professionals, with
only a basic knowledge of Unity3D can create an interactive 3D walkthrough of an
existing BIM model. Students that were the most comfortable working with BIM and 3D
models were able to create a walkthrough with the most ease. The time investment
required would be based upon the size of the model and required animations. A
rendered model without advanced lighting or any animations could be done within a few
hours. A large project with animated doors, elevators and interactive lighting could
require several days to fully animate using the guide provided. Any additional
animations would require time spent writing scripts and making additional modifications
to the Revit model.
Barriers to Research
The most significant barriers to this research were time and experience. The team
which evaluated the applications used in this study had little experience with them.
Though most of the team had at least moderate experience in Revit, no member of the
89
team had previous experience with Unity3D or 3DS Max. Therefore the applications
were quickly studied through instructional videos and forums. A team member with
experience in 3DS Max may have been able to produce many of the final effects in that
application, rather than leaving them for Unity3D. A team member with more
experience with Javascript or C# may have been able to produce more efficient and
easy to use scripts. Through these barriers, the team was able to produce all of the
desired effects and animations.
90
CHAPTER 7 RECOMMENDATIONS FOR FUTURE STUDY
Animation Library
This research determined three animations common to a building animation for
which to write scripts. A library of many more scripts could be produced and made
available for use. For more repetitive tasks, like the operation of a door, a simpler script
should be created, which could be applied to dozens of doors in a few minutes. During
the trial, the students averaged 1.7 minutes per door, which would become a hindrance
when animating a large building with many doors. This library should be created by
researchers more experienced in scripting protocols.
In addition to scripting in Unity3D, rendering engines such as 3DS Max and Maya
have the capabilities to produce and export animations. Animations for simple objects,
such as opening a drawer or a door may be created in one of these rendering engines
and imported into Unity3D. Additional study by researchers more experienced in these
applications may produce better methods for duplicating the effects described in this
paper and producing animations. A library of model animations could be produced and
made available for use. Given more time and resources, this researcher would have
preferred to spend more time learning the capabilities of 3DS Max. An experience user
of 3DS Max’s animator and renderer could have achieved many of this research’s
desired results more efficiently or effectively. Due to time limitations of this research,
only the basic capabilities of 3DS Max were explored.
The products of the Unity3D visualization is only as good as the BIM model
created. The built-in libraries in Revit 2012 lacked elements for proper visualization.
Items such as base boards and trims, which are typical to a construction project are left
91
out of the Revit wall family. The door families are also missing details such as hardware
and the proper trim framing. Future efforts to create libraries for BIM visualization
should include Revit families to fix the details left out by Autodesk. Future releases of
Revit may resolve these limitations.
Uses for Interactive 3D Animations
Though there has been a desire for a process to import a BIM model created in
Revit into Unity3D, there have been few uses described for the result. Currently the
model serves the purpose of advanced animation and stereoscopic 3D visualization.
Further study to determine additional uses in construction management should be
conducted. A model broken up by sequence could possibly be used for construction
simulation. A model broken up by discipline could be used for review of complex
systems, including mechanical or plumbing systems in more detail than that provided by
Autodesk Navisworks. The success for using a model for construction management
purposes could be studied using test cases or surveys, monitoring potential
improvements to the schedule or a reduced number of requests for information when an
interactive model has been created for a project.
Using the guidelines set forth in this paper, this author is currently exploring
some of the potential uses of visualization in Unity3D for preconstruction. This includes
analyzing site logistics scenarios on a zero lot line site, and analyzing access through
and around a construction site on an active campus using crowd simulation. Initial
research is also being performed to determine if projects which use gaming visualization
produce a higher level of client satisfaction.
92
APPENDIX A SCRIPTS
LightSwitch
#pragma strict var TargetLight : Light; var FlashLightOn : boolean = false; var EnterTrigger : boolean = false; function Update () { if(Input.GetButtonDown("togglelight") && FlashLightOn == false){ if( EnterTrigger == true){ FlashLightOn = true; TargetLight.intensity = 2; } } else if(Input.GetButtonDown("togglelight") && FlashLightOn == true){ if( EnterTrigger == true){ FlashLightOn =false; TargetLight.intensity = 0; } } } function OnTriggerEnter (Col : Collider){ if(Col.gameObject.tag == "Player"){ EnterTrigger = true; } } function OnTriggerExit (Col : Collider){ if(Col.gameObject.tag == "Player"){ EnterTrigger = false; } }
93
DoorOperation
var Smooth : float = 1.5; var OpenAngle : float = 90.0; var CloseAngle : float = 0.0; var openSound : AudioClip; var closeSound : AudioClip; var OpenDoor : boolean = false; var EnterTrigger : boolean = false; function Update () { if( OpenDoor == true) { var DoorOpen = Quaternion.Euler(0, OpenAngle, 0); transform.localRotation = Quaternion.Slerp(transform.localRotation, DoorOpen, Time.deltaTime * Smooth); } if( OpenDoor == false){ var DoorClosed = Quaternion.Euler(0, CloseAngle, 0); transform.localRotation = Quaternion.Slerp(transform.localRotation, DoorClosed, Time.deltaTime * Smooth); } if( EnterTrigger == true) OpenDoor = true; if(EnterTrigger == false) OpenDoor = false; } function OnTriggerEnter (Col : Collider){ if(Col.gameObject.tag == "Player"){ EnterTrigger = true; audio.PlayOneShot(openSound); } } function OnTriggerExit (Col : Collider){
94
if(Col.gameObject.tag == "Player"){ EnterTrigger = false; yield WaitForSeconds(1); audio.PlayOneShot(closeSound); } }
ElevatorController
var floors : Vector3[] = new Vector3[2] ; var currentFloor : int = 0 ; var speed : float = 1.5; var isMoving : boolean = false; function Move (floorID : int, goingUp : boolean) { isMoving = true; if(goingUp) { while(floors[floorID].y > transform.position.y) { transform.position.y += speed*Time.deltaTime; yield; } if(transform.position.y > floors[floorID].y) { transform.position.y = floors[floorID].y; } } else { while(floors[floorID].y < transform.position.y) { transform.position.y -= speed*Time.deltaTime; yield; } if(transform.position.y < floors[floorID].y) { transform.position.y = floors[floorID].y; } } currentFloor = floorID; isMoving = false; }
95
PanelController
var myElevator : ElevatorController; var myFloor0 : int; var myFloor1 : int; var myFloor2 : int; var myFloor3 : int; var myFloor4 : int; var Button : AudioClip; function OnTriggerStay() { if(Input.GetKeyDown("0") && !myElevator.isMoving) { if(myElevator.currentFloor == myFloor0) { if(myFloor0) { targetFloor = myFloor0--; goingUp = false; }else{ targetFloor = myFloor0++; goingUp = true; } }else{ goingUp = (myElevator.currentFloor > myFloor0) ? false : true; targetFloor = myFloor0; } myElevator.Move(targetFloor, goingUp); } else if(Input.GetKeyDown("1") && !myElevator.isMoving) { audio.PlayOneShot(Button); if(myElevator.currentFloor == myFloor1) { if(myFloor1) { targetFloor = myFloor1--; goingUp = false; }else{ targetFloor = myFloor1++; goingUp = true; }
96
}else{ goingUp = (myElevator.currentFloor > myFloor1) ? false : true; targetFloor = myFloor1; } myElevator.Move(targetFloor, goingUp); } else if(Input.GetKeyDown("2") && !myElevator.isMoving) { if(myElevator.currentFloor == myFloor2) { if(myFloor2) { targetFloor = myFloor2--; goingUp = false; }else{ targetFloor = myFloor2++; goingUp = true; } }else{ goingUp = (myElevator.currentFloor > myFloor2) ? false : true; targetFloor = myFloor2; } myElevator.Move(targetFloor, goingUp); } else if(Input.GetKeyDown("3") && !myElevator.isMoving) { if(myElevator.currentFloor == myFloor3) { if(myFloor3) { targetFloor = myFloor3--; goingUp = false; }else{ targetFloor = myFloor3++; goingUp = true; } }else{
97
goingUp = (myElevator.currentFloor > myFloor3) ? false : true; targetFloor = myFloor3; } myElevator.Move(targetFloor, goingUp); } else if(Input.GetKeyDown("4") && !myElevator.isMoving) { if(myElevator.currentFloor == myFloor4) { if(myFloor4) { targetFloor = myFloor4--; goingUp = false; }else{ targetFloor = myFloor4++; goingUp = true; } }else{ goingUp = (myElevator.currentFloor > myFloor4) ? false : true; targetFloor = myFloor4; } myElevator.Move(targetFloor, goingUp); } }
Sliding Door X-Axis Negative
var myFloor : int; var myElevator : ElevatorController; var targeti : Transform; var moveSpeed : float = 1.0; var downMinDistance : float; var openCloseSound : AudioClip; private var initPosition : Vector3; private var openDoor : boolean = false; function Start() { initPosition = targeti.transform.position; } function Update () { if (!targeti) { return;
98
} if (openDoor == true) { targeti.position.x = Mathf.Max(downMinDistance,targeti.position.x-moveSpeed * Time.deltaTime); } else { targeti.position.x = Mathf.Min(initPosition.x, targeti.position.x+moveSpeed * Time.deltaTime); } } function OnTriggerEnter() { if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.currentFloor == myFloor) { openDoor = true; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = true; audio.PlayOneShot(openCloseSound); } } function OnTriggerExit() { if(myElevator.currentFloor == myFloor) { yield WaitForSeconds(1); openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } }
Sliding Door X-Axis Positive
var myFloor : int; var myElevator : ElevatorController; var targeti : Transform; var moveSpeed : float = 1.0; var upMaxDistance : float; var openCloseSound : AudioClip; private var initPosition : Vector3; private var openDoor : boolean = false; function Start() { initPosition = targeti.transform.position; } function Update () {
99
if (!targeti) { return; } if (openDoor == true) { targeti.position.x = Mathf.Min(upMaxDistance, targeti.position.x+moveSpeed * Time.deltaTime); } else { targeti.position.x = Mathf.Max(initPosition.x, targeti.position.x-moveSpeed * Time.deltaTime); } } function OnTriggerEnter() { if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.currentFloor == myFloor) { openDoor = true; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = true; audio.PlayOneShot(openCloseSound); } } function OnTriggerExit() { if(myElevator.currentFloor == myFloor) { yield WaitForSeconds(1); openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } }
Sliding Door Z-Axis Negative
var myFloor : int; var myElevator : ElevatorController; var targeti : Transform; var moveSpeed : float = 1.0; var downMinDistance : float; var openCloseSound : AudioClip; private var initPosition : Vector3; private var openDoor : boolean = false; function Start() { initPosition = targeti.transform.position;
100
} function Update () { if (!targeti) { return; } if (openDoor == true) { targeti.position.z = Mathf.Max(downMinDistance,targeti.position.z-moveSpeed * Time.deltaTime); } else { targeti.position.z = Mathf.Min(initPosition.z, targeti.position.z+moveSpeed * Time.deltaTime); } } function OnTriggerEnter() { if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.currentFloor == myFloor) { openDoor = true; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = true; audio.PlayOneShot(openCloseSound); } } function OnTriggerExit() { if(myElevator.currentFloor == myFloor) { yield WaitForSeconds(1); openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } }
Sliding Door Z-Axis Positive
var myFloor : int; var myElevator : ElevatorController; var targeti : Transform; var moveSpeed : float = 1.0; var upMaxDistance : float; var openCloseSound : AudioClip; private var initPosition : Vector3; private var openDoor : boolean = false;
101
function Start() { initPosition = targeti.transform.position; } function Update () { if (!targeti) { return; } if (openDoor == true) { targeti.position.z = Mathf.Min(upMaxDistance, targeti.position.z+moveSpeed * Time.deltaTime); } else { targeti.position.z = Mathf.Max(initPosition.z, targeti.position.z-moveSpeed * Time.deltaTime); } } function OnTriggerEnter() { if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.currentFloor == myFloor) { openDoor = true; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = true; audio.PlayOneShot(openCloseSound); } } function OnTriggerExit() { if(myElevator.currentFloor == myFloor) { yield WaitForSeconds(1); openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myFloor == -1) { openDoor = false; audio.PlayOneShot(openCloseSound); } else if(myElevator.isMoving == true) { openDoor = false; audio.PlayOneShot(openCloseSound); } }
102
APPENDIX B SHADERS
GlassMap Shader
Shader "GlassMap" { Properties { _EnvMap ("EnvMap", 2D) = "black" { TexGen SphereMap } } SubShader { SeparateSpecular On Tags {"Queue" = "Transparent" } Pass { Name "BASE" ZWrite on //Blend One One // additive Blend One OneMinusSrcColor // soft additive //Blend SrcAlpha OneMinusSrcAlpha // real alpha blending BindChannels { Bind "Vertex", vertex Bind "normal", normal } SetTexture [_EnvMap] { combine texture } } } Fallback off }
103
LIST OF REFERENCES
Arrington, M. (2011). "Unity Technologies Takes $12 Million For 3D Gaming Development, Looks to China for Big Growth." http://techcrunch.com/2011/07/20/unity-technologies-takes-12-million-for-3d-gaming-development-looks-to-china-for-big-growth/ (18 March, 2012).
Autodesk Inc. (a). "3DS Max Help." http://download.autodesk.com/us/3dsmax/2012help/index.html (15 July 2012).
Autodesk Inc. (b). "Autodesk FBX." http://usa.autodesk.com/fbx/ (03 July 2012).
Autodesk Inc. (c). "Autodesk Products." http://usa.autodesk.com/products/ (14 July 2012).
Becerik-Gerber, B., and Rice, S. (2010). "The Perceived Value of Building Information Modeling in the U.S. Building Industry." ITcon, 15 Mar 25, 2012.
DeLeon, V. J., and Berry, R. J. (2000). "Bringing VR to the Desktop: Are You Game?" IEEE Multimedia, 7(2), 68-72.
Dunston, P. S., Arns, L. L., and McGlothlin, J. D. (2007). "An Immersive Virtual Reality Mock-Up for Design Review of Hospital Patient Rooms." CONVR, 6 June 2012.
Games-to-Teach Team. (2003). "Design Principles of Next-Generation Digital Gaming for Education." Educational Technology, 43(5), 17-33.
I. Howell, and Batcheler, B. (2008). "Building Information Modeling Two Years Later –Huge Potential, Some Success and Several Limitations." http://www.laiserin.com/features/bim/newforma_bim.pdf (25 Mar, 2012).
Isaacs, J. P., Gilmour, D. J., Blackwood, D. J., and Falconer, R. E. (2011). "Immersive and Non Immersive 3D Virtual City: Decision Support Tool for Urban Sustainability." ITcon, 16(Special Issue Use of Gaming Technology in Architecture, Engineering and Construction), 17 Jan 2012-151-162.
Juang, J. R., Hung, W. H., and Kang, S. C. (2011). "Using Game Engines for Physical-Based Simulations - A Forklift." ITcon, 16(Special Issue Use of Gaming Technology in Architecture, Engineering and Construction), 17 Jan 2012-3-22.
Kamat, V. R., and Martinez, J. C. (2005). "Dynamic 3D Visualization of Articulated Construction Equipment." Journal of Computing in Civil Engineering, 19(4), 356-368.
Kumar, S., Hedrick, M., Wiacek, C., and Messner, J. I. (2011). "Developing an Experienced-Based Design Review Application for Healthcare Facilities Using a
104
3D Game Engine." ITcon, 16(Special Issue Use of Gaming Technology in Architecture, Engineering and Construction), 17 Jan 2012-85-104.
Lin, K., Son, J. W., and Rojas, E. M. (2011). "A Pilot Study of a 3D Game Environment for Construction Safety Education." ITcon, 16(Special Issue Use of Gaming Technology in Architecture, Engineering and Construction), 17 Jan 2012-69-84.
L. Luxology. "Modo 601." http://www.luxology.com/modo/ (14 July 2012).
Majumdar, T., Fischer, M. A., and Schwegler, B. R. (2006). "Conceptual Design Review with a Virtual Reality Mock-Up Model." Joint International Conference on Computing and Decision Making in Civil and Building Engineering, 2902-2911.
Maxon Computer GmbH. "Maxon 3D Products." http://www.maxon.net/products.html (14 July 2012).
Microsoft Corporation. (2012). "Windows 7 System Requirements." http://windows.microsoft.com/en-us/windows7/products/system-requirements (6 June, 2012).
Pauwels, P., De Meyer, R., and Van Campenhout, J. (2010). "Visualisation of Semantic architectural Information Within A Game Engine Environment." 10th International Conference on Construction Applications of Virtual Reality, .
Sallcachat, R., and Choutgrajank, A. (2003). "Collaborative Design: Integrating Game Engine to Online Interavtive Persentation Tool." 8th International Conference on Computer Aided Architectural Design Research in Asia, CAADRIA, Bangkok, 295-306.
Shiratuddin, M. F., and Thabet, W. (2011). "Utiilizing 3D game Engine to Develop a Virtual Design Review System." ITcon, 16(Special Issue Use of Gaming Technology in Architecture, Engineering and Construction), 17 Jan 2012-39-68.
Shiratuddin, M. F., and Thabet, W. (2002). "Virtual Office Walkthrough Using a 3D Game Engine." International Journal of Design Computing, (Issue on Designing Virtual Worlds), 4.
Shiratuddin, M. F., and Zulkifli, A. N. (2001). "Making Virtual Reality a Reality: Bringing CAD and Game Engine Together." Proceedings of the International Conference on Information Technology and Multimedia at UNITEN: Recent Advances and Future Trends in Information Technology and Mulimedia, Malaysia, .
ShiVa 3D. "Company Information." http://www.stonetrip.com/stonetrip-information.html (18 March, 2012).
105
Uddin, M. S., and Yoon, S. (2002). "House X, Scheme G: 3D Game Engine For Portable Virtual Representation of Architecture." 20th Education and Research in Computer Aided Architectural Design in Europe Conference Proceedings, eCAADe, Warsaw, Poland, 526-531.
Unity Technologies. "Asset Importing." http://unity3d.com/unity/editor/importing (03 July 2012).
Yan, W., Culp, C., and Graf, R. (2011). "Integrating BIM and Gaming for Real-Time Interactive Architectural Visualization." Automation in Construction, 20(4), 17 Jan 2012-446-458.
106
BIOGRAPHICAL SKETCH
Ryan Fintel began his career at Kent State University when he earned a Bachelor
of Science degree in architecture in the spring of 2009. While completing his degree he
began working as an architectural intern for a small architecture firm in Akron, Ohio.
After two years of employment, in the fall of 2010, he moved to Gainesville, Florida to
pursue a Master of Science degree at the University of Florida’s M.E. Rinker Sr. School
of Building Construction.
Working for a small architecture firm, where advanced and expensive technologies
such as BIM and 3D modeling were not used fueled a desire to help bring the latest
design and construction technology to all professionals. A strong interest in design and
graphics lead him to conduct research in construction visualization. Ryan has
continued his research in the commercial sector as a Virtual Design and Construction
Engineer at a national contracting company since Fall of 2012.