rand expression

   4968   2   2
User Avatar
Member
18 posts
Joined: Dec. 2014
Offline
Hi ,

I am very new to Houdini coming from Flash actionscript background and I would love to learn it.Please answer my question.
rand(seed) - if the expression is going to give a value of 0-1, then what is the use in writing the following expression
rand($F) , rand($F * 10) , rand($F * 100) , rand($PT / $F) …..its all going to give the same value.Please can anyone explain me. ops:

and can I see the value of any expression in the output panel in Houdini as that of trace statement in Flash.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
rand(seed)
change the seed, change the result.

All three of your examples evaluate to 0 at frame 1.

All of my examples that I've been doing for over 20 years add offsets to $F when using noise():

rand($F + 1.001)
rand($F + 10.001)
rand($F + 100.001)

To scale $F kinda doesn't make sense with rand() as it doesn't accelerate anything. Just different noise. Then again, if it works, who am I to stop you.

Surely with noise(value) which is spatially coherent (for the most part), multiplying the value will certainly change the frequency, but again not with rand.

As for visualizing noise when using time in the value, you can view the actual expression by opening up the channel editor on the parameter in question. Just Shift-MMB (MiddleMouseButton) on the keyed parameter with the expression to pop open the channel editor.

There are other ways to visualize your noise as well. For more challenging expressions that are per point based, you can resort to using CHOPs to record the channel over time, as I believe you are hinting at with the “trace” comment.

Hope this helps.
There's at least one school like the old school!
User Avatar
Member
18 posts
Joined: Dec. 2014
Offline
thx jeff , its very useful You have introduced noise , let me check that
  • Quick Links