city engine help 2010.3

828
The Quick Start Guide provides a short overview of the CityEngine's user interface and workflow possibilities. The guide the quick way to learn to use the CityEngine and efficiently create your first cityscape. The CityEngine Manual contains the complete reference to the user interface, the different tools, import and export, magic wizards, and the data structures. The Tutorials describe step-by-step typical CityEngine workflows with practical examples - and lots of basic aspects of the CityEngine are teached. You might take the red pill for the CGA Shape Grammar Reference and go straight for the truth.

Upload: jesus-manuel-gonzalez

Post on 21-Apr-2015

4.963 views

Category:

Documents


93 download

TRANSCRIPT

The Quick Start Guide provides a short overview of the CityEngine's user interface and workflow possibilities. The guide the quick way to learn to use the CityEngine and efficiently create your first cityscape.Version 2010.3. Copyright 2008 - 2010 Procedural Inc.

The CityEngine Manual contains the complete reference to the user interface, the different tools, import and export, magic wizards, and the data structures.

The Tutorials describe step-by-step typical You might take the red pill for the CityEngine workflows with practical examples - CGA Shape Grammar Reference and lots of basic aspects of the CityEngine are and go straight for the truth. teached.

Quick Start GuideThis quick start guide is intended for CityEngine beginners. It introduces its major components and helps you to understand the basic tasks required when modeling a generative city. After a general overview, the guide highlights the user interface, and explains the modeling workflow when using the CityEngine. Then it shows the basics of rule-based modeling and shows how to export generated models.

Table of Contents1. CityEngine Overview 2. User Interface 3. CityEngine Workflow 4. Rule-based Modeling 5. Model ExportCopyright 2008 - 2010 Procedural Inc.

CityEngine ManualTable of ContentsA. User Interface1. Window Type Overview 2. The Viewport Window 3D Navigation Essentials Viewing Modes and Display Settings Object Selection Object Edit and Transform Tools Cameras Bookmarks Multiple Viewport Windows Keyboard Shortcut Reference 3. The File Navigator 4. The Scene Window 5. The CGA Editor 6. The Log View 7. The CGA Console 8. The CGA Problems View 9. The Progress View 10. The Inspector 11. Configuring the Windows Layout Editors Views Dragging Windows Default Window Layouts Saving and Loading Window Layouts 12. CityEngine Preferences General Appearance Automatic Exit Colors and Fonts Label Decorations Editors File Associations Text Editors Accessibility Hyperlinking Linked Mode Quick Diff Grammar Core Keys Mouse

3D Mouse Perspectives Startup and Shutdown Bookmarks Cameras Help

B. Project Management1. Why Project Management 2. Using CityEngine Projects Creating a CityEngine Project Folder Organization and File Types Importing Files into a Project Exploring Projects with the File Navigator Editing and Refreshing Assets 3. The CityEngine Workspace Creating a new Workspace Switching Workspaces 4. Archiving or Exchanging CityEngine Projects Importing a Project into the Workspace Exporting a Project

C. Map Layers1. General 2. What is a Map Layer 3. Creating a Map Layer Texture Obstacle Terrain Mapping Function 4. Working with Map Layers in the Inspector Window 5. Editing Map Layer Functions 6. Controlling Rule Attributes with Map Layers 7. Selection via Image Maps 8. Aligning Terrains to Shapes 9. Exporting Terrains to geometry or image files

D. Shapes1. What are Shapes 2. Creating and Editing Shapes Manually Aligning Shapes to the Terrain Subdividing Shapes 3. Creation of Shapes from Graph Networks Block Parameters Street Parameters Crossing Parameters Parameter Source Street Shapes

4. Importing Shapes Creating and Preparing Polygons for Shape Import 5. Exporting Shapes

E. Street Networks1. What are Street Networks 2. Creating and Editing Street Networks Manually 3. Growing Street Networks 4. Importing Graph Networks 5. Exporting Graph Networks 6. Aligning Graph Networks to the Terrain

F. Rule-based Modeling1. Basics of Rule-based Modeling 2. Rule Files 3. Writing Rules 4. Shape Operations 5. Rule Editing Tools

G. Exporting Models1. Export Overview 2. General Export Reference 3. Supported Formats and Specific Options 4. Export Application Notes

H. Python Scripting1. Scripting Usage 2. Commands by Category 3. Command Reference

I. Interactive Facade Editing1. Facade Wizard Overview

Licensing1. Licensing Overview 2. Node-locked License 3. Floating LicenseCopyright 2008 - 2010 Procedural Inc.

TutorialsThe CityEngine tutorials are the starting point to experience the features of the CityEngine. The different tutorials cover all parts of the CityEngine workflow like project management, map usage, street network generation, data import features and Shape Grammar modeling. How to work with the Tutorials

Table of Contents

1.

CityEngine Basics Tutorial

2.

Street Tutorial

3.

Map Control Tutorial

4.

Import Streets Tutorial

5.

Import Shapes Tutorial

6.

Basic Shape Grammar Tutorial

7.

Facade Modeling Tutorial

8.

Mass Modeling Tutorial

9.

Advanced Shape Grammar Tutorial

10.

Python Scripting Tutorial

11.

Reporting Tutorial

12.

GIS Mapping Tutorial

13.

Scripted Report Export Tutorial

14.

Visual CGA Tutorial

15.Copyright 2008 - 2010 Procedural Inc.

Facade Wizard Tutorial

CGA Shape Grammar ReferenceShape Operations

alignScopeToAxes

alignScopeToGeometry

center

color

comp

convexify

deleteUV

extrude

innerRect

i (insert)

mirror

mirrorScope

normalizeUV

NIL

offset

pop

print

projectUV

push

r (scope rotate)

report

reverseNormals

roofGable

roofHip

roofPyramid

roofShed

rotate

rotateScope

rotateUV

s (scope size)

scaleUV

scatter

set

setback

setPivot

setupProjection

shapeL

shapeU

shapeO

split

t (scope translate)

taper

texture

tileUV

translate

translateUV

trim

Shape Attributescomp seedian initialShape scope material split pivot trim

Builtin FunctionsMathabs atan2 floor log10 sqrt acos ceil isinf pow tan asin cos isnan rint atan exp ln sin

Probabilityp rand

Conversionbool float sel str

Stringcount find len substring

Geometrygeometry.area geometry.isRectangular geometry.volume geometry.du/dv geometry.nEdges geometry.isConcave geometry.nFaces geometry.isPlanar geometry.nVertices

FilefileExists fileSearch

Assets and ImagesassetInfo imagesSortRatio assetsSortRatio assetsSortSize imageInfo

Occlusioninside overlaps touches

Miscconvert

OtherSimple Types Operations version attr const import

CGA Utility Functions LibraryString Utility FunctionsfindFirst getSuffix findLast replace getPrefix getRange

String List Utility FunctionsStringlists are a series of strings stored inside one string. The elements are separated by a semicolon (";"). The data type is "string", thus it is not any real type of array as used in other scripting languages. listAdd listItem listSize listClean listLast listFirst listRandom listIndex listRange

File, Asset and Image Utility FunctionsassetApproxRatio assetFitSize fileName assetApproxSize fileBasename fileRandom assetBestRatio fileDirectory imageApproxRatio assetBestSize fileExtension imageBestRatio

MiscCGA Changelog Asset Search Builtin Assets

Copyright 2008 - 2010 Procedural Inc.

CityEngine OverviewThis page gives a introduction to the 3D content creation concepts of the CityEngine. It provides an overview of CityEngine's main features, modeling pipeline and the general ideas behind the procedural modeling of cities and buildings are explained.

Introduction to the CityEngineThe CityEngine Features

Procedural Modeling Core The main concept of the CityEngine is the "procedural" approach towards modeling efficiently. The computer is given a codebased "procedure" which represents a series of commands - in this context geometric modeling commands - which then will be executed. Instead of the "classical" intervention of the user, who manually interacts with the model and models 3d geometries, the task is described "abstractly", in a rule file. The commands which are provided in the CityEngine's CGA shape grammar, such as "extrude", "split" or "texture" are widely known commands in most 3d applications and thus any user can adapt them easily and create complex architectural forms in short time. To learn more about procedural modeling, read the paragraph 'Grammar-based modeling' lower on this page.

Dynamic City Layouts The Dynamic City Layouts give the user a powerful tool to create interactive street networks which automatically update in realtime. Streets, Sidewalks and whole Blocks, which form the specific urban context adapt efficiently to the user's input and give the user an intuitive way to design the layout of complete cities. And of course, all the Geometries which depend on the layout of the underlying Dynamic City Layout are also updated on the fly ! Watch your buildings getting rebuilt while you edit the width of the surrounding streets !

Customizable User Interface The User Interface in the CityEngine can be adapted to any task at hand. Whether this is rule creation, working on the street network, editing attributes with realtime feedback or studying the statistical reports of your current city's development: "anything goes". For users who want to have control over repetitive tasks, create formatted reports in file format or automating other specific actions, Python Scripting is available to further streamline the workflow in the CityEngine.

Data Interoperability The CityEngine supports the Industry's most common formats for both import and export. The user is able to transport line data, shape data (footprints) and 3d geometry to and out of the CityEngine. Whether you work in the field of Urban Planning, Architecture, Entertainment or Simulation, we provide a way to transport your data.

The CityEngine Modeling PipelineModeling an urban environment with the CityEngine usually implies the individual stages of the pipeline given in the figure below. The pipeline consists of several procedural modeling tools for generating large-scale urban layouts, as well as applying CGA rules for the creation of detailed building models.

Overview of the CityEngine modeling pipeline. Black boxes illustrate data types (layers) and white boxes the operations to create them. Typically, in the first step, the street network is created, afterwards the resulting blocks are subdivided into lots. Finally, the 3D models of the buildings are generated using the CGA rules. The output of the CityEngine are polygonal building models.

A CityEngine scene is stored as layers of different data types representing the different stages. The pipeline is flexible and can be entered at different stages. For example, street blocks or building masses - both as polygons in (grouped) .obj files - can be imported and further processed.

Generating Large-Scale Urban LayoutsThe CityEngine consists of several procedural and interactive tools to layout street networks, align and subdivide shapes. On the one hand, streets can be grown according to different patterns and edited in an interactive way. For example, street-crossings can be moved, streets can be deleted or selected and the street growth wizard can be applied again on the selection. On the other hand, tools for the editing of lot shapes are available, such as aligning building lots to a terrain etc. The tools usually work on the selection done in the 3D view window, the viewport, or operate on the whole layer.

The CityEngine provides several tools for the efficient and interactive creation of urban layouts.

The layered organization of CityEngine scenes provides a practical and organized handling of the massive data sets. For example, it is recommended to duplicate layers before editing and therefore creating different variations in each layers. Of course, the visibility of each layer can be switched on or off.

Grammar-based Modeling"Grammar-based" or "procedural" modeling has a widespread range of applications, but mostly it is applied, when large numbers of interations of a design or large numbers of objects have to be created which obey certain standardized rules. Automation of the modeling is the goal and the overall quality of the grammar-based description is reflected in the quality and number of details of the generated models. Uniqe objects (such as landmark buildings) are best modeled by hand and usually do not need the procedural approach since often none of the modeling tasks on that object can be automated. Of course, the preparation of the rule set creates a certain overhead at the beginning, but on the other side, the model generation itself is done in a small fraction of the time compared to classic manual modeling. The following chart compares both techniques and it is obvious that the application of grammar based modeling becomes useful with a certain amount of models to do.

CGA The CGA shape grammar of the CityEngine is a unique programming language specified to generate architectural 3D content. The term CGA stands for Computer Generated Architecture. The idea of grammar-based modeling is to define rules, or CGA rules within CityEngine, that iteratively refine a design by creating more and more detail. The rules operate on shapes which consist of a

geometry in a locally oriented bounding-box (the so-called scope). The following rule derivation illustrates the process: on the left side the start shape is shown and on the right side the resulting generated model is displayed.

The generation of building geometries with the CGA shape grammar works as follows: 1. The building lots are either created by the CityEngine with the above mentioned tools or imported. In the latter case, also mass models (building envelopes) can be the starting point. 2. The user selects which rule file (.cga) she or he wishes to apply onto these shapes. The user can either assign one rule to all buildings, or assign rule sets on a per-building basis. 3. Then, the user can trigger the application of the rules on the selected shapes. Therefore it is important that the Start Rule of the shape is present in the rule file. Otherwise no rule can be invoked. The generated models can then be explored in the 3D viewer of the CityEngine. In the case of very large models, it is not recommended to generate all buildings in the CityEngine due to memory constraints. 4. In order to edit the resulting 3D models, different possibilities exist: (1) edit the rules, (2) overwrite the rule parameters of a rule set on a per-building basis, and (3) if stochastic rules are used (rules with random parameters), the random seed of all or single buildings can be altered. 5. After the design is finalized, the user can export the selected buildings or streets to the hard disk (including textures). Note that there are no memory constraints in the exporting mode.

Copyright 2008 - 2010 Procedural Inc.

User InterfaceThis page gives a quick overview of the user interface of the CityEngine. On the one hand the main types of windows are described, and on the other hand basic functionalities like project management and navigation are shortly explained.

The CityEngine Main WindowThe user interface revolves around a main window, which consist of several sub-window components. The screenshot below shows a typical CityEngine modeling session.

The CityEngine User Interface with a scene opened. 1: Navigator; 2: Scene Editor; 3: CGA Shape Grammar Editor; 4: First Viewport; 5: Second Viewport; 6: Inspector; 7: The default area for the Console, CGA Problems, Progess, etc.

Individual sub-windows can be opened in the menu Window . Each window can have multiple tabs, which can be freely arranged via drag'n'drop. By dragging a tab into the corresponding half of another window, the tab becomes a single window. Most windows (except the editors) can also be detached. The window layout configuration (a "perspective") can be stored and loaded via Windows Layout ... . For example for grammar editing we recommend the corresponding default perspective. In the following the different sub-window types and their main functions are described.

NavigatorThe Navigator represents the workspace which is used for project and scene management. Hence the window shows the projects in or linked into the workspace. A new CityEngine project can be created via File New CityEngine CityEngine Project ... . A standard CityEngine project consists of the following folders: assets : The assets are applied by the shape grammar to compose the 3D models. Assets can be in .obj format (optionally with .mtl) and textures of any format. data : This folder contains usually arbitrary additional data. For example lots or mass models (as grouped .obj) are stored in this folder. These can be imported into the CityEngine as Shape Layers where shape grammar rules can be applied on. images : Additional imagery like Viewport snapshots are typically stored here. maps : This folder usually contains the image maps used by the Map Layers. For example, a height- or water-map is stored here. models : This folder is intended as place to store the exported 3D models (.fbx, .dae, .obj, etc) rules : This folder contains usually the CGA shape grammar rule files (.cga) scenes : Here the CityEngine scenes (.cej) are stored. Besides project management, other main function done in this window are the opening of a scene via double-click, assigning CGA shape grammar rules to the selection via corresponding right-mouse-button, investigating assets via left-click (they appear in the Inspector window then), or refreshing folders via F5 (useful when assets are modified or for collaborative working environments i.e. a project is shared on the network and rules, scenes etc. have been added/modified).

In addition, the file navigator can inspect selected files. In the case of CGA rule files, the functions and rules are listed. Clicking on entries in the CGA file inspector will let CGA Shape Editor to scroll to the corresponding entry in the rule file. Hence the file navigator inspector is a powerful tool to navigate in a rule file.

Scene EditorThis window is the central place where you manage your scene. A CityEngine scene is organized in layers. Currently, five different layer types exist: Environment Layers control common 3D viewport parameters such as scene's panorama or the scene light. Both layers are configured using the inspector. Map Layers contain arbitrary maps (images) and can be used to globally control object attributes. Graph Layers contain street networks and blocks, dynamically generated shapes and generated models. Shape Layers contain static shapes, typically building lots used for generating CGA models.

The Scene Editor with a graph layer, two inital shape layers and a layer with generated models.

The layers tree allows you to navigate, delete or duplicate the layers and its objects as well as control the visibility of objects in the tree through the search field. The visibility of each layer in the viewport can be toggled by clicking on the "eye" symbol left to the layer name. In the case where building lots or mass models have been already modeled with an external program, these can be imported as shape layers. First, you have to convert your shapes into a grouped obj file (each group corresponds one shape). Afterwards copy it into the data folder of your project and import it via File Import CityEngine Layers OBJ Import ... or via rightmouse-button on the .obj file in the Navigator. Afterwards, CGA rules can be applied in the typical way on these imported meshes.

CGA Rule EditorBy double clicking on a .cga file in the Navigator window, the corresponding file is opened in the CGA Rule Editor. Another possibility to open a .cga file for editing is to click on Rule File in the Inspector window if the selected object has already a rule file assigned. The typical efficient workflow with the CGA Rule Editor is: 1. Assign a rule to the selected objects either via the RMB-menu on the rule file in the Navigator, or via RMB-menu in the Viewport, or via Shapes Assign Rule File ... . In the latter two cases the rule has to be selected in the opened dialog. 2. Open the rule file in the CGA Rule Editor and edit the rules. 3. Press Ctrl-s for saving the rule file. 4. Press Ctrl-g for (re-)generating the model. The rule editor has syntax highlighting and shows syntax errors (the latter are described in more detail in the CGA Problems window where you can double click on each entry). Furthermore, during typing, command completion can be invoked via Ctrl-

Space .

ViewportThe Viewport is the main view to interact with the 3D scene. As many Viewport windows can be opened as required by the user (usually with other cameras or a different render mode). The 3D scene can be rendered as wireframe, shaded, with textures and/or lighted. The default navigation works as follows: Alt-LMB : Tumble camera around the center of interest. Alt-MMB : Track (also called pan) camera parallel to the view plane (through the center of interest). Alt-RMB : Dolly the camera to or away from the center of interest, means the distance of the camera to the center of interest is alternated. f : Frame the selection. The camera's center of interest is placed into the center of the selection and the distance is adjusted accordingly. As a consequence, the typical navigation works by selecting an object via LMB or via drag-LMB and then pressing f to frame the camera. Afterwards the selection can be explored via tumble, track and dolly. Other practical functions include the isolation of the selection (toggle it via short-key i ), framing all content (via short-key a ), superimposing an information display (toggle via short-key d followed by another d ). or the bookmarks which store camera positions. New bookmarks can be simply created by clicking on the bookmark icon. Furthermore, in the corresponding drop-down icons of the Viewport, zooming (changing the focal length) can be done either via camera preferences or the by setting the focal length directly to one of the presets. Note: The CityEngine preferences ( Preferences Navigation Devices Mouse ) allow you change the mouse navigation schemes according to the schemes of other 3D applications. Linux users might want to change the modifier key mapping for navigation to CTRL since some window managers catch the ALT key.

InspectorThe "Inspector" is the main tool for viewing and modifying CityEngine objects. Depending on the type of object selected, the inspector adapts its user interface to provide full access to the objects attributes. The inspector is invoked via WindowInspector in the main-menu, or by pressing ALT+I . For CityEngine layer objects such as shapes, the inspector shows all attributes and parameters of the object. If the object is associated with a rule file, the rule file is parsed and all rule parameters are available for modification. Each rule parameter can take its value from either the rule itself, from the object, from a user-defined value or from a compatible map. You can change the source of the rule attribute value in the "Source" column of the rule parameter table. Besides the attributes, shapes have a seed which is used for the random number generator of the rule engine. Changing the seed will influence all random dependent rules such as explicit rand() calls as well as probabilistic rules (e.g. Lot33%: A 33%: B else: C). To reset the seeds to their default values, select ShapesReset Seed from the main menu. To randomize seeds, select ShapesUpdate Seed and Generate.

Shape inspector showing the relevant attributes and parameters.

The start rule where generation will start can be entered in the "Start Rule" field. If this value does not match any rule in the rules file, no generation will take place. The inspector not only supports editing of single objects but also collection of objects. Attributes that are unique across all objects are shown as-is. If some attribute has different values in the object collection, the attribute is marked as non-unique with the ? sign. Regardless of the uniqueness of attribute values, changing a value will apply this value to all objects in the collection. This allows for easy editing of large collection of objects. In addition, the inspector automatically groups object collections by type so that even for heterogeneous collection multi-edit is possible.Copyright 2008 - 2010 Procedural Inc.

CityEngine WorkflowThis guide gives a hands-on description of the basic CityEngine modeling workflow. This page describes similar steps as when using the City Wizard. But in contrast, here the different steps are invoked manually.

Creating a new CityEngine SceneAfter at least one CityEngine project has been created, the first step is to create a new scene. This can be done in the main menu via File New... CityEngine CityEngine scene . The name of the CityEngine scene can now be entered and after pressing Finish, the new project is created.

Creating a City LayoutStarting with CityEngine 2010, street and lot shapes are created dynamically from given graph network structures. Therefore, the extra steps of creating and subdividing shapes are no longer necessary. The easiest way to create a city layout consisting of streets, blocks and lots is to invoke the Street Growth Wizard from the main menu Graph Grow Streets... In this wizard, several growth parameters such as the intended number of streets or the street pattern can be selected. When completing the wizard, CityEngine creates a new Street Network layer (or extends an existing street layer, if selected) containing the graph network, blocks, and street and lot shapes. Later, the resulting shapes can be used as a starting point for the grammar-based modeling.

The created layout in the 3D Viewport (generated with the default growth parameters). Top viewport shows street network and blocks. Bottom viewport shows street and lot shapes.

Street networks can also be edited manually by using the graph edit or transform tools in the main toolbar. Selected streets are deleted via the DELETE key. By using the inspector window, attributes such as the width of the selected streets can be edited.

Available tools for street network and shape editing.

In addition, street networks can be designed in an external application such as Autodesk's AutoCAD and then imported into the CityEngine. This can be done by invoking the import wizard in the File menu, e.g. File Import... CityEngine Layers DXF Import for .dxf files. Alternatively, CityEngine also supports data exported from OpenStreetMap. Similarly, arbitrary polygon meshes can be designed in an external application such as Autodesk's Maya or ESRI's ArcGIS and then imported into the CityEngine. This can be done by invoking the import wizard in the File menu, e.g. File Import... CityEngine Layers OBJ Import for .obj files or (Shapefile Import for ESRI Shapefiles accordingly). The imported shapes can be used in the same way as shapes generated by the CityEngine: You can edit them and you can assign CGA rule files in order to generate building models.

Using the City WizardThe City Wizard is the easiest way to generate your first city within seconds. It integrates above steps - creating street networks, street and lot shapes - in a single user interface step and uses pre-defined parameter sets for the algorithms. It also assigns selected rule files to the created shapes. The created city is stored in a CityEngine scene file, and can be explored, modified and further extended. The City Wizard is invoked from an existing workspace any time by selecting and follow the self-explaining wizard pages. File New ... . Then select City Wizard, hit next

The four City Wizard pages that guide the generation of different city types.

The schematic city type.

The sci-fi city type.

The textured city type.

Copyright 2008 - 2010 Procedural Inc.

Rule-based ModelingIn CityEngine, building models are described through CGA Rules. A CGA rule file consists of several rules that define how the actual building geometry is created. After a CGA rule file is assigned to a shape, the generation of the building model starting from this shape can begin. In this tutorial we will create a single CGA file with very basic rules.

Creating and writing a new rule fileA new CGA shape grammar rule file can be created clicking: New ... CityEngine CGA Grammar File A new CGA file is created in the rules/ directory of your project, and the CGA rule editor is opened. In the CGA editor, grammar authoring can now be started by defining the building parameters: Therefore, the minimum and maximum building height are defined as so-called rule attributes. These values can later be changed conveniently for single buildings in the Inspector.attr minheight = 10 attr maxheight = 30

Every shape (lot or street shape) has a specific start rule that triggers a rule from the rule file. For example, lots generated in the CityEngine have the start rule Lot by default. Select a single lot and look into the Inspector to see the current start rule.

Inspector view of a selected shape.

The start rule defines the first rule that is triggered form the rule set. We therefore write the start rule for our building as follows:Lot --> extrude ( rand ( minheight , maxheight )) Envelope

The lot will be extruded to a random height between minheight and maxheight. Note that pressing Ctrl-space in the CGA editor triggers the code completion feature. Possible commands and their parameters are listed as suggestions which makes coding CGA easier without the need to look up commands in the reference.

Assigning rules and generatingIn the next step, the newly created rule file has to be assigned to the corresponding shapes (in the above case to lots): Select the lot layer Lots in the scene editor Shapes Assign Rule File ... Select the file CGA file from the rules directory and hit Ok . The selected lot now has an assigned rule file. Select some lots in the 3D viewport and hit the Generate button in the toolbar in order to generate the buildings. You see below the generated buildings using a simple extrusion rule in the CGA file for deviation.

The generated extruded models.

Copyright 2008 - 2010 Procedural Inc.

Quick Start: Model ExportCityEngine can export graphs (street networks), shapes (such as lots or street shapes), and models (such as buildings). This page describes a step-by-step workflow how to export the models (i.e. building- and street-geometry) into the Wavefront OBJ format. CityEngine can export to a number of other formats, here is an overview (see the manual for details):

Exporting Models to Wavefront OBJ Format1. Open a scene (e.g. one of the tutorial scenes) and select some shapes in the Shape Layers or by Right-Left-DragLMB . The highlighted parts in the following screenshot show that we have selected two shapes with the same rule file and the same start rule. For the left shape, we have already generated a model.

2. Open the batch export wizard with File Export... . You will be presented with the first of three wizard pages for the batch export of models. Select the entry CityEngine Export Models of Selected Shapes (all models are generated) and hit next .

3. The second page lets you choose the file format. Select

Wavefront OBJ .

4. The third page lets you choose amongst a variety of format-specific options, the most important ones are the export location and the file base name (highlighted). Please refer to the Export Option Reference for a description of the individual options.

5. Hit Finish to start the batch export. 6. The obj file, textures and an export log are written to the target location, in this case C:\Users\shaegler\Documents\models\two_buildings_0.obj.Copyright 2008- 2010 Procedural Inc.

Window Type Overview

The main window types of the CityEngine. 1. File navigator with CGA outline 2. Scene editor for scene, layer, and object management 3. 4. 5. 6. CGA rule editor with text and graphical view First 3D viewport Second 3D viewport (with a different camera). Inspector for a detailed view and editing of currently selected objects.

7. "Log" for CityEngine messages; "Console" for CGA output; "CGA Problems" for CGA compiler errors and warnings, "Progress" for progress reporting of long-running CityEngine operations.Copyright 2008 - 2010 Procedural Inc.

The Viewport WindowThe 3D viewport is your main interaction tool with the current CityEngine scene besides the scene window. You can have any number of open viewports. Select WindowNew Viewport from the main menu to create a new viewport.

Tasks: 1. 3D Navigation Essentials 2. Viewing Modes and Display Settings 3. Object Selection 4. Object Edit and Transform Tools 5. Cameras 6. Bookmarks 7. Multiple Viewport Windows 8. Keyboard Shortcut ReferenceCopyright 2008 - 2010 Procedural Inc.

3D Navigation Essentials

For navigation in the 3d viewport you may use the navigation tools to track, tumble or dolly. Select the appropriate tool in the toolbar and click-and-drag the mouse in the viewport. Alternatively, the three navigation modes can be applied at any time in conjunction with a modifier. The default settings are as follows: ALT+LMB : Tumble camera around the point of interest. ALT+MMB : Track camera parallel to the view plane (through the point of interest), also known as panning. ALT+RMB or Mouse Wheel: Dolly the camera towards or away from the point of interest, meaning the distance of the camera to the point of interest is changed while staying on the same axis. In addition, there are a number of operations that make navigation within complex scenes easier: F : Frame the selection. The camera's point of interest is placed in the center of the selection and the camera distance is adjusted accordingly. You can also frame the current selection by clicking on the Frame button. A : Frame all. The camera's point of interest is placed in the center of all objects and the camera distance is adjusted accordingly. You can also frame all objects by clicking on the Frame All button. SPACE : Maximize 3D viewport. The active 3D viewport is maximized and fills the entire CityEngine window. Pressing SPACE again restores the previous window layout. As a consequence, the typical navigation works by selecting an object via LMB or via drag-LMB and then pressing F to frame the selection. Afterwards the selection can be explored via tumble, track and dolly. Note: The CityEngine preferences ( Preferences Navigation Devices Mouse ) allow you change the mouse navigation schemes according to the schemes of other 3D applications. Linux users might want to change the modifier key mapping for navigation to CTRL since some window managers catch the ALT key.

Copyright 2008 - 2010 Procedural Inc.

Viewing Modes and Display Settings

A 3D viewport can render its contents in three different modes: Wireframe: all edges of objects are drawn as lines. There are no filled polygons so you can "look-through" the objects. The wireframe mode can be activated by selecting the Wireframe button or pressing 4 . You can always overlay wireframe independent of the viewing mode by enabling Wireframe on Shaded/Textured in the View Settings menu or pressing 7 . Shaded: all polygons are filled with the object colour. No texturing takes place. The shaded mode can be activated by selecting the Shaded button or pressing 5 . Textured: all polygons are filled with textures and object colours. The textured mode can be activated by selecting the Textured button or pressing 6 . The View Settings menu allows further customization of the rendering: Scene Light toggles between the global scene light (see Viewport Preferences) and the headlight scene illumination. You can toggle the scene light by pressing L . Wireframe on Shaded/Textured turns on and off the wireframe overlay. You can toggle wireframe overlay by pressing 7 . Shadows turns on and off the shadows for generated models. Note that enabling on shadows on large models may considerably affects rendering performance. Bounding Boxes turns on and off the rendering of bounding boxes. Bounding boxes are "shoeboxes" around actual objects that may help navigating complex scenes. You can toggle bounding box rendering by pressing B . Information Display turns the information display on and off. The information display gives some statistics of the current scene such as number of objects and polygon count. You can toggle information display visibility by pressing D and then D again. Grid turns the grid on and off. You can toggle the grid by pressing D and then G Axes turns the axes on and off. You can toggle the axes by pressing D and then A Compass turns the compass on and off. You can toggle the compass by pressing D and then C The layer buttons determine, which layer types are visible on a per-viewport basis: Show/Hide Map Layers toggles attribute map layer visibility for this viewport. Selective rendering of layers can be used e.g. for rendering shapes in one viewport and geometries in another. You can toggle map layer visibility by pressing F9 . Show/Hide Graph Networks toggles graph network visibility for this viewport. You can toggle graph network visibility by pressing F10 . Show/Hide Shapes toggles shape visibility for this viewport. You can toggle shape visibility by pressing F11 . Show/Hide Models toggles model visibility for this viewport. You can toggle model visibility by pressing F12 . Note: On Linux, visibility is mapped to SHIFT+F9 , SHIFT+F10 , SHIFT+F11 , and SHIFT+F12 to avoid conflicts with key bindings of certain window managers. Viewport settings are stored per-viewport together with your scene data. This means that when you re-open a scene, you will get exactly the same viewport settings while you were saving the scene. Note: Global viewport settings can be changed by selection See also Viewport Preferences.Copyright 2008 - 2010 Procedural Inc.

EditPreferencesGeneralViewport from the main menu.

Object Selection

The selection of objects forms the basis for most CityEngine operations such as generation or transformation. The selection tool is enabled by pressing the corresponding tool button in the toolbar or by hitting Q . Four different selection modes are available: Click-LMB selects an individual object. Double-Click-LMB selects an object's components (faces, edges, or vertices). Right-Left-Drag-LMB selects objects that intersect with the selection rectangle. Left-Right-Drag-LMB selects objects or components that are fully inside the selection rectangle. In addition, four different types of selection modification are available: Replace (the default), Add, Invert, and Remove. The modifiers define how a new selection behaves with respect to an existing one. The modifier keys SHIFT and CTRL temporarily define the current selection modification: If no modifier key is pressed the previous selection will be replaced with the new one. Holding down SHIFT while clicking or dragging will add to the existing selection. Holding down CTRL inverts/toggles the selection state of the newly selected objects. Holding down CTRL+SHIFT removes objects from an existing selection. The current selection modification can also be set persistently by choosing the appropriate selection icon in the toolbar, or by repeatedly pressing Q to toggle through the available modifications.

Selection MenuThe selection menu provides a variety of methods to select a subset of the scene objects. Additionally, selection sets can be saved, applied and edited. The menu can be accessed either over the main menu Select or by using the context menu of the view port.

The selection menu

Selection MethodsSelect All, Deselect All, Invert Selection Select all and deselect all can also be triggered using the shortcuts CTRL+A and CTRL+SHIFT+A . Select Objects in Same Layer If the source selection contains layers, all children of these layers are selected. If the source selection contains layer-objects, all children of all parent layers are selected. Select Objects by Map Layer Map layers that define a boolean attribute can be used as selection constraints. In the sub-menu, all boolean attributes of all map layers are listed. After choosing one of these attributes, the attribute is evaluated for all objects of the source selection (at the center of the objects). Then, the objects where the attribute evaluated to "true" are selected. Select Objects of Same Type Selects all objects having the same types as present in the source selection. Select Objects of Same Group Selects all objects belonging to the same group as the objects in the source selection. For example if the source selection contains a block, the resulting selection will contain the block and the block's shapes. Select Objects with Same Rule File Selects all objects having assigned a rule file that is present in the source selection. Select Objects with Same Start Rule Selects all objects having a start rule that is present in the source selection. Select Continuous Graph Objects This method can be used to select graph segments that are continuous, e.g. if they together define one street. In the dialog, there is one parameter (Max. Angle). This value defines the maximal angle under which two segments are said to be continuous. The search for continues segments starts at the source selection. Isolation mode ( I ) and per-viewport layer-visibility ( F9 , F10 , F11 , F12 ) have no influence on the selection result. However, per-scene layer-visiblity (controlled in the scene window) does influence the result.

Selection SetsSave Selection Set As... Arbitrary sets of objects (graph, shapes, models) can be saved into selection sets. A selection set is identified with a user-defined name. Apply Selection Set Existing selection sets are listed in the submenu. To apply one, select the corresponding name. Then, the set objects (which are still present in the scene) are selected. Edit Selection Sets...

The edit selection sets dialog

Existing selection sets are listed in this dialog. Sets can be removed, renamed and sorted (up/down).

Isolation the SelectionWhen working with larger models, it is often useful to reduce the scene temporarily to a smaller working set. To achieve this, you can use the 3D viewport's "Isolation" feature. When you isolate a selection, only the currently selected object will be visible. To isolate the selection, click on the Isolate button or press I . Pressing Isolate or I when already in isolation mode will show the whole model again.

Copyright 2008 - 2010 Procedural Inc.

Object Edit and Transform Tools

Besides the Selection Tool, a number of object edit and transform tools allow for manipulation of objects directly in the 3D viewport.

Available Transform and Edit ToolsCurrently, the following tools are available: The Move Tool W moves selected objects and components along the axes (X, Y, Z). Note that these axes are defined by the currently defined coordinate reference systems, see below. Click-Drag-LMB the handles for individual axes. Use the "free handle" to move the selection on the X-Z or object plane. If the selection contains a single street network node or shape vertex is selected, the tool will snap to edges and vertices of other objects. Holding down SHIFT while dragging inhibits snapping. The Rotate Tool E rotates selected objects and components around the axes (X, Y, Z). Press SHIFT to snap to 45 degree angles. The Scale Tool R scales selected objects and components along the axes (X, Y, Z). Use the "free handle" in order to uniformly scale along all axes. Using the Create Shape Tool S you may create new shapes or extend existing shapes with new vertices. Refer to Creating and Editing Shapes Manually for details. Similarly, by applying the Create Segment Tool S you may create new street or extend existing networks. Refer to Creating and Editing Street Networks Manually for details.

The available object transform types: Move, Scale, Rotate.

Reference Coordinate SystemsBy default, the transform tools (Move, Scale, Rotate) operate in the World Coordinate System, i.e. all operations take place along the principal axes (X, Y, Z). In many cases, it is more convenient the use a specific object's coordinate system as the reference

system. The currently active reference space (world vs. object) can be toggled by clicking in the appropriate toolbar icon or by pressing , . World Coordinates Object Coordinates If object space is active and multiple objects are selected, the current coordinate space is determined by the currently selected Lead Object. The lead object is always the most recent individually selected object. Therefore, you can change the lead object by holding SHIFT and selecting the new lead object.

Several objects (with lead object bottom middle) selected in World mode.

The same selection after switching in Object mode.

The local coordinate space of an object depends on the object or component itself and is defined as follows. Shapes: The local X axis is defined by the first edge. The local Y axis is defined by the face normal. The local Z axis is given by the cross-product of X x Y, i.e. it is normal to local X and Y. Shape edges: The local space is defined by the local space of the associated face. Shape vertices: The local space is defined by the local space of the associated face, or the first face in case of multiface shapes. Graph edges: The local X axis is defined by the direction of the edge. Local Y and Z are calculated in a way, that Z lies in the world X-Z plane and Y is orthogonal to X and Z. In addition, you may lock the current reference system by using the Lock icon or by pressing . . Lock Current Coordinate Space A locked reference space defines a persistent coordinate space (for example with ongoing selection) until it is unlocked (by pressing the icon or . again).

Locked coordinate system.

Numeric Transform InputWhile transforming one or multiple objects, the numeric transform text field in the Tools toolbar provides feedback of the current transformation (e.g. when moving an object by 10.0 along the X axis, the field will show "10.0 0.0 0.0"). This text field can also be used to carry out transforms numerically. Since previous values are stored in the drop down menu, you may select a different object and hit ENTER in the text field in order to execute the corresponding transformation. Note that vector components (X Y Z) are separated by a space character. For scale transforms you may enter only a single value in order to scale uniformly.

Make Names UniqueNames of generated objects in a CityEngine scene are not automatically unique. In some cases, unique names are required. This can be achieved using the Make Names Unique Tool in the Edit Menu. Edit Make Names Unique... All selected scene objects are enumerated and renamed in ascending order. The delimiting character can be chosen.

The Make Names Unique dialog

Note that this is a one-time operation. Once you modify your scene (add scene objects), there might be new shapes with non-unique names again.Copyright 2008 - 2010 Procedural Inc.

Cameras

CityEngine supports an arbitrary number of cameras. Multiple cameras are especially useful if your are working with more than one 3D viewport. There are four predefined cameras: Perspective: a perspective view of the scene. Front: a front view of the scene (you look along the z-axis) Top: a top view of the scene (you look along the y-axis) Side: a side view of the scene (you look along the x-axis) In addition to these predefined cameras, you can always align the camera along a specific axis by pressing X , Y , or Z . While Y only orients the Y-Axis in camera direction, X and Z also re-orient the Y-axis upwards. This in combination with switching between orthographic and perspective view P allows you to quickly walk through multiple views of your scene. The cameras are accessible from the Camera menu. Cameras are shared among 3D viewports, meaning that if multiple 3D viewports use the same camera, changing the camera in one viewport (e.g. by rotation) will affect the second viewport with the same camera as well. In order to create your own camera, you can either click on the Camera menu button, or select New Camera from the Camera menu. This will automatically clone the current camera and save it under a new name. By choosing Edit Cameras, you can finetune the camera and change all camera parameters individually.

A camera configuration has the following options:

Perspective: if selected, the camera will give a perspectively correct image. If not selected, the camera will operate in orthogonal mode where parallel edges will also appear as parallel lines in the 3D viewport. You can switch between perspective and orthogonal mode by pressing P or selecting Orthogonal View from the Focal Length menu. Angle of view: the width of the field of view. For your convenience, some predefined angles of view corresponding to specific focal lengths are accessible from the Focal Length / Lens menu. Near and far clipping plane: these values limit the space where your camera will work. If your scene disappears when you move far away from it, increase the far clipping plane. Configuration: these values position and orient the camera. You can enter a world coordinate position for the camera as well as a specific rotation of the camera. Distance to Point of Interest: this value corresponds to the distance between the camera and the POI. The POI is also the center of rotation and thus the distance to the POI defines the radius of the camera rotation.Copyright 2008 - 2010 Procedural Inc.

Bookmarks

A specific camera configuration can be saved as bookmark. Bookmarks are accessible from the Bookmarks menu . For the predefined perspective, front, top, and side cameras there is always a "Home" bookmark which restores the default configuration of the current camera. The home bookmark can also be activated by pressing H . Bookmarks and cameras are independent this means that you can apply any bookmark to any camera. Bookmarks are always applied to the currently active camera. In order to create a new bookmark, you can either select Bookmark from the Boomarks menu or click on the Bookmarks menu button. The first ten bookmarks are mapped to the numeric keypad and can be activated by pressing the corresponding key on the numeric keypad. Pressing CTRL+[NUMPAD] on the numeric keypad will automatically store the current camera configuration at the corresponding bookmark position. This allows you to store and recall bookmarks without navigating to the viewport menu. Similar to cameras, bookmarks can be edited by choosing Edit Bookmark from the Bookmarks menu.

A camera bookmark has the following options:

Perspective: if selected, the camera will give a perspectively correct image. If not selected, the camera will operate in

orthogonal mode where parallel edges will also appear as parallel lines in the 3D viewport. You can switch between perspective and orthogonal mode by pressing P or selecting Orthogonal View from the Focal Length menu. Angle of view: the width of the field of view. For your convenience, some predefined angles of view corresponding to specific focal lengths are accessible from the Focal Length menu. Near and far clipping plane: these values limit the space where your camera will work. If your scene disappears when you move far away from it, increase the far clipping plane. Configuration: these values position and orient the camera. You can enter a world coordinate position for the camera as well as a specific rotation of the camera. Distance to Point of Interest: this value corresponds to the distance between the camera and the POI. The POI is also the center of rotation and thus the distance to the POI defines the radius of the camera rotation.Copyright 2008 - 2010 Procedural Inc.

Multiple Viewport Windows

You can open as many 3D viewports as you require for your modelling task. A new 3D viewport is created by selecting WindowNew Viewport from the main menu. A very common configuration is a single viewport for navigating the scene as well as a four viewport configuration with a perspective, top, front, and side view. By pressing SPACE you can maximize the current viewport. Similarly, the previous viewport configuration is restored by pressing SPACE again.

By sharing a camera between viewports but having different rendering modes or layer visibility, you can very easily compare side to side e.g. shapes and generated models. While sharing a camera between viewports, camera changes in one viewport affect the other viewport and vice versa.Copyright 2008 - 2010 Procedural Inc.

Keyboard Shortcut Reference for the 3D ViewportThe following table summarizes the 3D viewport shortcuts: Key ALT+LMB ALT+MMB ALT+RMB LMB SHIFT+LMB CTRL+LMB SHIFT+CTRL+LMB A B D F I L P X Y Z H [NUMPAD] CTRL+[NUMPAD] CTRL+A 4 5 6 7 F9 F10 F11 F12 Q W E R S G Description Rotate Track / pan Dolly Apply tool / Replace selection Add to selection Toggle selection Remove from selection Frame all Toggle bounding boxes Toggle information display visibility Frame selected Toggle isolation Toggle scene light Toggle between perspective and orthogonal view Apply left/right side view (changes camera orientation only) Apply top/bottom view (changes camera orientation only) Apply front/back view (changes camera orientation only) Apply default camera settings Apply bookmark at position [NUMPAD] Save current camera settings as bookmark at position [NUMPAD] Select all Select wireframe mode Select shaded mode Select textured mode Toggle wireframe on shaded Show / hide map layers Show / hide graph networks Show / hide shapes Show / hide models Select selection tool Select translate tool Select rotate tool Select scale tool Select create shape tool Select graph (i.e., street network) create segment tool

Note: Depending on your Operating System, some of the default CityEngine shortcuts might be globally assigned to other actions. In this case, you have the choice to either change the Operating System's defaults (where available) or to change CityEngine's key bindings (see Keyboard Preferences Note: You can always recall a list of currently active CityEngine shortcuts by pressing CTRL+SHIFT+L . Note (Mac OS X): For most shortcuts, use the COMMAND key instead of CTRL .Copyright 2008 - 2010 Procedural Inc.

The File NavigatorThe Navigator is your main tool to navigate and operate on files and folders. You can open the navigator by selecting WindowShow Navigator from the main menu.

inspector visible, showing the outline of a CGA rule file.

The file navigator with

You can open and edit CGA and scene files within CityEngine by double-clicking the corresponding file in the navigator. To directly open a file, hit CTRL+SHIFT+R and type the name of the file you are looking for. The navigator provides also basic operations such as copying, renaming and deleting files and folders. For performance reasons the CityEngine keeps an internal copy of the workspace. If you modify files outside of CityEngine (e.g. by editing a file in an external program or renaming a file in the system file explorer), you have to refresh the CityEngine's internal representation. Choose FileRefresh Workspace or simply hit F5 . The file navigator can inspect selected files. In the case of CGA rule files, the functions and rules are listed. Clicking on entries in the CGA file inspector will let CGA Shape Editor to scroll to the corresponding entry in the rule file. Hence the file navigator inspector is a powerful tool to navigate in a rule file.Copyright 2008 - 2010 Procedural Inc.

The Scene Window

This window is the central place where you manage your scene. A CityEngine scene is organized in layers. Currently, the following layer types exist: Environment Layers control common 3D viewport parameters such as scene's panorama or the scene light. Both layers are configured using the inspector. Map Layers contain arbitrary maps (images) and can be used to globally control object attributes. Graph Layers contain street networks and blocks, dynamic shapes (street shapes, building footprints), and generated models Shape Layers contain static shapes, typically used as building footprints for generation of CGA models.

Working with LayersLayers can easily be deleted, duplicated or merged by selecting the corresponding menu item from the context menu or the "Layer" menu in the main menu. In addition to that, you can use the standard cut, copy, and paste actions to transfer objects between layers. The visibility of each layer in the viewport can be toggled by clicking on the "eye" symbol left to the layer name. You may rearrange layers by dragging them to the desired position. You can control the visibility of different object / layer types on a per-viewport basis from the view settings menu.

Using the Search Field to Select and Filter ObjectsIn the search field on the top of the scene window you can type a wildcard expression (e.g. "Lot*") and limit the visible objects in the scene window by clicking on the magnifying glass icon on the right. You can use the same expression to select matching objects. To show all objects again, clear the search field and select the magnifying glass icon again.

Importing and Exporting Layers

In the case where building lots or mass models have been already modeled with an external program, these can be imported as shape layers. First you have to convert your shapes into a grouped ".obj" file (each group corresponds one shape) or a ".dxf" file. Afterwards copy it into the data folder of your project and import it via FileImportCityEngine Layers from the main menu or via the navigator context menu on the file. Afterwards the CGA shape grammar rules can be applied in the usual way on these imported shapes. Any object from the scene window can be exported to a new scene by choosing FileExportExport Selected Objects as .cej File To import layers from the exported ".cej" file into a new scene, select FileImportCityEngine Layers from the main menu.Copyright 2008 - 2010 Procedural Inc.

The CGA Editor

By double clicking on a ".cga" file in the Navigator window, the corresponding file is opened in the CGA shape grammar editor. Another possibility to open a ".cga" file for editing is to click on Rule File in the Inspector window if the selected object has already a rule file assigned. The typical workflow with the CGA shape grammar editor is: Assign a rule to the selected objects either via the RMB-menu on the rule file in the Navigator, or via RMB-menu in the Viewport, or via ShapesAssign Rule File... in the main menu. In the latter two cases the rule has to be selected in the opened dialog. Open the rule file in the CGA shape grammar editor and edit the rules. Press CTRL+S for saving the rule file. Press CTRL+G for (re-)generating the model. The rule editor has syntax highlighting and shows syntax errors (the latter are described in more detail in the CGA Problems window where you can double click on each entry). Furthermore, during typing, command completion can be invoked via CTRL+SPACE . NOTE: you can always recall a list of currently active CityEngine shortcuts by pressing CTRL+L .Copyright 2008 - 2010 Procedural Inc.

The Log View

The Log View shows the log records of the CityEngine. You can open the log view by selecting WindowShow Log from the main menu. Log records are created by various parts of the CityEngine and range from informational messages to severe internal errors conditions (such as out of memory). The properties and values of each log record are shown in this view. The Log View can is especially useful in tracking down strange or erroneous behavior. The meaning of the severity color is as follows: None: Information Yellow: Warning Red: ErrorCopyright 2008 - 2010 Procedural Inc.

The CGA Console

If a CGA command produces textual output (such as the CGA print command), this output will be shown in the CGA console. You can open the CGA Console by selecting WindowShow Console from the main menu.Copyright 2008 - 2010 Procedural Inc.

The CGA Problems View

If you encounter any errors during CGA shape grammar editing, they will be displayed in the Problems view. Errors and warnings are passed up from the CGA compiler. The Problems view lists the error, filename and folder. If you select an error the associated file will open in the CGA shape grammar editor and the cursor will display the line where the error was encountered. You can open the CGA problems view by selecting WindowShow CGA Problems from the main menu.Copyright 2008 - 2010 Procedural Inc.

The Progress View

The progress view shows the progress status of long running CityEngine operations. You can monitor the progress in the progress view as well as cancel an operation by clicking on the red Stop button on the right-hand side of the operation. You can open the progress view by selecting WindowShow Progress from the main menu. NOTE: You can always cancel all pending model generation by pressing the ESC key or choosing Cancel from the main toolbar.

The InspectorThe "Inspector" is the main tool for viewing and modifying CityEngine objects. Depending on the type of object selected, the inspector adapts its user interface to provide full access to the objects attributes. The inspector is invoked via WindowInspector in the main-menu, or by pressing ALT+I .

Shape inspector showing the relevant attributes and parameters.

For CityEngine layer objects such as shapes, the inspector shows all attributes and parameters of the object. If the object is associated with a rule file, the rule file is parsed and all rule parameters are available for modification. Each rule parameter can take its value from either the rule itself, from the object, from a user-defined value or from a compatible map. You can change the source of the rule attribute value in the "Source" column of the rule parameter table. If the "Live Mode" is enabled, model generation is triggered immediately when attribute or parameters change. Thus, live mode allows you to customize your rules interactively by just changing the values. Besides the attributes, shapes have a seed which is used for the random number generator of the rule engine. Changing the seed will influence all random dependent rules such as explicit rand() calls as well as probabilistic rules (e.g. Lot33%: A 33%: B else: C). To reset the seeds to their default values, select ShapesReset Seed from the main menu. To randomize seeds, select

ShapesUpdate Seed and Generate. The start rule where generation will start can be entered in the "Start Rule" field. If this value does not match any rule in the rules file, no generation will take place. The inspector not only supports editing of single objects but also collection of objects. Attributes that are unique across all objects are shown as-is. If some attribute has different values in the object collection, the attribute is marked as non-unique with the ? sign. Regardless of the uniqueness of attribute values, changing a value will apply this value to all objects in the collection. This allows for easy editing of large collection of objects. In addition, the inspector automatically groups object collections by type so that even for heterogeneous collection multi-edit is possible. For attribute maps, the inspector lets you change the map files, modify the bounds, and adjust the display offset (how much the rendering of the map is displaced regarding the actual map values). In addition to that, an overly color and alpha value for the map can be specified. The mapping function can also be edited by the map inspector.

Attribute map inspector including layer attributes.

Copyright 2008 - 2010 Procedural Inc.

Configuring the Windows LayoutThe CityEngine main window can contain two different types of windows (views and editors) and its layout is controlled by perspectives. A perspective is a group of views and editors in the main CityEngine window. Within the main CityEngine window, each perspective may have a different set of views but all perspectives share the same set of editors. With the exceptions of the 3D viewport, views usually exist as a single instance, meaning that e.g. there is only one inspector. Modifications in views are immediately propagated inside CityEngine and views may exist without an open editor. You can open views by selecting the view type from the main Window menu. Editors follow more an open-save-close lifecycle model and are opened by double clicking on a file in the Navigator. The CityEngine provides the following views: Navigator for file management Log view for CityEngine messages Console view for CGA output CGA Problems view for CGA compiler errors and warnings Progress view for progress reporting of long-running CityEngine operations. Multiple 3D viewports Outline view for an overview of the currently selected objects Shape tree view for browsing the shape tree Inspector for a detailed view and editing of currently selected objects. The editors provided by CityEngine are: CGA shape grammar editor for editing .cga files Scene editor for editing .cej files A basic text editor for editing arbitrary text files An editor is also a visual component within the Workbench. It is typically used to edit or browse a resource. The visual presentation might be text or a diagram. Typically, editors are launched by clicking on a resource in a view. Modifications made in an editor follow an open-save-close lifecycle model. Note: To directly open a file, hit CTRL+SHIFT+R and type the name of the file you are looking for. Some features are common to both views and editors. Both can be active or inactive, but only one window can be active at any one time. The active window is the one whose title bar is highlighted. The active window is the target for common operations like selection. The active window also determines the contents of the status line. If an editor tab is not highlighted it indicates the editor is not active; however views may show information based on the last active editor. Tasks: 1. Editors 2. Views 3. Dragging Windows 4. Default Window Layouts 5. Saving and Loading Window LayoutsCopyright 2008 - 2010 Procedural Inc.

EditorsDepending on the type of file that is being edited, the appropriate editor is displayed in the editor area. For example, if a ".cga" file is being edited, a CGA shape grammar editor is displayed in the editor area. The figure below shows an editor CGA shape grammar editor open on the file "RR20_appartments_01.cga". The name of the file appears in the tab of the editor. An asterisk (*) appearing at the left side of the tab indicates that the editor has unsaved changes. If an attempt is made to close the editor or exit CityEngine with unsaved changes, a prompt to save the editor's changes will appear.

When an editor is active, the main menu bar and toolbar of CityEngine contain operations applicable to the editor. When a view becomes active, the editor operations are disabled. However, certain operations may be appropriate in the context of a view and will remain enabled. The editors can be stacked in the editor area and individual editors can be activated by clicking the tab for the editor. Editors can also be tiled side-by-side in the editor area so their content can be viewed simultaneously. See Dragging Windows how to rearrange views and editors. CTRL+F6 pops up a list of currently open editors. By default, the list will have selected the editor used before the current one, allowing you to easily go back to the previous editor. If a resource does not have an associated editor, CityEngine will attempt to launch an external editor registered with the platform. These external editors are not tightly integrated with CityEngine and are not embedded in the main window of CityEngine. On Windows, if the associated editor is an external editor, CityEngine may attempt to launch the editor in-place as an OLE document editor. For example, editing a ".doc" file will cause Microsoft Word to be opened in-place within CityEngine if Microsoft Word is installed on the machine. If Microsoft Word has not been installed, Word Pad will open instead.Copyright 2008 - 2010 Procedural Inc.

ViewsThe primary use of Views is to provide navigation of the information inside CityEngine. For example: The Shape Tree view displays the structure of a generated model. The Navigator view displays CityEngine projects, their folders and files. A view might appear by itself, in a floating window or stacked with other views in a tabbed window. Views have two menus. The first, which is accessed by right clicking on the view's tab, allows the view to be manipulated in much the same manner as the menu associated with editors. The second menu, called the "view pull-down menu", is accessed by clicking the down arrow. The view pull-down menu typically contains operations that apply to the entire contents of the view, but not to a specific item shown in the view. In addition to that, some often used view actions are placed in the toolbar of the view.Copyright 2008 - 2010 Procedural Inc.

Dragging WindowsThis section will explain how to rearrange editors and views to customize the layout of the main CityEngine window. Drop cursors indicate where it is possible to dock views in the CityEngine main window. Several different drop cursors may be displayed when rearranging views. Dock above: If the mouse button is released when a dock above cursor is displayed, the view will appear above the view underneath the cursor. Dock below: If the mouse button is released when a dock below cursor is displayed, the view will appear below the view underneath the cursor. Dock to the right: If the mouse button is released when a dock to the right cursor is displayed, the view will appear to the right of the view underneath the cursor. Dock to the left: If the mouse button is released when a dock to the left cursor is displayed, the view will appear to the left of the view underneath the cursor. Stack: If the mouse button is released when a stack cursor is displayed, the view will appear as a tab in the same pane as the view underneath the cursor. Restricted: If the mouse button is released when a restricted cursor is displayed, the view will not dock there. For example, a view cannot be docked in the editor area. In order to change the position of a 3D viewport (or any other) view click in the title bar of the 3D viewport and drag the view across the CityEngine main window. Do not release the mouse button yet. While still dragging the view around on top of the CityEngine main window, note that various drop cursors appear. These drop cursors (see above) indicate where the view will dock in relation to the view or editor area underneath the cursor when the mouse button is released. Notice also that a rectangular highlight is drawn that provides additional feedback on where the view will dock. Dock the view in any position in the CityEngine main window, and view the results of this action. Click and drag the view's title bar to re-dock the view in another position in the CityEngine main window. Observe the results of this action. Click and drag the view's title bar outside the CityEngine main window. Notice that it becomes a "Detached" window (floating on the desktop). Finally, drag the 3D viewport over another view. A stack cursor will be displayed. If the mouse button is released the 3D viewport will be stacked with the other view into a tabbed window. The Workbench allows for the creation of two or more sets of editors in the editor area. The editor area can also be resized but views cannot be dragged into the editor area. Open at least two editors in the editor area by double-clicking editable files in the Navigator. Still holding down the mouse button, drag the editor over the editor area and move the cursor along all four edges as well as in the middle of the editor area, on top of another open editor. Notice that along the edges of the editor area the directional arrow drop cursors appear, and in the middle of the editor area the stack drop cursor appears. Dock the editor on a directional arrow drop cursor so that two editors appear in the editor area. Notice that each editor can also be resized as well as the entire editor area to accommodate the editors and views as necessary. It is important to observe the color of an editor tab (in the figure below there are two groups, one above the other) Blue indicates that the editor is currently active Default (gray on Windows XP) indicates that the editor was the last active editor. If there is an active view, it will be the editor that the active view is currently working with. This is important when working with views like the Outline and the Inspector that work closely with the active editor. Drag and dock the editor somewhere else in the editor area, noting the behavior that results from docking on each kind of drop cursor. Continue to experiment with docking and resizing editors and views until the CityEngine window layout has been arranged to satisfaction.Copyright 2008 - 2010 Procedural Inc.

Default Window LayoutsThere are a several predefined window layouts available in CityEngine. Window layouts are called perspectives and can be accessed by selecting WindowLayout from the main menu. Choose your preferred layout from this list.

The "Four views" perspective resembles a classical perspective, top, front, and side layout and is handy for reviewing models similar to 2D drawings.

The "Grammar Editing" perspective allocates a larger area to the CGA shape grammar editor and is intended for editing CGA files and visually verifies the results in a perspective and a front view.

The street generation perspective has a large top and perspective view. It simplifies generation and editing of street networks without cluttering the layout with unwanted editors.

Copyright 2008 - 2010 Procedural Inc.

Saving and Loading Window LayoutsIf you have found a preferred arrangement of windows, you can save it by selecting As... from the main menu. WindowLayoutSave Perspective

For your convenience, a perspective along with the current open scene is saved automatically with the same name as the scene. This means that if you re-open a scene, the last associated window layout will automatically be restored. NOTE: It is recommended to name layouts after specific modeling tasks such as "Grammar Editing". This allows you to easily pick a corresponding layout to what you are currently working on.Copyright 2008 - 2010 Procedural Inc.

CityEngine Preferences1. General 2. Appearance 3. Automatic Exit 4. Colors and Fonts 5. Label Decorations 6. Editors 7. File Associations 8. Text Editors 9. Accessibility 10. Hyperlinking 11. Linked Mode 12. Quick Diff 13. Grammar Core 14. Keys Key Strokes, Key Sequences, and Key Bindings Schemes Contexts Platform and Locale Customizing Key bindings Conflict Resolution 15. Mouse 16. 3D Mouse 17. Perspectives 18. Startup and Shutdown 19. Bookmarks 20. Cameras 21. HelpCopyright 2008 - 2010 Procedural Inc.

General Preferences

The following preferences can be changed on the General preference page: Always run in background: Turn this option on to perform long running operations in the background without blocking you from doing other work. Keep next/previous part dialog open: If this option is turned on then the editor and view cycle dialogs will remain open when their activation key is let go. Normally the dialog closes as soon as the key combination is release. Show Heap Status: Turn this option on to display an indicator showing information about current Java heap usage. A basic heap monitor is always enabled inside CityEngine and reports Java and core heap usage. Open mode: You can select one of the following methods for opening resources: Double click - Single clicking on a resource will select it and double clicking on it will open it in an editor. Single click (Select on hover) - Hovering the mouse cursor over the resource will select it and clicking on it once will open it in an editor. Single click (Open when using arrow keys) - Selecting a resource with the arrow keys will open it in an editor. Note: Depending on which view has focus, selecting and opening a resource may have different behavior.Copyright 2008 - 2010 Procedural Inc.

Appearance Preferences

You can change the following preferences on the Appearance preferences page: Current presentation: Specify the currently active presentation (look and feel). Override presentation settings: Locally override the settings for the current presentation. Editor tab positions: Specify either top or bottom to indicate where you want tabs for stacked editors to appear. View tab positions: Specify either top or bottom to indicate where you want tabs for stacked views to appear. Perspective switcher positions: Specify the location of the perspective switcher bar (unused in the current CityEngine release). Current theme: specifies the currently active theme (color and font set). Show traditional style tabs: Specify whether traditional (square) tabs should be used in place of the curved tabs. Enable animations: Enable/disable the feature where views animate to their location when closed or opened.Copyright 2008 - 2010 Procedural Inc.

Automatic Exit

CityEngine features an auto-exit functionality. CityEngine can automatically exit after a given number of minutes of inactivity. Before exiting, all open files will be saved. Enter '0' minutes in order to disable automatic exit. Automatic exit can be useful for installations where people usually do not close applications and thus do not return licenses held by these application to the license server. Closing the application returns the licenses held to the license server as a side-effect and allow in turn other users to start the application.Copyright 2008 - 2010 Procedural Inc.

Colors and Fonts Preferences

Many of the fonts and colors and used by the CityEngine editors can be set using the Colors and Fonts preference page. A tree, used to navigation, shows a short preview of the various colors and fonts. The current face (but not size) of any font is previewed in its label. Colors are previewed in the icon associated with its label. Additionally, some categories provide a more detailed preview of their contributions. This preview is shown below the description area if available. Font settings can be changed either by selecting the font from the list and clicking Use System Font to choose the Operating System font setting or by clicking Change to open up a font selection dialog. Reset can be used to return to the default value. Color settings can be changed by clicking color to the right of the tree area when a color is selected. Reset can be used to return to the default value.Copyright 2008 - 2010 Procedural Inc.

Label Decorations

Label Decorations allow additional information to be displayed in an item's label and icon. The label decorations preference page provides a description of each decoration and allows the selection of which decorations are visible.Copyright 2008 - 2010 Procedural Inc.

Editor Preferences

You can change the following preferences on the Editor's preference page: Size of recently opened files list: Each file that is opened in an editor is stored in a list of recently used files in the File menu. This option controls the number of files that is displayed in that list. Show multiple editor tabs: Specifies whether you wish to show multiple editor tabs. If off, editor workbooks have one large tab and all non-visible editors are accessible only from the chevron. Show Heap Status: Turn this option on to display an indicator showing information about current Java heap usage. A basic heap monitor is always enabled inside CityEngine and reports Java and core heap usage. Allow in place system editors: Specifies if OLE in-place editing will be used on the Windows platform. Restore editor state on startup: Specifies if editors should be restored on the next launch of CityEngine. Close editors automatically: Specifies whether or not to re-use editors in CityEngine. If on, you may specify the number of editors to use before they are recycled (the default is 8). You can also specify if a prompt dialog should be opened or if a new editor should be opened when all editors are "dirty" (have unsaved changes). Once it is turned on, the Pin Editor action is added to the toolbar and editor tab menu. Pinned editors are not recycled.Copyright 2008 - 2010 Procedural Inc.

File Association Preferences

On the File Associations preference page, you can add or remove file types recognized by CityEngine. You can also associate editors with file types in the file types list. File types list Add...: Adds a new file or file type (extension) to the predefined list. In the resulting New File Type dialog, type the name of a file or a file extension. If you are adding a file extension, you must type either a dot or a "*." before the file type (e.g., ".txt" or "*.txt" as opposed to simply "txt"). Remove: Removes the selected file type from the list. Associated editors list Add...: Adds a new editor to the list of editors associated with the file type selected above. In the resulting Editor Selection dialog, you can choose an editor to launch either inside CityEngine (internal) or outside CityEngine (external); click Browse to locate an editor yourself if the editor you want is not displayed in the list. Remove: Removes the association between an editor and the file type selected above. Note: Any editor that is bound by content type may not be removed from this list. Currently, there is no mechanism available to remove these editors. Default: Sets the selected editor as the default editor for the file type selected above. The editor moves to the top of the Associated Editors list to indicate that it is the default editor for that file type.

Note: Depending on which view has focus, selecting and opening a resource may have different behavior.Copyright 2008 - 2010 Procedural Inc.

Text Editor Preferences

The following preferences can be changed on the Text Editors page and affect the CGA shape grammar editor. Undo history size: This option allows you to set the size of the undo history for text editors. Displayed tab width: This option allows you to set the displayed tab width for text editors. Insert spaces for tabs: This option allows you to insert space characters in place of tab characters. Highlight current line: This option controls whether the current line is highlighted or not. Show print margin: This option controls whether the print margin is visible or not. Print margin column: This option allows you to set the print margin column position. Show line numbers: This option controls whether or not line numbers are shown on the left side of the text editor. Show range indicator: This option controls whether or not range indicators are shown in the text editor. Show whitespace characters: This option controls whether to display whitespace characters in text editors. Show affordance in hover on how to make it sticky: This option controls whether to show an affordance in the hover on how to make it sticky.le Enable drag and drop of text: This option controls whether text drag and drop is enabled. Warn before editing a derived file: This option controls whether to warn if a derived file is going to be edited. Smart caret positioning at line start and end: This option controls whether the editor automatically positions the caret and the start or end of a line. Appearance color options: This option controls various appearance colors.

Copyright 2008 - 2010 Procedural Inc.

Accessibility Preferences

You can change the following preferences on the Accessibility preference page: Use custom caret: Replaces the original caret (the marker that indicates where the next character will appear) with a custom caret and shows a different caret for Overwrite and Insert modes. Enable thick caret: Replaces the original caret with a more visible, thicker caret. Use characters to show changes on line number bar: Quick Diff shows the changes in a vertical ruler using colors. Color-blind persons can enable this option to show differences with different characters in the line number ruler.Copyright 2008 - 2010 Procedural Inc.

Hyperlinking

You can change the following preferences on the Hyperlinking preference page: Enable on demand hyperlink style navigation: Enables/disables the hyperlinking feature in text editors. This setting is currently not used by the CGA shape grammar editor. Default modifier key: The default modifier key that activates the hyperlinking feature.Copyright 2008 - 2010 Procedural Inc.

Linked Mode

You can change the following preferences on the Linked Mode preference page: Ranges: the range, which activates the linked mode. Show in text as: the visual appearance of the linked mode text. Color: the color of the linked mode text.Copyright 2008 - 2010 Procedural Inc.

Quick Diff

The following preferences can be changed on the Quick Diff preference page. Enable quick diff: This option will enable or disable the quick diff option. Show differences in overview ruler: This option will show differences in the overview ruler. Colors Changes: This option controls the color of changes. Colors Additions: This option controls the color of additions. Colors Changes: This option controls the color of changes. Colors Deletions: This option controls the color of deletions. Use this reference source: This option sets which reference to use as the base for generating quick diff comparisons. Options are: Version on Disk: Current file is compared against the last saved version on disk.Copyright 2008 - 2010 Procedural Inc.

Grammar Core

The Grammar Core preferences page controls various options with respect to rule derivation (model generation), display, rendering, occlusion and miscellaneous engine arguments. Derivation The maximum function call depth controls the maximum recursion level of function calls. This includes attributes. The maximum derivation depth controls the maximum recursion level of rules (createShape), or the depth of the shape tree, respectively. The maximum number of active shapes aims at limiting the breadth of the shape tree.

If "Generate with trim plane computation" is disabled, trim planes are not computed during derivation. The extent of the trim planes can be controlled with trim plane size; note that this is for computation only, the rendering size of the trim planes can be controlled in the display settings below. Occlusion Disable inter-/intra-occlusion queries: Disabling intra-shape tree or inter-shape tree (neighbors) occlusion queries might be useful for rule debugging. Maximum distance for touches: Due to floating point limitations, the distinction of touches() and overlaps() is enforced using a threshold value. Neighborhood distance for inter-occlusion queries: all shapes within this distance of the bounding box of a shape are considered neighbors; this means their models need to be derived for inter-occlusion queries. Display Options Trim plane size: Defines the display size of trim planes. Pivot size: Defines the display size of pivots. Pivot line with: Defines the display line width of pivots. Scope line with: Defines the display line width of scopes. Rendering (affects only generated models) Max texture width/height: Textures which are wider/higher than this value are rescaled to this value in order to save memory. Use CityEngine shader: Deselect to disable GLSL shaded rendering and enables the standard OpenGL shader. Use this flag if OpenGL 2.0 is not available. Matching profile: Using this popup, you can control render performance versus memory consumption. For most use cases, "Balanced" is a good choice. Use Two-Sided Lighting: Deselect to disable two-sided lighting. Force OpenGL Double Buffering On Windows (starting with Vista) and Mac OSX, double buffering is disabled because the operating system already takes care of smooth rendering. Use this option to force double buffering. Statistics Write grammarcore information: Select to enable console output of grammar core information. Logging Disable the RCP Logger: Disabling the logger might speed up generation and responsiveness of the CityEngine. However, important feedback from the grammarcore is lost.Copyright 2008 - 2010 Procedural Inc.

CityEngine PreferencesKeys

The function of the keyboard can be extensively customized CityEngine using the keys preference page. Within CityEngine, key strokes and key sequences are assigned to invoke particular commands. Tasks: 1. Key Strokes, Key Sequences, and Key Bindings 2. Schemes 3. Contexts 4. Platform and Locale 5. Customizing Key bindings 6. Conflict ResolutionCopyright 2008 - 2010 Procedural Inc.

Mouse Preferences

The mouse pref