Using 3D City Libraries in Game Engines

This post aims to introduce both the advantages and ease to which CityEngine can be used for varying forms of media. This includes a step-­by-­step tutorial on bringing models created in CityEngine to three popular platforms; Unity, Unreal Engine, and LumenRT.

From providing a haunted setting in the latest nightmare­-inducing horror flick to bringing exotic locales to life, today’s media have these often overlooked heroes to thank: buildings. Historically, three­-dimensional buildings were exhaustive to create, mold, and integrate into media such as games, movies, and even television shows. CityEngine, however, aims to bring this labor-intensive process to an end. Using procedural generation, buildings can be easily created in a way that will captivate professionals and hobbyists alike. Many game developers and movie directors are already capitalizing on this incredible opportunity such as Disney’s Prince of Persia and Microsoft’s new racing game Forza 5.

Here at SmarterBetterCities we provide a plethora of starter material in our libraries for use in CityEngine, which can in turn be imported into any major game engine with ease. This tutorial is
going to show just how easy it is to bring 3D models from CityEngine into three major platforms: Unity game engine, LumenRT, and Unreal Engine 4.

Click here to download the latest version of Unity.
Click here to download the latest version of Unreal Engine.
Click here to download the latest version of LumenRT.

First, highlight the models you wish to export. Then, go to File > Export > CityEngine > Export Models of Selected Shapes and Terrain Layers > Next

Screen Shot 2015-10-22 at 09.53.26

Select Autodesk FBX for Unreal Engine 4 or Unity, and E­On Software Vue for LumenRT.

Screen Shot 2015-10-22 at 09.53.42

Hit Next, then select an Output Path (where to store the new files) and hit Center. You will need to change the File Granularity depending on your needs. It is recommended to set this to “One file per start shape” if you are importing singular models or importing into Unreal Engine. If, however, you intend to bring a large number of models all at once into either Unity or LumenRT it is instead recommended to set this to “One file as long as Memory Budget is not exceeded” as neither Unity nor LumenRT appear to reassemble these models for you.

IMPORTANT: If using LumenRT make sure to not leave the Geometry Settings blank (Vertex Normals and Texture Coordinates) or CityEngine will likely crash.

Screen Shot 2015-10-22 at 09.53.53

Hit Finish once done. Next simply open Unity, Unreal, or LumenRT and drag the exported files in. You might find that the models will need to be resized, or in the case of Unity and LumenRT reassembled. Setting the models in Unity and Unreal to a scale of 100 seems to best fit the example characters provided as shown below.

LumenRT Finished product:

FullScene_001 (2)

Unity Finished product:

Screenshot (38)

Screen Shot 2015-10-22 at 10.07.49

Unreal Finished product:

Screenshot (33)

Screenshot (30)

Hope you enjoyed this tutorial and be sure check out our blog for more awesome stuff! Enjoy!

 

 


This article was written by mvdb

Menu