← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard

Splits a figure into zones by nearest prototype. Every ZoneSample is one prototype: the mean OKLab colour of the 3×3 pixels around the click, so a single noisy pixel cannot decide it. Every masked pixel then takes the zone of the prototype nearest to it, its lightness weighted as the ZoneSettings say; of prototypes equally near, the first wins.

Link copied to clipboard
@Serializable
data class Zone(val name: String, val ramp: String, val samples: List<ZoneSample>)

One zone of a figure: its name, the ramp it is shaded with — one of the profile's ramps; two zones may share one — and the samples the artist clicked on it.

Link copied to clipboard

The zone stage: one label map per frame of a clip by NearestZone, with the artist's strokes on top by ZoneBrush, cached under the frames, the masks and the ZoneSettings. Adding a sample or retuning the weight labels every frame again and touches nothing upstream.

Link copied to clipboard
@Serializable
data class ZoneSample(val frame: Int, val x: Int, val y: Int)

A point the artist clicked: pixel (x, y) of frame of the clip, in working-frame pixels.

Link copied to clipboard
@Serializable
data class ZoneSettings(val zones: List<Zone> = emptyList(), val lightnessWeight: Double = 0.5, val fixes: List<ZoneStroke> = emptyList())

How a clip's figure is split into zones — skin, shirt, trousers — each shaded with one ramp; stored per clip in profile.json.

Link copied to clipboard
@Serializable
data class ZoneStroke(val frame: Int, val zone: String, val radius: Int, val points: List<BrushPoint>)

One stroke of the zone brush on frame of a clip: figure under a disc of radius pixels along points joins zone, whatever the nearest sample said. Strokes apply in the order painted.