Animate your paint strokes

Moderators: Disciple, zlovatt

Post Reply
malex
Posts: 20
Joined: May 21st, 2004, 3:03 pm

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.
r.t-rone
Posts: 4
Joined: April 17th, 2007, 8:18 am
Location: Tuscaloosa, AL

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.
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

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
r.t-rone
Posts: 4
Joined: April 17th, 2007, 8:18 am
Location: Tuscaloosa, AL

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.
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

I cooked this up specifically for Paint effect strokes. I don't think it will work with stroked paths.

Dan
r.t-rone
Posts: 4
Joined: April 17th, 2007, 8:18 am
Location: Tuscaloosa, AL

[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!
Post Reply