Asked By
goff cash
0 points
N/A
Posted on - 12/20/2012
Â
Hi guys,
I am learning Flash action script 3. I know there is a filter called displacement map as3 but I have never used it. Please tell me when we use this filter and how we use it. Give me a script sample if you can.
Thanks
Need help about displacement map as3
Â
Hi
The displacement map filter is a flash built feature that can use for some special effects.
Displacement mapping is a computer graphic technique in contrast bumps mapping, parallax mapping, and normal mapping using texture.
The DisplacementMapFilter uses a pixel values from a Bitmapdata object to perform a displacement effect on a new object.
Â
You should know following components.
Map point: you can use this when you want to apply filter to your image.
X component: which color channel map the image effects the X position of pixel.
Y Component: which color channel of the map image effects the Y position of pixel.
X scale: specify the how strong the X axis displacement.
Y scale: specify the how strong the Y axis displacement.
Â
Example: offset = new flash.geom.point(0,0) – (this will define a new point for the offset of the displacement map)
Â
Displacement_map =new flash.filters.displacementMapfilters(bmp,offset,chaneel)
Â
(This will create the displacement map itself)
Â
Bmp=new flsh.display.bitmapdata(500,250);
(this will draw the displacement map un the bitmap data)
Â
Thanks & Regards
Â
Mckinney Ma