Need help about displacement map as3

Asked By 0 points N/A Posted on -
qa-featured

 

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

SHARE
Answered By 0 points N/A #168066

Need help about displacement map as3

qa-featured

 

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

Related Questions