標量場
61 個節點
本頁內容 61
物理比例
函數Meters per unit cell.
This applies only to width and "height" of the heightmap grid, not physical height.
物理比例(Scalar Field: Scalar Field) -> 數字
double PhysicalScale(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
備註
Recommended range for large scale terrain work: 1m/px to 10m/px.
As a reference, a 2K heightmap representing 4km square landscape should use a ScalarField2D.PhysicalScale of 2, aka. 2 meters per unit cell.
Use lower value (e.g. 0.5) if we wish to represent dense details on smaller regions.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
標量場
函數過載 1/2
標量場(寬度: 整數, 高度: 整數) -> Scalar Field
ScalarField2D ScalarField2D(int width, int height)
Initializes a new instance of the Heightmap class with the specified dimensions.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | The width (number of columns) of the heightmap. |
| 高度 | 整數 | — | The height (number of rows) of the heightmap. |
返回
| 標量場 | Scalar Field |
過載 2/2
標量場(初始資料: 數字陣列陣列) -> Scalar Field
ScalarField2D ScalarField2D(double[][] initialData)
Initializes a new instance of the Heightmap class with the specified data.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 初始資料 | 數字陣列陣列 | — | A jagged array of doubles representing the heightmap data. |
返回
| 標量場 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
相加
函數Adds another heightmap to this heightmap, element-wise.
相加(Scalar Field: Scalar Field, 另一個: Scalar Field)
void Add(ScalarField2D Scalar Field, ScalarField2D other)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 另一個 | Scalar Field | — | The other heightmap to add. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
應用
函數Applies a custom transformation function to each height value in the heightmap.
過載 1/2
應用(Scalar Field: Scalar Field, 變換: Func<數字, 數字>)
void Apply(
ScalarField2D Scalar Field,
Func<double, double> transform)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 變換 | Func<數字, 數字> | — | The function to apply to each height value. |
過載 2/2
應用
Scalar Field: Scalar Field
變換: Func<整數, 整數, 數字, 數字>void Apply(
ScalarField2D Scalar Field,
Func<int, int, double, double> transform)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 變換 | Func<整數, 整數, 數字, 數字> | — | The function to apply to each height value. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
複製標量場
函數Clones the heightmap, creating a deep copy.
複製標量場(Scalar Field: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
建立範本
函數Creates a heightmap with same dimensions and attributes but initialized with fresh empty data.
建立範本 -> Scalar Field
Scalar Field: Scalar Field
新用途: 文字ScalarField2D CreateTemplate(
ScalarField2D Scalar Field,
string newUsage)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新用途 | 文字 | — |
返回
| 結果 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
裁剪
函數Crops the heightmap to the specified rectangular region.
裁剪 -> Scalar Field
Scalar Field: Scalar Field
起點 X: 整數
起點 Y: 整數
裁剪寬度: 整數
裁剪高度: 整數ScalarField2D Crop(
ScalarField2D Scalar Field,
int startX,
int startY,
int cropWidth,
int cropHeight)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 起點 X | 整數 | — | The starting x-coordinate (column index). |
| 起點 Y | 整數 | — | The starting y-coordinate (row index). |
| 裁剪寬度 | 整數 | — | The width of the cropped region. |
| 裁剪高度 | 整數 | — | The height of the cropped region. |
返回
| 結果 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
侵蝕筆刷
函數過載 1/2
侵蝕筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Simple erosion
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | |
| 中心 Y | 整數 | — | |
| 半徑 | 整數 | — | |
| 衰減 | 數字 | — | |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 |
過載 2/2
侵蝕筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
迭代次數: 整數
休止角: 數字
侵蝕係數: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
int iterations,
double talusAngle,
double erosionFactor,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Applies thermal erosion within a brush area.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | The x-coordinate of the brush center. |
| 中心 Y | 整數 | — | The y-coordinate of the brush center. |
| 半徑 | 整數 | — | The radius of the brush. |
| 衰減 | 數字 | — | The fall-off parameter (0 to 1). |
| 迭代次數 | 整數 | — | The number of erosion iterations to perform. |
| 休止角 | 數字 | — | The maximum stable slope (in height units). |
| 侵蝕係數 | 數字 | — | Controls how much material moves per iteration (0 to 1). |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 | The shape of the brush ("circle" or "rectangle"). |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
壓平筆刷
函數Flattens the terrain within a brush area to a target height.
壓平筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
目標高度: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid FlattenBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double targetHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | The x-coordinate of the brush center. |
| 中心 Y | 整數 | — | The y-coordinate of the brush center. |
| 半徑 | 整數 | — | The radius of the brush. |
| 衰減 | 數字 | — | The fall-off parameter (0 to 1). |
| 目標高度 | 數字 | — | The target height to flatten to. |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 | The shape of the brush ("circle" or "rectangle"). |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
列數
函數Gets the width of the heightmap (number of columns).
列數(Scalar Field: Scalar Field) -> 整數
int Columns(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得資料
函數Row-major: height (y), width (x).
取得資料(Scalar Field: Scalar Field) -> 數字陣列陣列
double[][] Data(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字陣列陣列 |
備註
Every read of the values goes through here, the field's own members' included, so a field whose values are kept elsewhere - on the graphics card, where a GPU kernel left them (round 26) - brings them here the first time anything reads it, and from then on is an ordinary field.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得高程
函數此節點沒有文件說明。
取得高程(Scalar Field: Scalar Field) -> ScalarField2D.ElevationRange
ScalarField2D.ElevationRange Elevations(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | ScalarField2D.ElevationRange |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
是否已歸一化
函數Gets whether all values in this scalar field are valid normalized values in the inclusive 0..1 range.
是否已歸一化(Scalar Field: Scalar Field) -> 真否
bool IsNormalized(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 真否 |
備註
This does not require the field minimum to be exactly 0 or the maximum to be exactly 1.
A constant mask value such as 0.5 is considered normalized because it is already directly usable as opacity.
Non-finite values are never considered normalized.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
是否為正方形
函數Occassionally useful due to output engine requirements - some usage scenarios require square maps.
是否為正方形(Scalar Field: Scalar Field) -> 真否
bool IsSquare(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
值
函數Gets or sets the height value at the specified (x, y) coordinate.
值(Scalar Field: Scalar Field, X: 整數, Y: 整數) -> 數字
double Item(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
行數
函數Gets the height of the heightmap (number of rows).
行數(Scalar Field: Scalar Field) -> 整數
int Rows(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
用途
函數An indicator what this heightmap is used for.
Some valid values: Height, Mask, Slope/Steepness, Wetness, etc.
用途(Scalar Field: Scalar Field) -> 文字
string Usage(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 文字 |
備註
Currently only for display purpose; No functional distinction.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得世界深度
函數此節點沒有文件說明。
取得世界深度(Scalar Field: Scalar Field) -> 數字
double WorldDepth(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得世界寬度
函數此節點沒有文件說明。
取得世界寬度(Scalar Field: Scalar Field) -> 數字
double WorldWidth(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得角度(度)
函數Calculates the slope angle in degrees based on the gradient at a given point.
取得角度(度) -> 數字
Scalar Field: Scalar Field
X: 整數
Y: 整數double GetAngleDegree(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得平均高度
函數Gets the average height value of the heightmap.
取得平均高度(Scalar Field: Scalar Field) -> 數字
double GetAverageHeight(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得顏色
函數此節點沒有文件說明。
取得顏色(Scalar Field: Scalar Field, X: 整數, Y: 整數) -> 顏色
ColorElement GetColor(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — |
返回
| 結果 | 顏色 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得陣列形式的資料
函數Gets a copy of data.
取得陣列形式的資料(Scalar Field: Scalar Field) -> 數字陣列陣列
double[][] GetDataAsArrays(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字陣列陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得陣列形式的資料(低精度)
函數Gets a copy of data in floats.
取得陣列形式的資料(低精度)(Scalar Field: Scalar Field) -> 低精度數字陣列陣列
float[][] GetDataAsArraysLD(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 低精度數字陣列陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得浮點值
函數This is very slow!
取得浮點值 -> 低精度數字
Scalar Field: Scalar Field
X: 整數
Y: 整數float GetFloatValue(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — |
返回
| 結果 | 低精度數字 |
備註
Currently this is very slow, e.g. when used with `PixelImageSampling.GetGrayClamped` on `ImageFilter.DirectionalGradientSmudge`. It's recommended to conver the Topology.ScalarField2D to a grayscale image first.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得梯度
函數Gets the gradient (partial derivatives) at the specified (x, y) coordinate.
取得梯度 -> (數字, 數字)
Scalar Field: Scalar Field
X: 整數
Y: 整數
使用物理比例: 真否(double, double) GetGradient(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale = true)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
| 使用物理比例 | 真否 | True |
返回
| 結果 | (數字, 數字) |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得梯度大小
函數此節點沒有文件說明。
取得梯度大小 -> 數字
Scalar Field: Scalar Field
X: 整數
Y: 整數
使用物理比例: 真否double GetGradientMagnitude(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — | |
| 使用物理比例 | 真否 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得灰度位元組
函數此節點沒有文件說明。
取得灰度位元組 -> 位元組
Scalar Field: Scalar Field
X: 整數
Y: 整數byte GetGrayByte(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — |
返回
| 結果 | 位元組 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得高度變化
函數此節點沒有文件說明。
取得高度變化 -> 數字
Scalar Field: Scalar Field
X: 整數
Y: 整數double GetHeightChange(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得最大高度
函數Gets the maximum height value in the heightmap.
取得最大高度(Scalar Field: Scalar Field) -> 數字
double GetMaxHeight(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
備註
Consider using ScalarField2D.Elevations
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得最小高度
函數Gets the minimum height value in the heightmap.
取得最小高度(Scalar Field: Scalar Field) -> 數字
double GetMinHeight(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字 |
備註
Consider using ScalarField2D.Elevations
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得法線
函數過載 1/2
取得法線 -> (數字, 數字, 數字)
Scalar Field: Scalar Field
X: 整數
Y: 整數(double, double, double) GetNormal(
ScalarField2D Scalar Field,
int x,
int y)Gets the normal vector at the specified (x, y) coordinate.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
返回
| 結果 | (數字, 數字, 數字) |
過載 2/2
取得法線 -> Vector3dhd
Scalar Field: Scalar Field
點 1: Vector3dhd
點 2: Vector3dhd
點 3: Vector3dhdVector3DHD GetNormal(
ScalarField2D Scalar Field,
Vector3DHD p1,
Vector3DHD p2,
Vector3DHD p3)Computes the normal vector of a triangle defined by three 3D points.
Points should be specified in counter-clockwise order to ensure the normal points outward (right-hand rule).
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 點 1 | Vector3dhd | — | |
| 點 2 | Vector3dhd | — | |
| 點 3 | Vector3dhd | — |
返回
| 結果 | Vector3dhd |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得物理高度變化
函數此節點沒有文件說明。
取得物理高度變化 -> 數字
Scalar Field: Scalar Field
X: 整數
Y: 整數double GetPhysicalHeightChange(
ScalarField2D Scalar Field,
int x,
int y)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | |
| Y | 整數 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得值
函數Gets the height value at the specified (x, y) coordinate.
取得值(Scalar Field: Scalar Field, X: 整數, Y: 整數) -> 數字
double GetValue(ScalarField2D Scalar Field, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得 Z
函數此節點沒有文件說明。
取得 Z -> 低精度數字
Scalar Field: Scalar Field
X: 低精度數字
Y: 低精度數字float GetZ(ScalarField2D Scalar Field, float x, float y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 低精度數字 | — | |
| Y | 低精度數字 | — |
返回
| 結果 | 低精度數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
插值高度
函數Interpolates the height value at the specified (x, y) coordinate using bilinear interpolation.
插值高度(Scalar Field: Scalar Field, X: 數字, Y: 數字) -> 數字
double InterpolateHeight(
ScalarField2D Scalar Field,
double x,
double y)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 數字 | — | The x-coordinate (can be fractional). |
| Y | 數字 | — | The y-coordinate (can be fractional). |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
噪聲筆刷
函數此節點沒有文件說明。
噪聲筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
噪聲振幅: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid NoiseBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double noiseAmplitude,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | |
| 中心 Y | 整數 | — | |
| 半徑 | 整數 | — | |
| 衰減 | 數字 | — | |
| 噪聲振幅 | 數字 | — | |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
就地歸一化並限制範圍
函數Normalizes every value in _heightData in place so the result is between 0.0 and 1.0 (as specified by Max Value).
For data values smaller than zero, it becomes 0.
就地歸一化並限制範圍(Scalar Field: Scalar Field, 最大值: 數字)
void NormalizeInPlaceWithClamp(
ScalarField2D Scalar Field,
double maxValue)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 最大值 | 數字 | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
抬升降低筆刷
函數Raises or lowers the terrain within a brush area.
抬升降低筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
高度增量: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid RaiseLowerBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double deltaHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | The x-coordinate of the brush center. |
| 中心 Y | 整數 | — | The y-coordinate of the brush center. |
| 半徑 | 整數 | — | The radius of the brush. |
| 衰減 | 數字 | — | The fall-off parameter (0 to 1). |
| 高度增量 | 數字 | — | The amount to raise or lower the height. |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 | The shape of the brush ("circle" or "rectangle"). |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
調整大小
函數過載 1/2
調整大小(Scalar Field: Scalar Field, 新寬度: 整數, 新高度: 整數)
void Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight)Resizes the heightmap to the specified dimensions using nearest neighbor scaling.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新寬度 | 整數 | — | The new width (number of columns). |
| 新高度 | 整數 | — | The new height (number of rows). |
過載 2/2
調整大小
Scalar Field: Scalar Field
新寬度: 整數
新高度: 整數
插值方式: ScalarField2D.HeightmapResizeInterpolation
保持海拔範圍: 真否void Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Resizes the heightmap to the specified dimensions.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新寬度 | 整數 | — | The new width (number of columns). |
| 新高度 | 整數 | — | The new height (number of rows). |
| 插值方式 | ScalarField2D.HeightmapResizeInterpolation | 雙線性 | Interpolation method. |
| 保持海拔範圍 | 真否 | False | Prescales result so original min/max elevation remains unchanged. Only neeed as a post to ensure exact min/max elevations, otherwise matters not. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
逆時針旋轉
函數Rotates the heightmap data 90 degrees counterclockwise.
逆時針旋轉(Scalar Field: Scalar Field)
void RotateCCW(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
順時針旋轉
函數Rotates the heightmap data 90 degrees clockwise.
順時針旋轉(Scalar Field: Scalar Field)
void RotateCW(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
雙線性取樣(限制邊界)
函數Bilinearly samples the field using grid coordinates and clamps samples at the outer border.
雙線性取樣(限制邊界) -> 數字
Scalar Field: Scalar Field
X: 數字
Y: 數字double SampleBilinearClamped(
ScalarField2D Scalar Field,
double x,
double y)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 數字 | — | |
| Y | 數字 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
世界座標雙線性取樣(限制邊界)
函數Bilinearly samples the field using physical world coordinates.
Cell values are treated as samples located at cell centres.
世界座標雙線性取樣(限制邊界) -> 數字
Scalar Field: Scalar Field
世界 X: 數字
世界 Y: 數字double SampleWorldBilinearClamped(
ScalarField2D Scalar Field,
double worldX,
double worldY)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 世界 X | 數字 | — | |
| 世界 Y | 數字 | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
縮放高度
函數Scales the heightmap vertically by the specified factor.
縮放高度(Scalar Field: Scalar Field, 縮放: 數字)
void ScaleHeights(ScalarField2D Scalar Field, double scale)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 縮放 | 數字 | — | The scale factor to apply. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
設定值
函數Sets the height value at the specified (x, y) coordinate.
設定值(Scalar Field: Scalar Field, X: 整數, Y: 整數, 值: 數字)
void SetValue(
ScalarField2D Scalar Field,
int x,
int y,
double value)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整數 | — | The x-coordinate (column index). |
| Y | 整數 | — | The y-coordinate (row index). |
| 值 | 數字 | — | The height value to set. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
平滑
函數Smooths the heightmap using a simple averaging filter.
平滑(Scalar Field: Scalar Field)
void Smooth(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
平滑筆刷
函數Applies a smoothing operation within a brush area.
平滑筆刷
Scalar Field: Scalar Field
中心 X: 整數
中心 Y: 整數
半徑: 整數
衰減: 數字
筆刷形狀: ScalarField2D.PaintbrushShapevoid SmoothBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整數 | — | The x-coordinate of the brush center. |
| 中心 Y | 整數 | — | The y-coordinate of the brush center. |
| 半徑 | 整數 | — | The radius of the brush. |
| 衰減 | 數字 | — | The fall-off parameter (0 to 1). |
| 筆刷形狀 | ScalarField2D.PaintbrushShape | 圓形 | The shape of the brush ("Circle" or "Rectangle"). |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
細分
函數Subdivides each heightmap cell into a finer grid while preserving the overall physical dimensions.
細分
Scalar Field: Scalar Field
係數: 整數
插值方式: ScalarField2D.HeightmapResizeInterpolation
保持海拔範圍: 真否void Subdivide(
ScalarField2D Scalar Field,
int factor = 2,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 係數 | 整數 | 2 | Number of cells created along each axis for every existing cell. Must be greater than or equal to 1. |
| 插值方式 | ScalarField2D.HeightmapResizeInterpolation | 雙線性 | Interpolation method used to generate the additional samples. |
| 保持海拔範圍 | 真否 | False | Rescales the result so the original minimum and maximum elevations remain unchanged. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
彙總
函數Returns a technical summary of the heightmap, one parameter per line.
彙總(Scalar Field: Scalar Field) -> 文字
string Summarize(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
轉為平鋪陣列
函數Flattened array.
轉為平鋪陣列(Scalar Field: Scalar Field) -> 數字陣列
double[] ToFlattenArray(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 數字陣列 |
備註
Used for high-performance purposes.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
轉為平鋪陣列(低精度)
函數Flattened array.
轉為平鋪陣列(低精度)(Scalar Field: Scalar Field) -> 低精度數字陣列
float[] ToFlattenArrayLD(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | 低精度數字陣列 |
備註
Used for high-performance purposes.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
轉為像素影像
函數此節點沒有文件說明。
轉為像素影像(Scalar Field: Scalar Field) -> Pixel Image
PixelImage ToPixelImage(ScalarField2D Scalar Field)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
作為顏色資料修改
函數此節點沒有文件說明。
作為顏色資料修改
Scalar Field: Scalar Field
更新函數: Func<顏色陣列陣列, 顏色陣列陣列>void UpdateColorData(
ScalarField2D Scalar Field,
Func<ColorElement[][], ColorElement[][]> updater)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 更新函數 | Func<顏色陣列陣列, 顏色陣列陣列> | — |
備註
Converts the current heightmap into a grayscale image, lets caller-provided code modify that image, then writes the modified grayscale values back into the heightmap as heights.
Per IPixelImageSampler.UpdateColorData.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
建立派生圖
函數此節點沒有文件說明。
建立派生圖(源: Scalar Field, 用途: 文字) -> Scalar Field
ScalarField2D CreateDerivedMap(
ScalarField2D source,
string usage)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 源 | Scalar Field | — | |
| 用途 | 文字 | — |
返回
| 結果 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
從陣列建立
函數此節點沒有文件說明。
從陣列建立 -> Scalar Field
初始資料: 低精度數字陣列陣列
用途: 文字
物理比例: 數字ScalarField2D FromArrays(
float[][] initialData,
string usage = "Height",
double physicalScale = 1)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 初始資料 | 低精度數字陣列陣列 | — | |
| 用途 | 文字 | Height | |
| 物理比例 | 數字 | 1 |
返回
| 結果 | Scalar Field |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
生成生物群系紋理
函數此節點沒有文件說明。
生成生物群系紋理(高度圖: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTexture(ScalarField2D heightmap)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 高度圖 | Scalar Field | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
生成生物群系漸層紋理
函數此節點沒有文件說明。
生成生物群系漸層紋理(高度圖: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTextureGradient(ScalarField2D heightmap)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 高度圖 | Scalar Field | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
取得坡度圖用途標記
函數Returns the canonical usage/term string for a slope map type.
取得坡度圖用途標記(坡度圖型別: Slope Map Type) -> 文字
string GetSlopeMapUsageToken(ScalarField2D.SlopeMapType slopeMapType)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 坡度圖型別 | Slope Map Type | — |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
轉為灰度像素影像
函數此節點沒有文件說明。
轉為灰度像素影像(高度圖: Scalar Field) -> Pixel Image
PixelImage ToGrayscalePixelImage(ScalarField2D heightmap)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 高度圖 | Scalar Field | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成
驗證物理比例
函數此節點沒有文件說明。
驗證物理比例(源: Scalar Field, 使用物理比例: 真否)
void ValidatePhysicalScale(
ScalarField2D source,
bool usePhysicalScale)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 源 | Scalar Field | — | |
| 使用物理比例 | 真否 | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 標量場
- 所屬包
- 程序化生成