元编程参考文档

纹理场

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
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理场
所属包
图像处理