Painting
8 nodes
On this page 8
Combine Strokes
FunctionStrokes painted one set after another: the second set's over the first's, and its erasing strokes rubbing out what the first painted.
CombineStrokes -> Paint Strokes
first: Paint Strokes
second: Paint StrokesPaintStrokes CombineStrokes(
PaintStrokes first,
PaintStrokes second)Parameters
| name | type | default | description |
|---|---|---|---|
| first | Paint Strokes | — | The strokes painted first. |
| second | Paint Strokes | — | The strokes painted over them. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Mirror Strokes
FunctionThe 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.
MirrorStrokes -> Paint Strokes
strokes: Paint Strokes
axis: Facing Direction
mesh: MaterialMeshPaintStrokes MirrorStrokes(
PaintStrokes strokes,
FacingDirection axis = FacingDirection.Right,
MaterialMesh mesh)Parameters
| name | type | default | description |
|---|---|---|---|
| strokes | Paint Strokes | — | The strokes. |
| axis | Facing Direction | Right | Which way to mirror: Left or Right mirrors across, Up or Down top to bottom, Front or Back front to back (surface strokes only). |
| mesh | MaterialMesh | — | The model surface strokes lie on, whose middle they mirror across; not needed for texture strokes. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Paint Mask
FunctionTurns 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.
PaintMask -> (result: Texture, color: Texture)
strokes: Paint Strokes
size: Integer
mesh: MaterialMesh
stamp: Texture
wrap: TruthTexture PaintMask(
PaintStrokes strokes,
out Texture color,
int size = 1024,
MaterialMesh mesh,
Texture stamp,
bool wrap = true)Parameters
| name | type | default | description |
|---|---|---|---|
| strokes | Paint Strokes | — | The strokes, first painted first. |
| size | Integer | 1024 | The textures' width and height in pixels. |
| mesh | MaterialMesh | — | The model surface strokes lie on; needed only for those. |
| stamp | Texture | — | The picture stamp strokes lay when they carry none of their own - a brush's alpha. |
| wrap | Truth | True | Whether texture strokes wrap across the edges, for a texture that tiles; off for a model's layout. |
Returns
| result | Texture |
| color | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Place Decal
FunctionA 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.
PlaceDecal -> Paint Strokes
picture: Texture
x: Number
y: Number
size: Number
rotation: Number
opacity: NumberPaintStrokes PlaceDecal(
Texture picture,
double x = 0.5,
double y = 0.5,
double size = 0.3,
double rotation = 0,
double opacity = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| picture | Texture | — | The decal. |
| x | Number | 0.5 | Where its centre is across, 0 to 1. |
| y | Number | 0.5 | Where its centre is down, 0 to 1. |
| size | Number | 0.3 | Its longer side, as a share of the texture's width. |
| rotation | Number | 0 | Its turn, in degrees. |
| opacity | Number | 1 | How strongly it paints, 0 to 1. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Project Decal
FunctionA 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.
ProjectDecal -> Paint Strokes
picture: Texture
mesh: MaterialMesh
from: Facing Direction
x: Number
y: Number
size: Number
rotation: Number
opacity: NumberPaintStrokes 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)Parameters
| name | type | default | description |
|---|---|---|---|
| picture | Texture | — | The decal. |
| mesh | MaterialMesh | — | The model, unwrapped. |
| from | Facing Direction | Front | The side it is pressed on from. |
| x | Number | 0.5 | Where its centre is across the model as seen from that side, 0 (left) to 1 (right). |
| y | Number | 0.5 | Where its centre is down the model as seen from that side, 0 (top) to 1 (bottom). |
| size | Number | 0.3 | Its longer side, as a share of the model's largest dimension. |
| rotation | Number | 0 | Its turn, in degrees. |
| opacity | Number | 1 | How strongly it paints, 0 to 1. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Random Strokes
FunctionStrokes 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.
RandomStrokes -> Paint Strokes
count: Integer
length: Number
radius: Number
radiusVariation: Number
curl: Number
direction: Number
directionVariation: Number
hardness: Number
opacity: Number
color: Optional Color
taper: Number
erase: Truth
seed: IntegerPaintStrokes 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)Parameters
| name | type | default | description |
|---|---|---|---|
| count | Integer | 24 | How many strokes. |
| length | Number | 0.25 | How long each is, as a share of the texture's width. |
| radius | Number | 0.006 | Half a stroke's width, as a share of the texture's width. |
| radiusVariation | Number | 0.5 | How much strokes' widths differ, 0 to 1. |
| curl | Number | 0.3 | How much a stroke turns as it goes: 0 is straight, 1 wanders. |
| direction | Number | 0 | The way strokes run, in degrees: 0 is across, 90 is down. |
| directionVariation | Number | 1 | How far a stroke's way may differ from that, 0 (all alike) to 1 (any way). |
| hardness | Number | 0.7 | How hard their edges are, 0 to 1. |
| opacity | Number | 1 | How strongly they paint, 0 to 1; each stroke varies under it. |
| color | Optional Color | — | What they paint in the colour output; white when not given. |
| taper | Number | 0.8 | How much strokes thin toward their ends, 0 to 1. |
| erase | Truth | False | Rub out what earlier strokes painted instead: scratches through paint. |
| seed | Integer | 0 | Which strokes. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Stroke
FunctionA 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.
Stroke -> Paint Strokes
points: Number Array
radius: Number
hardness: Number
opacity: Number
color: Optional Color
erase: Truth
taper: NumberPaintStrokes Stroke(
double[] points,
double radius = 0.03,
double hardness = 0.6,
double opacity = 1,
ColorElement? color,
bool erase = false,
double taper = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| points | Number Array | — | The path as pairs of numbers, u then v: 0.1, 0.5, 0.9, 0.5 is a line across the middle. |
| radius | Number | 0.03 | Half the brush's width, as a share of the texture's width. |
| hardness | Number | 0.6 | How much of the brush is solid before it fades, 0 to 1. |
| opacity | Number | 1 | How strongly the stroke paints, 0 to 1. |
| color | Optional Color | — | What the stroke paints in the colour output; white when not given. |
| erase | Truth | False | Rub out what earlier strokes painted instead. |
| taper | Number | 0 | How much the stroke thins toward its ends, 0 to 1, as a pen lifted at both. |
Returns
| result | Paint Strokes |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing
Stroke Count
FunctionHow many strokes there are.
StrokeCount(strokes: Paint Strokes) -> Integer
int StrokeCount(PaintStrokes strokes)
Parameters
| name | type | default | description |
|---|---|---|---|
| strokes | Paint Strokes | — | The strokes. |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Painting
- Package
- Image Processing