CityEngineModelGenerator

Generates 3D models from input geometries and ArcGIS CityEngine rule packages (*.rpk).

Jump to Configuration

Typical Uses

  • Read in a geometry file of a building footprint with an FME Reader and pass the generated Feature to a CityEngineModelGenerator transformer to output 3D geometry in FME.
  • Analyze an input .rpk file and generate a config JSON attribute of the CGA attributes defined in the .rpk file which can be used to customize the model generation process.

How does it work?

The CityEngineModelGenerator uses CityEngine to apply rule packages to input geometry to produce textured 3D models. The input geometry is provided as FME geometry on the input feature. The generated model is output as 3D geometry on the feature.

Note: This transformer uses PyPRT, which is a Python Binding for the CityEngine SDK.
Legal Disclaimer: It 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. See PyPRT for further details.

Examples

Usage Notes

  • The rule package file can contain CGA attributes which can be specified for model generation. To edit these attributes for model generation, run the transformer with ‘Action’ as ‘Generate Configuration Template’ to generate a config JSON as an FME attribute which can be edited to insert these values.
  • When editing the configuration JSON string of CGA attributes, the data type (such as float, int, string) is STRICT. The attribute values inserted into the JSON must be of that data type for the CGA attribute value to be applied to the resulting geometry output. The transformer will attempt to convert the value to the correct data type but it is recommended that you input the CGA attribute with the correct data type to avoid unexpected results.

    For example below:

    • For example, “input”: null should have the value "input": 30.0 to be applied correctly because of the “type: float”.

    • "input": 30 is incorrect and will be converted into a float at runtime and trigger a warning.

    • The specified input must be within the “range” of 28 and 150.

Copy
Example Output:
{
        "BuildingHeight" : {
            "input" : null,
            "range" : [28, 150],
            "type" : "float",
         }
}
  • The specifications of the CGA attribute values are defined individually in each rule package. It is important to understand the rule package you are using.
    For example:
    • There could be a rule package that has a color attribute buildingColor that specifically requires a hex color string. The configuration JSON string will define the type as "string", but "buildingColor": {“input” : "blue" } is not valid, whereas "buildingColor": { “input”: "#0000FF" } is valid.
  • CityEngine stores geometry internally in a y-Up orientation, which does not match the standard z-Up orientation of FME and other GIS applications. As a result, the CityEngineModelGenerator will transform input geometry from an assumed z-Up orientation to y-Up before processing through the PyPRT module. The generated geometry model will be transformed to a z-Up orientation on output.

  • The input geometry is expected to be in a projected coordinate system. Any input Feature in a geographic coordinate system will be rejected by the transformer and will need to be reprojected to a projected coordinate system beforehand.

  • Caution: When using an expensive rpk file that applies lots of textures to the models, the FME Data Inspector can take a significant amount of time to load the rasters.

Configuration

Input Ports

Output Ports

Parameters

The remaining parameters available depend on the value of the Action parameter. Parameters for each Action are detailed below.

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies Esri ArcGIS CityEngine Commercial license for commercial use

Operating System Restrictions

Windows 64-bit only

Aliases  
History  

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the CityEngineModelGenerator on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.