| Link an object to a transition...
• | | | |
 | Link an object to a transition...
by Barry Brimley on Feb 14, 2010 at 5:21:32 am |
Hello.
I want to link up an object (in this case a solid) to the end of a transition. To elaborate a bit more, I've got one large solid (not the full size of the comp), so the transition completion doesn't match the comp exactly (say, 15% completion technically just STARTS the transition of the solid, if that makes any sense?).
At the moment I've just keyframed the solid to match the transition, however I thought I would come on here and ask if there's an expression to do this so the positioning would be exact, for the next time. I've had to re-position the solid every frame, as I'm working with a low frame rate, and two beginning and end keyframes just doesn't match the solid with the end of the transition at all. It starts off way ahead and near the middle is way behind and such.
Thanks. I'm horrible at expressions, so if this question seems silly then I apologize in advanced. :)
| | | | |
• | | | |  | Re: Link an object to a transition... by Dan Ebberts on Feb 14, 2010 at 8:28:34 pm |
Maybe this example will help. This should track the x location of a linear wipe of "Trans Layer":
L = thisComp.layer("Trans Layer");
pct = thisComp.layer("Trans Layer").effect("Linear Wipe")("Transition Completion");
x = L.transform.position[0] + L.width*( pct/100 - 1/2);
[x,value[1]]
| | | | |
• | | | |  | Re: Link an object to a transition... by Barry Brimley on Feb 14, 2010 at 10:17:48 pm |
Nice, thanks that definitely links the two.
Now, the problem I have is that the transition is a -90 angle, and the object I want linked and the transition are now going against each other. In other words, the transition is going left-to-right and the solid is going right-to-left. How would I fix this? I've tried messing around with the expression but I need to remind you I know literally nothing about them, haha. Thanks though, expression works wonders, now how do I reverse it to fit the animation?
| | | | |
• | | | |  | Re: Link an object to a transition... by Dan Ebberts on Feb 14, 2010 at 11:42:22 pm |
Like this, I think:
L = thisComp.layer("Trans Layer");
pct = thisComp.layer("Trans Layer").effect("Linear Wipe")("Transition Completion");
x = L.transform.position[0] + L.width*( 1/2 - pct/100);
[x,value[1]]
Dan
| | | | |
• | | | |  | Re: Link an object to a transition... by Lukasz Pason on Feb 25, 2010 at 7:12:30 pm |
This actually works for what I am doing as well but I have a question about placing this script on multiple layers.
If each layer has the linear effect on it, each is a square of 48x48 px, I want the row of squares to animated on based on the position of the null. So when the null reaches 49 on the x axis the transition begins for that next square. Make sense?
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz
| | | | |
• | | | |  | Re: Link an object to a transition... by Dan Ebberts on Feb 25, 2010 at 7:28:57 pm |
It sounds like you need something like this:
nullX = thisComp.layer("Null 1").transform.position[0];
startX = toWorld([0,0])[0];
endX = toWorld([width,0])[0];
linear(nullX,startX,endX,0,100)
Dan
| | | | |
• | | | |  | Re: Link an object to a transition... by Lukasz Pason on Feb 25, 2010 at 8:03:05 pm |
Am I still placing his on the "Transition Complete" property inside each square? Or am I linking the transition complete to this? Sorry being such a noob. I just can't wrap my brain around code.
And what if I want all the squares to animate at the same time?
Does it matter that I am using shape layers?
Motion Designer / DJ / Father
http://www.lukaszpason.com
http://www.krop.com/lukasz
| | | | |
• | | | |  | Re: Link an object to a transition... by Dan Ebberts on Feb 25, 2010 at 8:17:10 pm |
>Am I still placing his on the "Transition Complete" property inside each square?
Yes.
>And what if I want all the squares to animate at the same time?
Just apply the expression to the square that you want to define the timing and link the Transition Complete properties of the others to that one.
>Does it matter that I am using shape layers?
Yes. It won't work the way you expect for shape layers. If you create your shape in a precomp with a size that just fits the dimensions of the shape and then apply the effect and expression to the precomp layer in your main comp, it should work.
Dan
| | | | |
•
• | | | |  | Re: Link an object to a transition... by lee gibbons on Apr 25, 2011 at 9:16:09 pm |
Ok this is exactly what im looking for, I want a picutre I have to follow the transition of the linear wipe, But where do I put this expression? do I have to rename the picture layter to Trans layer ?
| | | | |
• | | | |  | Re: Link an object to a transition... by Lukasz Pason on Apr 25, 2011 at 9:30:28 pm |
| | | | |
• | | | |  | Re: Link an object to a transition... by lee gibbons on Apr 25, 2011 at 9:48:39 pm |
ahaha sorrry i opened it and i dont think im taht advanced yet I dont even know whats going on!
basically I am doing a pan through a wall to the other side using 2 different video footage I have filmed. and I am doing it very simply but it is working by having a linear wipe going across as the came goes into the wall, But Because its hand held I want the brick work in between the walls to track perfectly with the linear wipe :S does that make sense? I tried track motion but that does not seem to work.
thanks for the quick reply I believe I am going to post on here a lot haah
| | | | |
•
| |
|