home/ atoms/ hydra-modulation

Hydra modulate functions use one source's colors to warp another source's geometry

Modulation is Hydra’s most distinctive operation. Where blend functions combine two textures’ colors, modulate functions use one texture’s color values to displace the UV coordinates of another texture — warping its geometry. The canonical statement: ‘modulation is to geometry what blending is to color.’ .modulate(tex, amount) reads the incoming texture’s pixel values and shifts the base texture’s sample coordinates proportionally, producing a displacement or refraction effect analogous to looking through textured glass. Variants include .modulateRotate(), .modulateScale(), .modulateScrollX/Y(), .modulateHue(). Any Hydra source or chain can serve as the modulator. The amount parameter scales the displacement; small values (0.01–0.1) typically suffice.

Examples

osc(10).modulate(noise(3), 0.2).out()
shape(4).modulateRotate(osc(5), 0.3).out()

Assessment

Distinguish .blend(noise()) from .modulate(noise()) — which affects geometry, which affects color? Write a patch where an oscillator’s colors warp a shape’s geometry.

“While blend functions combine the colors from two visual sources, modulate functions use the colors from one source to affect the geometry of the second source.”