Nodes/WAS Affine/Affine Cross-Hatch Noise Options
ComfyUI Node

Affine Cross-Hatch Noise Options

Engraving-style masks, tuned

By WASasquatch·Created about a year ago·Updated 4 months ago· 5
Affine Cross-Hatch Noise Options
    • noise_options
    hatch_freq_cyc_px0.60
    hatch_angle1_deg0
    hatch_angle2_deg90
    hatch_squarefalse
    hatch_phase_jitter0.10
    hatch_supersample1

    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.

    Categorylatent/adjust

    Inputs (6)

    NameTypeDefaultDescription
    hatch_freq_cyc_pxFLOAT0.600.01–2Line frequency in cycles per pixel. Higher = denser lines.
    hatch_angle1_degINT00–179Primary hatch angle in degrees.
    hatch_angle2_degINT900–179Secondary cross angle in degrees (for cross-hatch).
    hatch_squareBOOLEANfalseIf true, uses square wave instead of sine for sharper lines.
    hatch_phase_jitterFLOAT0.100–1Random phase jitter [0-1] to break uniformity.
    hatch_supersampleINT11–8Supersampling factor to reduce aliasing (slower when >1).

    Outputs (1)

    NameTypeDescription
    noise_optionsDICT