FME Version
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 in working with Esri CityEngine and some working knowledge of parsing JSON in FME. The tutorial on Getting Started with JSON is a great place to start to learn how to parse and modify JSON in FME.
Requirements
Platform Support
The CityEngineModelGenerator is currently only supported on a Windows 64-bit platform for FME 2019.0 (build 19238) and newer versions.
Licensing
The CityEngineModelGenerator, which makes use of CityEngine’s SDK, is free for non-commercial use; however, commercial use requires at least one commercial license of the latest Esri CityEngine version installed in 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 programing 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 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 come out of 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 do I find sample rule packages to get started with?
ArcGIS CityEngine Rule Packages
Esri PyPRT Examples on GitHub
Comments
0 comments
Please sign in to leave a comment.