To maintain a consistent stroke width in After Effects when scaling shape layers, apply the "Maintain Stroke Width" expression to the Stroke Width property. Alternatively, adjust the scale within the "Transform Shape" property of the shape layer for the same effect.
What do you think? Submit your opinion to see what others have to say!
Now, if you've played around with shape layers, you might have noticed that when you scale them up or down, the thickness of their outline, known as the stroke, changes too. This can be a bit of a nuisance, especially when you want that stroke to remain consistent. That's where our Maintain Stroke Width expression comes into play.
Imagine you've drawn a simple circle with a 5-pixel wide stroke. As you scale the circle to make it bigger, that 5-pixel stroke might become 10 pixels wide, altering its appearance. The "Maintain Stroke Width" expression cleverly adjusts the stroke width based on how much you're scaling the layer. It's like having an invisible assistant who ensures that no matter how much you resize your shape, the stroke remains visually the same.
Now, a quick heads-up. If you've tried scaling your shape differently in width (X) and height (Y), you might find the stroke behaving a bit unpredictably. This is because the expression has to figure out how to adjust the stroke when the shape is being stretched more in one direction than the other. A simple workaround is to average the X and Y scale values and use that average to adjust the stroke width. It's a bit of math magic that ensures your stroke looks just right.
If you're looking for another method, here's a pro tip. Instead of scaling the entire layer, you can adjust the scale within the "Transform Shape" property of the shape layer. This way, the stroke remains below the transformation, ensuring it doesn't get affected by the scaling. To do this:
Browse Templates, Extensions, Plugins & Presets....
Search
Browse Graphics, Mockups, Brushes & More!
Search