元编程参考文档

高度图操作

63 个节点

本页内容 63

相加

函数

此节点没有文档说明。

重载 1/2

签名
相加(源: Scalar Field, 值: 数字) -> Scalar Field
ScalarField2D Add(ScalarField2D source, double value)

参数

名称类型默认值说明
源Scalar Field—
值数字—

返回

结果Scalar Field

重载 2/2

签名
相加(A: Scalar Field, B: Scalar Field) -> Scalar Field
ScalarField2D Add(ScalarField2D a, ScalarField2D b)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—

返回

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

相加(就地)

函数

此节点没有文档说明。

重载 1/2

签名
相加(就地)(目标: Scalar Field, 值: 数字)
void AddInPlace(ScalarField2D target, double value)

参数

名称类型默认值说明
目标Scalar Field—
值数字—

重载 2/2

签名
相加(就地)(目标: Scalar Field, 值: Scalar Field)
void AddInPlace(ScalarField2D target, ScalarField2D value)

参数

名称类型默认值说明
目标Scalar Field—
值Scalar Field—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

应用曲线

函数

此节点没有文档说明。

签名
应用曲线 -> Scalar Field
    源: Scalar Field
    曲线: Func<数字, 数字>
ScalarField2D ApplyCurve(
    ScalarField2D source,
    Func<double, double> curve)

参数

名称类型默认值说明
源Scalar Field—
曲线Func<数字, 数字>—

返回

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

应用蒙版

函数

Applies a series of HeightmapMasks to the Heightmap using a specified modification function.

签名
应用蒙版
    源: Scalar Field
    蒙版: Scalar Field 数组
    修改方式: Func<数字, 数字, 数字, 数字, 数字>
void ApplyMasks(
    ScalarField2D source,
    ScalarField2D[] masks,
    Func<double, double, double, double, double> modification)

参数

名称类型默认值说明
源Scalar Field—
蒙版Scalar Field 数组—Array of HeightmapMasks to apply.
修改方式Func<数字, 数字, 数字, 数字, 数字>—Function that modifies the height based on the mask value and coordinates.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

混合

函数

此节点没有文档说明。

签名
混合 -> Scalar Field
    A: Scalar Field
    B: Scalar Field
    方式: Scalar Field Blend Operation
    权重: 数字
ScalarField2D Blend(
    ScalarField2D a,
    ScalarField2D b,
    ScalarField2DBlendOperation mode,
    double weight = 1)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—
方式Scalar Field Blend Operation—
权重数字1

返回

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

混合高度蒙版

函数

Creates a modified copy of a heightmap by applying a grayscale height mask using the specified blend mode.

签名
混合高度蒙版 -> Scalar Field
    源: Scalar Field
    高度蒙版: Pixel Image
    起始高度: 数字
    最大高度: 数字
    方式: TerrainBlendMaskApplicationMode
ScalarField2D BlendHeightMask(
    ScalarField2D source,
    PixelImage heightsMask,
    double startHeight,
    double maxHeight,
    TerrainBlendMaskApplicationMode mode)

参数

名称类型默认值说明
源Scalar Field—The source heightmap to blend.
高度蒙版Pixel Image—The pixel image used as the height mask. Its dimensions must match the source heightmap. The red channel is interpreted as the mask value, where 0 maps to Start Height and 255 maps to Max Height.
起始高度数字—The target height represented by a mask value of 0.
最大高度数字—The target height represented by a mask value of 255.
方式TerrainBlendMaskApplicationMode—The mode used to apply the computed target height to each source height.

返回

结果Scalar Field

备注

This method returns a cloned heightmap and does not modify Source.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

带蒙版混合

函数

此节点没有文档说明。

签名
带蒙版混合 -> Scalar Field
    A: Scalar Field
    B: Scalar Field
    蒙版: Scalar Field
ScalarField2D BlendMasked(
    ScalarField2D a,
    ScalarField2D b,
    ScalarField2D mask)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—
蒙版Scalar Field—

返回

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

计算流量累积图

函数

Calculates routed rainfall accumulation across the terrain.

签名
计算流量累积图 -> Scalar Field
    地形: Scalar Field
    降水量: Scalar Field
    降雨比例: 数字
    汇流方式: ScalarField2DHydrology.FlowRoutingMode
    MFD 指数: 数字
    使用物理比例: 真否
ScalarField2D CalculateFlowAccumulationMap(
    ScalarField2D terrain,
    ScalarField2D precipitation,
    double rainfallScale = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
降水量Scalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
降雨比例数字1Global multiplier for rainfall contribution.
汇流方式ScalarField2DHydrology.FlowRoutingMode多流向Flow routing model.
MFD 指数数字1.1Multiple-flow-direction concentration exponent.
使用物理比例真否TrueIf true, accumulation uses PhysicalScale as world area. If false, accumulation uses cell count.

返回

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

计算高度变化

函数

此节点没有文档说明。

签名
计算高度变化(源: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChange(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

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

计算归一化高度变化

函数

Calculates pixel-space gradient magnitude and normalizes the result to 0-1.
Does not use PhysicalScale.

签名
计算归一化高度变化(源: Scalar Field) -> Scalar Field
ScalarField2D CalculateHeightChangeNormalized(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

结果Scalar Field

备注

This measures height change per heightmap cell, then normalizes by the strongest local gradient in the map.
0 = flat, 1 = steepest point in this map.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

计算基于法线的陡峭度

函数

Calculates normal-derived steepness.
Range: 0 to 1.
0 = flat, 1 = vertical.
Uses PhysicalScale by default.

签名
计算基于法线的陡峭度 -> Scalar Field
    源: Scalar Field
    使用物理比例: 真否
ScalarField2D CalculateNormalBasedSteepness(
    ScalarField2D source,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
源Scalar Field—
使用物理比例真否True

返回

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

计算法线

函数

此节点没有文档说明。

签名
计算法线(源: Scalar Field, 高度比例: 数字) -> Vector3 数组数组
Vector3[][] CalculateNormals(
    ScalarField2D source,
    double heightScale = 1)

参数

名称类型默认值说明
源Scalar Field—
高度比例数字1

返回

结果Vector3 数组数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

计算物理高度变化

函数

此节点没有文档说明。

签名
计算物理高度变化(源: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChange(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

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

计算归一化物理高度变化

函数

Calculates world-space gradient magnitude and normalizes the result to 0-1.
Uses PhysicalScale.

签名
计算归一化物理高度变化(源: Scalar Field) -> Scalar Field
ScalarField2D CalculatePhysicalHeightChangeNormalized(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

结果Scalar Field

备注

This measures height change per real-world horizontal unit, then normalizes by the strongest local physical gradient in the map.
0 = flat, 1 = steepest point in this map.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

计算坡度角(度)

函数

Calculates slope angle in degrees.
Range: 0 to 90.
Uses PhysicalScale by default, so the result represents real terrain angle.

签名
计算坡度角(度) -> Scalar Field
    源: Scalar Field
    使用物理比例: 真否
ScalarField2D CalculateSlopeAngleDegrees(
    ScalarField2D source,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
源Scalar Field—
使用物理比例真否True

返回

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

计算坡度角(弧度)

函数

Calculates slope angle in radians.
Range: 0 to PI / 2.
Uses PhysicalScale by default, so the result represents real terrain angle.

签名
计算坡度角(弧度) -> Scalar Field
    源: Scalar Field
    使用物理比例: 真否
ScalarField2D CalculateSlopeAngleRadians(
    ScalarField2D source,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
源Scalar Field—
使用物理比例真否True

返回

结果Scalar Field

备注

A heightfield slope angle is normally 0 to PI / 2, not 0 to PI.
0 = flat, PI / 2 = vertical.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

计算坡度图

函数

Calculates a derived slope/steepness map from a heightmap.

签名
计算坡度图 -> Scalar Field
    源: Scalar Field
    坡度图类型: Slope Map Type
ScalarField2D CalculateSlopeMap(
    ScalarField2D source,
    ScalarField2D.SlopeMapType slopeMapType = SlopeMapType.NormalBasedSteepness)

参数

名称类型默认值说明
源Scalar Field—Source heightmap.
坡度图类型Slope Map Type基于法线的陡峭度Slope/steepness representation to calculate.

返回

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

计算地形湿度指数图

函数

Calculates raw Topographic Wetness Index from routed flow accumulation and terrain slope.

签名
计算地形湿度指数图 -> Scalar Field
    地形: Scalar Field
    降水量: Scalar Field
    降雨比例: 数字
    汇流方式: ScalarField2DHydrology.FlowRoutingMode
    MFD 指数: 数字
    坡度最小值: 数字
    使用物理比例: 真否
ScalarField2D CalculateTopographicWetnessIndexMap(
    ScalarField2D terrain,
    ScalarField2D precipitation,
    double rainfallScale = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    double slopeEpsilon = 1E-06,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
降水量Scalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
降雨比例数字1Global multiplier for rainfall contribution.
汇流方式ScalarField2DHydrology.FlowRoutingMode多流向Flow routing model.
MFD 指数数字1.1Multiple-flow-direction concentration exponent.
坡度最小值数字1E-06Minimum slope used to avoid division by zero and extreme flat-terrain values.
使用物理比例真否TrueIf true, flow and slope use terrain PhysicalScale.

返回

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

计算湿度蒙版

函数

Creates an artist-friendly 0-1 wetness mask from Topographic Wetness Index percentiles.

签名
计算湿度蒙版 -> Scalar Field
    地形: Scalar Field
    降水量: Scalar Field
    湿度: 数字
    汇流方式: ScalarField2DHydrology.FlowRoutingMode
    MFD 指数: 数字
    坡度最小值: 数字
    干燥百分位: 数字
    湿润百分位: 数字
    对比度: 数字
    使用物理比例: 真否
ScalarField2D CalculateWetnessMask(
    ScalarField2D terrain,
    ScalarField2D precipitation,
    double wetness = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    double slopeEpsilon = 1E-06,
    double dryPercentile = 0.02,
    double wetPercentile = 0.98,
    double contrast = 1,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
降水量Scalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
湿度数字1Overall wetness multiplier.
汇流方式ScalarField2DHydrology.FlowRoutingMode多流向Flow routing model.
MFD 指数数字1.1Multiple-flow-direction concentration exponent.
坡度最小值数字1E-06Minimum slope used in the TWI calculation.
干燥百分位数字0.02TWI percentile mapped to 0.
湿润百分位数字0.98TWI percentile mapped to 1.
对比度数字1Centered contrast applied to the final wetness mask.
使用物理比例真否TrueIf true, flow and slope use terrain PhysicalScale.

返回

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

限制范围

函数

此节点没有文档说明。

签名
限制范围 -> Scalar Field
    源: Scalar Field
    最小值: 数字
    最大值: 数字
ScalarField2D Clamp(
    ScalarField2D source,
    double min = 0,
    double max = 1)

参数

名称类型默认值说明
源Scalar Field—
最小值数字0
最大值数字1

返回

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

限制范围(就地)

函数

此节点没有文档说明。

签名
限制范围(就地)
    高度图: Scalar Field
    最小值: 数字
    最大值: 数字
void ClampInPlace(
    ScalarField2D heightmap,
    double min = 0,
    double max = 1)

参数

名称类型默认值说明
高度图Scalar Field—
最小值数字0
最大值数字1
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

复制高度图

函数

此节点没有文档说明。

签名
复制高度图(源: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

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

合并蒙版

函数

Combines multiple Heightmap masks (value range 0-1) into a single union mask.

签名
合并蒙版(蒙版: Scalar Field 数组) -> Scalar Field
ScalarField2D CombineMasks(ScalarField2D[] masks)

参数

名称类型默认值说明
蒙版Scalar Field 数组—An array of Heightmap masks to combine.

返回

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

对比度

函数

Adjusts height contrast relative to the current elevation range.

签名
对比度 -> Scalar Field
    源: Scalar Field
    对比度: 数字
    枢轴点: 数字
    限制到范围: 真否
ScalarField2D Contrast(
    ScalarField2D source,
    double contrast = 1,
    double pivot = 0.5,
    bool clampToRange = true)

参数

名称类型默认值说明
源Scalar Field—Source heightmap.
对比度数字1Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast.
枢轴点数字0.5Normalized pivot inside the current range. 0.5 means midpoint.
限制到范围真否TrueClamp result back to the original elevation range.

返回

结果Scalar Field

备注

Preserves the original min/max when Clamp To Range == true. With Clamp To Range == false, it can overshoot beyond the original field range, which may be useful for procedural amplification before a later HeightmapOperations.Normalize, HeightmapOperations.Clamp, or blend step.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

对比度(就地)

函数

Adjusts height contrast relative to the current elevation range.

签名
对比度(就地)
    高度图: Scalar Field
    对比度: 数字
    枢轴点: 数字
    限制到范围: 真否
void ContrastInPlace(
    ScalarField2D heightmap,
    double contrast = 1,
    double pivot = 0.5,
    bool clampToRange = true)

参数

名称类型默认值说明
高度图Scalar Field—Target heightmap.
对比度数字1Contrast factor. 0 flattens to pivot, 1 is unchanged, values greater than 1 increase contrast.
枢轴点数字0.5Normalized pivot inside the current range. 0.5 means midpoint.
限制到范围真否TrueClamp result back to the original elevation range.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

创建森林蒙版

函数

Creates a forest suitability mask.
Selects non-water terrain with acceptable slope and enough local flatness for larger vegetation.

签名
创建森林蒙版 -> Scalar Field
    地形: Scalar Field
    水域蒙版: Scalar Field
    排除水域: 真否
    最大坡度(度): 数字
    坡度衰减(度): 数字
    平坦半径: 整数
    最大局部起伏: 数字
    局部起伏衰减: 数字
    簇蒙版: Scalar Field
    簇强度: 数字
    簇半径: 整数
    簇对比度: 数字
    使用物理单位: 真否
    已归一化: 真否
    离水退缩距离: 数字
ScalarField2D CreateForestMask(
    ScalarField2D terrain,
    ScalarField2D waterMask,
    bool excludeWater = true,
    double maxSlopeDegrees = 32,
    double slopeFalloffDegrees = 12,
    int flatRadius = 4,
    double maxLocalRelief = 0.04,
    double localReliefFalloff = 0.06,
    ScalarField2D clusterMask,
    double clusterStrength = 0.65,
    int clusterRadius = 8,
    double clusterContrast = 1.5,
    bool usePhysicalUnits = true,
    bool isNormalized = true,
    double recessionFromWater = 0)

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
水域蒙版Scalar Field—Optional 0-1 water mask. If null and excludeWater is true, one is generated.
排除水域真否TrueIf true, water areas are suppressed.
最大坡度(度)数字32Slope angle where forest suitability remains fully allowed.
坡度衰减(度)数字12Slope fade range above maxSlopeDegrees.
平坦半径整数4Neighborhood radius in cells used to test local relief.
最大局部起伏数字0.04Maximum local height range considered fully suitable. If isNormalized is true, this is interpreted as 0-1 of the terrain elevation range. Otherwise it is interpreted in terrain height units.
局部起伏衰减数字0.06Fade range above maxLocalRelief. If isNormalized is true, this is interpreted as 0-1 of the terrain elevation range. Otherwise it is interpreted in terrain height units.
簇蒙版Scalar Field—Optional 0-1 modulation mask/noise for clustered forest placement.
簇强度数字0.650 ignores clustering, 1 fully applies cluster suppression.
簇半径整数8Smooth radius used to favor larger connected forest patches.
簇对比度数字1.5Contrast applied to the clustered suitability mask. Values greater than 1 make clusters tighter.
使用物理单位真否TrueUse terrain PhysicalScale for slope, hydrology, and water recession distance calculations.
已归一化真否TrueIf true, local relief thresholds are interpreted as normalized 0-1 terrain elevation range values.
离水退缩距离数字0(Experimental) Distance over which forest fades in away from water. Adds a no/low-forest buffer outside the water. If usePhysicalUnits is true, this is interpreted as world distance. Otherwise it is interpreted as 0-1 of map width. E.g. `0.05` mean 5% of map width when usePhysicalUnits == false, and `30` mean 30 meters/world-units when usePhysicalUnits == true.

返回

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

创建局部起伏蒙版

函数

Creates a terrain flatness mask from local relief.

签名
创建局部起伏蒙版 -> Scalar Field
    地形: Scalar Field
    半径: 整数
    最大局部起伏: 数字
    衰减: 数字
ScalarField2D CreateLocalReliefMask(
    ScalarField2D terrain,
    int radius,
    double maxLocalRelief,
    double falloff)

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
半径整数—Neighborhood radius in cells used to measure local min/max relief.
最大局部起伏数字—Maximum local height range considered fully suitable.
衰减数字—Relief range above maxLocalRelief over which the mask fades to 0.

返回

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

创建径向蒙版

函数

此节点没有文档说明。

签名
创建径向蒙版 -> Scalar Field
    宽度: 整数
    高度: 整数
    中心 X: 数字
    中心 Y: 数字
    半径: 数字
    衰减: 数字
    衰减类型: HeightmapFalloffType
ScalarField2D CreateRadialMask(
    int width,
    int height,
    double centerX = 0.5,
    double centerY = 0.5,
    double radius = 0.85,
    double falloff = 0.15,
    HeightmapFalloffType falloffType = HeightmapFalloffType.SmootherStep)

参数

名称类型默认值说明
宽度整数—
高度整数—
中心 X数字0.5
中心 Y数字0.5
半径数字0.85
衰减数字0.15
衰减类型HeightmapFalloffType更平滑的阶跃

返回

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

创建积雪蒙版

函数

重载 1/2

签名
创建积雪蒙版 -> Scalar Field
    地形: Scalar Field
    雪线: 数字
    积雪量: 数字
    雪线衰减: 数字
    最大坡度(度): 数字
    坡度衰减(度): 数字
    沉降半径: 整数
    沉降迭代次数: 整数
    平滑度: 数字
    使用物理单位: 真否
ScalarField2D CreateSnowMask(
    ScalarField2D terrain,
    double snowLine,
    double snowAmount = 0.08,
    double snowLineFalloff = 0.12,
    double maxSlopeDegrees = 38,
    double slopeFalloffDegrees = 18,
    int settleRadius = 3,
    int settleIterations = 3,
    double smoothing = 0.65,
    bool usePhysicalUnits = true)

Creates a snow coverage mask from elevation, slope retention, and settling.

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
雪线数字—Elevation where snow begins to accumulate.
积雪量数字0.08Maximum snow depth added before settling.
雪线衰减数字0.12Elevation range used to feather snow around the snow line.
最大坡度(度)数字38Slope angle where snow remains fully retained.
坡度衰减(度)数字18Slope fade range above maxSlopeDegrees.
沉降半径整数3Smoothing radius used while settling snow surface.
沉降迭代次数整数3Number of settling passes.
平滑度数字0.65Settling smooth strength.
使用物理单位真否TrueIf true, slope calculation uses terrain PhysicalScale.

返回

结果Scalar Field

重载 2/2

签名
创建积雪蒙版 -> (结果: Scalar Field, 积雪深度: Scalar Field, 雪面海拔: Scalar Field)
    地形: Scalar Field
    雪线: 数字
    积雪量: 数字
    雪线衰减: 数字
    最大坡度(度): 数字
    坡度衰减(度): 数字
    沉降半径: 整数
    沉降迭代次数: 整数
    平滑度: 数字
    使用物理单位: 真否
ScalarField2D CreateSnowMask(
    ScalarField2D terrain,
    out ScalarField2D snowDepth,
    out ScalarField2D snowSurfaceElevation,
    double snowLine,
    double snowAmount = 0.08,
    double snowLineFalloff = 0.12,
    double maxSlopeDegrees = 38,
    double slopeFalloffDegrees = 18,
    int settleRadius = 3,
    int settleIterations = 3,
    double smoothing = 0.65,
    bool usePhysicalUnits = true)

Creates a snow coverage mask and exposes snow depth and final snow surface elevation.

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
雪线数字—Elevation where snow begins to accumulate.
积雪量数字0.08Maximum snow depth added before settling.
雪线衰减数字0.12Elevation range used to feather snow around the snow line.
最大坡度(度)数字38Slope angle where snow remains fully retained.
坡度衰减(度)数字18Slope fade range above maxSlopeDegrees.
沉降半径整数3Smoothing radius used while settling snow surface.
沉降迭代次数整数3Number of settling passes.
平滑度数字0.65Settling smooth strength.
使用物理单位真否TrueIf true, slope calculation uses terrain PhysicalScale.

返回

结果Scalar Field
积雪深度Scalar Field
雪面海拔Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

创建水域蒙版

函数

重载 1/2

签名
创建水域蒙版 -> Scalar Field
    地形: Scalar Field
    降水量: Scalar Field
    河源面积: 数字
    河道全面积: 数字
    降雨比例: 数字
    流量系数: 数字
    汇流方式: ScalarField2DHydrology.FlowRoutingMode
    MFD 指数: 数字
    出口蒙版: Scalar Field
    边界作为出口: 真否
    最小排水坡度: 数字
    出口阈值: 数字
    最小湖深: 数字
    湖泊羽化深度: 数字
    包括河流: 真否
    包括湖泊: 真否
    使用物理单位: 真否
ScalarField2D CreateWaterMask(
    ScalarField2D terrain,
    ScalarField2D precipitation,
    double channelHeadArea = 1024,
    double channelFullArea = 0,
    double rainfallScale = 1,
    double dischargeScalar = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double outletThreshold = 0.5,
    double minimumLakeDepth = 0.001,
    double lakeFeatherDepth = 0.01,
    bool includeRivers = true,
    bool includeLakes = true,
    bool usePhysicalUnits = true)

Creates a combined water mask from routed rivers and filled-depression lakes.

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
降水量Scalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
河源面积数字1024Accumulated contributing area where river selection begins.
河道全面积数字0Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used.
降雨比例数字1Global multiplier for rainfall contribution.
流量系数数字1Multiplier applied to flow accumulation before river selection.
汇流方式ScalarField2DHydrology.FlowRoutingMode多流向Flow routing model.
MFD 指数数字1.1Multiple-flow-direction concentration exponent.
出口蒙版Scalar Field—Optional outlet mask. Values at or above outletThreshold are drainage outlets.
边界作为出口真否TrueIf true, terrain borders are drainage outlets.
最小排水坡度数字1E-05Minimum downhill gradient used when creating the drainable routing surface.
出口阈值数字0.5Outlet mask threshold.
最小湖深数字0.001Minimum depression fill depth required before a lake appears.
湖泊羽化深度数字0.01Depth range over which lake mask ramps from 0 to 1.
包括河流真否TrueIf true, include river contribution.
包括湖泊真否TrueIf true, include lake contribution.
使用物理单位真否TrueIf true, area and slope values use terrain PhysicalScale.

返回

结果Scalar Field

重载 2/2

签名
创建水域蒙版 -> (结果: Scalar Field, 河流蒙版: Scalar Field, 湖泊蒙版: Scalar Field, 水深: Scalar Field, 水面海拔: Scalar Field, 流量累积: Scalar Field)
    地形: Scalar Field
    降水量: Scalar Field
    河源面积: 数字
    河道全面积: 数字
    降雨比例: 数字
    流量系数: 数字
    汇流方式: ScalarField2DHydrology.FlowRoutingMode
    MFD 指数: 数字
    出口蒙版: Scalar Field
    边界作为出口: 真否
    最小排水坡度: 数字
    出口阈值: 数字
    最小湖深: 数字
    湖泊羽化深度: 数字
    包括河流: 真否
    包括湖泊: 真否
    使用物理单位: 真否
ScalarField2D CreateWaterMask(
    ScalarField2D terrain,
    out ScalarField2D riverMask,
    out ScalarField2D lakeMask,
    out ScalarField2D waterDepth,
    out ScalarField2D waterSurfaceElevation,
    out ScalarField2D flowAccumulation,
    ScalarField2D precipitation,
    double channelHeadArea = 1024,
    double channelFullArea = 0,
    double rainfallScale = 1,
    double dischargeScalar = 1,
    ScalarField2DHydrology.FlowRoutingMode routingMode = FlowRoutingMode.MultipleFlowDirection,
    double mfdExponent = 1.1,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double outletThreshold = 0.5,
    double minimumLakeDepth = 0.001,
    double lakeFeatherDepth = 0.01,
    bool includeRivers = true,
    bool includeLakes = true,
    bool usePhysicalUnits = true)

Creates a combined water mask and exposes the derived river, lake, depth, surface, and flow maps.

参数

名称类型默认值说明
地形Scalar Field—Source terrain.
降水量Scalar Field—Optional rainfall/intensity map. Null means uniform rainfall.
河源面积数字1024Accumulated contributing area where river selection begins.
河道全面积数字0Accumulated contributing area where river mask reaches 1. If less than or equal to zero, channelHeadArea * 8 is used.
降雨比例数字1Global multiplier for rainfall contribution.
流量系数数字1Multiplier applied to flow accumulation before river selection.
汇流方式ScalarField2DHydrology.FlowRoutingMode多流向Flow routing model.
MFD 指数数字1.1Multiple-flow-direction concentration exponent.
出口蒙版Scalar Field—Optional outlet mask. Values at or above outletThreshold are drainage outlets.
边界作为出口真否TrueIf true, terrain borders are drainage outlets.
最小排水坡度数字1E-05Minimum downhill gradient used when creating the drainable routing surface.
出口阈值数字0.5Outlet mask threshold.
最小湖深数字0.001Minimum depression fill depth required before a lake appears.
湖泊羽化深度数字0.01Depth range over which lake mask ramps from 0 to 1.
包括河流真否TrueIf true, include river contribution.
包括湖泊真否TrueIf true, include lake contribution.
使用物理单位真否TrueIf true, area and slope values use terrain PhysicalScale.

返回

结果Scalar Field
河流蒙版Scalar Field
湖泊蒙版Scalar Field
水深Scalar Field
水面海拔Scalar Field
流量累积Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

创建水面

函数

Simply mask out a water plane based on specified Water Level.
If Is Normalized, then Water Level is between 0-1.

签名
创建水面 -> Scalar Field
    地形: Scalar Field
    水位: 数字
    已归一化: 真否
ScalarField2D CreateWaterPlane(
    ScalarField2D terrain,
    double waterLevel,
    bool isNormalized)

参数

名称类型默认值说明
地形Scalar Field—
水位数字—
已归一化真否—

返回

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

裁剪

函数

Crops the source scalar field to the specified rectangular region.

签名
裁剪 -> Scalar Field
    源: Scalar Field
    起点 X: 整数
    起点 Y: 整数
    裁剪宽度: 整数
    裁剪高度: 整数
ScalarField2D Crop(
    ScalarField2D source,
    int startX,
    int startY,
    int cropWidth,
    int cropHeight)

参数

名称类型默认值说明
源Scalar Field—Source scalar field.
起点 X整数—Starting x-coordinate / column index.
起点 Y整数—Starting y-coordinate / row index.
裁剪宽度整数—Cropped width / column count.
裁剪高度整数—Cropped height / row count.

返回

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

曲线调整

函数

Applies a normalized level adjustment transfer curve while preserving the current elevation range.

签名
曲线调整 -> Scalar Field
    源: Scalar Field
    曲线: Level Adjustment Curve
    强度: 数字
ScalarField2D CurveAdjustment(
    ScalarField2D source,
    LevelAdjustmentCurve curve,
    double strength = 1)

参数

名称类型默认值说明
源Scalar Field—Source heightmap or mask.
曲线Level Adjustment Curve—Normalized 0..1 transfer curve.
强度数字10 = unchanged, 1 = full curve adjustment.

返回

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

曲线调整(就地)

函数

Applies a normalized level adjustment transfer curve while preserving the current elevation range.

签名
曲线调整(就地)
    高度图: Scalar Field
    曲线: Level Adjustment Curve
    强度: 数字
void CurveAdjustmentInPlace(
    ScalarField2D heightmap,
    LevelAdjustmentCurve curve,
    double strength = 1)

参数

名称类型默认值说明
高度图Scalar Field—Target heightmap or mask.
曲线Level Adjustment Curve—Normalized 0..1 transfer curve.
强度数字10 = unchanged, 1 = full curve adjustment.

备注

Current values are normalized into 0..1 using the current min/max, passed through the curve,
then converted back into the original elevation range.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

相除

函数

此节点没有文档说明。

重载 1/3

签名
相除(源: Scalar Field, 值: 数字) -> Scalar Field
ScalarField2D Divide(ScalarField2D source, double value)

参数

名称类型默认值说明
源Scalar Field—
值数字—

返回

结果Scalar Field

重载 2/3

签名
相除(值: 数字, 源: Scalar Field) -> Scalar Field
ScalarField2D Divide(double value, ScalarField2D source)

参数

名称类型默认值说明
值数字—
源Scalar Field—

返回

结果Scalar Field

重载 3/3

签名
相除(A: Scalar Field, B: Scalar Field) -> Scalar Field
ScalarField2D Divide(ScalarField2D a, ScalarField2D b)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—

返回

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

相除(就地)

函数

此节点没有文档说明。

重载 1/2

签名
相除(就地)(目标: Scalar Field, 值: 数字)
void DivideInPlace(ScalarField2D target, double value)

参数

名称类型默认值说明
目标Scalar Field—
值数字—

重载 2/2

签名
相除(就地)(目标: Scalar Field, 值: Scalar Field)
void DivideInPlace(ScalarField2D target, ScalarField2D value)

参数

名称类型默认值说明
目标Scalar Field—
值Scalar Field—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

均衡化

函数

Redistributes values by percentile rank while preserving the current elevation range.

签名
均衡化(源: Scalar Field, 均衡化程度: 数字) -> Scalar Field
ScalarField2D Equalize(
    ScalarField2D source,
    double equalization = 1)

参数

名称类型默认值说明
源Scalar Field—Source heightmap or mask.
均衡化程度数字10 = unchanged, 1 = fully equalized.

返回

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

均衡化(就地)

函数

Redistributes values by percentile rank while preserving the current elevation range.

签名
均衡化(就地)(高度图: Scalar Field, 均衡化程度: 数字)
void EqualizeInPlace(
    ScalarField2D heightmap,
    double equalization = 1)

参数

名称类型默认值说明
高度图Scalar Field—Target heightmap or mask.
均衡化程度数字10 = unchanged, 1 = fully equalized.

备注

Unlike Normalize, this changes the value distribution. Values are remapped by sorted rank/CDF, so common ranges are compressed and rare ranges are expanded.
Duplicate values are kept identical by assigning the whole equal-value group the same rank.
For realistic terrain, use Equalize(..., 0.15d..0.35d) on actual heightmaps, but 0.7d..1d on masks.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

填充(就地)

函数

此节点没有文档说明。

签名
填充(就地)(高度图: Scalar Field, 值: 数字)
void FillInPlace(ScalarField2D heightmap, double value)

参数

名称类型默认值说明
高度图Scalar Field—
值数字—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

按高度筛选

函数

重载 1/2

签名
按高度筛选 -> Scalar Field
    高度图: Scalar Field
    规则: Height Filter Rule
    值: 数字
    渐变: 数字
ScalarField2D FilterByHeight(
    ScalarField2D heightMap,
    ScalarField2D.HeightFilterRule rule,
    double value,
    double fade = 0)

Filters the heightmap based on a minimum or maximum height rule with an optional fade.

参数

名称类型默认值说明
高度图Scalar Field—
规则Height Filter Rule—Min or Max.
值数字—The height value.
渐变数字0Optional fade distance.

返回

结果Scalar Field

重载 2/2

签名
按高度筛选 -> Scalar Field
    高度图: Scalar Field
    最小高度: 数字
    最大高度: 数字
    渐变: 数字
ScalarField2D FilterByHeight(
    ScalarField2D heightMap,
    double minHeight,
    double maxHeight,
    double fade = 0)

Filters the heightmap based on a height range with an optional fade.

参数

名称类型默认值说明
高度图Scalar Field—
最小高度数字—Minimum height value.
最大高度数字—Maximum height value.
渐变数字0Optional fade distance.

返回

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

按坡度筛选

函数

重载 1/2

签名
按坡度筛选 -> Scalar Field
    高度图: Scalar Field
    最小坡度: 数字
    最大坡度: 数字
    渐变: 数字
ScalarField2D FilterBySlope(
    ScalarField2D heightMap,
    double minSlope,
    double maxSlope,
    double fade = 0)

Filters the heightmap based on slope range with an optional fade.
Filters by real-world terrain slope angle.
0° = flat
90° = vertical

参数

名称类型默认值说明
高度图Scalar Field—Source terrain.
最小坡度数字—Minimum slope in degrees.
最大坡度数字—Maximum slope in degrees.
渐变数字0Optional fade distance (in degrees).

返回

结果Scalar Field

备注

Filter slope angle in degrees.
Per HeightmapOperations.CalculateSlopeAngleDegrees

重载 2/2

签名
按坡度筛选 -> Scalar Field
    源: Scalar Field
    坡度类型: Slope Map Type
    最小坡度: 数字
    最大坡度: 数字
    衰减: 数字
ScalarField2D FilterBySlope(
    ScalarField2D source,
    ScalarField2D.SlopeMapType slopeType,
    double minSlope = 0,
    double maxSlope = 1,
    double falloff = 0)

此节点没有文档说明。

参数

名称类型默认值说明
源Scalar Field—
坡度类型Slope Map Type—
最小坡度数字0
最大坡度数字1
衰减数字0

返回

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

按值筛选

函数

此节点没有文档说明。

签名
按值筛选 -> Scalar Field
    源: Scalar Field
    最小值: 数字
    最大值: 数字
    衰减: 数字
ScalarField2D FilterByValue(
    ScalarField2D source,
    double minValue,
    double maxValue,
    double falloff = 0)

参数

名称类型默认值说明
源Scalar Field—
最小值数字—
最大值数字—
衰减数字0The `falloff` parameter softens the mask edges outside the [minValue, maxValue] range

返回

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

用 1 减

函数

Invert by subtracting from 1.

签名
用 1 减(源: Scalar Field) -> Scalar Field
ScalarField2D Invert(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

结果Scalar Field

备注

Typically this is only used when range if normalized between 0-1, but may be occassionally useful otherwise.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

反转范围

函数

此节点没有文档说明。

签名
反转范围(源: Scalar Field) -> Scalar Field
ScalarField2D InvertRange(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

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

生成排水

函数

Modifies terrain in place so non-outlet cells can drain toward an outlet.

签名
生成排水 -> Scalar Field
    源: Scalar Field
    出口蒙版: Scalar Field
    边界作为出口: 真否
    最小排水坡度: 数字
    强度: 数字
    出口阈值: 数字
    使用物理比例: 真否
ScalarField2D MakeDrainage(
    ScalarField2D source,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double strength = 1,
    double outletThreshold = 0.5,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
源Scalar Field—Source terrain to generate from.
出口蒙版Scalar Field—Optional outlet mask. Values at or above outletThreshold are drainage targets.
边界作为出口真否TrueIf true, terrain borders are drainage targets.
最小排水坡度数字1E-05Minimum downhill gradient in height units per horizontal unit.
强度数字1Blend from original terrain to corrected drainage terrain. 1 applies the full correction.
出口阈值数字0.5Outlet mask threshold.
使用物理比例真否TrueIf true, minimumDrainageSlope is interpreted per PhysicalScale world unit.

返回

结果Scalar Field
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

生成排水(就地)

函数

Modifies terrain in place so non-outlet cells can drain toward an outlet.

签名
生成排水(就地)
    目标: Scalar Field
    出口蒙版: Scalar Field
    边界作为出口: 真否
    最小排水坡度: 数字
    强度: 数字
    出口阈值: 数字
    使用物理比例: 真否
void MakeDrainageInPlace(
    ScalarField2D target,
    ScalarField2D outletMask,
    bool useBordersAsOutlets = true,
    double minimumDrainageSlope = 1E-05,
    double strength = 1,
    double outletThreshold = 0.5,
    bool usePhysicalScale = true)

参数

名称类型默认值说明
目标Scalar Field—Target terrain to modify.
出口蒙版Scalar Field—Optional outlet mask. Values at or above outletThreshold are drainage targets.
边界作为出口真否TrueIf true, terrain borders are drainage targets.
最小排水坡度数字1E-05Minimum downhill gradient in height units per horizontal unit.
强度数字1Blend from original terrain to corrected drainage terrain. 1 applies the full correction.
出口阈值数字0.5Outlet mask threshold.
使用物理比例真否TrueIf true, minimumDrainageSlope is interpreted per PhysicalScale world unit.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

生成梯田

函数

Creates a terraced copy while preserving the source elevation range.

签名
生成梯田 -> Scalar Field
    源: Scalar Field
    梯田层数: 整数
    强度: 数字
    方法: HeightmapOperations.TerraceMethod
    梯田形状: 数字
    分层方式: HeightmapOperations.TerraceLayerMode
    层偏置: 数字
    蒙版: Scalar Field
    梯田调制: Scalar Field
    调制强度: 数字
ScalarField2D MakeTerrace(
    ScalarField2D source,
    int terraceCount = 8,
    double strength = 1,
    HeightmapOperations.TerraceMethod method = TerraceMethod.Sharp,
    double terraceShape = 0.75,
    HeightmapOperations.TerraceLayerMode layerMode = TerraceLayerMode.Uniform,
    double layerBias = 0,
    ScalarField2D mask,
    ScalarField2D terraceModulation,
    double modulationStrength = 0)

参数

名称类型默认值说明
源Scalar Field—
梯田层数整数8
强度数字1
方法HeightmapOperations.TerraceMethod锐利
梯田形状数字0.75
分层方式HeightmapOperations.TerraceLayerMode均匀
层偏置数字0
蒙版Scalar Field—
梯田调制Scalar Field—
调制强度数字0

返回

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

生成梯田(就地)

函数

Applies terrace shaping in place while preserving the current elevation range.

签名
生成梯田(就地)
    目标: Scalar Field
    梯田层数: 整数
    强度: 数字
    方法: HeightmapOperations.TerraceMethod
    梯田形状: 数字
    分层方式: HeightmapOperations.TerraceLayerMode
    层偏置: 数字
    蒙版: Scalar Field
    梯田调制: Scalar Field
    调制强度: 数字
void MakeTerraceInPlace(
    ScalarField2D target,
    int terraceCount = 8,
    double strength = 1,
    HeightmapOperations.TerraceMethod method = TerraceMethod.Sharp,
    double terraceShape = 0.75,
    HeightmapOperations.TerraceLayerMode layerMode = TerraceLayerMode.Uniform,
    double layerBias = 0,
    ScalarField2D mask,
    ScalarField2D terraceModulation,
    double modulationStrength = 0)

参数

名称类型默认值说明
目标Scalar Field—Target heightmap.
梯田层数整数8Number of terrace levels.
强度数字10 = unchanged, 1 = fully terraced.
方法HeightmapOperations.TerraceMethod锐利Sharp concentrates the riser near the top of each terrace band; Smooth centers and softens the riser.
梯田形状数字0.750 = soft/continuous, 1 = broad flats with narrow risers.
分层方式HeightmapOperations.TerraceLayerMode均匀Controls non-uniform vertical terrace spacing.
层偏置数字00 = uniform spacing, 1 = strongest layer distribution bias.
蒙版Scalar Field—Optional 0-1 mask controlling local effect strength.
梯田调制Scalar Field—Optional 0-1 modulation map shifting terrace bands locally.
调制强度数字0Terrace-band phase shift strength. 1 shifts up to half a terrace band.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

相乘

函数

此节点没有文档说明。

重载 1/2

签名
相乘(源: Scalar Field, 值: 数字) -> Scalar Field
ScalarField2D Multiply(ScalarField2D source, double value)

参数

名称类型默认值说明
源Scalar Field—
值数字—

返回

结果Scalar Field

重载 2/2

签名
相乘(A: Scalar Field, B: Scalar Field) -> Scalar Field
ScalarField2D Multiply(ScalarField2D a, ScalarField2D b)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—

返回

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

相乘(就地)

函数

此节点没有文档说明。

重载 1/2

签名
相乘(就地)(目标: Scalar Field, 蒙版: Scalar Field)
void MultiplyInPlace(ScalarField2D target, ScalarField2D mask)

参数

名称类型默认值说明
目标Scalar Field—
蒙版Scalar Field—

重载 2/2

签名
相乘(就地)(目标: Scalar Field, 值: 数字)
void MultiplyInPlace(ScalarField2D target, double value)

参数

名称类型默认值说明
目标Scalar Field—
值数字—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

取反

函数

Negates all values.

签名
取反(源: Scalar Field) -> Scalar Field
ScalarField2D Negate(ScalarField2D source)

参数

名称类型默认值说明
源Scalar Field—

返回

结果Scalar Field

备注

Use with care, depending on context the result may not make sense.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

归一化

函数

此节点没有文档说明。

签名
归一化 -> Scalar Field
    源: Scalar Field
    新最小值: 数字
    新最大值: 数字
ScalarField2D Normalize(
    ScalarField2D source,
    double newMin = 0,
    double newMax = 1)

参数

名称类型默认值说明
源Scalar Field—
新最小值数字0
新最大值数字1

返回

结果Scalar Field

备注

Can also be used to "rescale" height range.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

归一化(就地)

函数

Rescale entire height field to fit in height range.

签名
归一化(就地)
    高度图: Scalar Field
    新最小值: 数字
    新最大值: 数字
void NormalizeInPlace(
    ScalarField2D heightmap,
    double newMin = 0,
    double newMax = 1)

参数

名称类型默认值说明
高度图Scalar Field—
新最小值数字0
新最大值数字1
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

幂运算

函数

此节点没有文档说明。

签名
幂运算(源: Scalar Field, 指数: 数字) -> Scalar Field
ScalarField2D Power(ScalarField2D source, double exponent)

参数

名称类型默认值说明
源Scalar Field—
指数数字—

返回

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

替换(就地)

函数

Replace data from flattened array.

重载 1/2

签名
替换(就地)(高度图: Scalar Field, 低精度数据: 低精度数字数组)
void ReplaceInPlace(ScalarField2D heightmap, float[] ldData)

参数

名称类型默认值说明
高度图Scalar Field—
低精度数据低精度数字数组—

重载 2/2

签名
替换(就地)(高度图: Scalar Field, 高精度数据: 数字数组)
void ReplaceInPlace(ScalarField2D heightmap, double[] hdData)

参数

名称类型默认值说明
高度图Scalar Field—
高精度数据数字数组—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

调整大小

函数

Resizes the source scalar field to the specified dimensions.

签名
调整大小 -> Scalar Field
    源: Scalar Field
    新宽度: 整数
    新高度: 整数
    插值方式: ScalarField2D.HeightmapResizeInterpolation
    保持海拔范围: 真否
    物理比例: 数字
ScalarField2D Resize(
    ScalarField2D source,
    int newWidth,
    int newHeight,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false,
    double physicalScale = 1)

参数

名称类型默认值说明
源Scalar Field—Source scalar field.
新宽度整数—New width / column count.
新高度整数—New height / row count.
插值方式ScalarField2D.HeightmapResizeInterpolation双线性Interpolation method.
保持海拔范围真否FalseRescales result so original min/max elevation remains unchanged.
物理比例数字1Sets the new physical scale.

返回

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

平滑

函数

Useful on low-resolution imports.

签名
平滑(源: Scalar Field, 半径: 整数, 强度: 数字) -> Scalar Field
ScalarField2D Smooth(
    ScalarField2D source,
    int radius = 1,
    double strength = 1)

参数

名称类型默认值说明
源Scalar Field—
半径整数1
强度数字1

返回

结果Scalar Field

备注

Another technique is to add new fbm noise on top of imported.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
高度图操作
所属包
程序化生成

细分

函数

Creates a more densely subdivided scalar field while preserving its overall physical dimensions.

签名
细分 -> Scalar Field
    源: Scalar Field
    系数: 整数
    插值方式: ScalarField2D.HeightmapResizeInterpolation
    保持海拔范围: 真否
ScalarField2D Subdivide(
    ScalarField2D source,
    int factor = 2,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false)

参数

名称类型默认值说明
源Scalar Field—Source scalar field.
系数整数2Number of cells created along each axis for every existing cell.
插值方式ScalarField2D.HeightmapResizeInterpolation双线性Interpolation method.
保持海拔范围真否FalseRescales the result so the original minimum and maximum elevations remain unchanged.

返回

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

细分(就地)

函数

Subdivides the target scalar field in place while preserving its overall physical dimensions.

签名
细分(就地)
    目标: Scalar Field
    系数: 整数
    插值方式: ScalarField2D.HeightmapResizeInterpolation
    保持海拔范围: 真否
void SubdivideInPlace(
    ScalarField2D target,
    int factor = 2,
    ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
    bool preserveElevationRange = false)

参数

名称类型默认值说明
目标Scalar Field—
系数整数2
插值方式ScalarField2D.HeightmapResizeInterpolation双线性
保持海拔范围真否False
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

相减

函数

此节点没有文档说明。

重载 1/3

签名
相减(源: Scalar Field, 值: 数字) -> Scalar Field
ScalarField2D Subtract(ScalarField2D source, double value)

参数

名称类型默认值说明
源Scalar Field—
值数字—

返回

结果Scalar Field

重载 2/3

签名
相减(值: 数字, 源: Scalar Field) -> Scalar Field
ScalarField2D Subtract(double value, ScalarField2D source)

参数

名称类型默认值说明
值数字—
源Scalar Field—

返回

结果Scalar Field

重载 3/3

签名
相减(A: Scalar Field, B: Scalar Field) -> Scalar Field
ScalarField2D Subtract(ScalarField2D a, ScalarField2D b)

参数

名称类型默认值说明
AScalar Field—
BScalar Field—

返回

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

相减(就地)

函数

此节点没有文档说明。

重载 1/2

签名
相减(就地)(目标: Scalar Field, 值: 数字)
void SubtractInPlace(ScalarField2D target, double value)

参数

名称类型默认值说明
目标Scalar Field—
值数字—

重载 2/2

签名
相减(就地)(目标: Scalar Field, 值: Scalar Field)
void SubtractInPlace(ScalarField2D target, ScalarField2D value)

参数

名称类型默认值说明
目标Scalar Field—
值Scalar Field—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
高度图操作
所属包
程序化生成

梯田化

函数

此节点没有文档说明。

签名
梯田化 -> Scalar Field
    源: Scalar Field
    梯田层数: 整数
    强度: 数字
ScalarField2D Terrace(
    ScalarField2D source,
    int terraceCount,
    double strength = 1)

参数

名称类型默认值说明
源Scalar Field—
梯田层数整数—
强度数字1

返回

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

阈值化

函数

Creates a binary mask by converting values below the threshold to 0 and values at or above the threshold to 1.

签名
阈值化(水场: Scalar Field, 阈值: 数字) -> Scalar Field
ScalarField2D Threshold(
    ScalarField2D waterField,
    double threshold)

参数

名称类型默认值说明
水场Scalar Field—The source scalar field containing mask values.
阈值数字—The inclusive threshold used to classify values as 1.

返回

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