Getting Started with the CityEngineModelGenerator

Jovita C.
Jovita C.
  • Updated

Introduction

The CityEngineModelGenerator is a transformer available on the FME Hub that allows you to create 3D models from CityEngine rule packages and input vector geometry.

The transformer has two main functions: one that generates a configuration template based on a rules file, and the second that generates the 3D model based on input vector geometry, such as a building footprint and a CityEngine rule package file (.rpk).

The Generate Configuration Template option reads an input rules file and creates an attribute called _cga_attr_json, which is a JSON-formatted string containing the configurable parameters available in the rules file. You can then configure the rule package by modifying the attribute in your workflow and use it to generate a desired model with the Generate Model action.

This tutorial assumes that you have some familiarity with working with Esri CityEngine and some working knowledge of parsing JSON in FME. The tutorial on Getting Started with JSON is a great starting point for learning how to parse and modify JSON in FME.

Requirements

Platform Support
The CityEngineModelGenerator is currently only supported on a Windows 64-bit platform 

Licensing
The CityEngineModelGenerator, which utilizes CityEngine’s SDK, is available for free for non-commercial use; however, commercial use requires a minimum of one commercial license of the latest Esri CityEngine version to be installed within the organization. Please see Esri's Licensing Information on the CityEngine SDK for further details.

Terminology

  • Rule Package: the *.rpk file that contains the CGA attributes
  • CGA (Computer Generated Architecture): a programming language that provides the rules or instructions for generating the 3D model
  • _cga_attr_json: the FME attribute containing a JSON string that displays the contents of the CGA attributes

Troubleshooting

When generating a model from a modified _cga_attr_json string, I am getting warnings about data types being converted (such as an int into a float). Should I be worried?

The data type in the CGA attribute is strict. This means that if a maxBuildingHeight has a type of “float”, the transformer will only accept an input value that is a float data type. FME will do its best to convert data types appropriately, so it’s likely that the wrong type of input was given and FME is handling it for you. Verify that the output is what you’re looking for, and you can either correct the input or accept it as it is.

Why did my feature appear in the rejected port?

Be sure to pay attention to what kinds of geometry your rule package applies to. For example, many rule packages may ask for a 2D vector building footprint or closed polygons for vegetation to be generated. A mismatched input for the rule package could cause features to be output from the rejected port.

Additional Resources

Where can I find sample rule packages to get started?

ArcGIS CityEngine Rule Packages
Esri PyPRT Examples on GitHub

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.