Affine Cross-Hatch Noise Options
Engraving-style masks, tuned
- noise_options
Cross-hatch is the pattern in WAS Affine that looks like an engraving or a technical drawing: oriented line gratings that cross each other at an angle. It's a geometric, structured mask - the opposite of perlin's organic blobs - which makes it useful for architectural shots, line-art-ish styles, or anywhere you want the affine effect to follow a deliberate, directional texture. Affine Cross-Hatch Noise Options tunes it and emits the parameters as a noise_options DICT.
The knobs
- hatch_freq_cyc_px (default 0.6) - line frequency in cycles per pixel. Higher = denser, closer-spaced lines.
- hatch_angle1_deg / hatch_angle2_deg (defaults 0 and 90) - the two grating directions. 0/90 gives a classic grid; unequal angles give a proper hatch.
- hatch_square (default False) - use a square wave instead of a sine for sharp, hard-edged lines (adds harmonics).
- hatch_phase_jitter (default 0.1) - random phase variation per seed/frame, 0–1. This breaks up the mechanical uniformity so the mask doesn't look stamped.
- hatch_supersample (default 1) - anti-aliasing factor for sub-pixel hatch. Higher = cleaner lines, slower.
How it fits
Wire noise_options into Latent Affine, an affine sampler, or Affine Pattern Noise; the hatch_* keys override the base options DICT. Start by changing just the two angles if you want a rotated look, or the frequency if you want a finer/coarser weave. The jitter is the knob that takes it from "synthetic grid" to "hand-drawn" - worth turning up a little even if you keep everything else default.
Installing
Part of WAS Affine by WASasquatch. ComfyUI Manager → Install Custom Nodes → search "WAS Affine" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was_affine
Restart ComfyUI. ComfyUI 1.0.0+, torch and numpy.
Common issues
As with every options node, nothing happens until the DICT is actually wired to an affine node's noise_options input. With cross-hatch specifically, sharp lines at high frequency can alias into moiré - that's what hatch_supersample is for; bump it to 2 before you blame the mask. And remember a hard geometric mask produces hard edges in latent space; pairing this pattern with a little blur from the common options is usually the difference between a crisp effect and an artifact.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| hatch_freq_cyc_px | FLOAT | 0.600.01–2 | Line frequency in cycles per pixel. Higher = denser lines. |
| hatch_angle1_deg | INT | 00–179 | Primary hatch angle in degrees. |
| hatch_angle2_deg | INT | 900–179 | Secondary cross angle in degrees (for cross-hatch). |
| hatch_square | BOOLEAN | false | If true, uses square wave instead of sine for sharper lines. |
| hatch_phase_jitter | FLOAT | 0.100–1 | Random phase jitter [0-1] to break uniformity. |
| hatch_supersample | INT | 11–8 | Supersampling factor to reduce aliasing (slower when >1). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| noise_options | DICT | — |