first of all, I am a total noob when it comes to expressions and coding all together but from what I can reed is that I need it to get this to work. And as with many things my ambition is way ahead of my current skills.
Here is the thing, I have made a motion timelapse of windmills which is shot over 12 hours. Now the whole film pans from left to right (sunset to sunrise) going from one windmill to the other, 6 in all. I want to animate a text with some technical readout, like windspeed, the windmills output in watts and some technical mombo jombo like Hz and Volt. All to make it more technical in its expression. The txt is then motion tracked to each windmill so it will follow it throughout the pan and also I have transformed it in 3D so it kinda is aligned to each windmill based on its position in the frame.
right now i have txt like:
data: 40Hz 660v
But i want the numbers to toggle quite fast, like have windspeed info to toggle between 08 and 13 m/s, so it looks like a constant live readout from some datarecording, and have the Kw readout to do the same and so on... so everything is constantly toggeling within a given value. I have tried different methods but no luck... if i highlight like say 08 in "wind" and ask for random(minValOrArray,maxValOrArray) and put in 08, 13, I then can se the value change in my inspector but the highlighted field in my viewer is now empty.
can anybody give my a recipe for how to easally make this possible..
keep in min that I am new to this so please keep the technical gibberish as simple as possible
the freq1 value defines how quickly the number changes. You might want to make this larger
the amp1 value defines by how MUCH it changes. This is the main number to tweak.
the baseNum slider defines the middle value. So if you wanted the max jump to be at 500, and the min to be 300, you'd set the baseNum to 400 (the middle) and the amp to 100.
the Math.floor part simply removes all decimals from the final result (so you have whole numbers)
The actual randomization is achieved using the wiggler, which interpolates between random values instead of just jumping to a completely random value every frame.
You may need to use multiple text layers (parented to a master layer) in order to get your text to do what you need it to.
Yes i noticed that it hit the wrong forum tread but could not find a way to move or delete it..
But back to you reply, i was in the process of playing with the slider but had not found a way to fill in the parameters.. Your recipe worked nicely, now I just have a question on how to implement it.
Is it best to have the slider in i Null layer and then just link to it?
The other thing is can i make multiple expression within the same source text? what i mean is, do I have to break it all up, txt and readout nr. in separate text boxes or is it possible to just highlight what i want to animate and then program just that section of the text.
These are all good questions (using external source text, setting up leading zeros, etc). I can't help you there, however (my expressions skills are pretty basic). I suggest you take what you know at this point and bring it to the expressions forum in a new post.
As for the null, by the way: when I have a lot of expressions, I like to set up a "CONTROLLER" null that has all the expression sliders that I need, so I can tweak them all at once. But this is really a matter of taste more than anything. Good luck!