Create a terrain map from image files; create a street network against an obstacle map; streetgraph cleanup tool; aligning terrain to shapes/shapes to terrrain; working with dynamic city (street) layouts
- Drag and drop a terrain data image into the viewport – when you drag an image into the viewport, CityEngine assumes you want to create a terrain.
- Heightmap and texture files: the heightmap contains raster data and the texture file is mapped on top of the terrain, The extents must match.
- Extent values must be set for files that are not geolocated.
- Select the terrain layer in the Scene editor and view attributes in the Layer Inspector
- NOTE: the terrain layer should be centered on the x/z “crosshair”. If this is not the case, the X-Offset and Y-Offset in the layer inspector should be set – probably to -2000 and -1600 respectively.
- Change offset and alpha values
- View wireframe alpha
- Change terrain resolution u and v values to change resolution and minimize the number of polygons
- CGA code at the bottom of the Layer Attributes for inclusion in rule files as needed
- Create an obstacle map: Layer > New Map Layer > Obstacle
- Obstacle Threshhold: adjust level to control where streets should/should not be created
- Shapes > Grow Streets using the obstacles.png file for the obstaclemap parameter
- Street Graph Cleanup – errors in shapes are indicated in red lines. Repair either manually by selecting and moving a node or, if there are many errors in a dataset, use the graph cleanup tool:
- Graph > Cleanup Graph or with the Cleanup Graph button on the toolbar, then enter parameters.
- Align elements in the scene, street graphs, shapes and terrain: select streets, then Graph > Align Graph to Terrain or the Align Graph to Terrain button on the toolbar. Enter parameters.
- Align static shapes (imported or drawn manually)
- Align dynamic shapes produced by CE
- Align Shapes to Terrain and Terrain to Shapes
- Select static shapes and click the Align Shapes to Terrain button. Moves the shape up or down but keeps it planar:
- Project all, project below, project to object average, gtranslate to average, maximum or minimum.
- Align dynamic shapes – is handled in Block Parameters in the inspector under the Alignment setting.
- Align terrain to shapes (as when terrain is changed by construction.
- Check “Enable Elevation Data” to toggle between with/without alignment. Delta maps are stored in a subfolder of the Data folder. Save the scene and refresh the folder.