Raster Brush

Paint directly onto images with a brush.

What it does

Raster Brush stamps a brush shape onto a canvas at a position. It takes a position and an active signal each frame, usually wired from Pointer, and lays down a stamp at the size, rotation, opacity and Color set on the node. With Surface disconnected, a blank canvas is created at project resolution and the painting persists on the node. Wire a canvas into Surface and the paint goes onto that instead, so a Raster Brush inside a Feedback Loop accumulates strokes over time.

Brush defaults to a soft round dot shaped by Hardness. Any image can be wired in as a custom stamp: a white brush plus a Color tint gives tinted painting, a full-colour brush gives decals or sprite stamping. Wire Surface into a 3D geometry's UV space rather than a flat canvas and the paint lands on that mesh's texture, Albedo or Emissive.

When to use it

ParameterTypeDefault
surfaceOneOf([FieldOf(Raster)])
brushOneOf([FieldOf(Raster)])
positionVec3(0.5, 0.5, 0)
sizeNumber20
rotationVec3(0, 0, 0)
opacityNumber1
colorColorrgba(1.00, 1.00, 1.00, 1.00)
activeBooleanfalse
stroke_idNumber0
stroke_pointsString"[]"
blend_modeString"Over"
uniform_scaleBooleantrue
scale_xNumber1
scale_yNumber1
paint_targetString"Albedo"
paint_resolutionString"1024"
eraseBooleanfalse
hardnessNumber0.500
canvas_positionVec3(0, 0, 0)
canvas_rotationVec3(0, 0, 0)
canvas_zoomNumber1
canvas_scaleNumber1

Gotchas

Active paints only while it is true. Paint persists across frames only when the output is looped back into Surface, most often inside a Feedback Loop. Without that loop, each cook starts from a blank or freshly wired canvas and previous stamps are gone.

Uniform Scale locks brush width and height together. Turn it off to reveal Scale X and Scale Y for a stretched or squashed stamp.

A fast, curved pointer gesture still lays down a smooth stroke. Every pointer sample between cooks is recorded and a curve is walked through them, rather than one stamp per frame.

Worked example

  1. Add a Raster Brush. Leave Surface disconnected to paint on a fresh blank canvas.

  2. Wire Pointer.position into Position and Pointer.left_button into Active.

  3. Wrap the node in a Feedback Loop, feeding its output back into its own Surface, so strokes accumulate as you draw.

  4. Raise Size for a bigger stamp, lower Hardness for a softer edge, and set Color to change the paint tint.

  5. Enable Erase to remove paint with the same brush shape instead of adding it.

See also

Image · Blur · Rasters (images)