XML technologies / SVG / Filters, transformations and gradients / Using and combining filters and lighting effectively / Filters and masks / The feTurbulence effect

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

This effect creates fractal or random patterns, calculated as individual tiles and assembled. In addition to the universal attributes, these attributes are available:

Note:
Pattern colors cannot be controlled directly, but another filter can process the result to adjust them.

<filter id="Turb01">
  <feTurbulence in="SourceGraphic" baseFrequency="0.02" numOctaves="1" seed="2" type="turbulence"/>
</filter>
<filter id="Turb02">
  <feTurbulence in="SourceGraphic" baseFrequency="0.02" numOctaves="6" seed="2" type="turbulence"/>
</filter>
<filter id="Turb03">
  <feTurbulence in="SourceGraphic" baseFrequency="0.02" numOctaves="6" seed="2" type="fractalNoise"/>
</filter>
<filter id="Turb04">
  <feTurbulence stitchTiles="stitch" in="SourceGraphic" baseFrequency="0.06" numOctaves="17" seed="2" type="fractalNoise"/>
</filter>
<filter id="Turb05">
  <feTurbulence stitchTiles="noStitch" in="SourceGraphic" baseFrequency="0.06" numOctaves="17" seed="2" type="fractalNoise"/>
</filter>
<filter id="Turb06">
  <feTurbulence stitchTiles="stitch" in="SourceGraphic" baseFrequency="0.01 0.1" numOctaves="0.1" seed="0.3" type="fractalNoise"/>
</filter>

Filters Turb01 through Turb03 create the left-hand pattern column in the next figure. The right column is produced by filters Turb04 through Turb06.

Examples of the feTurbulence element

Figure: Examples of the feTurbulence element.

   

 

 

 

back to top