# Scaling an expression based curve in x

**URL:** https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171
**Category:** Compositing
**Tags:** shake
**Created:** [May 30, 2005, 10:29pm UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171 "2005-05-30T22:29:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 30, 2005, 10:29pm UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/1 "2005-05-30T22:29:50Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 30, 2005, 11:37pm UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/2 "2005-05-30T23:37:40Z")

</div>

> > 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.

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 31, 2005, 5:48am UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/3 "2005-05-31T05:48:10Z")

</div>

Ivan,

Thanks for this. I will try.

Catherine

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [June 2, 2005, 11:40pm UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/4 "2005-06-02T23:40:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pahan](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/p/5f8ce5/32.png) [@pahan](https://forum.highend3d.com/u/pahan)
#### Post date: [June 9, 2005, 6:25pm UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/5 "2005-06-09T18:25:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [June 11, 2005, 5:12am UTC](https://forum.highend3d.com/t/scaling-an-expression-based-curve-in-x/10171/6 "2005-06-11T05:12:49Z")

</div>

Sam,

Thanks for explaining this. I'll try it!

Catherine
