元編程參考文件

繪製

8 個節點

本頁內容 8

合併筆畫

函數

Strokes painted one set after another: the second set's over the first's, and its erasing strokes rubbing out what the first painted.

簽名
合併筆畫 -> Paint Strokes
    先畫的: Paint Strokes
    後畫的: Paint Strokes
PaintStrokes CombineStrokes(
    PaintStrokes first,
    PaintStrokes second)

參數

名稱型別預設值說明
先畫的Paint Strokes—The strokes painted first.
後畫的Paint Strokes—The strokes painted over them.

返回

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

鏡像筆畫

函數

The strokes and their mirror image, painted both: symmetrical painting. Texture strokes mirror across the texture's middle; surface strokes across the model's middle, for a model that is symmetrical.

簽名
鏡像筆畫 -> Paint Strokes
    筆畫: Paint Strokes
    鏡像方向: Facing Direction
    網格: MaterialMesh
PaintStrokes MirrorStrokes(
    PaintStrokes strokes,
    FacingDirection axis = FacingDirection.Right,
    MaterialMesh mesh)

參數

名稱型別預設值說明
筆畫Paint Strokes—The strokes.
鏡像方向Facing Direction右Which way to mirror: Left or Right mirrors across, Up or Down top to bottom, Front or Back front to back (surface strokes only).
網格MaterialMesh—The model surface strokes lie on, whose middle they mirror across; not needed for texture strokes.

返回

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

繪製遮罩

函數

Turns strokes into a mask - how much is painted at each pixel - and the colour painted there, ready for a layer's mask and a blend. Strokes on a model's surface are painted through the model's texture layout, past each island's edge so seams do not show.

簽名
繪製遮罩 -> (結果: Texture, 顏色: Texture)
    筆畫: Paint Strokes
    尺寸: 整數
    網格: MaterialMesh
    印章: Texture
    平鋪環繞: 真否
Texture PaintMask(
    PaintStrokes strokes,
    out Texture color,
    int size = 1024,
    MaterialMesh mesh,
    Texture stamp,
    bool wrap = true)

參數

名稱型別預設值說明
筆畫Paint Strokes—The strokes, first painted first.
尺寸整數1024The textures' width and height in pixels.
網格MaterialMesh—The model surface strokes lie on; needed only for those.
印章Texture—The picture stamp strokes lay when they carry none of their own - a brush's alpha.
平鋪環繞真否TrueWhether texture strokes wrap across the edges, for a texture that tiles; off for a model's layout.

返回

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

放置貼花

函數

A picture placed on the texture as a decal: a logo, a label, a number, a stencil. A colour picture with transparency paints in its own colours; a greyscale one is how much to paint.

簽名
放置貼花 -> Paint Strokes
    圖片: Texture
    橫向位置: 數字
    縱向位置: 數字
    大小: 數字
    旋轉: 數字
    不透明度: 數字
PaintStrokes PlaceDecal(
    Texture picture,
    double x = 0.5,
    double y = 0.5,
    double size = 0.3,
    double rotation = 0,
    double opacity = 1)

參數

名稱型別預設值說明
圖片Texture—The decal.
橫向位置數字0.5Where its centre is across, 0 to 1.
縱向位置數字0.5Where its centre is down, 0 to 1.
大小數字0.3Its longer side, as a share of the texture's width.
旋轉數字0Its turn, in degrees.
不透明度數字1How strongly it paints, 0 to 1.

返回

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

投射貼花

函數

A picture projected onto a model from one side, as a decal is pressed onto it: it lands where the model's surface is seen from that side, lies across it there, and wraps round as the surface bends - whatever the model's texture layout.

簽名
投射貼花 -> Paint Strokes
    圖片: Texture
    網格: MaterialMesh
    投射方向: Facing Direction
    橫向位置: 數字
    縱向位置: 數字
    大小: 數字
    旋轉: 數字
    不透明度: 數字
PaintStrokes ProjectDecal(
    Texture picture,
    MaterialMesh mesh,
    FacingDirection from = FacingDirection.Front,
    double x = 0.5,
    double y = 0.5,
    double size = 0.3,
    double rotation = 0,
    double opacity = 1)

參數

名稱型別預設值說明
圖片Texture—The decal.
網格MaterialMesh—The model, unwrapped.
投射方向Facing Direction前The side it is pressed on from.
橫向位置數字0.5Where its centre is across the model as seen from that side, 0 (left) to 1 (right).
縱向位置數字0.5Where its centre is down the model as seen from that side, 0 (top) to 1 (bottom).
大小數字0.3Its longer side, as a share of the model's largest dimension.
旋轉數字0Its turn, in degrees.
不透明度數字1How strongly it paints, 0 to 1.

返回

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

隨機筆畫

函數

Strokes that wander across the texture: scratches, brush marks, cracks drawn in paint, chalk scribbles - each a random walk that curls as it goes and thins at its ends, wrapping across the edges so the texture still tiles.

簽名
隨機筆畫 -> Paint Strokes
    數量: 整數
    長度: 數字
    半徑: 數字
    半徑變化: 數字
    彎曲: 數字
    方向: 數字
    方向變化: 數字
    硬度: 數字
    不透明度: 數字
    顏色: 可選顏色
    兩端變細: 數字
    擦除: 真否
    種子: 整數
PaintStrokes RandomStrokes(
    int count = 24,
    double length = 0.25,
    double radius = 0.006,
    double radiusVariation = 0.5,
    double curl = 0.3,
    double direction = 0,
    double directionVariation = 1,
    double hardness = 0.7,
    double opacity = 1,
    ColorElement? color,
    double taper = 0.8,
    bool erase = false,
    int seed = 0)

參數

名稱型別預設值說明
數量整數24How many strokes.
長度數字0.25How long each is, as a share of the texture's width.
半徑數字0.006Half a stroke's width, as a share of the texture's width.
半徑變化數字0.5How much strokes' widths differ, 0 to 1.
彎曲數字0.3How much a stroke turns as it goes: 0 is straight, 1 wanders.
方向數字0The way strokes run, in degrees: 0 is across, 90 is down.
方向變化數字1How far a stroke's way may differ from that, 0 (all alike) to 1 (any way).
硬度數字0.7How hard their edges are, 0 to 1.
不透明度數字1How strongly they paint, 0 to 1; each stroke varies under it.
顏色可選顏色—What they paint in the colour output; white when not given.
兩端變細數字0.8How much strokes thin toward their ends, 0 to 1.
擦除真否FalseRub out what earlier strokes painted instead: scratches through paint.
種子整數0Which strokes.

返回

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

筆畫

函數

A brush stroke through points in texture coordinates, 0 to 1 across: a line where a mask should be, a scratch placed by hand, a path to follow.

簽名
筆畫 -> Paint Strokes
    點: 數字陣列
    半徑: 數字
    硬度: 數字
    不透明度: 數字
    顏色: 可選顏色
    擦除: 真否
    兩端變細: 數字
PaintStrokes Stroke(
    double[] points,
    double radius = 0.03,
    double hardness = 0.6,
    double opacity = 1,
    ColorElement? color,
    bool erase = false,
    double taper = 0)

參數

名稱型別預設值說明
點數字陣列—The path as pairs of numbers, u then v: 0.1, 0.5, 0.9, 0.5 is a line across the middle.
半徑數字0.03Half the brush's width, as a share of the texture's width.
硬度數字0.6How much of the brush is solid before it fades, 0 to 1.
不透明度數字1How strongly the stroke paints, 0 to 1.
顏色可選顏色—What the stroke paints in the colour output; white when not given.
擦除真否FalseRub out what earlier strokes painted instead.
兩端變細數字0How much the stroke thins toward its ends, 0 to 1, as a pen lifted at both.

返回

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

筆畫數量

函數

How many strokes there are.

簽名
筆畫數量(筆畫: Paint Strokes) -> 整數
int StrokeCount(PaintStrokes strokes)

參數

名稱型別預設值說明
筆畫Paint Strokes—The strokes.

返回

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