ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud


COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Aaron BabcockVa
by on Feb 24, 2012 at 1:47:58 pm


Is it possible to have a variable brush size on a stroke effect applied a mask? I'd love to have the stroke size controlled by a black and white image, similar to how a luma key or depth matte works, but I'm interested in any solution. Thank you so much,


P.S. I'm using AE CS4, if that affects anything.

Return to posts index

Brian CharlesRe: Va
by on Feb 24, 2012 at 4:04:03 pm

Have you considered using the Write-On effect?

Return to posts index

Dave LaRondeRe: Va
by on Feb 24, 2012 at 4:04:20 pm

To do this, don't use Stroke. Use Write-On.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA

Return to posts index

Kevin CampRe: Va
by on Feb 24, 2012 at 4:33:13 pm

you could try using compound blur (which will blur based on the luminance or lightness of another layer) and then levels or curves to compress just the alpha values to tighten the blurred edges. the result should vary the stroke width based on the luminance of the other layer, at least to some degree.

if you wanted the stroke to write-on with a variable weight, the you could use the write-on effect, copying/pasting the mask path into the brush position and then using a sampleImage() expression to drive the brush size. the expression would look something like this:

map = thisComp.layer("image map"); // this would be your image map layer
size = 20; // use this to adjust the overall thickness of the line
map.sampleImage(effect("Write-on")("Brush Position"), radius = [.5, .5], postEffect = true, t = time)[0]*size

you'll also need to set the brush time property to 'size'.

note, the expression assumes that the image map is the same size and position as the layer that the write-on effect is applied to.

Kevin Camp
Senior Designer

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved