FORUMS: list search recent posts

How do you maintain stroke width while animating using parent/child?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Carolyne Anthony
How do you maintain stroke width while animating using parent/child?
on Mar 30, 2017 at 10:15:24 pm

I'm trying to make an animation where all shapes retain their stroke width, even with parent/child relationships.

I have a little guy whose head/hair/face/arms need to follow his body, and then other little people follow his body as well. I can remove the stroke from each general shape group, pick whip each shape's individual scale to match that of the body, and readjust every single anchor point to match it, but this seems so tedious. I've applied a constant stroke expression to the stroke width but every time I build the artwork and then start to pick whip it to a null, strokes start to get larger or smaller to match or the shapes blow up.

Has anyone made something like this that can help me?

Is there like a hack to this I don't know about?


Return to posts index

Kevin Camp
Re: How do you maintain stroke width while animating using parent/child?
on Mar 30, 2017 at 10:23:07 pm

i'm not sure if you are using the expression that was in my last post, but if you are, you may need to link the stroke size to the scale of the parent. try this if you are using my expression:
value * 100 / parent.scale[0]
if you are using a different expression, post it and we can take look.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Carolyne Anthony
Re: How do you maintain stroke width while animating using parent/child?
on Mar 31, 2017 at 2:45:50 pm

Hey thank you for taking the time to respond to my posts.

This is the expression I'm applying to the stroke width:
s = transform.scale[0];
scaleFactor = 100/s;
value*scaleFactor;

I think what I'm starting to understand is that I need to make all these shapes on one shape layer for this particular animation, and just scale everything individually.

Sorry it took me that long to come to that realization, it's just a workflow adjustment.


Return to posts index


Kevin Camp
Re: How do you maintain stroke width while animating using parent/child?
on Mar 31, 2017 at 3:38:04 pm

this should work if all the layers are parented to the same layer/null.
s = parent.scale[0];
scaleFactor = 100/s;
value*scaleFactor;

it will kick up an error if either the layer is not parented, or the scale of the parent is 0. there are ways to write the expression if that is a problem.

having the shapes all on one layer would also solve this problem, but might introduce other issues, depending on how you want the layers to interact.

pre-composing the figure with it's current layers and without a parent might also work, but might be limiting or introduce a more complicated workflow as you continue to animate, depending on what you are doing.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Carolyne Anthony
Re: How do you maintain stroke width while animating using parent/child?
on Mar 31, 2017 at 5:24:20 pm

That expression is really helpful, thank you. I'll probably use a combination of both depending on what animation needs to take place.

Thanks again.


Return to posts index

Darby Edelen
Re: How do you maintain stroke width while animating using parent/child?
on Mar 31, 2017 at 7:12:31 pm

You should be able to find the absolute x-scale of a layer no matter how many parents it has with this expression:

length(fromWorldVec([100,0,0]));

The y-scale would be:

length(fromWorldVec([0,100,0]));

This only works with one axis (X, Y or Z) at a time.

Darby Edelen


Return to posts index


Kevin Camp
Re: How do you maintain stroke width while animating using parent/child?
on Mar 31, 2017 at 8:37:12 pm

That's cool. I knew there would be a way to find that, just never looked into it...

Thanks Darby

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]