create({ tileable: true }) + sampleManyA flow field is an anisotropic material. Take a periodic pattern — white noise, or a set of straight bands — walk every pixel backwards along the streamlines, and read the pattern where the walk ends: the bands bend into the flow and the noise smears into streaks. That is the whole recipe behind brushed metal, wood grain, damascus, marble and agate, and it is the single most common production use of flow noise. The five presets below differ only in the pattern they start from, how far they advect it, and the colour ramp on the end.
Two mixing weights per preset: a line-integral term, which averages the pattern over the
whole streamline (this is what turns noise into brushed metal), and a warp term, which
takes only the far end of the walk (this is what folds bands into damascus). Everything else on
screen is the field: anisotropy γ < 0 makes the streamlines prefer the grain
axis, coherence organizes them into big sweeps, slope decides how much
fine wander rides on the large ones. Tile 3×3 shows the result repeated — because a
texture that does not tile is not usable.
The seam number is the one that matters. A texture is only useful
if the right edge continues into the left edge, and the readout prints exactly that:
max |T(0,y) − T(2π,y)| over 160 points per edge, in units of the texture's own
contrast range. With tileable: true the wavevectors are snapped to the integer
lattice, so the field is 2π-periodic by construction and the seam reads ~1e-14 — the
residue of evaluating cos(k·x + 2πk) in double precision, nothing else. Turn
tileable off and the same parameters rebuild the field off-lattice: the seam jumps to
~0.7 of the full contrast range, and the 3×3 view shows the grid of hard edges you would
have shipped. Both numbers are measured every render; the live one is teal.
The second number backs the word flow-aligned instead of asserting it. It is the ratio of
second-order structure functions across and along the local flow direction,
⟨(T(p+hê⊥) − T(p))²⟩ / ⟨(T(p+hê) − T(p))²⟩ at 2000 random points, with
ê the unit in-plane velocity at p and h a 64th of the
tile. Printed beside it is the same ratio with advect at 0 — the identical pattern before
the flow touched it. Brushed metal, which is pure line-integral, runs about 14× against a
control of 1.0; the warp presets start from bands that lie across the flow and end up in
the 1.3–2.8 range, so the number tells you honestly which presets are combed and which are only
folded. Drag advect to 0 and the live value collapses onto the control.
What this is not. There is no simulation here: no pressure solve, no viscosity, no
boundaries, nothing advancing in time. It is a closed-form divergence-free velocity field sampled
at points. The walk uses the in-plane components of that 3-D field on a fixed z
slice, and a 2-D slice of a 3-D divergence-free field is not itself divergence-free — the
streaks converge and thin out in places, which is welcome in a material and would be wrong in a
fluid. Integration is first-order explicit Euler at fixed arc length, so the streaks are the
shape of the streamlines, not accurate trajectories. And the output is one scalar through a
colour ramp: an albedo map, not a shaded render — "brushed metal" here is a gradient, with no
lighting model behind it.