元編程參考文件

紋理變換

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
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
紋理變換
所屬包
影像處理