Forum Replies Created
-
Well, I see that you indicate in your post that you’re not looking for an expression, but expressions would really help you here. Put those in and play around with the numbers in the parentheses. Using the posterizeTime() expression keeps you from having to use the Posterize Time effect which can mess with other effects.
Layer A timeremap could be
posterizeTime(6);
value
Layer B timeremap could be
posterizeTime(5);
value
Layer C timeremap could be
posterizeTime(4);
value
-
Trent Armstrong
December 3, 2020 at 2:01 pm in reply to: Time Remapped preComp using parentComp timeUntil we solve the expression problem, would you be able to actually make your precomp the same length as the parent comp? That way the timing would work out between them.
-
Long,
I’m sure this is not what you want to hear, but I think you would need to use some other kind of program to get this kind of result. As Dan Ebberts says: After Effects can only calculate expressions on a per frame basis. So trying to write code for the expression to figure out where something was and will be later are pretty tough. It’s maybe possible to do some keyframing of expected motion and use DuIK tools Effector to have the motion kind of “simulate”.
Or maybe you could use something like Character Animator and then render that to a movie for AE.
-
Hi!
What you’re looking for is the sourceRectAtTime() expression. You have the ability to check the width and height of a layer—including text layers.
// Apply this expression to the position of the triangle layer
txt = thisComp.layer(“THE TEXT”); // this is your text layer
p = txt.transform.position;
w = txt.sourceRectAtTime(0).width;
h = txt.sourceRectAtTime(0).height * .5;
padding = 25;
p + [w, -h] + [padding, 0]
-
I am not terribly confident in the angles math for this, but I put something together that at least looks like maybe it’s the right effect.
-
I have certainly experienced this kind of thing in the past. Sometimes it even seems that there is a hierarchy situation for rendering. I’m not exactly sure what the magic formula is for where the expressions live. There may actually be a before/after setting in some of the expressions (i.e. true/false). But I have not done much research into that. Let’s hope it gets moved to the top of the pile so we can get a solution.
-
It’s a little bit of a hack, and it would take a while to do; but you could convert all expressions to keyframes if you are in a pinch.
-
Okay! Cool! Use the ~ to get to the Desktop of any user on Mac.
myPath = “~/Desktop/Project/Expression.js”;
$.evalFile (myPath);
-
I left some spots where you can put your code. Just get rid of the “//” and all the code thereafter for those lines. Also, go check out https://www.w3schools.com/js/default.asp where you can find a lot of wonderful ways to use Javascript for Expressions magic.
txt = text.sourceText;
temp = txt.search(“:”);
if (temp > 0) {
//[code for : exists]
} else {
//[code for : doesn’t exist]
}
-
Dan Ebberts has some thoughts on this where you use a text layer inside the AE project to house the expression.
txt = thisComp.layer(“Text”).text.sourceText.value;
eval(txt)You can then send over AE projects with expressions in text layers to anyone Mac or Windows that they import into their project and then set up the correct reference.