Checkerboard
2D checkerboard pattern field — alternating 0/1 cells on a rotated grid with per-axis cell size and phase.
Category: Fields Menu path: Fields > Checkerboard
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
scalar | scalar | output | Value at comp center (0 or 1) |
scalarField | scalarField | output | Binary 0/1 scalar field |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
cellX / cellY | scalar | 50 | Cell dimensions in comp pixels |
center | vec2 | (0, 0) | Rotation pivot and phase origin |
angle | scalar | 0° | Rotation of the grid around center, in degrees |
phaseX / phaseY | scalar | 0 | Fractional offset in units of cells along each axis. Animate for scrolling/flicker |
How It Works
Samples are rotated back by -angle around center, then divided by cell dimensions. The integer floor gives cell coordinates; parity of their sum (checker rule) determines the output.
The output is hard-edged — no antialiasing. For smoothed versions, combine downstream with a Colorize ramp or FieldMath Multiply with a soft mask.
Usage Examples
Basic: Background pattern
Checkerboard → DrawField (scalar) → Output. Classic chequerboard at whatever cell size you set.
Creative: Scrolling
Animate phaseX from 0 → 1 → the pattern slides across one cell. Combine X + Y phase for diagonal scrolling.
Creative: Mask
Wire Checkerboard.scalarField → ShapeAttributes target=Opacity source=Field on a chain of shapes — every other shape becomes transparent.