场景编辑器是您管理现场和中心地位的方案。一个CityEngine中场景的群体和层次构成。以下是图层类型列表:

  • 地图层— 包含任意地图(图像),可用于全局控制场景对象的各种参数。场景地形也是使用地图层创建的。
  • 图形层– 包含街道网络和街区、动态形状(街道形状、街区、地块)和生成的模型。
  • 形状层– 包含形状,通常用作生成 CGA 模型的建筑覆盖区。
  • 静态模型层– 包含静态模型,例如 Collada 文件。
  • 分析图层– 包含分析工具,例如视域和视图走廊。
  • 图层组– 包含用于组织场景层次结构的其他图层。

有关图层类型的更多信息,请参阅场景对象概述

场景编辑器显示当前场景与组元件,层,和对象的树。您可以通过从上下文菜单中选择相应的菜单项或通过在主菜单中打开图层来删除、复制或合并图层 。此外,您可以使用标准的剪切、复制和粘贴操作在层之间传输对象。您可以通过将图层拖动到所需位置来重新排列图层。

创建组图层

使用图层组,您可以根据相似的几何图形(例如建筑物、街区、街道网络、模型)或主题(例如高程、图像、地形)将相似的图层放在一起来组织数据。

要创建新的图层组,请执行以下操作:

  1. Scene Editor窗口中右键单击并选择 New > New Layer Group
  2. 命名组图层。

要将子层或组添加到您创建的组,请将它们拖放到新的组层中。

层状态

为了有效地处理图层,您可以切换它们的可见性和编辑状态并分配不同的颜色,以便在视口中进行编辑。状态由Scene Editor旁边的方块表示。

设置图层颜色

每个图层或组都有一个颜色状态(有色或无色)。

  1. 单击左侧的“设置颜色”框为图层或组指定颜色。
  2. 在调色板中选择一种颜色。
  3. 单击“确定”
  4. 再次单击“设置颜色”框以删除颜色。

    您可以在Scene EditorInspector 中访问颜色值。当图层没有指定颜色时,颜色框会显示灰色条纹对角线。

图层颜色和层次结构

要了解颜色在父层和子层中的表现,请查看下面的示例。颜色继承自组层次结构。当您为父图层组指定颜色时,属于该图层或组的所有子对象和模型将在视口中具有该颜色。在场景编辑器中,子层将始终保持其颜色。下面的示例显示了两个没有继承颜色的彩色图层:

GUID-81B8A808-C2A6-412E-B16D-D34733098B66-web

没有继承颜色的两个彩色层

另一方面,此示例显示具有继承颜色的两个彩色图层。

GUID-B91CB36D-0916-4F86-9CB7-A186615FDB39-web
具有继承颜色的两个彩色层

锁定组和层

每个图层或组都有一个锁定状态(锁定或解锁)。中间的复选框显示图层的锁定状态。一旦锁定图层,就无法选择或修改包含的对象。您可以在Inspector 中访问锁定状态。

笔记:

将组设置为“锁定”时,子图层和组将保持其原始锁定状态,但无法选择或修改。

切换可见性

每个图层或组都有一个可见状态(可见或不可见)。右侧复选框显示图层或组的可见性状态。禁用可见性状态时,相应的对象将不会显示在任何视口中。无法选择不可见的对象。您可以在Scene EditorInspector 中访问可见性。

笔记:
  • 当组“不可见”时,子层和组将保持其原始可见性状态,但其对象将不会显示在视口中。
  • 不同对象/图层类型的可见性也可以在每个视口的基础上从视口窗口的视图设置菜单进行控制。

附加层选项

重命名图层和组

通过单击其名称两次,使用上下文菜单(“重命名”条目)或通过更改Inspector 中的名称字段来重命名图层或组。

框架元素

双击任何元素以在所有视口中框住元素。

多选

选择多个图层/组并更改所有选定项目的可见性/锁定/颜色状态。

使用搜索字段选择和过滤对象

搜索字段允许用户搜索名称匹配、属性匹配(名称和值)的对象。搜索结果会自动选择并在Viewport 中框起来。搜索操作的结果显示在状态栏中。

在场景窗口顶部的搜索字段中,您可以输入通配符表达式(例如“Lot*”)来选择匹配的对象。

  • Shape* — 匹配名称以Shape开头的场景对象
  • “Shape 12” – 匹配名称恰好是Shape 12 的场景对象
  • “Shape* *12” — 匹配名称以Shape开头且以12结尾的场景对象
笔记:

搜索查询中的空白字符表示逻辑 OR 表达式。要将对象名称与空格匹配,请将您的搜索查询放在双引号 “” 中

 

导入和导出图层

  • 如果已经使用外部程序对建筑地块或占地面积进行了建模,则可以将它们作为形状图层导入。首先,您必须将形状转换为分组的“.obj”文件(每组对应一个形状)或“.dxf”文件或类似文件。然后将其复制到项目的数据文件夹中,并通过从主菜单中单击文件>导入> CityEngine 图层并选择文件类型或通过文件上的导航器上下文菜单将其 导入。之后,您可以在这些导入的形状上以通常的方式应用 CGA 形状语法规则。
  • 场景窗口中的任何对象都可以通过选择文件>导出>将选定对象导出为 .cej > 要将图层从导出的“.cej”文件导入到新场景中,选择文件>导入> CityEngine 图层从主菜单。

 

 

The Scene Editor is the central place where you manage your scene and scenarios. A CityEngine scene is organized in groups and layers. The following is a list of layer types:

  • Map Layer—Contains arbitrary maps (images) and can be used to globally control various parameters for scene objects. The scene terrain is also created using a map layer.
  • Graph Layer—Contains street networks and blocks, dynamic shapes (street shapes, blocks, parcels), and generated models.
  • Shape Layer—Contains shapes, typically used as building footprints for generation of CGA models.
  • Static Model Layer—Contains static models, such as Collada files.
  • Analysis Layer—Contains analysis tools such as Viewsheds and View Corridors.
  • Group Layer—Contains other layers to organize the scene hierarchy.

See Scene objects overview for more information about layer types.

The Scene Editor displays the current scene as a tree with group elements, layers, and objects. You can delete, duplicate, or merge layers by selecting the corresponding menu item from the context menu or by opening Layer in the main menu. In addition, you can use the standard cut, copy, and paste actions to transfer objects between layers. You may rearrange layers by dragging them to the desired position.

Create a group layer

With group layers you can organize your data by putting similar layers together based on similar geometry (e.g. buildings, blocks, street networks, models) or themes (e.g. elevation, imagery, terrain).

To create a new Layer Group, do the following:

  1. Right-click inside the Scene Editor window and choose New > New Layer Group.
  2. Name the group layer.

To add child layers or groups to the group you created, drag and drop them in the new group layer.

Layer states

To work with layers effectively, you can toggle their visibility and edit status and assign different colors to make editing in the viewport easier. The states are represented by the squares next to the Scene Editor.

Set the layer color

Each layer or group has a color state (colored or uncolored).

  1. Click the left Set Color box to assign a color to the layer or group.
  2. Choose a color in the palette.
  3. Click OK.
  4. Click the Set Color box again to remove the color.

    You can access the color value in the Scene Editor and in the Inspector. When a layer doesn’t have a color assigned to it, the color box displays grey-striped diagonal lines.

Layer colors and hierarchies

To see how color behaves with parent and child layers, look at the examples below. The color is inherited from the group hierarchy. When you give a parent layer group a color, all child objects and models belonging to this layer or group will have that color in the Viewport. In the Scene Editor, the child layers will maintain their colors at all times. The example below shows two colored layers without inherited colors:

GUID-81B8A808-C2A6-412E-B16D-D34733098B66-web

Two colored layers without inherited colors

This example, on the other hand, shows two colored layers with inherited colors.

GUID-B91CB36D-0916-4F86-9CB7-A186615FDB39-web
Two colored layers with inherited colors

Lock groups and layers

Each layer or group has a locked state (locked or unlocked). The middle check box displays the locked state of the layer. Once you lock a layer, you can’t select or modify the contained objects. You can access the locked state and in the Inspector.

Note:

When setting a group to “locked”, the child layers and groups will keep their original locked state, but can’t be selected or modified.

Toggle visibility

Each layer or group has a visibility state (visible or invisible). The right check box displays the visibility state of the layer or group. When disabling the visibility state, the corresponding objects will not be shown in any viewports. Invisible objects can’t be selected. You can access the visibility in the Scene Editor and in the Inspector.

Note:
  • When a group is “invisible”, the child layers and groups will keep their original visibility state, but their objects will not be displayed in the viewports.
  • The visibility of different object / layer types can also be controlled on a per-viewport basis from the view settings menu of the Viewport window.

Additional layer options

Renaming layers and groups

Rename a layer or a group by clicking on its name twice, using with the context menu (“Rename” entry), or by changing the name field in the Inspector.

Framing elements

Double click any element to frame the element in all viewports.

Multi selection

Select multiple layers/groups and to change visibility/lock/color state for all the selected items.

Using the Search Field to select and filter objects

The search field allows the user to search for objects with name match, attribute match (name and value). The result of the search is automatically selected and framed in the Viewport. The result of the search action is displayed in the status bar.

In the search field on the top of the scene window you can type a wildcard expression (e.g. “Lot*”) to select matching objects.

  • Shape* — Matches scene objects whose names start with Shape
  • “Shape 12” — Matches scene objects whose names are exactly Shape 12
  • “Shape* *12” — Matches scene objects whose names start with Shape AND end with 12
Note:

Whitespace characters in a search query denote a logical OR expression. To match object names with spaces, put your search query in double quotes “”

 

Importing and exporting layers

  • In the case where building lots or footprints 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 or similar. Afterwards copy it into the data folder of your project and import it by clicking File > Import > CityEngine Layers from the main menu and choose your file type or through the Navigator context menu on the file. Afterwards you can apply CGA shape grammar rules in the usual way on these imported shapes.
  • Any object from the scene window can be exported to a new scene by choosing File > Export > Export Selected Objects as .cej > To import layers from the exported “.cej” file into a new scene, select File > Import > CityEngine Layers from the main menu.