CGA modeling

Computer Generated Architecture (CGA) is a programming language that is used to instruct CityEngine how to automatically generate 3D geometry, and particularly architecture.

The following are the basic elements of CGA:

Rule—The building instructions are called rules. Each rule corresponds to one instruction or transformation step. When run, each rule takes geometry as input and alters or replaces it to generate an output. This output becomes the input of a following rule. The first rule that is run is the start rule, and it takes an initial shape as input geometry. A rule file (*.cga) contains the start rule and other rules as well as attributes and functions.

Initial Shape—The input geometry is typically a polygon that represents a lot or a building footprint. It can be imported, modeled manually, or automatically generated from street graphs. To connect a start rule to an initial shape, drag a *.cga file onto the shape in the Viewport window.

Generation—To begin model creation, click the Generate button Generate on the toolbar, or press Ctrl+G. The start rule runs and the resulting 3D geometry (model) is shown in the Viewport window.


To better understand the basic elements in CGA modeling, see the Generate models with rules section of Tutorial 1: Essential skills.

CGA and manual modeling

Procedural techniques are applied in many areas of 3D modeling. These approaches are efficient and time-saving when large numbers of models with slight variations and similar typology are required, while full artistic control over each individual instance is secondary. The creation of city models has many use cases for procedural modeling.

In urban design and planning, procedural modeling offers another use case. By instructing a CGA rule to calculate sizes and dimensions of a model during generation, key performance indicators (KPIs) such as gross floor area or total window area can be calculated on the fly. This information can influence the design process in early stages and therefore lead to more complex design decisions.

Manual modeling, however, is fast when a one-of-a-kind model is needed and only a visual representation is required.

Manual and CGA modeling can be combined: CityEngine offers shape creation tools to define a rough building hull. CGA modeling can then be used to detail facades and roofs. Furthermore, local edits provide an intuitive tool to manually alter CGA generation by interactive tools.

In this topic
  1. CGA and manual modeling