The Terrain Layer is a special map layer that visualizes the elevation of the scene topography using image data. It also serves as reference elevation for align operations for scene objects such as shapes or graph nodes.
Creating a Terrain Layer
A Terrain Layer can be created in the following ways:
- An image is dragged from the Navigator into the scene.
- A terrain is imported with File > Import > Terrain Import.
- A new Terrain Layer is created with Layer > New Map Layer > Terrain .
Terrain options
Heightmap File | Choose an image from your workspace which will be used as heightmap mesh / Digital Elevation Model. Normally this is a greyscale image. When a georeferenced image is selected, elevation and bounds are set automatically. |
Texture File | Choose an image from your workspace which will be used to texture the heightmap mesh. Note:The texture file is applied over the exact extent of the heightmap mesh. It is therefore important that your texture file has the same extent as the heightmap file. |
Channel | Choose the source channel from the image that is used to read the data for the elevation. For most images brightness is the best choice. |
Min. elevation | The minimum value / the lower bound for the elevation in meters. For dedicated filetypes like geoTiff this value is read automatically from the file. |
Max. elevation | The maximum value / the upper bound for the elevation in meters. For dedicated filetypes like geoTiff this value is read automatically from the file. |
Bounds Dimensions | The Width and Height of the resulting terrain in meters. When a georeferenced image is selected, this value is set automatically. |
Bounds Location | The location of the resulting terrain in meters. When a georeferenced image is selected, this value is set automatically. Note:
|
Terrain Layer in a CityEngine scene
The new terrain is added as a new layer in the Scene Editor. If the terrain is not visible in the Viewport, right-click on the Terrain Layer and choose Frame Layer.
Note:
Terrain layers (like all map layers) can not be selected in the Viewport directly, but only through the Scene Editor.
Inspector options
To change the options of a terrain, you can select the Terrain Layer in the Scene Editor and review its attributes in the Inspector. with the following options:
Name | Layer name |
Visibility | Layer visibility |
Locked | Lock terrain layer |
Transparency | Layer transparency |
Color | Color value multiplied onto layer |
Wireframe | Wireframe enabled/disabled |
Dimensions | Extent of layer |
Location | Location of layer |
Elevation Offset | Elevation offset applied to layer. This value is also available as a built-in function in the Layer Attributes code. |
Heightmap File | Heightmap file location |
Resolution | The number of terrain mesh vertices in u and V direction. |
Apply Alignments | If enabled, the built-in function "elevationDelta" in the Layer Attributes code returns the elevation deltas resulting from the terrain alignment tool. If disabled, the function returns 0. |
Heightmap Sampling | Bilinear and Nearest Neighbor (hard edges) determine the smoothness of the elevation. |
Minimum / Maximum Height |
|
Layer Attributes | Contains the (editable) cga code for evaluation of the elevation. |
Base map
Select the image you want to have active as your basemap. Click the blank active image to add another basemap.
Export terrains
You can export terrains as tile packages (TPK), images, or geometries by selecting the map layer(s) to export.
Export terrains to Tile Package (TPK)
To export terrains to TPK, do the following:
- Click File > Export... > CityEngine > Export Selected Layers as TPK.
- Choose to export both the basemap and elevation terrain files as TPK's or just select one of them.
- For Scene Environment, you have the option of exporting the terrain for either a global or local scene.
- If you chose to export both Basemap and Elevation maps, you will have a {filename}_Basemap.tpk and a{filename}_Elevation.tpk file in your output folder.
- Sign in to ArcGIS Online or ArcGIS Enterprise to share the TPK's with your organization or the public.
- Right-click the TPK file you want to share and click Share as.....
This opens the share Tile Package dialog.
- Fill out the necessary fields and click Share.
Go to the Content tab in your account in ArcGIS Online or ArcGIS Enterprise and publish the TPK as a hosted elevation or tile layer.
Export terrains as image
To export to image files, select File > Export... > CityEngine > Export Selected Terrains as Image and choose a format.
Export terrains to geometry
To export to geometry files, select File > Export... > CityEngine > Export Models of Selected Shapes and Terrain Layers and choose a format. The rest of the process is similar to the model exporter.
Note:
The KML and the Esri Scene Layer Package formats do not support exporting terrains.