元編程參考文件

紋理場

9 個節點

本頁內容 9

倒角

函數

Raises a flat shape into a bevelled one: at the edge it is 0, climbing over the bevel's distance to 1 across its top. The profile sets the bevel's cross-section. How bricks, tiles and panels get their rounded edges.

簽名
倒角 -> Texture
    蒙版: Texture
    距離: 數字
    截面: Bevel Profile
    閾值: 數字
Texture Bevel(
    Texture mask,
    double distance = 12,
    BevelProfile profile = BevelProfile.Round,
    double threshold = 0.5)

參數

名稱型別預設值說明
蒙版Texture—The shape: white is inside.
距離數字12How far in the bevel reaches, in pixels of a 1024-pixel texture.
截面Bevel Profile圓The bevel's cross-section.
閾值數字0.5The value above which the mask counts as inside.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

距離場

函數

How far each pixel is from the nearest white pixel of a mask, measured across the tile's edges: 0 on the shape, rising to 1 at the maximum distance. Grows outlines, glows and spreads.

簽名
距離場(蒙版: Texture, 最大距離: 數字, 閾值: 數字) -> Texture
Texture DistanceField(
    Texture mask,
    double maximumDistance = 32,
    double threshold = 0.5)

參數

名稱型別預設值說明
蒙版Texture—The shape: white (above the threshold) is inside.
最大距離數字32The distance that reads as 1, in pixels of a 1024-pixel texture.
閾值數字0.5The value above which the mask counts as inside.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充

函數

Finds every separate white shape in a mask - each brick, each stone, each tile - so each can be given its own colour, tilt or height. Shapes that run off one edge and back on the other are one shape.

簽名
泛洪填充(蒙版: Texture, 閾值: 數字) -> Flood Fill
FloodFillMap FloodFill(Texture mask, double threshold = 0.5)

參數

名稱型別預設值說明
蒙版Texture—The shapes, white on black.
閾值數字0.5The value above which a pixel belongs to a shape.

返回

結果Flood Fill
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充數量

函數

How many separate shapes a flood fill found.

簽名
泛洪填充數量(填充結果: Flood Fill) -> 整數
int FloodFillCount(FloodFillMap fill)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充轉漸層

函數

A gradient across each shape a flood fill found, each at its own random angle: lifts one side of every brick, stone or plank, so they no longer lie flat in the same plane.

簽名
泛洪填充轉漸層 -> Texture
    填充結果: Flood Fill
    角度: 數字
    角度隨機性: 數字
    隨機種子: 整數
Texture FloodFillToGradient(
    FloodFillMap fill,
    double angle = 0,
    double angleRandomness = 1,
    int seed = 0)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.
角度數字0The gradient's direction in degrees before the randomness.
角度隨機性數字1How far each shape's direction strays, 0 (all the same) to 1 (any direction).
隨機種子整數0Which random angles.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充轉位置

函數

Each shape's centre as a colour: red is how far across, green how far down, so a texture can be sampled once per shape at its centre.

簽名
泛洪填充轉位置(填充結果: Flood Fill) -> Texture
Texture FloodFillToPosition(FloodFillMap fill)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充轉隨機顏色

函數

A random colour for each shape a flood fill found; black between shapes. For telling shapes apart, or as a material ID.

簽名
泛洪填充轉隨機顏色 -> Texture
    填充結果: Flood Fill
    隨機種子: 整數
Texture FloodFillToRandomColor(FloodFillMap fill, int seed = 0)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.
隨機種子整數0Which random colours.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充轉隨機灰度

函數

A random grey for each shape a flood fill found, the same over the whole shape; black between shapes. Per-brick variation of height, colour or roughness.

簽名
泛洪填充轉隨機灰度 -> Texture
    填充結果: Flood Fill
    隨機種子: 整數
Texture FloodFillToRandomGrey(FloodFillMap fill, int seed = 0)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.
隨機種子整數0Which random values.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理

泛洪填充轉尺寸

函數

Each shape's size: the larger side of its bounding box as a share of the texture. Small shapes dark, large ones bright; for treating pebbles and boulders differently.

簽名
泛洪填充轉尺寸(填充結果: Flood Fill) -> Texture
Texture FloodFillToSize(FloodFillMap fill)

參數

名稱型別預設值說明
填充結果Flood Fill—The flood fill.

返回

結果Texture
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理場
所屬包
影像處理