Page 1 of 1

Animate your paint strokes

Posted: June 3rd, 2004, 11:24 am
by malex
This expression was created by Dan Ebberts NOTE : It will only work in AE 6.5

Here's a fun example.

Create a 200 x 200 layer and draw a generally vertical stroke (start at the bottom and draw up) that extends about half the height of the comp. Set "Paint on Transparent" to on. Apply this expression to the brush's position transform:

range = [50,50];
center = [width/2,height/2];

random(center - range, center + range);



Apply this expression to the brush's rotation transform:

p = propertyGroup(1).position;
center = [width/2,height/2];

if (p[0] < center[0]){
if (p[1] < center[1]){
random(90,180)
}else{
random(0,90)
}
}else if (p[1] < center[1]){
random(180,270)
}else{
random(270,360)
}


Duplicate the brush a bunch of times and preview.

Posted: May 8th, 2007, 8:53 am
by r.t-rone
I tried to follow this example, but when I put in the expression for the brush's rotation transform a dialouge box popped up that read "Bad method arguments: propertyGroup can't be used on this Property". What am I doing wrong? I just copied and pasted the expression from the webpage. I also made sure that I was using 6.5.

Thanks for your help.

Posted: May 8th, 2007, 9:07 am
by Dan Ebberts
You would get that result if you pasted the expression into the layer's rotation property rather than the brush's. Is that possibly what happened?

Dan

Posted: May 8th, 2007, 9:24 am
by r.t-rone
I'm a little confused. I am sort of new at using After Effects. Okay, after I draw the spline do I apply a stroke effect to it? I thought that that was what I was supposed to do, but I did not see brush position or rotation under this effect's options. I did end up applying these expressions to the layer properties.

I guess I am a little confused what effect I am supposed to apply to the spline to see these options.

Thanks for your help.

Posted: May 8th, 2007, 9:44 am
by Dan Ebberts
I cooked this up specifically for Paint effect strokes. I don't think it will work with stroked paths.

Dan

Re: Animate your paint strokes

Posted: May 15th, 2007, 9:53 am
by r.t-rone
[quote="malex"]draw a generally vertical stroke (start at the bottom and draw up) that extends about half the height of the comp. quote]

I know what I was doing wrong. I was using the pen tool to draw the stroke instead of the brush tool. That's why I did not see the brush options in the paint effect. I feel like such a jerk!