元编程参考文档

纹理变换

10 个节点

本页内容 10

打散平铺

函数

Breaks up a tiling texture's repetition: a texture several copies across, in which every copy shows the texture moved, turned and scaled at random, blended across the seams so no two copies match and no seam shows. Across a floor or a hillside, where the same stone in the same place every metre gives a tiling texture away, this is what hides it. The result still tiles, but only every Tiles Across copies.

签名
打散平铺 -> Texture
    纹理: Texture
    横向份数: 整数
    接缝混合: 数字
    旋转: 数字
    缩放变化: 数字
    对比度: 数字
    种子: 整数
    尺寸: 整数
Texture BreakUpTiling(
    Texture texture,
    int tilesAcross = 4,
    double blend = 0.3,
    double rotation = 360,
    double scaleVariation = 0,
    double contrast = 0.5,
    int seed = 0,
    int size = 2048)

参数

名称类型默认值说明
纹理Texture—The tiling texture.
横向份数整数4How many copies of the texture the result is across, and how far apart its own repetition is.
接缝混合数字0.3How wide the seams' blend is, as a share of a copy: 0 cuts hard, 1 blends across the whole copy.
旋转数字360How far each copy may turn, in degrees: 0 for a texture with a direction (planks, brushed metal, rain), 360 for one without.
缩放变化数字0How much each copy may grow or shrink, 0 to 0.5.
对比度数字0.5How much the brighter (higher) copy wins where two meet, 0 to 1: high keeps stones whole across a seam, 0 cross-fades.
种子整数0Which random arrangement.
尺寸整数2048The result's width and height in pixels; it holds Tiles Across copies, so each copy gets this divided by Tiles Across.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

直角坐标转极坐标

函数

Wraps a texture round the centre: its left-to-right becomes the angle round, its top-to-bottom the distance out. A row of stripes becomes rings; a gradient becomes a sunburst.

签名
直角坐标转极坐标(纹理: Texture) -> Texture
Texture CartesianToPolar(Texture texture)

参数

名称类型默认值说明
纹理Texture—The texture.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

使其平铺

函数

Makes a texture that does not tile - a photograph - tile, by blending it with two copies of itself, one moved half a tile and one a quarter, each used away from its own seams. The original's seams are its edges, the half copy's a cross through the middle, the quarter copy's a grid between them; no point lies on all three, so every point has a copy with no seam there, and the blend's edges are broken up by noise so they do not show as lines.

签名
使其平铺 -> Texture
    纹理: Texture
    过渡宽度: 数字
    随机种子: 整数
Texture MakeItTile(
    Texture texture,
    double blendWidth = 0.25,
    int seed = 0)

参数

名称类型默认值说明
纹理Texture—The texture.
过渡宽度数字0.25How far from its seams a copy fades in, as a share of the texture: wider hides seams better and shows more doubling.
随机种子整数0Which noise breaks up the fades' edges.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

镜像

函数

Reflects one half of a texture onto the other: symmetric ornaments, or a quick way to hide a seam.

签名
镜像(纹理: Texture, 轴: Mirror Axis, 保留后半: 真否) -> Texture
Texture Mirror(
    Texture texture,
    MirrorAxis axis = MirrorAxis.Horizontal,
    bool keepSecondHalf = false)

参数

名称类型默认值说明
纹理Texture—The texture.
轴Mirror Axis水平Mirror across, down, or both.
保留后半真否FalseKeep the right (or bottom) half and reflect it, rather than the left (or top).

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

偏移

函数

Moves a texture across and down, wrapping round. Half and half shows what was at the corners in the middle, which is where a seam would show.

签名
偏移(纹理: Texture, 横向偏移: 数字, 纵向偏移: 数字) -> Texture
Texture Offset(
    Texture texture,
    double offsetX = 0.5,
    double offsetY = 0.5)

参数

名称类型默认值说明
纹理Texture—The texture.
横向偏移数字0.5Across, as a share of the width.
纵向偏移数字0.5Down, as a share of the height.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

极坐标转直角坐标

函数

Unwraps a texture from round its centre: the angle round becomes left-to-right, the distance out top-to-bottom. Rings become stripes.

签名
极坐标转直角坐标(纹理: Texture) -> Texture
Texture PolarToCartesian(Texture texture)

参数

名称类型默认值说明
纹理Texture—The texture.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

重复

函数

Repeats a texture a whole number of times across and down at the same size, so it tiles finer.

签名
重复(纹理: Texture, 横向数量: 整数, 纵向数量: 整数) -> Texture
Texture Repeat(Texture texture, int countX = 2, int countY = 2)

参数

名称类型默认值说明
纹理Texture—The texture.
横向数量整数2Repeats across.
纵向数量整数2Repeats down.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

调整尺寸

函数

Resamples a texture to a new size: box-filtered when it shrinks, bilinear when it grows.

签名
调整尺寸(纹理: Texture, 尺寸: 整数) -> Texture
Texture Resize(Texture texture, int size = 512)

参数

名称类型默认值说明
纹理Texture—The texture.
尺寸整数512The new width and height in pixels.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

旋转九十度

函数

Turns a texture by quarter turns, exactly, with no resampling.

签名
旋转九十度(纹理: Texture, 四分之一圈数: 整数) -> Texture
Texture Rotate90(Texture texture, int quarterTurns = 1)

参数

名称类型默认值说明
纹理Texture—The texture.
四分之一圈数整数1Quarter turns clockwise.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理

变换

函数

Moves, turns and scales a texture about its centre, reading across its edges so the result still tiles when the scale is a whole number and the turn a quarter.

签名
变换 -> Texture
    纹理: Texture
    横向偏移: 数字
    纵向偏移: 数字
    旋转: 数字
    尺度: 数字
Texture Transform(
    Texture texture,
    double offsetX = 0,
    double offsetY = 0,
    double rotation = 0,
    double scale = 1)

参数

名称类型默认值说明
纹理Texture—The texture.
横向偏移数字0Moves it across, as a share of the width.
纵向偏移数字0Moves it down, as a share of the height.
旋转数字0Turns it, in degrees clockwise.
尺度数字1Repeats it this many times across; 2 shows it twice as small.

返回

结果Texture
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
纹理变换
所属包
图像处理