Reputation: 1046
Photoshop and Fireworks both have some nice filters. When you put one bitmap over the other, the first bitmap can act as filter. For example, the white pixels of the top bitmap lighten the pixels of the bottom bitmap.
Is there any way to apply this in as3?
What I am trying to accomplish:
I have a large single-color bitmapdata object. I want to overlay perlin noise and lighten/darken the single-color bitmap to give it some random/natural look.
Upvotes: 1
Views: 805
Reputation: 76790
There are BlendMode's in Flash, much like the blending options you refer to in Photoshop. They can be used not only on Bitmap objects, but really anything which descends from DisplayObject.
One way to achieve the effect you want is to create a Bitmap
(let's call it noiseBitmap
) with the noise you want as it's bitmapData
, and then set noiseBitmap.blendMode = BlendMode.LIGHTEN
, or which ever specific one suits your needs. Overlay this Bitmap on the solid one.
Upvotes: 1