元編程參考文件

高度圖操作

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