The Plants section provides methods for adding individual plants to a scene. Individual plants are placed using the current CityEngine scope attributes of size, position, and tilt rotation. For rotation around the up axis (y-axis), LumenRT automatically randomizes this in order to create more unique looking instances. In general, when placing plants, the only thing you need to worry about is choosing a plant species and a scale. LumenRT will handle the remaining issues in order to place the plant correctly. All of the available plant assets are found in the folder LumenRT/assets/Plants. Individual plant assets are specified by their file name without the extension. For example, the plant in the path LumenRT/assets/Plants/Acer/Acer.obj would be identified by the simple name “Acer”.

Plant Age: Plant age enumerated variables are available to automate how plants are scaled. You can use these enumerated variables in place of the plant scale value. The enumerated values are:

  • BASE = 1.0
  • YOUNG = scale range (0.4 – 0.8)
  • ADULT = scale range (0.8 – 1.5)
  • MATURE = scale range (1.2 – 2.0)
  • GIANT = scale range (1.8 – 3.0)
  • MIX = scale range (0.5 – 2.5)


LumenRT.Plant (“Banana”, LumenRT.ADULT)

Creating Individual Plants: There are two methods available for creating individual plants:

Plant (Plant Name) – creates a plant using the current scope size attributes.

Plant (Plant Name, Scale) – basic plant creation with a scale factor.

string PlantName: The name of the plant.

float Scale: The scale of the plant.


LumenRT.Plant (Acer) – creates an Acer tree using the current shape scope size.

LumenRT.Plant (“Cypress”, 2) – creates a Cypress shrub with a scale of 2X the primary scale.

“植物”部分提供了将单个植物添加到场景的方法。使用当前的大小,位置和倾斜旋转的CityEngine范围属性放置单个植物。为了围绕向上轴(y轴)旋转,LumenRT会自动对其进行随机化,以创建更加独特的外观实例。一般来说,放置植物时,唯一需要担心的是选择植物种类和规模。 LumenRT将处理剩余的问题,以便正确放置工厂。所有可用的工厂资产都可以在LumenRT / assets / Plants文件夹中找到。单个工厂资产由其文件名指定,不带扩展名。例如,路径LumenRT / assets / Plants / Acer / Acer.obj中的工厂将由简单名称“Acer”识别。
BASE = 1.0
YOUNG =比例范围(0.4 – 0.8)
成员=比例范围(0.8 – 1.5)
成熟=比例范围(1.2 – 2.0)
GIANT =比例范围(1.8 – 3.0)
MIX =比例范围(0.5 – 2.5)

工厂(工厂名称) – 使用当前范围大小属性创建工厂。
植物(植物名称,规模) – 具有比例因子的基本植物创建。
string PlantName:工厂的名称。

LumenRT.Plant(Acer) – 使用当前形状范围大小创建Acer树。
LumenRT.Plant(“赛普拉斯”,2) – 创造了一个规模为初级规模2倍的赛普拉斯灌木。

Was this article helpful?

Related Articles