Book Image

Unity for Architectural Visualization

By : Stefan Boeykens
Book Image

Unity for Architectural Visualization

By: Stefan Boeykens

Overview of this book

Architects have always relied on drawings, renderings, and sometimes even movies to present their design concepts to clients, contractors, and other stakeholders. The accessibility of current game engines provides new and exciting possibilities to turn any design into an interactive model that anyone can experience at their own pace. "Unity for Architectural Visualization" explains how you can create compelling, real-time models from your 3D architectural project. Filled with practical tips and in-depth information, this book explains every step in the process, starting from the very basics up to custom scripts that will get you up to the next level. This book begins with a general overview of the Unity workflow for architectural models. You will start with a simple project that lets you walk around in your design using basic Unity tools and methods. You will then learn how to easily get convincing lightning effects on your scene. You will then set up a basic navigation system in your project, and not only this; you will also cover some tips and tricks to take navigation to the next level. You will quickly learn how to fine-tune the shaders and how to set up materials that are a bit more advanced. Even when you finish Unity for Architectural Visualization, this book will make scripting easier with reusable examples of scripts that can be applied in most projects. After reading this book, you will be comfortable enough to tackle new projects and develop your own.
Table of Contents (15 chapters)
Unity for Architectural Visualization
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Building Information Modeling (BIM) Software


Building Information Modeling or BIM is a methodology of organizing the building process by using digital building models, containing both geometry and information about the entities which comprise a building. The designer creates a three-dimensional model of the building, which embeds information about objects, properties, and relations.

Note

The BIM process is inherently tied to BIM authoring tools, which in the context of this book are typically architectural 3D modeling systems. The best known BIM authoring applications are Graphisoft ArchiCAD and Autodesk Revit and both have been created for this purpose from the beginning. There is also a version of AutoCAD, called AutoCAD Architecture that adheres to this concept. There is a wide variety of other software systems for BIM, ranging from modeling (authoring), to viewing, and analysis, but this is beyond the scope of this book.

In the context of architectural visualization, it is important to understand that the modeling process with BIM software is more indirect, when compared to traditional 3D CAD or DCC modeling methods. The user creates building objects, such as walls, floors, and roofs, inserts windows, doors, and other objects, and sets up a variety of views which display the model in some form, such as a 2D annotated drawing, a section or elevation drawing, or a 3D view. The idea is that the model is the main source of all information about the building and all related views are derived from it, just like you would set up a database and create queries that filter information from the model.

The indirect modeling is apparent in the way objects are managed. You start from predefined or custom created parametric objects, which are positioned using only a small set of location parameters: position, orientation, and size mainly. Instead of manipulating 3D geometry directly, you would select the object and change its properties, which triggers a routine that recreates the 3D geometry or other related geometry and characteristics. This also means that there are multiple possible representations of the model. Take this into account when preparing a BIM model for architectural real-time visualization with Unity. You have to decide on many aspects that steer the geometry generation, for example, scale level and building phase or status, alongside a plethora of model display options.

Example workflow scenario

Let's explain this with an example that could be applied in most BIM authoring software applications.

When the architect creates the design, he or she can set up the model in BIM software as an assembly of building entities positioned on stories. At any time, the model can be shown in a 3D view. However, many possible 3D views can be created. Imagine that it has been decided to visualize a first design proposal to the client. The model can be set up at a moderately detailed scale level (for example, 1:100), with the main fixed furniture visible, albeit without some of the model details, such as door knobs and closet handles.

In addition, all technical installations, which have been created as part of the model and which are important mostly for the engineers and contractors, have been hidden in the model. It was decided to mainly show the atmosphere of the design through materials and lights and the layout of the facility.

The particular 3D view is then exported into a Unity compatible format and placed inside a separate folder underneath the project Assets folder. We skip the many possible interoperability issues in this example and focus on the overall workflow. Within Unity, the model is imported and positioned in a scene, to be explored in the "game" by the building owner, who receives the Unity project as a standalone application.

Although the architect imagined the building owner not to be interested in the technical details, there are some worries about the feasibility of placing the large ventilation shafts and ducts in a non-obtrusive way, so the architect is asked to update the design. In the BIM authoring system, a new 3D view is created, which only displays the technical installations as 3D geometry and this is exported as a second model for Unity. This model is added to the scene and a small GUI is scripted with two simple buttons to toggle the visibility of the architectural and the installation model upon request. In Chapter 7, Full Control with Scripting, we explain how to provide such an option to the user.

After the next client meeting, some design changes are requested. The architect adjusts the model in the BIM authoring software and exports the models again from the two views that have been set up, overwriting the first export files. The model inside Unity is updated automatically and the new version of the interactive application simply has to be built again with identical settings. While the design model changes took some effort, the time it took to update the real-time model inside Unity was negligible.

The scenario pictured here requires some experience to set up a properly, but it is not far-fetched at all and presents an important added value of using BIM authoring software for a real-time architectural visualization. The master model contains the actual, current version of the design, which can be updated at any time, and is completely in sync with the technical drawings, the presentation drawings, or renderings. The real-time model can be updated with minimal effort to integrate changes into Unity. This makes the process accessible in an architectural office, although dedicated visualization teams can create more extensive and graphically refined models, when specializing in the Unity part of the workflow.

Considerations when using BIM software

It is strongly advised to not try to make a single model encompassing every part of the design. It is much more efficient to set up separate complementary models, such as architectural, structural, and technical subsets. They can be assembled inside Unity and toggled from a simple user interface.

While the scenario depicted above seems easy and straightforward, the interoperability poses particular problems. Most BIM software lacks the direct support of the FBX format and even when available, this export is often not optimized for Unity.

Many of the pitfalls we discussed about CAD software are still applicable: architectural BIM models often use plain colors for materials and often lack texture-mapping information.

The problem of back-face culling is less prevalent, as the BIM software tools generate suitable polyhedral meshes where the face orientation is set up properly apart from maybe the glass panes, which are often modeled as a single face only.

There is a huge risk of adding too much geometry into the model, especially when furniture is included or (even worse) if trees and cars are included. While BIM tools often support a good library of common building objects, such as chairs, tables, but also windows and doors, they are typically not set up to minimize geometry. For example, a closet model also contains geometry for the inner parts, even though they are probably never seen in the real-time model, unless the model is set up to allow doors to be opened.

If supported by the BIM software, it is advised to set up the objects to be scale sensitive, allowing them to hide large parts of the geometry when displayed at a larger scale. This can then be used as a setting inside the particular views that have been set up for export to the real-time model. Some applications, such as ArchiCAD also provide a resolution setting for most curved objects, which controls the tessellation into polyhedral meshes.

To make matters worse, the export process often creates each object as a completely new geometric object, disregarding instancing in most cases. If you place 20 chairs in a restaurant space (which is easy to do in a BIM system), each chair will count as separate geometry in the exported model.

If feasible (it often isn't), create separate singular models for such objects and use Prefabs inside Unity, which places a much smaller burden on a scene, as repeated geometry will be optimized by the game engine. We will learn more on optimization in Chapter 5, Models and Environment.

When trying to add a rotation or sliding animation for doors and windows, it is often impossible to separate the moving parts from the static ones. It may even be necessary to hide them in the model and replace them with custom Unity animated objects, which takes much more effort. As a simple compromise, you can disable collisions on these objects or set them up in their open state in the BIM software, so they don't hinder navigation.

What about dedicated real-time solutions for CAD/BIM?

3D modeling systems and recently BIM authoring software can be extended with plug-ins or add-ons. A good example is the BIMx module, developed by Graphisoft, which is integrated into ArchiCAD. It allows a direct export from the ArchiCAD model into a standalone application, including the player and the model. It can be played on a computer (Mac or PC) or loaded into the free BIMx app for Android or iOS devices, allowing real-time navigation through the project, with only minimal effort. The following screenshot displays how an ArchiCAD model looks inside the BIMx software.

Other interesting systems that are worth mentioning are Autodesk Showcase, Act-3D Lumion, LightUp for SketchUp and Viso3D, also for SketchUp. There is also REALIS3D, which is a dedicated architectural visualization system, built with Unity.

When requiring real-time navigation for a project, it is good to consider such solutions. What they provide in ease-of-use (for example, single click export, built-in features), they often lack customization options. User interaction and the method of navigation are commonly predefined, without the possibility to add other forms of interactivity or visualization.

It is precisely this customization and flexibility that can be the motivation to master a real-time authoring system, such as Unity, at the cost of added effort and complexity. You could re-create most of the functionality of BIMx inside Unity and once this level of interactivity is prepared, using custom scripts, there is nothing preventing you to go a step further. Since this book is about Unity, we will not go into further detail about such dedicated systems.