元編程參考文件

植被與散佈

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
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
植被與散佈
所屬包
程序化生成