← f_ notebook · Mirrors · ∇ Effects

f_caustic, live ​

An optical caustic: a lattice of glass samples is displaced through a vector field and each deposits the source's light, so the bright folded sheets appear where rays pile up.

The cell below steps the NumPy mirror that f_caustic's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.

f_caustic · NumPy mirror (Pyodide) · not the Max patch
Downloads about 15 MB the first time (Python and NumPy).
  • sample density is the lattice resolution: points per output pixel, both axes, like the module's fixed 2 points per pixel; higher numbers smooth the sheets and cost more.
  • scale is the propagation distance: how far each sample is pushed by the field before it lands; larger values fold the sheets over.
  • gain brightens the caustic layer before the tone curve.
  • expo is the tone-curve exponent; lower values compress the bright folds harder.
  • mix_pct crossfades from the bare source toward the composite of source plus caustic.
  • edge decides where a ray that lands outside the frame goes: off discards it with its light, wrap re-enters it, mirror reflects it, clamp piles it on the border.
  • view shows the composite or the isolated caustic layer.
  • The second input is the refracting field (vector field); try different fields to reshape the sheets.

reference doc · idea note · patcher · scatter_mirror.py

← AdvectGlow →