Skip to main content

Draw Config & Ink

PaintDrawer runs exactly one active DrawConfig at a time — hot-swappable at runtime via PaintTool.SwitchPaint(...). A DrawConfig bundles the stamp's geometry (shape, atlas mapping, facing/depth culling, erase mode) with its ink — a list of InkChannel entries. Two geometry configs ship in the package.

The two draw configs

ConfigWhat it does
StandardBrushConfigStamps along the stroke using a procedural shape (None, soft-edged Circle, or a custom Texture mask) with adjustable hardness, plus an optional texture atlas (grid size + dynamically chosen cell)
FillMeshConfigA bucket/flood-fill tool with four bounded scopes: whole connected solid, single UV island, crease-bounded smooth patch, or a single triangle
Erase is a mode, not a tool

Either config can flip its own Erase Mode checkbox to lift coverage instead of depositing it. There's no separate erase asset — assign the same brush or fill config you paint with, then toggle Erase Mode on a second instance (or swap it at runtime).

Shared footprint controls

Both configs share the same underlying footprint controls:

  • Facing Angle — culls stamps on faces angled away from the brush, so thin double-sided meshes don't get painted through.
  • Projection Depth — limits how deep a stamp reaches along its axis.
  • Wrapping — controls how the footprint wraps around edges.
  • Additive Alpha — accumulates alpha within a single stroke instead of capping at the strongest overlap.

Ink channels

Colour/value data lives in ink channels — one InkChannel entry per target:

Ink typeTargetsValue reads as
ColorInkAn RGBA ChannelDefinitionPigment
ScalarInkA single-value ChannelDefinitionA number (metallic, smoothness, a mask…)
NormalInkA normal ChannelDefinitionA tangent-space normal
VisualInkA SimulationCanvas workspace's colour bufferPigment + painted absorption
DynamicsInkA SimulationCanvas workspace's dynamics bufferMass + velocity (a push force)

Every ink entry carries its own value (a constant colour/number or a gradient), an optional stamp texture, and an amount — a deposition rate in its own units (also the per-step push strength for DynamicsInk).

// Swap the active DrawConfig at runtime (brush → fill, etc.).
paintTool.SwitchPaint(fillMeshConfig);
One tool, many channels

A single brush can write several PBR channels at once — add one ink channel per ChannelDefinition you want the stroke to affect (e.g. albedo + normal + roughness), each with its own value and amount. On a SimulationCanvas, pair a VisualInk with a DynamicsInk to feed the fluid solver itself.


Next: Fluid Simulation