How could I create a seamlessly tileable noise in SVG, with the feTurbulence
filter or a combination of filters?
I'd like a similar result as with the Gimp's Filters/Render/Noise/Solild Noise...
.
How could I create a seamlessly tileable noise in SVG, with the feTurbulence
filter or a combination of filters?
I'd like a similar result as with the Gimp's Filters/Render/Noise/Solild Noise...
.
As Michael Mullany commented: it can be done with the stitchTiles="stitch"
attribute.
About handling this attribute with Inkscape, I found this reference in InkScape Bugs: UI for setting stitchTiles attribute (feTurbulence) missing in the filters editor. Unfortunately, the feature is to be implemented with InkScape v0.93, (still not available AFAIK)
Here is a sample of a seamlessly tiling SVG feTurbulence
with a stitchTiles="stitch"
attribute:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 512 512" height="512" width="512">
<defs>
<filter x="0" y="0" width="100%" height="100%" id="myStichedNoise" style="color-interpolation-filters:sRGB;">
<feTurbulence type="fractalNoise" stitchTiles="stitch" numOctaves="4" baseFrequency="0.0125"/>
<feColorMatrix values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" />
</filter>
<pattern id="myPattern" width="33.33333%" height="33.33333%">
<rect width="33.33333%" height="33.33333%" style="color:#000000;filter:url(#myStichedNoise)"/>
</pattern>
</defs>
<rect fill="url(#myPattern)" width="100%" height="100%"/>
</svg>