FME Transformers: 2024.2

Categories
3D

3D

Geometries
Integrations
Related Transformers
Extruder

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

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

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 has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

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

 

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