FORUMS: list search recent posts

write on from one null position to another

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason Jantzen
write on from one null position to another
on Feb 1, 2013 at 10:02:09 am

So Here's my problem. I animated the write on effect from one point in my comp to another (there are a lot actually) to sort of fake the Plexus look, since I'm too broke to buy it. I add a zoom in there and of course the write on coordinates don't move with the zoom. I was wondering if it's possible to say animate the write on effect based on layer markers. I currently have nulls placed all over for the position points each with a unique name and a null labeled center. I was thinking if I just placed a marker on the layer where I want the write on effect to take place, call it "center" and then another 20 frames down called "circle1", that maybe there's an expression to tell the write on effect to animate from the center null position to circle1 position. The toComp(value); expression really screws things up including seemingly never being able to render a single frame (just sits there thinking about it). A camera didn't work either. The only way to pull off a zoom with the write on effect would be to connect each position point with an expression triggered by markers.

Any ideas at this point would save my life (and wallet - $200 for plexus).

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Kevin Camp
Re: write on from one null position to another
on Feb 1, 2013 at 6:12:37 pm

i don't think you'll be able to do this with write on....

as the write on effect writes-on the point it draws will be relative to the time that it was drawn-on. example: the point the it starts writing-on at is fixed at the frame that it starts writing on at. as the camera moves (say 1 second into the move), you'd want that start point to be relative to the start position at 1 second, but it won't be. it will be at the point where it was first drawn...

if you want to test it, here's an expression that will use marker comments to drive the position of a layer to move between the anchor points of the layers named in the comments:
n = 0;
k = marker.numKeys;
if (k > n){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n--;
}
}
if (n==0){
value;
}else{
p1 = thisComp.layer(marker.key(n).comment).position;
p2 = thisComp.layer(marker.key(Math.min(n+1,k)).comment).position;
t1 = marker.key(n).time;
t2 = marker.key(Math.min(n+1,k)).time;
linear(time,t1,t2,p1,p2);
}

you can then use a this for the brush position for write on:
L = thisComp.layer('trackNull'); // make this the layer that has the above expression
fromComp(L.toComp(L.anchorPoint)

i've done something plex like before using multiple beam effects linking points together, however the design wasn't too complex (about a dozen points) and it didn't write-on.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Jason Jantzen
Re: write on from one null position to another
on Feb 1, 2013 at 6:56:10 pm

The second expression didn't work. I changed the name to the name of the layer that contains the first expression and made sure everything's written correctly, but still no go. Thanks for your input Kevin. I appreciate your helping out on this.

Jason Jantzen
vimeo.com/jasonj


Return to posts index


Kevin Camp
Re: write on from one null position to another
on Feb 1, 2013 at 7:04:00 pm

ooops, it's missing one last )...

L = thisComp.layer('trackNull'); // make this the layer that has the above expression
fromComp(L.toComp(L.anchorPoint))


Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Jason Jantzen
Re: write on from one null position to another
on Feb 1, 2013 at 7:26:47 pm

well I get no errors, but there is no drawing going on. I soloed the layer doing the drawing (takes like 10 seconds to render a frame) and checked before and after the marker (marker does trigger the move), but no drawing going on. The brush postion sits at the center of the comp. Any thoughts?

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Kevin Camp
Re: write on from one null position to another
on Feb 1, 2013 at 7:44:51 pm

the problem may be that i didn't specify that the layer markers would need to be on the tracking layer...

so if you have you markers on the write on layer, then we can direct the first expression to use those markers.

try this expression on the tracking layer (note the tracking layer should be 3d, and with this expression, it should be moving between the anchor points specified by the comments):

markerLayer = thisComp.layer("writeon"); // change the name to your layer with the write on effect
n = 0;
k = markerLayer.marker.numKeys;
if (k > n){
n = markerLayer.marker.nearestKey(time).index;
if (markerLayer.marker.key(n).time > time){
n--;
}
}

if (n==0){
value;
}else{
p1 = thisComp.layer(marker.key(n).comment).position;
p2 = thisComp.layer(marker.key(Math.min(n+1,k)).comment).position;
t1 = markerLayer.marker.key(n).time;
t2 = markerLayer.marker.key(Math.min(n+1,k)).time;
linear(time,t1,t2,p1,p2);
}


Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Jason Jantzen
Re: write on from one null position to another
on Feb 1, 2013 at 8:09:34 pm

I may have got this all confused, but what does seem to be working is using the first expression your wrote on the write on layer with the markers. I couldn't get that last expression to work on the tracking layers like you suggested, but the write layer does work with the first expression. The only beef now is my early 2010 MBP is choking BIG time on these layers and expressions, but it's working! I'll see if I can't get this to all connect up and then add my zoom. Thanks Kevin, I'll let you know how it goes (and if the client likes it, I'll post the finished results later on).

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Jason Jantzen
Re: write on from one null position to another
on Feb 1, 2013 at 9:04:41 pm

so as you said to begin with, this probably wouldn't work with write on because of the whole coordinate thing...well, you're right, and I figured a way around it, but my computer cannot handle the processing to interpret all that expression data, which doesn't seem like much, but moving the nulls around that connect to the write on effect makes everything REALLY slow to preview. my work around is basically just animating the null position where the write on lines connects to, which is really cool and plexus like, but I imagine plexus handling this 10 times faster or better.

Thanks again for your help Kevin. Glad we were able to affirmatively clear up any possibility of write-on ever being useful for camera moves. It was fun while it lasted ;)

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Kevin Camp
Re: write on from one null position to another
on Feb 1, 2013 at 9:07:36 pm

i may have done a really poor job of explaining what i gave you... so if it doesn't work/render the way you expect, you might try to follow this...

since i couldn't wrap my head around how to project a 3d point to travel between two 3d points and use layer space transforms to project it to a 2d plane... i did know i could move a 3d layer linearly between other 3d points, the use layer space transforms to project it's position to a 2d point on a 2d plane.

so what i did was to create a 3d null (named it 'trackNull') and use the larger expression to move it from point to point based on the marker comments.

then i used the shorter expression on the write on brush to simply track the trackNull's position from 3d comp space to 2d layer space.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Jason Jantzen
Re: write on from one null position to another
on Feb 2, 2013 at 12:53:01 am

i understand what you're saying about translating the 3d null data over to the 2d plane. It makes sense in theory, but it wasn't working when I hooked everything up. I did put the big expression on the 3d null and watched it move around fine. But the smaller expression on the 2d layer with the write-on effect didn't write on at all. No errors or anything, just no writing.

But remember how I tried putting the big expression (the second one you wrote) direclty on the layer doing the writing with the markers on the same layer? That worked, but of course write-on stil keeps to its cooridnates no matter what you do. So tired trapcode particular and set the emitter so that it creates a stroke effect, basically just leaving a particle trail for however long you set it to. It works with the camera and basically does exactly what I was hoping your expression would do. The ONLY thing I'm having trouble with now, is the emitter originates from the center of the comp even when the first marker is a null away from the center. It doesn't draw a solid line, just really spaced out particles then begins a solid line where the first marker is set. Do this make any sense at all?

Jason Jantzen
vimeo.com/jasonj


Return to posts index

Dan Ebberts
Re: write on from one null position to another
on Feb 3, 2013 at 7:30:28 pm

I don't know if you're still wrestling with this, but assuming your 2D write-on layer has markers with the names of the other layers as comments, this should work:


if (marker.numKeys > 0){
m = marker.nearestKey(time);
n = m.index;
if (m.time > time) n--;
if (n >= marker.numKeys){
L = thisComp.layer(marker.key(marker.numKeys).comment);
fromComp(L.toComp(L.anchorPoint));
}else if (n >= 1){
L = thisComp.layer(marker.key(n).comment);
p1 = fromComp(L.toComp(L.anchorPoint));
L = thisComp.layer(marker.key(n+1).comment);
p2 = fromComp(L.toComp(L.anchorPoint));
t1 = marker.key(n).time;
t2 = marker.key(n+1).time;
linear(time,t1,t2,p1,p2)
}else{
L = thisComp.layer(marker.key(1).comment);
fromComp(L.toComp(L.anchorPoint));
}
}else{
value
}


Dan



Return to posts index

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