Joe Maller: FXScript Reference: Building Joe's Soft GradientsHow I used FXScript to build my Soft Gradients filter for Final Cut Pro.
Joe's Soft Gradients uses the same ideas and basically the same code as described in Joe's Gradients. If you haven't read Building Joe's Gradients, this page might not make much sense. Rather than duplicate everything, the code on this page picks up after the gradient code and just before the colors are corrected for opacity.
Instead of drawing the gradient in color, this filter uses the gradient as the alpha channel for a blurred copy of the source image. This blurred image is then composited back onto the original image.
With the exception of a few inputs, Joe's Soft Gradients is the same as Joe Gradients. The code is identical until just before the highlight function. Since this filter uses no color, it replaces the color manipulations with blur commands:
This statement places a blurred copy of
Building the Mask
Since the resulting gradient in
Much like the alpha channel on Joe's Color Glow, the default alpha channel is the reverse of what I thought it should be. The Invert checkbox allows users to reverse the selected area by not inverting the alpha channel. The
Looking back, I should probably have just reversed the color order in the Highlight function. Even though InvertChannel is almost instantaneous, removing extraneous operations makes the filters just that little bit faster. Feel free to correct this on your own, I will do the same in the next version.
My standard set of composting controls merges
The FXScript Reference
FXScripting Joe's Filters
Joe's FXScript Explorers
Other FCP Stuff
Film & Video
Final Cut Pro
Site Notes Archive (weblog)
About Joe Maller
Past Home Pages Etc.