PDA

View Full Version : seed and random


Nicool
03-22-2003, 11:31 PM
Hye,
How do you use the function SEED with a RAND fuction?

Thanks

runna
03-23-2003, 11:05 AM
When you call a random function, it returns a random number from a set of random numbers. If you have a random call in an animation eg in an expression, every time you play back the animation those random numbers will be different. If you set the seed, using seed(x), where x is some number at the start of the animation, although the numbers chosen throughout the animation will be random, when you play back the animation those numbers will be the same each time.

You can set this for the animation using an expression such as,

if(frame==1) seed(7);

then any value using rand (or sphrand and gauss) will be randomly chosen, but consistent each playback.

Hope this helps.
:thumbsup:
Andrew

Nicool
03-26-2003, 10:43 AM
Thanks:)
It was just to know if a coded function was needed on a project on i'm working

onionringofdoom
06-20-2005, 01:46 AM
dammit, I posted in the wrong thread..

CGTalk Moderation
06-20-2005, 01:47 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.