元编程参考文档

地形侵蚀蒙版

6 个节点

本页内容 6

模糊

函数

Gaussian blur with a radius (sigma) in cells, clamped at the borders.

签名
模糊(图: Scalar Field, 标准差(单元格): 数字) -> Scalar Field
ScalarField2D Blur(ScalarField2D map, double sigmaCells = 1)

参数

名称类型默认值说明
图Scalar Field—Map to blur.
标准差(单元格)数字1Gaussian sigma in cells.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成

指数蒙版

函数

Saturating ramp for thicknesses (wear, deposition, debris): 1 − exp(−value / scale), so the mask reaches 0.63 at one scale and 0.95 at three.

签名
指数蒙版 -> Scalar Field
    图: Scalar Field
    尺度(米): 数字
    模糊(单元格): 数字
ScalarField2D ExponentialMask(
    ScalarField2D map,
    double scale = 0.5,
    double blurCells = 0.5)

参数

名称类型默认值说明
图Scalar Field—Raw map, metres.
尺度(米)数字0.5Thickness, metres, at which the mask reaches 0.63.
模糊(单元格)数字0.5Gaussian blur radius (sigma) in cells applied afterwards; 0 for none.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成

线性蒙版

函数

Linear ramp: 0 at or below Low, 1 at or above High.

签名
线性蒙版 -> Scalar Field
    图: Scalar Field
    低值: 数字
    高值: 数字
    模糊(单元格): 数字
ScalarField2D LinearMask(
    ScalarField2D map,
    double low = 0,
    double high = 1,
    double blurCells = 0.5)

参数

名称类型默认值说明
图Scalar Field—Raw map.
低值数字0Value that maps to 0.
高值数字1Value that maps to 1.
模糊(单元格)数字0.5Gaussian blur radius (sigma) in cells applied afterwards; 0 for none.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成

对数蒙版

函数

Logarithmic ramp for quantities spanning orders of magnitude (drainage area, sediment flux): 0 at or below Low, 1 at or above High.

签名
对数蒙版 -> Scalar Field
    图: Scalar Field
    低值: 数字
    高值: 数字
    模糊(单元格): 数字
ScalarField2D LogarithmicMask(
    ScalarField2D map,
    double low = 1000,
    double high = 10000000,
    double blurCells = 0.5)

参数

名称类型默认值说明
图Scalar Field—Raw map with positive values.
低值数字1000Value that maps to 0.
高值数字10000000Value that maps to 1.
模糊(单元格)数字0.5Gaussian blur radius (sigma) in cells applied afterwards; 0 for none.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成

百分位蒙版

函数

Ramp between two percentiles of the map itself. This adapts to the terrain, so the same value can mean different things on different maps; prefer the fixed conversions for anything that must stay consistent.

签名
百分位蒙版 -> Scalar Field
    图: Scalar Field
    低百分位: 数字
    高百分位: 数字
    对数: 真否
    模糊(单元格): 数字
ScalarField2D PercentileMask(
    ScalarField2D map,
    double lowPercentile = 0.02,
    double highPercentile = 0.98,
    bool logarithmic = false,
    double blurCells = 0.5)

参数

名称类型默认值说明
图Scalar Field—Raw map.
低百分位数字0.02Percentile (0..1) that maps to 0.
高百分位数字0.98Percentile (0..1) that maps to 1.
对数真否FalseRamp in log space, for area and flux maps.
模糊(单元格)数字0.5Gaussian blur radius (sigma) in cells applied afterwards; 0 for none.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成

有符号蒙版

函数

Diverging ramp for signed maps (height change): 0.5 at zero, 0 at −Range and 1 at +Range.

签名
有符号蒙版 -> Scalar Field
    图: Scalar Field
    范围: 数字
    模糊(单元格): 数字
ScalarField2D SignedMask(
    ScalarField2D map,
    double range = 10,
    double blurCells = 0.5)

参数

名称类型默认值说明
图Scalar Field—Raw signed map.
范围数字10Magnitude that maps to 0 or 1.
模糊(单元格)数字0.5Gaussian blur radius (sigma) in cells applied afterwards; 0 for none.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
地形侵蚀蒙版
所属包
程序化生成