Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Aaron Babcock on February 24, 2012 at 1:47 pm

    Hi,

    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,

    –Saib

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

    Kevin Camp replied 14 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Brian Charles

    February 24, 2012 at 4:04 pm

    Have you considered using the Write-On effect?

  • Kevin Camp

    February 24, 2012 at 4:33 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
    KCPQ, KMYQ & KRCW

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy