Field Scatter
Stamps on a Lattice, Deterministically
- reference_image
- reference_mask
- fill_mask
- mask
- preview
Random-looking dots that are actually a grid
Field Scatter places one shape per lattice cell - a circle, rectangle, polygon or star - with seeded jitter on position, size, rotation and value. It's the node for confetti, bokeh, dust motes, painted speckle, a field of soft lights, or a stipple mask you want to composite an effect through. And it's the deterministic kind of random: same settings, same seed, same stamps, every run, at every resolution.
That last part is the pack's whole thesis applied to scattering. density is cells across the reference dimension S = max(H, W), so cells are square at every aspect ratio - the same scatter at 512 and at 2048, just resolved more finely.
The controls worth understanding
shape,sides,star_ratio,stamp_aspect- the stamp geometry.stamp_aspectis rect-only and controls the native half-width, so an oblong stamp is exact rather than a stretched circle.density- cells acrossS. Default 8. This is your "how many slots are there" control.size- the stamp radius in cell units, where 1.0 is one full cell width. That's an unusually nice choice:sizemeans the same thing whether you've got 8 cells or 40, so changing density doesn't also change how big the dots are.fill- the probability any given cell is occupied. 1.0 means every cell stamped, which gives you a perfect grid rather than a scatter. Drop it to 0.4 and you get a scatter. This is the knob that makes it look random.position_jitter,size_jitter,rotation_jitter,value_jitter,rotation- each jitter draws from an independent per-cell hash channel driven byseed. That independence matters: turning up size jitter never reshuffles which cells are occupied or how they're rotated. You can tune one thing without losing the arrangement you liked.falloffandaa_width- the authored soft edge and the antialiasing width, exactly as on Field Shape. Withfalloffat 0 you get hard stamps.distribution,coverage,invert,seed,width/height- the standard pack tail.
size is clamped by the 3×3-neighbourhood reach cap (a stamp can only overhang so far before it would need to read cells it doesn't have), and star_ratio is clamped to what's achievable for the chosen sides. Both cases print a console note. If your stamps look cut down from what you asked for, that's the cap, not a bug.
The optional inputs are the good stuff
reference_image/reference_mask- inherit H, W, batch and device.reference_maskis size-only; it supplies dimensions and never touches the scatter itself. People wire a mask here expecting it to control placement and then wonder why the dots are everywhere. It won't. Usefill_maskfor that.fill_mask- spatially modulates placement probability. Read once per lattice cell at the cell's centre, soeffective fill = fill × (mask_min + (1 − mask_min) · m^mask_gamma). White means full fill; black meansmask_min × fill.mask_min- the placement floor wherefill_maskis black. 0 thins to nothing; raise it to keep some stamps everywhere. Only active whenfill_maskis wired.mask_gamma- a contrast curve on the mask before the floor. 1.0 skips the operation entirely.
Two behaviours to know about fill_mask. Stamps land whole or not at all - edges are honoured at cell resolution, and a stamp can overhang by its own reach - so keep mask features at least two cells wide or you'll get a ragged boundary. And with distribution=uniform, the area that gets masked out is remapped to mid-grey rather than black, because the rank transform ranks the whole frame. If you need truly zero outside the region, use native.
Outputs are mask and preview.
Install
Manager → ComfyUI Field, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jeremieLouvaert/ComfyUI-Field
Restart. No models, no extra packages. Under AKURATE/Fields/Generate.
Getting burned
fill at its default of 1.0 stamps every cell, which reads as a grid, not a scatter. The first thing to do with this node is drop fill to about 0.5 and add a little position jitter - that's when it starts to look organic.
Also: when the output is provably binary (falloff 0, value_jitter 0, aa_width 0), the node forces native regardless of what distribution says. The rank transform of a two-valued image isn't useful, so the pack just refuses. If the distribution widget seems to do nothing on hard stamps, that's why.
Finally, the seed widget is only active when it matters: 0 < fill < 1, any jitter above zero, or fill_mask wired. With fill = 1 and no jitter, changing the seed genuinely does nothing, and that's by design rather than a stuck widget.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| shape | COMBO | circle | Stamp shape, one exact SDF per cell |
| density | FLOAT | 8.01–64 | Lattice cells across the reference dimension S=max(H,W); square cells at every aspect (as Field Tile) |
| size | FLOAT | 0.3500.01–2 | Stamp radius (rect: half-height) in CELL units -- 1.0 = one full cell width. Clamped by the 3x3-neighbourhood reach cap, with a console note, if requested too large |
| sides | INT | 53–12 | polygon / star point count |
| star_ratio | FLOAT | 0.500.1–0.95 | Inner/outer radius ratio, star only. Clamped to the achievable range for `sides` (see console note) |
| stamp_aspect | FLOAT | 1.000.25–4 | rect only. Native half-width = size*stamp_aspect (cell units); sdf_rect is natively anisotropic, no gradient correction needed |
| rotation | FLOAT | 0-360–360 | Per-instance base rotation, degrees. Inactive on circle |
| rotation_jitter | FLOAT | 0.000–1 | Per-cell rotation offset, fraction of a full turn. Inactive on circle |
| fill | FLOAT | 1.000–1 | Probability a given cell is occupied. 0 = empty, 1 = every cell stamped |
| size_jitter | FLOAT | 0.000–1 | Per-cell size reduction (shrink only), fraction of `size` |
| position_jitter | FLOAT | 0.000–1 | Per-cell centre offset, fraction of the cell's half-width |
| value_jitter | FLOAT | 0.000–1 | Per-cell output-value reduction, fraction of full strength (1.0). Applied after the falloff quintic |
| falloff | FLOAT | 0.0000–1 | Authored soft edge width, fraction of S. 0 = hard |
| aa_width | FLOAT | 1.00–4 | Antialias width, pixels. Active when falloff is <= one pixel |
| seed | INT | 00–4294967295 | Active when 0 < fill < 1, any jitter > 0, or fill_mask is wired |
| distribution | COMBO | native | native: raw combined output. uniform: PIT-normalised against this field's own probe grid. Forced native when the configured output is provably binary (falloff=0, value_jitter=0, aa_width=0) |
| coverage | FLOAT | 0.500–1 | Fraction of the frame above the midpoint |
| invert | BOOLEAN | false | Flip the output |
| width | INT | 51216–8192 | Output width, ignored if a reference is wired |
| height | INT | 51216–8192 | Output height, ignored if a reference is wired |
| reference_imageopt | IMAGE | If wired, H/W/B and device come from this and the manual width/height widgets are ignored | |
| reference_maskopt | MASK | As reference_image, lower priority if both are wired. SIZE-ONLY: supplies H/W/batch/device and never touches the field -- use fill_mask to modulate placement. | |
| fill_maskopt | MASK | Spatially modulates PLACEMENT probability: effective fill = fill × (mask_min + (1−mask_min)·m^mask_gamma), read once per lattice cell at the cell's centre. White = full fill, black = mask_min×fill (0 = no stamps). Stamps land whole or not at all: edges are honoured at cell resolution and stamps can overhang by their own reach -- keep mask features at least two cells wide. With distribution=uniform the masked-out area is remapped to a mid-grey, not black (the PIT ranks the whole frame). Frame 0 used for batches. NOT the same as reference_mask, which only supplies size/batch/device. | |
| mask_minopt | FLOAT | 0.000–1 | Placement floor where fill_mask is black. 0 = thin out to nothing; raise it to keep some stamps everywhere (the slice-3 floor-not-gate taste). Only active when fill_mask is wired. |
| mask_gammaopt | FLOAT | 1.000.25–4 | Contrast curve on fill_mask before the floor. 1.0 = linear (skips the op entirely); >1 pulls feathered mid-greys toward the floor. Only active when fill_mask is wired. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |
| preview | IMAGE | — |