Tutorial 17: Desert City Tutorial

Copyright © 1995-2013 . All rights reserved. Tutorial 17: Desert City Tutorial

Table of Contents

Tutorial 17: Desert City Tutorial ...... 3

Copyright © 1995-2013 Esri. All rights reserved. 2 Tutorial 17: Desert City Tutorial

Tutorial 17: Desert City Tutorial

In this tutorial:

• Tutorial Steps • Recreating the full scene • Focus Intervention: New School

Download:

• Tutorial Data • Tutorial PDF

Prerequisites

Installed CityEngine (Version 2012 Advanced or later) • Pay attention to user interface information (especially how to navigate) when installing • Download the Desert City Example via Help > Download Tutorials and Examples, or via the CityEngine Resource Center (http://resources.arcgis.com/content/cityengine/about).

Importing the downloaded Example

If you have downloaded the Example via the Resource Center, import the Example_Desert_City__2012_1.zip project into your workspace: • Click File > Import Zipped Project into Workspace, then point CityEngine to the corresponding .zip file.

Tutorial Steps

Exploring the Desert City scene file

Steps: 1. Double click the Desert City scene file, which is located in the scene folder. 2. Click Generate in the first dialog which opens. This triggers the Model generation of all elements.

3. Navigate through the scene and explore the buildings, streets and vegetation. You’ll notice that only a fraction of all buildings are generated by default. This is obviously the case to save memory resources. 4. Edit some rule parameters, such as Building_Height, Building_Usage, or the Level of Detail. 5. Select some more building footprints or street shapes (left mouse botton click or draw a selection rectangle). Note: There is different behavior if you select ‘left-right’ or ‘right-left’ with a selection rectangle!

Copyright © 1995-2013 Esri. All rights reserved. 3 Tutorial 17: Desert City Tutorial

6. Click the Generate button in the toolbar or press ctrl-g (apple-g on MacOS) to trigger the Model Generation of the newly selected shapes.

Recreating the full scene

The complete ‘Desert City’ scene is composed of a GIS data and a rule set. The GIS data includes attributed footprint shapes, street center lines, vegetation markers, wall lines and electric power lines. All that data is contained in a so-called ‘GeoDataBase’ file, short ‘GDB’. Since there are different datatypes used (lines, polygons, points), each object type is stored in a different layer.

Steps: 1. Open the Desert_City_terrain_only scene file.

Import of GIS Data

Steps: 1. In the Navigator Window, locate the data folder. From within the data folder, drag-and-drop the DesertCityGDB.gdb directly into the 3d viewport. This triggers the GDB Import Dialog.

Copyright © 1995-2013 Esri. All rights reserved. 4 Tutorial 17: Desert City Tutorial

2. Uncheck the TerrainExtent layer. 3. Click Next and in the following settings, just activate the Merge Nodes option with a Merging Distance of 2, then click Finish.

Aligning of the imported GIS Data to the Terrain

In the Scene Editor, we see that all layers got created, but nothing is yet visible due to the fact that all elements come in at 0 elevation, thus we’ll need to project them to the correct heights and re-align the terrain accordingly:

Steps: 1. Deactivate the visibility of the Layers: PowerLines, Structures, Vegetation. 2. Select all visible in the viewport with a large selection rectangle. 3. Click Graph Menu > Align Graph To Terrain ... 4. Project to the Terrain, with an Offset of 0.4 meters. 5. Click Shapes Menu > Align Shapes To Terrain ... 6. Translate to the Maximum of the Shape, with an Offset of 0.2 Meters Note: (Translating keeps the shapes horizontal and flat.)

7. Click Layer Menu > Align Terrain To Shapes ... 8. Align the Terrain +- 250 meters. 9. Invert the visibility of all Layers, so the previously hidden ones are now visible and vice versa. 10. For the upcoming alignments, we’re leaving the Terrain as it is currently. 11. Project the Graphs (Walls and PowerLines) with an Offset of –0.5 meters. 12. Translate the Shapes (Structure and Vegetation Markers) to the Maximum of the Shape, with an Offset of -0.5 Meters.

Copyright © 1995-2013 Esri. All rights reserved. 5 Tutorial 17: Desert City Tutorial

CGA Rule Assignment

Now, let’s assign the according CGA Rules to each specific object type. To do so, it is easiest to activate each Layer’s visibility one after the other to be able to easily select all shapes for the Rule assignment Please note that there are multiple ways to assign Rules. Most common are: • Drag-and-dropping the Rule from the Navigator directly onto selected shapes in the viewport. • Use the Assign button in the Inspector Window. • Right-clicking on a layer. Due to the fact that the Marker shapes (Stuctures and Vegetation) are very small, it is tricky to assign the Rule via Drag-and-Drop. Thus, it is best just to right-click on those Layers and selecting all objects in the same Layer, then assigning the Rule via the Navigator.

Streets > Desert_City_Streets.cga PowerLines > Desert_City_Powerlines.cga Walls > Desert_City_Walls.cga Buildings > Desert_City_Buildings.cga Structures > Desert_City_Structures.cga Vegetation > Desert_City_Vegetation.cga

Increasing texture resolution in the city center

CityEngine stores all textures (= raster images) for the 3d display in the video memory of the graphics card, thus there is a recommended maximum resolution for all texture files used in CityEngine, which is about 4000x4000 pixels, which may not be enough detailed for large areas. (See also http://forums.arcgis.com/threads/54072-textures-raster-files-concepts-in-CityEngine- ArcGIS) To increase the quality of the Terrain texturing underneath the builidings at least locally, we’ll activate the dynamic Block Subdivision and use those new Lot shapes as a ground underneath the builidings. Onto that additional ground, we map a higher-resolution texture.

Steps: 1. First, hide all Layers except the Street Layer. 2. Select some Blocks with a right-left rectangle selection. In the Inspector, go to the Blocks tab and change the shapeCreation parameter to true, then set the lotAreaMin and Max to 2’000 and 4’000. 3. In each Block, select one shape, then select all shapes in the same group (right click context menu). Once you have the selection, assign the Rule called Desert_City_ParcelTexturing.cga. 4. Click Generate.

Copyright © 1995-2013 Esri. All rights reserved. 6 Tutorial 17: Desert City Tutorial

Focus Intervention: New School

The GDB for this chapter is available in the data folder as ‘DesertCity_Intervention.gdb’. People not interested in the actual manual creation of that data may skip this chapter. Let’s recreate a realworld focus intervention. At the following block near the city center, let’s plan a new school with soccer field in the following chosen city block.

Our GIS application to edit the data is ArcMap, so let's open the dataset in ArcMap. • Create a blank map in ArcMap and import the feature classes from the example dataset as layers DesertCityGDB.gdb. • For the actual intervention, create a new GDB, name it e.g. MyIntervention.gdb. It is best that you directly locate the GDB in your project’s data folder on your harddrive. • Create the following Feature Classes: • Polygon Features: named Intervention_Buildings Add the following attributes: ▪ Building_Height (of type float) ▪ Building_Usage (of type text) • Polygon Features: named Intervention_Soccer_Field Add no attributes: • Point Features: named Intervention_Vegetation Add the following attributes: ▪ Size (of type float) • Line Features: named Intervention_Walls Add the following attributes: ▪ width (must be lower case!) (of type float) • Create the different features: Draw one or multiple school buildings, with realistic heights [meters] and set the Building_Usage attribute to school. • Create some walls as polylines, set the width to 0.4 meters. The width value will be mapped directly in CityEngine. • Create a rectangular Soccer Field. • Distribute some Vegetation Points and set their Size attributes to realistic values between 2 and 15meters. • Save the GDB. • Unless you created the GDB in the project’s data folder, move or copy it there.

Copyright © 1995-2013 Esri. All rights reserved. 7 Tutorial 17: Desert City Tutorial

• Refresh the workspace in CityEngine: File > Refresh Workspace.

Importing the Intervention Data

As described in chapter 2, drag-and-drop the new GDB into the 3d viewport to trigger the import. Of course, you can choose either the GDB you have created yourself or the one shipping with the Example, DesertCity_Intervention.gdb.

Steps: 1. Align the Shapes and Graphs to the Terrain. 2. Assign the rules. There’s also a rule for the Soccer field. 3. In case the Soccer field is created in the wrong direction, set the attribute Orientation_Change to true.

Copyright © 1995-2013 Esri. All rights reserved. 8