Hello groovy list...
I am trying to generate a chrome effect by applying a displacement map to
Bitmap.
The Displacement map is generated from perlin noise, and the target is a
single colour filled bitmap.
However it's not working with the single colour filled bitmap
(I think it's because there is nothing to displace).
Maybe I am approaching this all wrong, and would appreciate any thoughts.
Here is my test code so far:
<code>
import flash.filters.DisplacementMapFilter;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
var mapBitmap:BitmapData = new BitmapData ( Stage.width, Stage.height,
false, 0x000000 );
mapBitmap.perlinNoise(100, 100, 10 , 10 , false, false,1 , true,
null );
var filter:DisplacementMapFilter = new DisplacementMapFilter(mapBitmap, new
Point(0, 0),4|8, 4|8, 100, 100, "wrap", .25, .25);
var dBitmap:BitmapData = new BitmapData ( Stage.width, Stage.height, false,
0x666666 );
attachBitmap( dBitmap, 10 );
dBitmap.applyFilter( dBitmap, dBitmap.rectangle,new Point( 0, 0 ),
filter );
</code>
P.s. This targets AS2 / FP8....
Kind regards
Karim
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders