Reputation: 21
How can I create an svg circle with massive blurriness and grainy texture?
I can't figure out how to combine GaussianBlur and feTurbulence in a filter, it's only the grainy texture that is being applied or reversed.
blurriness i want to achieve , grainy texture
Upvotes: 0
Views: 598
Reputation: 101868
Here's an example of what I believe you want.
You would have to apply the grain after the blur. Because if you do it the other way around, you will just blur the grain. And probably lose the effect.
svg {
width: 500px;
}
<svg viewBox="0 0 100 100">
<filter id="blur-plus-grain" x="-50%" y="-50%" width="200%" height="200%">
<!-- Blur the input object -->
<feGaussianBlur stdDeviation="10" result="blur"/>
<!-- Create some grainy noise -->
<feTurbulence type="fractalNoise" baseFrequency="0.95" numOctaves="3" stitchTiles="stitch"/>
<!-- Make the grain greyscale -->
<feColorMatrix type="saturate" values="0" result="grain"/>
<!-- Composit the grain onto the blurred object -->
<feComposite operator="in" in="blur" in2="grain"/>
</filter>
<ellipse cx="50" cy="50" rx="30" ry="20" fill="gold" filter='url(#blur-plus-grain)'/>
</svg>
Upvotes: 4