元编程参考文档

植被与散布

2 个节点

本页内容 2

散布地形

函数

按顺序把各物种放到地形上:泊松圆盘间距按密度和蒙版筛减,避开对它过陡的坡和水面,并与先放置的物种保持距离。同样的种子放置同样的东西。

签名
散布地形 -> Terrain Population
    地形: Scalar Field
    物种: Population Species 数组
    分析贴图: Terrain Analysis Maps
    种子: 整数
    最大数量: 整数
TerrainPopulation Populate(
    ScalarField2D terrain,
    PopulationSpecies[] species,
    TerrainAnalysisMaps analysis,
    int seed = 1337,
    int maxInstances = 400000)

参数

名称类型默认值说明
地形Scalar Field—Heights in metres, with their metres per cell.
物种Population Species 数组—The species, the first placed first: trees before the rocks that keep out of their way.
分析贴图Terrain Analysis Maps—An erosion's maps and the water, which the species' masks read by name; nothing but a water species stands in the water.
种子整数1337Where the random draws start.
最大数量整数400000The most placed in all.

返回

散布Terrain Population
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
植被与散布
所属包
程序化生成

散布物种

函数

要放置的一类东西,以及放置它的规则。

签名
散布物种 -> Population Species
    模型: Population Model
    间距(米): 数字
    密度: 数字
    蒙版: Terrain Mask
    最大坡度(度): 数字
    最小缩放: 数字
    最大缩放: 数字
    避让距离(米): 数字
    变体数: 整数
    可在水中: 真否
    名称: 文本
PopulationSpecies Species(
    PopulationModel model = PopulationModel.Pine,
    double spacingMetres = 6,
    double density = 1,
    TerrainMask mask,
    double maxSlopeDegrees = 35,
    double minScale = 0.8,
    double maxScale = 1.2,
    double clearanceMetres = 1.5,
    int variants = 4,
    bool inWater = false,
    string name = "")

参数

名称类型默认值说明
模型Population Model松树What it is drawn as.
间距(米)数字6The least distance between two of it, metres.
密度数字1How full the room the spacing leaves is filled where the mask is full: 1 as close as the spacing allows.
蒙版Terrain Mask—Where it grows, from the terrain masks; everywhere when left out.
最大坡度(度)数字35The steepest ground it stands on, degrees.
最小缩放数字0.8The smallest it is drawn, against the model's own size.
最大缩放数字1.2The largest it is drawn.
避让距离(米)数字1.5How far from each of these the species placed after it keep, metres.
变体数整数4How many different shapes of the model are made.
可在水中真否FalseWhether it may stand in water.
名称文本—Its name.

返回

物种Population Species
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
植被与散布
所属包
程序化生成