This is the first of two ECCE blog posts covering ArcGIS CityEngine, created for the course GEOG 647: Advanced GIS at the University of Calgary as a final term project.

The interactive ArcGIS StoryMap version of this project can be accessed here:


Page Navigation


Background


Esri’s ArcGIS CityEngine is a platform designed around bridging the gap between traditional 3D modelling of data by hand and the geospatial environment that planners are increasingly needing. CityEngine gives a computer code-based procedures that represent the geometric modelling commands a 3D modeller would typically do to a model by hand and automates them to all features given these procedures, which are stored in a Computer Generated Architecture (CGA) rule file (Esri, 2025a). CityEngine allows for scenario modelling within the program, which creates different views that can be swapped, and each view contains its own unique changes to the data that is presented in all three scenes (Shi et al., 2021).

CGA shape grammer is a programming language designed to generate 3D models over a very large scale. Each instruction or iteration of the code performs an operation that adds additional details to and modified an initial shape, such as a rectangular lot or street graph line (Esri, 2025a). With more complex scenes being created to support larger urban models, CGA code becomes essential to automate and reduce the amount of time needed to create these. CGA code can also read different attributes that can be modified per feature, dictating types of buildings or roadways to generate and what components of the rule file to execute, measurements of features and what kinds of details objects have (such as a roadway being lined with trees, number of vehicles per square kilometre, building windows, etc.). Randomized variables can also be assigned to values to give realistic discrepancies between different generated objects in a scene.

This blog post and its accompanying StoryMap feature a fictional community in Southwest Calgary, Alberta, Canada designed using CityEngine to highlight important use cases of the platform. This community example shows CityEngine’s capabilities in creating large scale communities and cities with ease, working with pre-existing CGA rules, modelling various scenarios, and writing custom CGA rules for low-density residential buildings. Scene examples are provided through static imagery and small, interactive components hosted through ArcGIS Online. Exported street and parcel data from CityEngine is integrated into web maps to display land use plans and street information.


Creating a Small Community


Setup

After creating a new CityEngine Project and new CityEngine Scene (.cej), there are two possible starting methods that one can use to set up a small city or community layout:

  1. Use the Get Map Data tab to pull terrain, imagery, building, and roadway data from OpenStreetMap (OSM).
  2. Import existing GIS data containing parcel information and roadways for the most accurate results.
  3. Let CityEngine automatically create a small, randomly generated city with the City Wizard.
The default appearance of a new scene upon creation.

Getting Data from OSM

With the Get Map Data tool, the area that data is pulled from can be set to either a set of coordinates or a rectangle extent can be drawn in the map window. The following data types can be pulled:

  1. 2K, 4K, or 8K Resolution Digital Elevation Model (DEM).
  2. 2K, 4K, or 8K Imagery Resolution.
  3. Options to download OSM Networks and Footprints.
  4. Filtering OSM data by OSM Tags.

For this example, OSM 8K DEM, Imagery, network, and footprint data was pulled from the area surrounding Red Deer Lake in SW Calgary, AB.

Imported OSM data in CityEngine.

Creating Street Layouts and Subdividing City Blocks

Now that data has been imported, streets need to be grown or drawn out before city blocks can be designed. In CityEngine, streets can be manually drawn out using the Street Creator tool. For this example, streets were grown once using the Grow Streets Wizard with a raster major and minor street default pattern, with Major Roadways being drawn in a grid format by hand. A special parkway roadway was drawn by Freehand near Red Deer Lake, to serve as a park roadway with parking stalls within a proposed urban regional park.

When an area is enclosed by roadways, it forms a new block and creates a new shape. This initial block can then be subdivided into various Lots by specifying the Subdivision Type and Area Min Area/Width of each subdivision. This forms Lots which can each accept a CGA rule to generate models or features.

The following subdivision types are possible in CityEngine:

  1. No Subdivision – Does not subdivide the initial created Lot.
  2. Skeleton Subdivision – Creates lots that are aligned to streets across an even area.
  3. Offset Subdivision – Creates small lots that are aligned to streets, followed by larger lots in behind them to fill the remaining area.
  4. Recursive Subdivision – Evenly subdivides the initial lot across its whole area, repeating for a specified number of iterations.
A modelled block with Skeleton Subdivision.

This example only uses Skeleton Subdivision (Buildings and Small Parks) and No Subdivision (Large Parks and Open Spaces) for its lots. In this comparison image, Skeleton Subdivision (Left) and Recursive Subdivision (Right) are shown in an example block surrounded by four streets.


Assigning Pre-Existing CGA Rules to Streets using the Complete Street Rule

Any shapes selected can be assigned a CGA rule which read user input as Attributes and Variables. Attributes allow for various things to be changed about the appearance of a model, such as the width of a roadway lane, the number of lanes present, whether a road has one way or two way traffic, etc., while Variables cannot be changed by the user and can only be changed by various parts of the CGA code, such as a rotation to be applied to the geometry after performing a calculation.

Shapes can be mass selected by either dragging or pressing CTRL plus Left Mouse on the 3D Viewport to make a selection, or by going to the Select menu and choosing to Select Objects by Same Type, Select Objects of Same Group, or Select Objects by Starting CGA Rule.

This example uses pre-existing CGA code from Esri’s Example 05 – Urban Planning and the Complete Street Rule, provided by Esri and created by D. Wasserman (Wasserman, 2015). The following slides show pre-existing CGA rules configured using Attributes to set street conditions and High-Density building conditions, all of which were saved to Scene Configuration files.

Generated pedestrian pathway and parkland features surrounding Red Deer Lake.

Basic Roadway

Type: Minor Road

  • Total Width: 12 m
  • Pavement Width: 8 m
  • Sidewalk Width: 2 m
  • Direction: Two-way
  • Lanes: 2
  • Centerline: None
  • Median: None
  • Lane Markings: None
  • Parking Lanes: 2
  • Bike/Transit Lanes: 0

Small Main Road with Parallel Parking

Type: Minor Road

  • Total Width: 14 m
  • Pavement Width: 8 m
  • Sidewalk Width: 3 m
  • Direction: Two-way
  • Lanes: 2
  • Centerline: Solid Yellow Line
  • Median: None
  • Lane Markings: Yes
  • Parking Lanes: 2
  • Bike/Transit Lanes: 0

Angled Roadway with Bike Lane

Type: Parkway

  • Total Width: 24 m
  • Pavement Width: 18 m
  • Sidewalk Width: 3 m
  • Direction: Two-way/One-way
  • Lanes: 2/1
  • Centerline: Solid Yellow Line/None
  • Median: None
  • Lane Markings: Yes
  • Parking Lanes: 1 (Angled)
  • Bike/Transit Lanes: 2/1

Divided Roadway with Trees

Type: Major Road

  • Total Width: 27 m
  • Pavement Width: 21 m
  • Sidewalk Width: 3 m
  • Direction: Two-way
  • Lanes: 4
  • Centerline: None
  • Median: Tree-Lined with Turn Lane
  • Lane Markings: Yes
  • Parking Lanes: 0
  • Bike/Transit Lanes: 0

Roadway with Bus Lanes

Type: Major Road

  • Total Width: 27 m
  • Pavement Width: 21 m
  • Sidewalk Width: 3 m
  • Direction: Two-way
  • Lanes: 4
  • Centerline: Solid Yellow Line
  • Median: None
  • Lane Markings: Yes
  • Parking Lanes: 0
  • Bike/Transit Lanes: 2

Divided Main Roadway with Middle Bus Lanes

Type: Major Road

  • Total Width: 30 m
  • Pavement Width: 24 m
  • Sidewalk Width: 3 m
  • Direction: Two-way
  • Lanes: 4
  • Centerline: None
  • Median: Tree-Lined with Turning Lanes
  • Lane Markings: Yes
  • Parking Lanes: 0
  • Bike/Transit Lanes: 2

Highway 22X

Type: Freeway

  • Total Width: 13 m
  • Pavement Width: 12 m
  • Sidewalk Width: None
  • Direction: One-way
  • Lanes: 3
  • Centerline: None
  • Median: None
  • Lane Markings: Yes
  • Parking Lanes: 0
  • Bike/Transit Lanes: 0

High-Density Buildings

Uses the BuildingConstruction.cga rule from Esri’s CityEngine Example 05 – Urban Design with randomized floor numbers from 7 to 40 in L and U-shaped lots.


Modelling Scenarios


In CityEngine, different Scenarios can be created by clicking the Add New Scenario button in the Scene tab. When a new Scenario is created, subsets of data or entire datasets can be copied and pasted into new datasets that are only present in that specific scenario. Using the Scenario ribbon, the 3D viewport can keep the same view angle but change the active scenario being seen in the viewport. This allows for direct comparisons between urban planning scenarios by letting features in each scenario receive attribute changes and CGA rule changes, including changes to the entire layout of a scene! By bookmarking the current view and taking screenshots, the following comparison below shows four example scenarios, with the default scene and 3 example changes. This comparison between scenarios is located in the High Density district found in the centre of the scene. The roadway and surrounding lots received changes throughout different scenarios.

Scenario 1

The Default Scenario

Scenario 2

Smaller High Density Buildings, Bigger Roadway

The High Density buildings in this scenario have a floor limit of 6 floors due to a zoning change. The main roadway also had an extra lane added in each direction with a tree-lined median put in place through the middle of the roadway.

Scenario 3

Low Density Only, Smaller Divided Roadway

A zoning change in this area resulted in no high density buildings being built and only low density being built. Due to the lower estimated traffic in the area, dedicated bus lanes were removed in favour of additional trees being planted and a tree-lined median being inserted.

Scenario 4

LRT Line in Community, Wider Roadway With No Bus Lanes

Due to extremely high traffic volumes in the region, a dedicated Light Rail Transit (LRT) line was built in the median of the road alongside the bus lanes being removed in favour of an additional lane of traffic in each direction. In this fictional scenario, this transit line connects to the Somerset-Bridlewood LRT station on the CTrain’s Red Line and extends east towards SE Calgary.


Scene Size Comparisons and Lessons Learned

(in GB)


Scene package sizes in gigabytes for different features.

A major issue with CityEngine exports for these scene packages was the colossal file size and heavy RAM usage on a 64 GB RAM system. A major lesson learned here was that after the parks export continued to fail, debugging the CGA code showed that the representation of each tree loaded into each lot could be changed to a “low poly” version. After changing this, the file size for the Parks scene would load properly into ArcGIS Online and the file size was reduced from 13 GB to 200 MB.

When working with CGA and scenes in the future, it is recommended to ensure that large scenes are loading low poly versions of models and that levels of detail (LODs) are set to less detail to prevent this issue arising in the first place.

# Parkland CGA Code Snippet                                  #
# Author: Harrison Drew                                      #
# Course: GEOG 647 - Winter 2026                             #
# Imports Esri Tree Generator rule and creates a random tree #
// Note: Displays as C# code but is in fact CGA code...

import Tree : "/ESRI.lib/rules/Plants/Plant_Loader.cga"
GenerateTree -->
	s(0,0,0)	
	set(Tree.Name, TreeType)
	set(Tree.Height, rand(5,15))
	set(Tree.Radius, rand(1,3))
     // set(Tree.Representation, "Realistic")  <-- Too high a LOD for large Parks
	set(Tree.Representation, "Fan") //     <-- The fix to this issue, low LOD
	Tree.Generate
Three major lessons learned from working with CityEngine.

From this created example community in CityEngine, challenges that arose included the need for lower levels of detail given the complexity of the scene, dealing with multi-hour compiles and handling scenarios for visualizing change. As well, it is important to save the project frequently, reapply CGA rules to shapes and regenerate models whenever changes to CGA code are written, and only generate models for smaller areas of a scene at a time in CityEngine to improve viewport performance. As well, prepare exported data for multiple formats and presentations across different platforms in the ArcGIS suite, such as dynamic Web Experiences and the 3D Scene Viewer for more powerful computers and static 360 VR images for less powerful computers.


References

Esri. (2025a). Introduction to CityEngine—ArcGIS CityEngine Resources | Documentation.  https://doc.arcgis.com/en/cityengine/latest/get-started/get-started-about-cityengine.htm 

Esri. (2025b). CityEngine Help—ArcGIS CityEngine Resources | Documentation.  https://doc.arcgis.com/en/cityengine/latest/help/cityengine-help-intro.htm 

Esri. (2025c). CGA Shape Grammar Reference—ArcGIS CityEngine Resources | Documentation.  https://doc.arcgis.com/en/cityengine/latest/cga/cityengine-cga-introduction.htm 

Müller P, Wonka P, Haegler S, Ulmer A, Van Gool L. (2006). Procedural modeling of buildings. ACM Trans Graph 25(3):614–623

Müller P. (2010). Procedural modeling of buildings. Thesis, University of Zürich. https://doi.org/10.3929/ethz-a-006397747

Parish YI, Müller P. (2001). Procedural modeling of cities. In: Proceedings of the 28th annual conference on computer graphics and interactive techniques. ACM, pp 301–308

Shi, W., Goodchild, M. F., Batty, M., Kwan, M.-P., & Zhang, A. (Eds.). (2021). Urban Informatics. Springer Singapore.  https://doi.org/10.1007/978-981-15-8983-6

Wasserman, D. (2015) Complete Street Rule. GitHub repository.  https://github.com/d-wasserman/Complete_Street_Rule .