PDA

View Full Version : Image Distortion in Flash


guywhite
07-10-2009, 05:18 PM
Hi.

I have been struggling in Flash to find out if advanced bitmap distortion is possible in flash. I am talking about the same distortion effects that Photoshop generates by going to Filter > distort menu. Especially the spherize, Wave and Twirl effects. All I know for now is that displacement map filter introduced in Flash 8 or 9 has this capability.

So I want to imitate Photoshop in Flash so that when I have an image in Flash the user would feel like he's using Photoshop filters and twirling or spherizing the image.

TomMalufe
07-10-2009, 05:28 PM
The DisplacementMapFilter is deffinitly the place to look. That's what I used in this experiment http://www.paulschoneveld.com/2009/04/water-effect-in-actionscript-3.html

TomMalufe
07-10-2009, 05:31 PM
Oh yeah, and you might like to look into the PerlinNoise function for BitmapData objects to give you a little randomness in your filters.

guywhite
07-10-2009, 07:14 PM
Thanks man,

I have seen your filter effect, looks gr8, but is there anyway that we could make this distortion permanent. I haven't experimented much but tried to search for any sample in which image is permanently changed in to another form. Couldn't find a single one.

By the way your portfolio is impressive.

TomMalufe
07-10-2009, 07:30 PM
The only reason my distortion isn't perminant is because I re-apply it every frame.

I would post a sample of my code from that project, but I'm on my work computer right now and those files are at home.

Try watching this video for some ideas http://gotoandlearn.com/play?id=63

guywhite
07-11-2009, 11:18 AM
That was a kind of example that I was looking for. I need to build on this example to make my own version. The following link shows some stretch effect.

http://www.elctech.com/snippets/actionscript-photo-liquify-smear-distort-with-displacementmapfilter