Here is an astonishingly simple method to get something like a diffusion effect of wet ink on blotting paper. This can be used to get organic looking edges or to give photos a painterly effect:
1. draw the object you want to diffuse onto a BitmapData object [A]
2. create another BitmapData object [B] of the same size as a temporary storage
3. create another BitmapData object [C] of the same size and fill it with noise
4. apply the DisplacementMapFilter on A using C as the displacement map and store it in B
5. draw B over A using Multiply mode for growth or Screen mode for shrinking or both for something in between. You can also experiment with other blendmodes
6. repeat from step 4
For a less fibery look you have to create a new random noise map each round. Instead of normal noise you can also use perlin Noise which will give you some freakish effect especially when used with photos.
Here is a demo:
Moving the mouse to the top will shrink the dark areas
Moving the mouse to the bottom will grow the dark areas
Moving the mouse to the left will give a smoother, blurrier look
Moving the mouse to the right will give a more fractal, fibery look
You can also paint by clicking and dragging and erase by clicking and dragging with the SPACE bar pressed.
And I have added a litte "Rorschach" inkblot mode which will horizontally mirror everything you draw. Press the "R" key to toggle it on/off. (you will have to click the Flash file at least once, so it receives the keyboard focus).
Download the source file here.
