After Effect Bezier surface Wrap to AS3 DisplacementMapFilter

825 Views Asked by At

After Effect has the possibility to apply the a Bezier Surface over an image.

However we want to achieve that affect with AS3.

We can use DisplacementMapFilter, using a mapBitmap for each frame for the bezier effect..

How can we generate each of those bitmaps?

The only information that after effect gives are the 12 control points for 12 key frames each one.

How can we with that information generate those mapBitmap that the DisplacementMapFilter operation requests?

Maybe after effect has another information that we are missing?

Thanks in advance.

1

There are 1 best solutions below

0
On

I'm asuming you're trying to come up with something like this: http://fatlinesofcode.philipandrews.org/2011/02/20/warping-bitmaps-with-a-bezier-surface/

Displacement map filter has limitations that would make this difficult. The trick is to break up the image into triangles and warp these triangles along the bezier lines/surface you like. The more triangles you use the smoother the resulting image.

this is a good place to start : http://www.flashandmath.com/advanced/p10triangles/index.html

here is a more advanced example (without code) http://www.miaumiau.cat/2010/03/simple-surface-editor/ that is using bezier curves

more code here also: http://wonderfl.net/c/rFOlY

you can try looking up more resources with drawTriangles and distort keywords