ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

stop expression and continue manually

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Susan Lanstop expression and continue manually
by on Aug 19, 2015 at 3:56:53 pm

I have a ligth linked to the camera move, and in some part, I want to stop the ligth following the posiution of the camera, and I want to move the ligth manually, with keyframes.

I create a Null and put a "checbox control" and when it is ON the expression is on, and when the checbox is off the expression of the ligth linked to the camera, stops.

I use this code for stop the expression (that the ligth is linked to the camera), but I don't know how to add it in the second expression of the code (or anywhere) that when the expression stops, I want to continue moving the position manually, and I don't want to write a second expression to ejecute when the first expression stops

<b></b>control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1)
{
thisComp.layer("Camera 1").transform.position;
}
else
{
[here how to tell I want move manuaklly without expression?];
}


Return to posts index

Walter SoykaRe: stop expression and continue manually
by on Aug 19, 2015 at 4:01:04 pm

I would approach this problem differently.

I'd make the camera the parent of the light. Now, any animation you do will be relative to the camera.

If you need to break that relationship, split the layer at the point where you want the light to be completely independent and remove the parenting on the new layer only.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Susan LanRe: stop expression and continue manually
by on Aug 19, 2015 at 4:11:16 pm

I can't linked the camera to the ligth, I only can linked the ligt (I mean, the null that is linked to the ligth) to the camera, because I have already donde the animatiom move of the position and rotation of the camera, and there are more elements effected but the animation of the camera, I simply can not deleted the camere movement...

I linked the null of the ligth to the camera position and rotation because "among" the this that are animated, I want to create the sensation that the camera is pursuing the movement of the ligth

First the camera is pursuing the ligth (which does the same movement but with offset) and in one point the camesa stops, and the ligth goes (manually with keyframes) to the inside of a flower, while the camera still stopped look at it

Can you have any other idea please...?


Return to posts index



Walter SoykaRe: stop expression and continue manually
by on Aug 19, 2015 at 4:31:25 pm

Got it.

We need to do two things:
1) Stop looking at the changing values at a specific time
2) Allow additional keyframe animation

offset = -.5;
p = thisComp.layer("My Animated Layer");
t = Math.min(time + offset,10); // stop following after 10 seconds
value + p.rotation.valueAtTime(t);


Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Susan LanRe: stop expression and continue manually
by on Aug 22, 2015 at 3:37:00 pm

Thanks,
"Math.min" means = "stop at this time"?


Return to posts index

Walter SoykaRe: stop expression and continue manually
by on Aug 24, 2015 at 12:46:48 pm

[Susan Lan] ""Math.min" means = "stop at this time"?"

No, Math.min takes multiple arguments (inputs) and returns (outputs) the smallest of them.

This code:
t = Math.min(time + offset,10); // stop following after 10 seconds
... says "Let t equal time-plus-offset, or let t equal 10, whichever is smaller.

So why does this stop at a given time? The next line of the expression:
value + p.rotation.valueAtTime(t);
... says, "Return the current value plus whatever the value of p.rotation was at time t. Since we've established a ceiling value for t (it can never be bigger than the constant 10 in the code above), we'll never look beyond the value at time 10 in this expression.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index


Susan LanRe: stop expression and continue manually
by on Aug 26, 2015 at 9:22:44 am

Thanks Walter! For all!


Return to posts index

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