Scaling an expression based curve in x

Hello,

I'm using a time function to create a random curve.
I know that time will animate every frame. I'm using
this with a local variable like with the fairy lesson in the
shake 3 book.

I'd like to change the frequency of the curve. I don't want the random curve to animate every frame. What
I want is the flicker to go on and off on random frames,
not necessarily on every frame and I want to be able to scale the curve in x to have control over the speed of the flicker.

I know I can use the pixel analyzer on an element like
a flame to do this. I know I can plot a few keyframes and
cycle and scale the curve but I am curious to see if I can manipulate the curve the way I've got it set up.

Thanks!

What
I want is the flicker to go on and off on random frames,
not necessarily on every frame.

You can do that with a couple of variables/expressions. Use one to set the flicker on/off (let's say a random rounded to 1 or 0) and another one to set the intensity of the flicker (i.e., another random, multiplied by the on/off controller)

If you need your expression baked into keyframes that you can later edit, do a resample of the curve, setting the frame range you want it to be sampled. You can also set it to bake a keyframe every 2 frames setting the timerange to 1-100x2.

Hope that helps.

Ivan,

Thanks for this. I will try.

Catherine

Ivan,

The resample worked great then I used a scale in X to change it around. I'm surprised I never discovered resample before as I use the other curve processing tools a lot.

Thanks again!

Catherine

Try using a noise or turbulence function (documented). rnd() will return psuedo-random numbers, but noise and turbulence can be "scaled".

Something like :

foo = Brightness(0, noise(time/freq)*ampl, float freq = 0.2, float ampl = 1);

Open the local parameters, futz with them while viewing the curve for "value" in the curve editor

Sam,

Thanks for explaining this. I'll try it!

Catherine