Exporting Heighmap-Based Terrains

Exporting Heighmap-Based Terrains

Height-map based terrain export exports the original CityEngine Terrain Layer heightmap and generates a sculptable terrain model inside of LumenRT. These terrains can use the LumenRT terrain sculpting and painting tools to mold and modify the terrain. To export a heightmap-based terrain, you must add a shape proxy and attach a LumenRT Terrain rule (as illustrated below):

Perspective

Follow these steps to create an exportable Heightmap-based Terrain:

  1. Create a simple rectangular shape anywhere in the scene.
  2. Attach a rule to the shape that is connected to the /LumenRT/rules/TerrainMap.cga rule file and uses a start rule called Terrain.
  3. After the rule is attached to shape, you should see the following dialog in the CityEngine inspector:
  4. Fill in each of the values for the attributes shown in the inspector. In most case you can just copy these over from your CityEngine terrain layer:
    • HeightMap
    • ColorMap
    • Elevation
    • ElevationOffset
    • XSize
    • ZSize
    • XOffset
    • ZOffset

Overview

Exporting Mesh-based Terrains

Mesh-based Terrains are CityEngine terrains that are first converted into polygon meshes before exporting. These meshes are added into the CityEngine scene like any other external mesh object.

Note: Mesh-based terrains are not sculptable inside of LumenRT.
When using the Python script export, CityEngine terrains must first be converted to a terrain mesh and imported as a separate object in the scene. To do this, perform the following steps:

  1. Set the Terrain Resolution to 256 x 256. This will help to create a mesh suitable for real-time operation inside of LumenRT.

    Edit Terrain

  2. Export the terrain as a .obj file and check “Simplify Terrain Meshes”.

    Export as Object

  3. Re-import the terrain as a static mesh. Once the mesh is inside of CityEngine, it can be exported along with other CityEngine shapes and LumenRT objects.

    Re-import as static mesh

The terrain is converted to a terrain mesh and is imported as a static model. You can now hide the height map terrain and use the new mesh-based terrain to export into LumenRT.

New Mesh-based Terrain

导出基于Heighmap的TerrainsHeight-map的地形导出导出原始CityEngine Terrain Layer高度图,并在LumenRT内部生成可雕塑的地形模型。这些地形可以使用LumenRT地形雕刻和绘画工具来塑造和修改地形。要导出基于高度图的地形,必须添加形状代理并附加LumenRT地形规则(如下图所示):PerspectiveFollow这些步骤创建可导出的基于Heightmap的地形:在场景中的任何位置创建一个简单的矩形形状。附上a规则连接到/LumenRT/rules/TerrainMap.cga规则文件并使用名为Terrain的启动规则。规则附加到形状后,您应该在CityEngine检查器中看到以下对话框:填写每个检查器中显示的属性的值。在大多数情况下,您可以从CityEngine地形图层复制这些内容:HeightMapColorMapElevationElevationOffsetXSizeZSizeXOffsetZOffsetOverviewExporting基于网格的TerrainsMesh-based Terrains是CityEngine地形,在导出之前首先转换为多边形网格。这些网格物体像任何其他外部网格物体一样被添加到CityEngine场景中。注意:基于网格的地形在LumenRT内部不可雕刻。当使用Python脚本导出时,必须首先将CityEngine地形转换为地形网格并作为单独导入场景中的物体。为此,请执行以下步骤:将地形分辨率设置为256 x 256.这将有助于创建适合LumenRT内部实时操作的网格.Edit Terrain将地形导出为.obj文件并选中“简化地形网格” “.Export as ObjectRe-将地形导入为静态网格物体。一旦网格在CityEngine内部,它就可以与其他CityEngine形状和LumenRT对象一起导出。导入为静态网格物体地形将转换为地形网格并作为静态模型导入。您现在可以隐藏高度图地形并使用新的基于网格的地形导出到LumenRT.New基于网格的地形

Was this article helpful?

Related Articles