PDA

View Full Version : Pausing on Noise expression


CLT
09-20-2003, 04:04 PM
Hi,

I`m using noise in an expression to waver an object.. quite slowly and I want to make it pause at the "reach" of each peak in the noise ... can this be done inside the expression... ?

Cheers

gmask
09-27-2003, 11:31 AM
You might beable to do this with the clamp function.

Clampo takes three inputs. A low number and a high number and lastly the data stream. If the stream goes above or below the previosu numbers it is held at the number.

So if you want to clamp anything above .5 you high number is point .5

CLT
09-27-2003, 08:28 PM
Hi,

Yea I did try this but its not quite right for what I need...
What seems to happen (as I recall) is the noise value has to be high , and the clamp below it to take effect and so its not pausing on the peak of each "throw" of the noise...

Thanks anyway

Cheers

gmask
09-27-2003, 08:53 PM
It sounds like another way you would want to approach this is with some conditional expressions.

If the noise reaches a high point then hold for 5 frames then resume calculating noise.


Which "noise" function are you using?

The main issue is that if you want to hold on peaks and every peak is different then you have to know when the peak is over.. so you have to calculate the next point in the noise curve to know that it would have gone down in order to have a peak to hold on if that makes sense.

Depending on what you really need it almost sounds like baking the noise and then manuaully edittingth eresulting curve would be much simplier.


I don't know if this is really correct but in audio terms it sounds like a "sample and hold" filter.


So possibly using th econditional you would store two values.. when comparing the second to the last value storted if the second is lower then you now that the previous was a peak and you hold it for a certain number of iterations before resuming with the lower second value.

pseudo code

valueA=noise
valueB=noise

if B < A then hold A for 5 frames otherwise use B

CLT
09-29-2003, 08:10 PM
Hi,

Yes , ... I do want to use an expression as I want it to be part of a procedural approach... the idea of conditional does sound interesting and worth
investigating ..I`ll try and set something up..
and see how it performs...Thanx for the
inspiration..
Cheers.. ;O)

CGTalk Moderation
01-16-2006, 04:09 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.