| Start or stop expression at a given frame
• | | | |
 | Start or stop expression at a given frame
by Muhneer on Mar 1, 2006 at 12:19:10 pm |
Hi,
I searched the forum but wasn't able to find.
This is something im strugglin with for a while.
Im getting into expression but what bothers me is that i am
not yet able to start or stop an expression at a given moment.
I.E. If i want to wiggle(3, 10) until frame 100, is there a way to set this up ?
Thanks in advance.
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by yikesmikes on Mar 1, 2006 at 3:55:28 pm |
I'm sure there is a way to stop the wiggle at the frame number 100, or time elapsed, Dan an others would know. But you can also add a Slider (Effect > Expression Controls > Slider Control) to a new Null layer, then highlight either the Amplitude or Frequency,
in your wiggle expression and pickwhip that to the slider, you get an expression like this:
wiggle (5,thisComp.layer("Null 1").effect("Slider Control")("Slider"))
I started out with:
wiggle (5, 50)
and pickwhipped the 50 (Amplitude I think). Anyway either will work and when you set a keyframe of "0" on the slider at 100 frames.
it stops that wiggle dead in its tracks, and more keyframes down the line will restart that wiggle. Oh, you need to set a keyframe >0 before 100 frames so it will wiggle before.
Anyway it works and is very controllable, an changeable.
God luck.
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by yikesmikes on Mar 1, 2006 at 3:56:50 pm |
I meant GOOD Luck.
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by Muhneer on Mar 1, 2006 at 4:51:55 pm |
Thanks for the fast reply,
But isnt there something i am missing, i mean there must be some
kind of stop(); for an expression. What if i rotate something with steps
of 10 each time. And i want to let it wiggle its position at frame 40. Then it will never stop rotating and it will rotate and wiggle instead of only wiggling and not rotating.
Am i thinking in the wrong way ? do such things have to been done with sliders ?
Thanks!
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by julian06 on Mar 1, 2006 at 5:08:29 pm |
Hi
Example for Pal 100frames=4secs
if (time < 4 ) wiggle (3,10)
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by julian06 on Mar 1, 2006 at 5:10:38 pm |
Sorry
if (time < 4 ) wiggle (3,10) else value
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by Mylenium on Mar 1, 2006 at 5:28:02 pm |
[Muhneer] "Thanks for the fast reply,
But isnt there something i am missing, i mean there must be some
kind of stop(); for an expression. What if i rotate something with steps
of 10 each time. And i want to let it wiggle its position at frame 40. Then it will never stop rotating and it will rotate and wiggle instead of only wiggling and not rotating.
Am i thinking in the wrong way ? do such things have to been done with sliders ?
Thanks!"
Your logic isn't quite correct. All expressions will respect animation values if you tell them to. Unlike julian06 suggested you don't even need to fiddle with conditional statements. All you need to do is add your wiggle to your existing rotation and then keyframe the slider value.
Ex:
wig_amp=effect("Wiggler")("Slider");
wig_freq=effect("Wiggly")("Slider");
[rotation+ wiggle(wig_freq,wig_amp)]
There can be no stop() procedure in an expression because it kinda defeats the purpose - the expression would stop to evaluate as a whole and ultimately be do nothing. Think of it like a car - you can't move it if the motor is out, but you can put it on idle if you wan't it to function but not actually move.
Mylenium
[Pour Myl
| | | | |
• | | | |  | Re: Start or stop expression at a given frame by Muhneer on Mar 1, 2006 at 5:56:25 pm |
Thanks for the replies.
Im starting to get a hang on it.
Sliders is the way to go to adjust expressions over time.
thanks
| | | | |
| |
|