-
KM 8.1 Chroma key filter [AS3, FP10]
KM 8.1 has a new filter you can use for chroma keying.
KeyFilter(keyColor, chromaTolerance, lumaTolerance, toleranceRange, preBlur, invertMask)
keyColor is a color value
chromaTolerance, lumaTolerance and toleranceRange are numbers from 0.0 to 1.0
preBlur and invertMask are boolean values
The filter works just like other filters.
You can use it from the gui or from ActionScript.
An actionscript example :
code: import km.filters.*;
var f:KeyFilter = new KeyFilter(0x00ff00, 0.4, 1.0);
mc1.filters = [f];
The filter compares the chroma and luma components of the key color you supply with the chroma and luma components of each pixel of the object the filter is applied to and makes the pixel transparent if the differences between the components are within the specified tolerances.
If you specify a toleranceRange of 0 (or omit it), the pixels become either transparent or stay the same. If you specify a bigger value, the transparency will change gradually within the specified range.
With the preBlur parameter set to true, the filter slightly blurs the object before the chroma and luma components are compared. The result will not be blurred but the edges will become a little softer.
Most of the times setting it to true looks best but it does result in a higher cpu load compared to setting it to false.
-
Here's an example (requires FP 10.1) to experiment with different values for the filter.
Click outside of one of the components on stage to select your own image.
http://www.waterlijn.info/km/as3/Chr...viewImage.html
-
hi,
Could you please tell me how to get KM 8.1 Chroma key filter
thanks
-
I responded to your email. The chroma filter is part of the GUI_VideoObject class. You can see the code in Program Files / KoolMoves / Bin / AS3 / Classes / km / components / GUI_VideoObject.as. The documentation is at Bin / AS3 / Documentation.
-
Hello Bob, Could you show me how to get de KM Chroma Key Filter?
Thank you.
-
See this tutorial -- http://www.koolmoves.com/chroma-key-filter.html
You have to be in Flash export Advanced or Cartooning gui mode.
Use File > Import to import a flash video. Use Effects > Flash 10 Filters > ChromaKey to apply the filter to the video.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|